/* =======================================
   PRODUCT DETAILS - COMPACT SPACING
   ======================================= */

:root {
    --text-dark: #111111;
    --text-grey: #666666;
    --brand-gold: #C0A062;
    --border-color: #e5e5e5;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

/* :::: LAYOUT (DESKTOP DEFAULT) :::: */
.pdp-container {
    max-width: 1400px; /* :::: FIX: Increased width to fill screen (was 1200px) :::: */
    margin: 40px auto 0; 
    padding: 0 20px;
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.pdp-gallery-wrapper {
    flex: 1.3;
    display: flex;
    gap: 5px; /* Reduced gap from 20px to 5px for very little space */
    position: sticky; 
    top: 100px; 
    align-items: flex-start;
    z-index: 10;
}

/* Thumbnail Section */
.pdp-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100px; /* :::: FIX: Increased thumbnail column width (was 80px) :::: */
    flex-shrink: 0;
    max-height: 600px;
    overflow-y: auto;
    scrollbar-width: none;
}
.pdp-thumbnails::-webkit-scrollbar { display: none; }

.thumb-item {
    width: 100px;  /* :::: FIX: Increased thumbnail size (was 80px) :::: */
    height: 100px; /* :::: FIX: Increased thumbnail size (was 80px) :::: */
    border: 1px solid transparent;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s;
    background: #fff;
    padding: 2px;
    border-radius: 4px;
}

.thumb-item.active { border-color: var(--text-dark); }
.thumb-item:hover { border-color: #ccc; }
.thumb-item img { width: 100%; height: 100%; object-fit: contain; }

/* Main Image */
.pdp-main-image {
    flex: 1;
    height: 600px; 
    background: #fff;
    border: none;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    border-radius: 4px;
}

.pdp-main-image img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    object-position: top center;
    background-color: #fff; 
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
    backface-visibility: hidden;
}

/* Image Transitions */
.img-center { transform: translate3d(0, 0, 0); z-index: 2; }
.img-left { transform: translate3d(-100%, 0, 0); z-index: 1; }
.img-right { transform: translate3d(100%, 0, 0); z-index: 3; }

/* Product Info Column */
.pdp-info-wrapper { flex: 1; padding-top: 0; }

.brand-label {
    display: block; font-size: 11px; font-weight: 700;
    letter-spacing: 2px; color: #888; text-transform: uppercase; margin-bottom: 10px;
}

.product-title {
    font-family: var(--font-heading); font-size: 32px; font-weight: 700;
    text-transform: uppercase; line-height: 1.2; margin-bottom: 15px;
    color: var(--text-dark); letter-spacing: 1px;
}

.price-block { display: flex; align-items: baseline; gap: 15px; margin-bottom: 20px; }

.current-price {
    font-size: 24px; font-weight: 700; color: #111111; 
    font-family: var(--font-body); transition: opacity 0.2s;
}

.old-price { font-size: 18px; color: #999; text-decoration: line-through; font-family: var(--font-body); }

.divider { height: 1px; background: var(--border-color); margin: 25px 0; }

/* Colors */
.color-section label {
    display: block; font-size: 13px; font-weight: 600;
    margin-bottom: 15px; text-transform: uppercase; color: var(--text-dark);
}

.color-grid { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 30px; }

.color-box {
    width: 110px;  
    height: 65px;  
    border: 1px solid #e0e0e0;
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 6px;
    background-color: #fff;
    position: relative;
    overflow: hidden;
}

.color-box:hover { 
    border-color: var(--brand-gold); 
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.color-box.active { 
    border: 2px solid var(--text-dark); 
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.color-box.has-swatch-img {
    background-size: contain;
    background-origin: content-box;
    padding: 4px;
}

/* Actions */
.action-block { display: flex; gap: 15px; margin-bottom: 30px; }

.qty-selector { display: flex; border: 1px solid var(--border-color); width: 110px; height: 50px; background: #fff; }
.qty-selector button { width: 35px; background: white; border: none; font-size: 18px; cursor: pointer; color: var(--text-dark); transition: 0.2s;}
.qty-selector button:hover { background: #f5f5f5; }
.qty-selector input { width: 40px; border: none; text-align: center; font-family: var(--font-body); font-weight: 600; font-size: 15px; color: var(--text-dark); outline: none; background: transparent; }

.add-to-cart-btn {
    flex: 1; background: var(--brand-gold); color: #000;
    font-family: var(--font-body); font-weight: 700; font-size: 13px;
    border: none; text-transform: uppercase; letter-spacing: 1px;
    cursor: pointer; transition: all 0.3s; height: 50px;
}
.add-to-cart-btn:hover { background: #b08d45; }

.amazon-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: #000; color: white; width: 100%; height: 50px;
    text-decoration: none; font-weight: 700; text-transform: uppercase;
    font-size: 14px; margin-bottom: 30px; transition: 0.3s;
}
.amazon-btn:hover { background: var(--brand-gold); color: black; }

/* Accordion */
.custom-accordion { border-top: 1px solid var(--border-color); }
.acc-item { border-bottom: 1px solid var(--border-color); }
.acc-header {
    width: 100%; padding: 20px 0; background: none; border: none;
    text-align: left; font-family: var(--font-body); font-size: 12px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-dark); display: flex; justify-content: space-between;
    align-items: center; cursor: pointer; transition: color 0.3s ease;
}
.acc-header:hover { color: var(--brand-gold); }
.acc-header i { transition: transform 0.3s ease; }
.acc-header.active i { transform: rotate(180deg); }
.acc-content {
    max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.acc-inner { padding-bottom: 25px; color: var(--text-grey); font-family: 'Montserrat', sans-serif; }

/* Description Formatting */
.pdp-description h2 { font-family: var(--font-heading); color: var(--text-dark); font-size: 18px; margin: 20px 0 10px 0; text-transform: uppercase; letter-spacing: 1px; border-left: 3px solid var(--brand-gold); padding-left: 10px; }
.pdp-description h3 { font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--text-dark); margin: 15px 0 5px 0; }
.pdp-description p { font-size: 14px; line-height: 1.8; margin-bottom: 15px; }
.pdp-description .gold-text { color: var(--brand-gold); font-weight: 700; }
.pdp-description ul { list-style: none; padding-left: 0; margin: 15px 0; }
.pdp-description ul li { position: relative; padding-left: 20px; margin-bottom: 8px; font-size: 14px; }
.pdp-description ul li::before { content: '▪'; color: var(--brand-gold); position: absolute; left: 0; top: -1px; font-size: 18px; line-height: 1; }

/* Reviews */
.pdp-reviews-section {
    width: 100%; padding: 0 0 80px; 
    background-color: #fafafa;
    border-top: 1px solid #eee; max-width: 1400px; margin: 0 auto;
}
.pdp-review-summary { text-align: center; margin-bottom: 50px; margin-top: 50px; }
.pdp-review-header { font-family: var(--font-heading); font-size: 28px; color: var(--text-dark); margin-bottom: 20px; letter-spacing: 1px; text-transform: uppercase; }
.review-pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 30px; border: 1px solid var(--brand-gold); border-radius: 50px; background: #fff; font-family: var(--font-body); }
.pill-score { font-weight: 800; font-size: 18px; color: var(--text-dark); }
.pill-star { color: var(--brand-gold); font-size: 16px; margin-top: -2px; }
.pill-count { color: #888; font-size: 14px; font-weight: 500; }

.pdp-reviews-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 40px; padding: 0 20px; }
.review-hidden { display: none !important; }

/* REVIEW CARD */
.pdp-review-card {
    background: #fff; padding: 0; border: 1px solid #e0e0e0; display: flex; flex-direction: column;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02); transition: transform 0.3s ease, border-color 0.3s ease;
    border-radius: 4px; overflow: hidden; height: 100%;
}
.pdp-review-card:hover { transform: translateY(-5px); border-color: var(--brand-gold); }

.review-content-body { 
    padding: 30px 20px;
    flex-grow: 1; display: flex; flex-direction: column; text-align: center; 
}
.pdp-reviewer-info { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; }
.pdp-reviewer-img { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; border: 1px solid #eee; }
.pdp-reviewer-details { display: flex; flex-direction: column; text-align: left; }
.pdp-reviewer-details .name { font-size: 11px; font-weight: 700; color: var(--text-dark); text-transform: uppercase; }
.pdp-reviewer-details .type { font-size: 9px; color: #999; margin-top: 2px; }
.pdp-stars { color: var(--brand-gold); font-size: 11px; margin-bottom: 12px; }
.pdp-review-text { font-family: 'Roboto', sans-serif; font-style: italic; font-size: 13px; color: #555; line-height: 1.6; margin-bottom: 20px; flex-grow: 1; }

.show-more-container { text-align: center; margin-top: 40px; }
.btn-show-more {
    background: transparent; border: 1px solid var(--text-dark); color: var(--text-dark); padding: 14px 40px;
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; cursor: pointer;
    transition: all 0.3s ease; font-family: var(--font-body);
}
.btn-show-more:hover { background: var(--text-dark); color: #fff; }

/* :::: EXPLORE MORE SECTION FIX (GLOBAL / DESKTOP) :::: */
/* Fix stretching on Desktop */
.related-products-section .product-grid {
    align-items: start; /* Prevents cards from stretching vertically */
}

.related-products-section .product-card {
    height: auto !important; /* Forces cards to take natural content height */
}

/* ======================================================
   :::: RESPONSIVE MEDIA QUERIES ::::
   ====================================================== */

/* --- TABLET SPECIFIC (600px - 1024px) --- */
@media (min-width: 601px) and (max-width: 1024px) {
    .pdp-container {
        flex-direction: column;
        padding: 0;
        gap: 0; /* :::: FIX: Reduced gap to 0 to minimize space :::: */
        margin: 0 0 0 0; 
    }

    .pdp-gallery-wrapper {
        flex-direction: column-reverse; 
        width: 100%;
        gap: 10px; /* :::: FIX: Added 10px gap between image and thumbnails :::: */
        position: static !important;
        display: flex; 
    }

    /* :::: FIX 1: BIGGER IMAGE, NO WHITE SPACE GAP :::: */
    .pdp-main-image {
        flex: 0 0 auto !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1/1; 
        min-height: auto; 
        display: block !important;
        background: #fdfdfd;
        position: relative;
        margin-bottom: 0; /* :::: FIX: Reset negative margin :::: */
    }

    .pdp-main-image img {
        object-fit: contain; 
        object-position: bottom center !important; 
    }

    .pdp-thumbnails {
        flex-direction: row;
        width: 100%;
        padding: 5px 30px 5px 30px; /* :::: FIX: Reduced bottom padding to 5px :::: */
        gap: 15px;
        justify-content: center;
        border-bottom: none; /* :::: FIX: Removed border-bottom as requested :::: */
    }

    .thumb-item { 
        width: 100px; 
        height: 100px; 
    }

    .pdp-info-wrapper {
        padding: 5px 40px 20px 40px; /* :::: FIX: Reduced top padding to 5px :::: */
    }

    .brand-label { font-size: 13px; margin-bottom: 12px; }
    .product-title { font-size: 36px; margin-bottom: 15px; } 
    .current-price { font-size: 30px; } 
    .old-price { font-size: 20px; }

    .color-section label { font-size: 14px; }
    .color-box { width: 130px; height: 75px; }

    /* :::: FIX 2: AMAZON BUTTON NOT AT BOTTOM (STATIC POSITION) :::: */
    .action-block {
        position: static; 
        bottom: auto;
        left: auto;
        width: 100%;
        background: transparent; 
        padding: 0;
        z-index: 1; 
        gap: 15px;
        border-top: none;
        box-shadow: none;
        margin-bottom: 30px; 
        padding-bottom: 0;
    }

    .qty-selector { width: 120px; height: 60px; }
    .qty-selector button { font-size: 22px; width: 40px; }
    .qty-selector input { font-size: 18px; width: 40px; }

    .add-to-cart-btn {
        height: 60px;
        font-size: 15px;
        letter-spacing: 2px;
    }

    .amazon-btn { height: 60px; font-size: 15px; margin-bottom: 0; }

    .acc-header { padding: 25px 0; font-size: 14px; }
    .pdp-description p { font-size: 16px; line-height: 1.9; }

    .pdp-reviews-grid { grid-template-columns: repeat(2, 1fr); gap: 25px; padding: 0 30px; }
    
    /* :::: GAP REMOVAL (Tablet) :::: */
    .pdp-review-summary { margin-top: 20px; margin-bottom: 30px; }
    .pdp-reviews-section { padding-top: 0; padding-bottom: 0px; margin-top: 0; }
    .related-products-section { padding-top: 0px !important; }
    .related-products-section .product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
}

/* --- MOBILE SPECIFIC (Up to 600px) --- */
@media (max-width: 600px) {
    .pdp-container {
        flex-direction: column;
        margin: 0; 
        padding: 0;
        gap: 20px;
    }

    .pdp-gallery-wrapper {
        flex-direction: column-reverse;
        width: 100%;
        gap: 0;
        position: static !important; 
    }

    .pdp-main-image {
        height: 50vh;
        min-height: 380px;
        max-height: 500px;
        width: 100%;
        background: #fdfdfd;
        border-radius: 0;
    }
    
    .pdp-thumbnails {
        flex-direction: row;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        justify-content: flex-start;
        padding: 10px 20px;
        gap: 10px;
        background: #fff;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .thumb-item { 
        width: 70px; /* :::: FIX: Bigger Thumbnails for Mobile :::: */
        height: 70px; 
        flex-shrink: 0; 
        border: 1px solid #eee; 
    }

    .pdp-info-wrapper {
        padding: 10px 25px 30px 25px;
    }

    .brand-label { font-size: 10px; margin-bottom: 8px; }
    .product-title { font-size: 24px; margin-bottom: 10px; }
    .price-block { margin-bottom: 15px; }
    .current-price { font-size: 22px; }
    .old-price { font-size: 16px; }

    .color-section label { font-size: 11px; }
    .color-grid { gap: 10px; margin-bottom: 20px; }
    .color-box { width: calc(33.33% - 7px); height: 60px; }

    .action-block {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #ffffff; 
        padding: 15px 20px;
        box-shadow: 0 -5px 30px rgba(0,0,0,0.15);
        margin: 0;
        z-index: 99999; 
        display: flex;
        align-items: center;
        gap: 10px;
        border-top: 1px solid #eee;
        padding-bottom: calc(15px + env(safe-area-inset-bottom));
    }

    .qty-selector {
        width: 90px;
        height: 48px;
        border-radius: 4px;
        background: #f9f9f9;
        border-color: #ddd;
    }
    .qty-selector button { font-size: 16px; width: 30px; background: transparent; }
    .qty-selector input { font-size: 14px; width: 30px; }

    .add-to-cart-btn {
        height: 48px;
        font-size: 12px;
        border-radius: 4px;
        box-shadow: 0 4px 10px rgba(192, 160, 98, 0.3);
    }
    
    .amazon-btn {
        margin-bottom: 0;
        height: 48px;
        border-radius: 4px;
        font-size: 12px;
    }

    .divider { margin: 20px 0; }
    .custom-accordion { margin-top: 10px; border-top: none; }
    .acc-item { border-top: 1px solid #eee; }
    .acc-header { padding: 18px 0; font-size: 11px; }

    /* :::: GAP FIX (Mobile) :::: */
    .pdp-reviews-section { padding: 10px 0 20px; }
    .pdp-review-summary { margin-top: 15px; }
    .pdp-review-header { font-size: 22px; }
    .pdp-reviews-grid { padding: 0 20px; grid-template-columns: 1fr; gap: 20px; }
    .pdp-review-card { flex-direction: column; border-radius: 8px; border-color: #f0f0f0; }
    
    /* :::: EXPLORE MORE FIX (Mobile) :::: */
    .related-products-section { padding: 10px 15px 40px; }
    .related-products-section h2 { font-size: 24px; margin-bottom: 25px; }
    
    /* FIX: Prevent card stretching on mobile */
    .related-products-section .product-grid { 
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
        align-items: start; /* Prevents vertical stretching */
    }
    
    .related-products-section .product-card {
        height: auto !important; /* Forces natural height */
        min-height: 0 !important; /* Removes any min-height forcing */
    }
}

/* --- SMALL MOBILE --- */
@media (max-width: 480px) {
    .pdp-main-image { height: 350px; }
    .color-box { width: calc(50% - 5px); }
    
    .related-products-section .product-grid { grid-template-columns: 1fr !important; }
}