﻿/* PROBACHI PREMIUM PRODUCT DESIGN SYSTEM */

:root {
    /* Premium Colors */
    --premium-bg: #050507;
    --premium-card-bg: rgba(20, 20, 25, 0.6);
    --premium-border: rgba(255, 255, 255, 0.08);
    --premium-gold: #FFD700;
    --premium-gold-glow: rgba(255, 215, 0, 0.4);
    --premium-accent: #2c67f2;

    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #FDB931 50%, #FFD700 100%);
    --gradient-dark: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);

    /* Effects */
    --glass-blur: blur(20px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --shadow-glow: 0 0 40px var(--premium-gold-glow);
}

/* =========================================================
   NAVBAR PARITY (Producto vs Index)
   - Fix: en algunas combinaciones de CSS el logo se renderiza
     con su tamaño natural (1024px) y rompe la barra.
   ========================================================= */
.navbar .nav-logo {
    height: 60px !important; /* mismo alto que `styles.css` */
}

.navbar .nav-logo .logo-img {
    height: 100% !important;
    width: auto !important;
    max-height: 60px !important;
    object-fit: contain;
}

.product-main {
    padding-top: 100px;
    min-height: 100vh;
    background: var(--premium-bg);
    color: #fff;
    position: relative;
    overflow-x: hidden;
}

/* Ambient Lighting Background */
.ambient-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
    animation: pulseLight 8s infinite alternate;
}

.light-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(44, 103, 242, 0.2) 0%, transparent 70%);
}

.light-2 {
    bottom: 10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, transparent 70%);
    animation-delay: 2s;
}

@keyframes pulseLight {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    100% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

.breadcrumb {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 3rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Inter', sans-serif;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--premium-gold);
    text-shadow: 0 0 8px var(--premium-gold-glow);
}

/* Product Container Layout */
.product-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 3rem 4rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Gallery Section */
.product-gallery {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column-reverse;
    /* Thumbnails bottom or handle grid differently */
    gap: 1.5rem;
}

.main-image {
    background: var(--premium-card-bg);
    border-radius: 24px;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border: var(--glass-border);
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.main-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.main-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.5));
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.main-image:hover img {
    transform: scale(1.05);
}

.thumbnail-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
}

.thumbnail {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 0.5rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--premium-gold);
    background: rgba(255, 215, 0, 0.05);
    transform: translateY(-2px);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Product Details - Right Column */
.product-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(160deg, rgba(20, 20, 30, 0.6) 0%, rgba(10, 10, 15, 0.4) 100%);
    border: var(--glass-border);
    border-radius: 24px;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    /* Entry Animation */
    animation: fadeUp 0.8s ease-out forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-brand-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--premium-gold);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: fit-content;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}

.product-title {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    /* Massive title */
    font-weight: 800;
    line-height: 1.1;
    margin: 0.5rem 0;
    background: linear-gradient(to right, #fff 20%, #ccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

/* Stars & Rating */
.product-rating-section {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.stars {
    color: var(--premium-gold);
    font-size: 1.1rem;
    filter: drop-shadow(0 0 5px var(--premium-gold-glow));
}

.rating-text {
    font-weight: 600;
    color: #fff;
}

.reviews-count {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* Price */
.product-price-section {
    display: flex;
    align-items: baseline;
    gap: 1.2rem;
    margin: 1rem 0;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.old-price {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: line-through;
}

.current-price {
    font-family: 'Outfit', sans-serif;
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--premium-gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.discount-badge {
    padding: 0.4rem 0.8rem;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Description */
.product-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    font-size: 1.05rem;
    font-weight: 300;
}

/* Specs Grid */
.product-specs {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.spec-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spec-value {
    font-weight: 600;
    color: #fff;
    font-size: 1.1rem;
}

/* Actions Section */
.quantity-section {
    margin-top: 1rem;
}

.quantity-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.3rem;
    display: inline-flex;
}

.qty-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.quantity-control input {
    background: transparent;
    border: none;
    color: #fff;
    width: 50px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.product-actions {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.btn-add-to-cart-large {
    background: var(--gradient-gold);
    color: #000;
    border: none;
    padding: 1.2rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.15);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-add-to-cart-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.3), 0 0 20px rgba(255, 215, 0, 0.5);
}

.btn-buy-now {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-buy-now:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #fff;
    transform: translateY(-2px);
}

/* Benefits */
.product-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.benefit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.benefit span {
    color: var(--premium-gold);
    font-size: 1rem;
}

/* 360 Viewer Overrides */
.btn-toggle-360 {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    padding: 10px 24px;
    border-radius: 100px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.btn-toggle-360:hover {
    transform: translateX(-50%) translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-gallery {
        position: static;
        max-width: 600px;
        margin: 0 auto;
    }

    .product-title {
        font-size: 2.5rem;
    }

    .current-price {
        font-size: 2.5rem;
    }
}

@media (max-width: 640px) {
    .product-container {
        padding: 1rem;
    }

    .product-actions {
        grid-template-columns: 1fr;
    }
}

/* Staggered Animation for Details */
.product-details>* {
    opacity: 0;
    animation: fadeUpShort 0.6s ease-out forwards;
}

.product-details>*:nth-child(1) {
    animation-delay: 0.1s;
}

.product-details>*:nth-child(2) {
    animation-delay: 0.15s;
}

/* Brand */
.product-details>*:nth-child(3) {
    animation-delay: 0.2s;
}

/* Title */
.product-details>*:nth-child(4) {
    animation-delay: 0.25s;
}

/* Rating */
.product-details>*:nth-child(5) {
    animation-delay: 0.3s;
}

/* Price */
.product-details>*:nth-child(6) {
    animation-delay: 0.35s;
}

/* Desc */
.product-details>*:nth-child(7) {
    animation-delay: 0.4s;
}

/* Specs */
.product-details>*:nth-child(8) {
    animation-delay: 0.45s;
}

/* Actions */
.product-details>*:nth-child(9) {
    animation-delay: 0.5s;
}

.product-details>*:nth-child(10) {
    animation-delay: 0.55s;
}

@keyframes fadeUpShort {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skeleton Loading State Utilities */
.skeleton-loading .product-details>*,
.skeleton-loading .main-image,
.skeleton-loading .thumbnail {
    opacity: 1 !important;
    /* Override fadeUp for skeleton state */
    animation: none !important;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.03) 25%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite !important;
    color: transparent !important;
    pointer-events: none;
    border-color: transparent !important;
}

.skeleton-loading img {
    opacity: 0;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}