/* ==========================================
   PRODUCT DETAILS PAGE (PDP) - SPECIFIC STYLES
   ========================================== */

:root {
    --text-primary: #ffffff;
    --text-muted: #94a3b8;
}

/* Main Layout Wrapper */
.product-page-wrapper {
    max-width: 1320px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 100px;
}

@media (max-width: 1023px) {
    .product-page-wrapper {
        padding: 10px 85px 100px 8px; /* Same 8px left margin and 85px railing space as Homepage */
    }

    .left-handed-mode .product-page-wrapper {
        padding: 10px 8px 100px 85px !important;
    }
}

@media (min-width: 1024px) {
    .product-page-wrapper {
        padding-top: 100px; /* Space for Desktop Header */
        padding-bottom: 60px;
    }
}

/* Grid Layout for Gallery & Info */
.pdp-top-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 1024px) {
    .pdp-top-section {
        display: grid;
        grid-template-columns: 1.1fr 1fr;
        gap: 30px;
        align-items: start;
    }
}

/* --- GALLERY SECTION --- */
.pdp-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 1024px) {
    .pdp-gallery-container {
        display: grid;
        grid-template-columns: 90px 1fr;
        gap: 16px;
    }
}

/* Vertical Thumbnails (Desktop Only) */
.pdp-thumbnails {
    display: none;
}

@media (min-width: 1024px) {
    .pdp-thumbnails {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .thumb-img {
        width: 85px;
        height: 85px;
        border-radius: 12px;
        object-fit: cover;
        cursor: pointer;
        border: 2px solid transparent;
        transition: border-color 0.2s;
        background: #141E3A;
    }

    .thumb-img.active,
    .thumb-img:hover {
        border-color: #FFEABD;
    }
}

/* Main Display Image Frame */
.pdp-main-image-box {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
    background: #141E3A;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdp-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Zoom Icon Button */
.zoom-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 32px;
    height: 32px;
    background: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease;
}

.zoom-btn:hover {
    transform: scale(1.1);
}

.zoom-btn svg {
    width: 16px;
    height: 16px;
}

/* Mobile Image Carousel Dots & Bar */
.pdp-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

@media (min-width: 1024px) {
    .pdp-mobile-bar {
        display: none;
    }
}

.trending-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: linear-gradient(90deg, #E9D0B3 0%, #C5955D 100%);
    border-radius: 53px;
    color: #0A0E19;
    font-size: 12px;
    font-weight: 600;
}

.carousel-dots {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
}

.dot.active {
    width: 28px;
    border-radius: 100px;
    background: #FFFFFF;
}

/* --- PRODUCT DETAILS SECTION --- */
.pdp-info-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pdp-desktop-badge {
    display: none;
}

@media (min-width: 1024px) {
    .pdp-desktop-badge {
        display: inline-flex;
        align-self: flex-start;
    }
}

.pdp-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 24px;
    color: #FFFFFF;
}

@media (min-width: 1024px) {
    .pdp-title {
        font-size: 26px;
        line-height: 32px;
    }
}

/* Rating & Sales Row */
.pdp-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-muted);
}

.pdp-meta-row > span {
    color: var(--text-muted);
}

.pdp-reviews-count,
.pdp-sold-count {
    color: var(--text-muted);
}

.pdp-star {
    color: #facc15;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.divider-line {
    width: 1px;
    height: 14px;
    background: var(--text-muted);
    opacity: 0.4;
}

/* Price Box */
.pdp-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-main {
    font-family: 'Inter', 'Urbanist', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #FFFFFF;
}

.price-strike {
    font-family: 'Inter', 'Urbanist', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.5);
}

.price-save-tag {
    background: #F1D9B8;
    color: #202636;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 13px;
}

/* Description Box */
.pdp-description-box {
    background: #283348;
    padding: 12px 15px;
    border-radius: 10px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    line-height: 18px;
    color: rgba(255, 255, 255, 0.9);
}

.pdp-description-box.clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

.pdp-read-more-link {
    color: #38BDF8;
    font-weight: 700;
    cursor: pointer;
    margin-left: 6px;
    text-decoration: underline;
    display: inline-block;
}

/* Color Swatches */
.section-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: #FFFFFF;
}

.color-swatches-row {
    display: flex;
    gap: 12px;
    padding: 6px 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.color-swatches-row::-webkit-scrollbar {
    display: none;
}

.color-swatch-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease, border-color 0.18s ease, outline 0.18s ease;
    padding: 0;
}

.color-swatch-btn:hover {
    transform: scale(1.05);
}

button.color-swatch-btn.active,
.color-swatch-btn.active {
    border: 2px solid #0B1120 !important;
    outline: 2.5px solid #FFEABD !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
    border-radius: 12px !important;
}

.color-swatch-btn .swatch-check-icon {
    display: none;
    pointer-events: none;
}

.color-swatch-btn.active .swatch-check-icon {
    display: block;
}

/* Sizes Row */
.size-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.size-chart-link {
    font-size: 12px;
    color: #FFFFFF;
    text-decoration: underline;
    opacity: 0.9;
}

