/* ==========================================================================
   PRODUCT DETAIL PAGE - ULTRA PREMIUM GLASSMORPHIC
   ========================================================================== */

.product-detail-page {
    background-color: #222222;
    color: #fff;
    min-height: 100vh;
    padding-top: 100px;
    /* Space for fixed header */
    padding-bottom: 120px;
    /* Space for sticky bottom bar */
    font-family: 'Tenor Sans', sans-serif;
}

.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Shared Card Styles (Synced with Shop High-Density) --- */
.product-card {
    position: relative;
    background: rgba(34, 34, 34, 0.45);
    border: 1px solid #616161;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    background: rgba(45, 45, 45, 0.6);
}

.product-card-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
}

.product-thumb {
    position: relative;
    aspect-ratio: 3/2;
    overflow: hidden;
    border-radius: 20px;
    margin: 0.75rem 0.75rem 0 0.75rem;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-discount {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    background: #e11d48;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.45rem 0.9rem;
    letter-spacing: 0.06em;
    border-radius: 0 8px 0 8px;
}

.product-info {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-family: 'Archivo', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    line-height: 1.2;
    color: #f1f1f1;
}

.product-description {
    font-family: 'Tenor Sans', sans-serif;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.3em;
}

/* --- Star Rating --- */
.product-rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.product-stars {
    display: flex;
    align-items: center;
    gap: 3px;
}

.product-stars i {
    color: #facc15;
    font-size: 0.85rem;
}

.product-stars .bi-star {
    color: rgba(255, 255, 255, 0.15);
}

.rating-value {
    font-family: 'Archivo', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    margin-left: 8px;
}

.review-count {
    font-family: 'Archivo', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.product-price-stock-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 0.4rem;
    flex-wrap: nowrap;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-shrink: 1;
}

.price-current {
    font-size: 1.2rem;
    font-weight: 800;
    font-family: 'Archivo', sans-serif;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.price-original {
    font-size: 0.85rem;
    color: #ef4444;
    text-decoration: line-through;
    font-weight: 600;
    opacity: 0.6;
}

/* --- Stock Indicator --- */
.stock-indicator {
    font-family: 'Archivo', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.stock-indicator.is-low {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.2);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.product-actions {
    position: relative;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #616161;
}

.add-to-cart-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
}

.add-to-cart-btn:hover {
    background: #fff;
    color: #000;
}

.buy-now-btn {
    background: #3b82f6;
    color: #fff;
    padding: 10px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buy-now-btn:hover {
    background: #2563eb;
    color: #fff;
}

/* --- Hero Section --- */
.product-hero {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 6rem;
}

.product-gallery {
    position: sticky;
    top: 140px;
}

.gallery-main-wrapper {
    position: relative;
    border-radius: 40px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
}

.gallery-main {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-main::-webkit-scrollbar {
    display: none;
}

.gallery-slide {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    /* Force stop at each image */
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-nav-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 1.5rem;
}

.nav-arrow {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-arrow:hover {
    background: #fff;
    color: #000;
}

.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .nav-arrow {
        display: none;
        /* Hide arrows on mobile */
    }

    .gallery-nav-container {
        gap: 0;
    }
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #fff;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.discount-badge-large {
    position: absolute;
    top: 0;
    right: 0;
    background: #e11d48;
    color: #fff;
    padding: 0.6rem 1.2rem;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    border-radius: 0 15px 0 15px;
    z-index: 5;
}

/* --- Info Section --- */
.product-main-info {
    padding-top: 2rem;
}

.product-cat-kicker {
    font-family: 'Archivo', sans-serif;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.product-main-title {
    font-family: 'Archivo', sans-serif;
    font-size: 3.5rem;
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.product-price-block {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.price-now {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Archivo', sans-serif;
}

.price-was {
    font-size: 1.5rem;
    color: #ff4d4d;
    text-decoration: line-through;
    opacity: 0.8;
}

.product-specs {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 3rem;
}

.specs-title {
    font-family: 'Archivo', sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
}

.product-full-desc {
    font-size: 1.15rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
}

/* --- Reviews Section --- */
.product-reviews-section {
    padding-top: 6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8rem;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
}

.reviews-summary h2 {
    font-family: ARCHIVO, sans-serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.avg-rating-box {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avg-val {
    font-size: 2rem;
    font-weight: 700;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.review-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 25px;
    padding: 2.5rem;
    transition: all 0.3s ease;
}

.review-card:hover {
    background: rgba(255, 255, 255, 0.04);
}

.review-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.reviewer-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.review-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.3);
}

.review-text {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
}

.read-more-reviews {
    margin-top: 4rem;
    text-align: center;
}

.btn-luxury-text {
    background: none;
    border: none;
    color: #3b82f6;
    font-family: 'Archivo', sans-serif;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-luxury-text:hover {
    color: #fff;
    gap: 15px;
}

/* --- Related Products --- */
.related-products-section {
    margin-bottom: 6rem;
}

.section-title {
    font-family: 'Archivo', sans-serif;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* --- Sticky Bottom Bar --- */
.product-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.2rem 0;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 0;
}

.product-sticky-bar.is-visible {
    transform: translateY(0);
}

.sticky-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sticky-info {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.sticky-thumb {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
}

.sticky-title {
    font-family: 'Archivo', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
}

.sticky-actions {
    display: flex;
    gap: 1rem;
}

.btn-sticky {
    padding: 1.1rem 2.5rem;
    border-radius: 50px;
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-sticky.add {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-sticky.buy {
    background: #3b82f6;
    border: none;
    color: #fff;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-sticky:hover {
    transform: translateY(-5px);
}

/* --- Mobile Fixes --- */
@media (max-width: 991px) {
    .product-hero {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .product-gallery {
        position: relative;
        top: 0;
    }

    .product-main-title {
        font-size: 2.5rem;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .product-detail-page {
        padding-top: 80px;
    }

    .detail-container {
        padding: 0 0.75rem;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .product-card {
        border-radius: 15px;
    }

    .product-thumb {
        border-radius: 12px;
        margin: 0.4rem 0.4rem 0 0.4rem;
        aspect-ratio: 16/10;
    }

    .product-info {
        padding: 0.6rem 0.5rem;
    }

    .product-title {
        font-size: 0.95rem;
        margin-bottom: 0.2rem;
    }

    .product-description {
        font-size: 0.7rem;
        margin-bottom: 0.4rem;
        -webkit-line-clamp: 3;
        min-height: 3.9em;
    }

    .product-rating-row {
        margin-bottom: 0.4rem;
    }

    .product-stars i,
    .rating-value,
    .review-count {
        font-size: 0.6rem;
    }

    .product-price-stock-row {
        margin-bottom: 0.65rem;
        gap: 0.2rem;
    }

    .price-current {
        font-size: 0.95rem;
    }

    .stock-indicator {
        font-size: 0.5rem;
        padding: 0.1rem 0.35rem;
    }

    .product-actions {
        padding-top: 0.5rem;
        gap: 4px;
    }

    .add-to-cart-btn,
    .buy-now-btn {
        padding: 6px 4px;
        font-size: 0.65rem;
        border-radius: 8px;
    }

    .sticky-info {
        display: none;
        /* Hide thumb/title on small mobile sticky bar */
    }

    .sticky-bar-inner {
        justify-content: center;
    }

    .sticky-actions {
        width: 100%;
        gap: 0.5rem;
    }

    .btn-sticky {
        flex: 1;
        padding: 0.8rem 1rem;
        font-size: 0.8rem;
    }

    .product-discount {
        font-size: 0.55rem;
        padding: 0.25rem 0.5rem;
        border-radius: 0 6px 0 6px;
    }
}

/* --- Cart Actions (Hero Section) --- */
.product-actions-hero {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.product-actions-hero .add-to-cart-btn,
.product-actions-hero .buy-now-btn {
    padding: 1.2rem 2.5rem;
    font-size: 1rem;
    font-weight: 700;
}



@media (max-width: 991px) {
    .cart-drawer {
        width: 100%;
        right: -100%;
        padding: 2rem;
    }
}

/* --- Review Modal Styles --- */
.review-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.review-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.review-modal-content {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 35px;
    width: 100%;
    max-width: 550px;
    padding: 3rem;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.review-modal-overlay.is-visible .review-modal-content {
    transform: translateY(0) scale(1);
}

.review-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.review-modal-header h3 {
    font-family: 'Archivo', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.review-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.review-modal-close:hover {
    opacity: 1;
}

.picker-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.rating-stars-picker {
    display: flex;
    gap: 12px;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.1);
}

.rating-stars-picker i {
    cursor: pointer;
    transition: all 0.2s ease;
}

.rating-stars-picker i.active {
    color: #facc15;
    text-shadow: 0 0 15px rgba(250, 204, 21, 0.4);
}

.review-modal-form textarea.form-control {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.25rem;
    color: #fff;
    font-family: 'Tenor Sans', sans-serif;
    min-height: 150px;
    resize: none;
}

.review-modal-form textarea.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.review-modal-form textarea.form-control:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.submit-review-btn {
    width: 100%;
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 1.25rem;
    border-radius: 50px;
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    letter-spacing: 0.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-review-btn:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.submit-review-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .review-modal-content {
        padding: 2rem;
        border-radius: 25px;
        margin: 1rem;
    }
}