.size-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.size-grid::-webkit-scrollbar {
    display: none;
}

.size-btn {
    min-width: 46px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #FFEABD;
    background: transparent;
    color: #FFEABD;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.size-btn:hover {
    background: rgba(255, 234, 189, 0.15);
}

.size-btn.active {
    background: #FFEABD;
    color: #232C45;
}

/* Features Cards Row */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
    gap: 8px;
    margin-top: 4px;
}

.feature-card {
    background: #283348;
    border-radius: 12px;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.feature-card svg {
    width: 22px;
    height: 22px;
}

.feature-card span {
    font-size: 11px;
    font-weight: 600;
    color: #FFEABD;
    line-height: 13px;
}

/* Desktop CTA Buttons Row (Buy Now + Add to Cart) */
.pdp-desktop-actions {
    display: none;
}

@media (min-width: 1024px) {
    .pdp-desktop-actions {
        display: flex;
        gap: 15px;
        margin-top: 10px;
    }

    .btn-buy-now {
        flex: 1.5;
        height: 48px;
        background: linear-gradient(180deg, #F1D9B8 0%, #A88452 100%);
        border-radius: 13px;
        border: none;
        color: #000000;
        font-weight: 700;
        font-size: 16px;
        cursor: pointer;
        transition: opacity 0.2s ease, transform 0.15s ease;
    }

    .btn-buy-now:hover {
        opacity: 0.95;
        transform: translateY(-1px);
    }

    .btn-add-cart {
        flex: 1;
        height: 48px;
        background: transparent;
        border: 1px solid #FFFFFF;
        border-radius: 13px;
        color: #FFFFFF;
        font-weight: 600;
        font-size: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        cursor: pointer;
        transition: background 0.2s ease;
    }

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

/* --- REVIEWS SECTION --- */
.reviews-container {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 234, 189, 0.3);
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.reviews-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.review-summary-grid {
    display: flex;
    align-items: center;
    gap: 24px;
}

.rating-big-box {
    text-align: center;
}

.rating-score {
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.rating-stars-gold {
    color: #facc15;
    font-size: 14px;
    letter-spacing: 2px;
}

/* Review Progress Bars */
.rating-bars-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    max-width: 320px;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.bar-star-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 24px;
    color: var(--text-muted);
    font-weight: 500;
}

.progress-track {
    flex-grow: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #FFEABD;
    border-radius: 3px;
}

/* --- MOBILE STICKY ACTION BAR (BUY NOW + ADD TO CART) --- */
.mobile-sticky-buy-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: 68px;
    height: auto;
    background: rgba(14, 21, 38, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0px -4px 16px rgba(0, 0, 0, 0.45);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
    z-index: 1002;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .mobile-sticky-buy-bar {
        display: none !important;
    }
}

.mobile-buy-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(180deg, #F1D9B8 0%, #A88452 100%);
    border-radius: 14px;
    border: none;
    color: #000000;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.15s ease;
    box-sizing: border-box;
    white-space: nowrap;
}

.mobile-buy-btn:active {
    transform: scale(0.98);
    opacity: 0.92;
}

.mobile-add-cart-btn {
    width: 100%;
    height: 48px;
    background: rgba(35, 44, 69, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(254, 238, 217, 0.35);
    border-radius: 14px;
    color: #FFEABD;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    box-sizing: border-box;
    white-space: nowrap;
}

.mobile-add-cart-btn svg {
    flex-shrink: 0;
    stroke: #FFEABD;
}

.mobile-add-cart-btn:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.12);
}

/* Gently lift the bottom cluster of the mobile right railing above the action buttons */
@media (max-width: 1023px) {
    .mobile-railing {
        bottom: 78px !important;
    }

    .mobile-railing .railing-buttons-col .rail-main {
        gap: 7px !important;
        margin-bottom: 2px !important;
    }

    .mobile-railing .railing-buttons-col .rail-top {
        gap: 8px !important;
    }

    /* When any railing drawer is actively expanded, keep full-height coverage */
    .mobile-railing.search-expanded,
    .mobile-railing.profile-expanded,
    .mobile-railing.cart-expanded,
    .mobile-railing.menu-expanded {
        bottom: 12px !important;
    }
}

/* ==========================================
   PDP DYNAMIC MODALS (DESCRIPTION & LIGHTBOX)
   ========================================== */

/* Glassmorphic Description Modal */
.pdp-desc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 15, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 16px;
}

.pdp-desc-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.pdp-desc-modal-card {
    background: rgba(18, 27, 48, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(37, 99, 235, 0.2);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pdp-desc-modal-backdrop.active .pdp-desc-modal-card {
    transform: translateY(0) scale(1);
}

.pdp-desc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pdp-desc-modal-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
}

.pdp-desc-modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.15s ease;
}

.pdp-desc-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.pdp-desc-modal-body {
    padding: 20px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    line-height: 22px;
    color: rgba(255, 255, 255, 0.88);
    overflow-y: auto;
    white-space: pre-line;
}

/* Fullscreen Gallery Lightbox */
.pdp-lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 16px;
}

.pdp-lightbox-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.pdp-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.pdp-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.15s ease;
}

