/* =========================================
   PRODUCT DETAIL THEME (PREMIUM)
   ========================================= */

.pdp-wrapper {
    background-color: #fff;
    padding-bottom: 80px;
    font-family: 'Outfit', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* --- GRID LAYOUT --- */
.pdp-main-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    /* Image larger than info */
    gap: 80px;
    padding-top: 40px;
    margin-bottom: 80px;
}

/* --- LEFT COLUMN: GALLERY --- */
.gallery-wrapper {
    display: flex;
    gap: 20px;
    height: 800px;
    /* Fixed height for sticky feel */
}

/* Vertical Thumbnails */
.thumbnail-strip {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 80px;
    overflow-y: auto;
    padding-right: 5px;
}

.thumbnail-strip::-webkit-scrollbar {
    width: 3px;
}

.thumbnail-strip::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.thumbnail-strip::-webkit-scrollbar-thumb {
    background: #ccc;
}

.thumb-item {
    width: 100%;
    aspect-ratio: 3/4;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s;
    border: 1px solid transparent;
}

.thumb-item.active,
.thumb-item:hover {
    opacity: 1;
    border-color: #000;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Main Image */
.main-image-container {
    flex: 1;
    background: #f9f9f9;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    /* Zoom hint */
}

.pdp-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* --- RIGHT COLUMN: INFO --- */
.pdp-info {
    padding-top: 0;
}

.product-title {
    font-size: 28px;
    font-weight: 400;
    /* Lighter, more premium */
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
    line-height: 1.3;
    text-align: initial !important;
}

.category-line {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}



.price-section {
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.current-price {
    font-weight: 600;
    color: #000;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 16px;
}

.discount-percentage {
    color: #cc0000;
    /* Red for discount */
    font-weight: 500;
}

.stock-status {
    font-size: 13px;
    margin-bottom: 30px;
    font-weight: 500;
}

/* --- SELECTORS --- */
.pdp-selectors {
    padding-bottom: 10px;
}

.selector-group {
    margin-bottom: 25px;
}

.selector-label {
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

/* Size Buttons - EXACT REFERENCE STYLE */
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.size-btn {
    min-width: 50px;
    height: 40px;
    background: #fff;
    border: 1px solid #000;
    /* Sharp black border */
    color: #000;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.size-btn:hover {
    background: #f5f5f5;
}

.size-btn.selected {
    background: #000;
    color: #fff;
    border-color: #000;
}

.size-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #ddd;
    color: #ccc;
    text-decoration: line-through;
}

/* --- ACTIONS (Buttons & Qty) --- */
.action-group {
    display: flex;
    flex-direction: column;
    /* Stacked buttons */
    gap: 12px;
    margin-top: 20px;
    max-width: 400px;
}

/* Quantity Box - Clean row */
.qty-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Space out buttons */
    border: 1px solid #000;
    width: 220px;
    height: 44px;
    margin-bottom: 10px;
    padding: 0 10px;
    /* Add some padding */
}

.qty-btn {
    width: 40px;
    height: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: #000;
    transition: color 0.2s;
}

.qty-btn:hover {
    color: #000;
}

.qty-wrapper input {
    width: 60px;
    /* Fixed small width */
    border: none;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    height: 100%;
    /* Remove arrows */
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-wrapper input::-webkit-outer-spin-button,
.qty-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* BUTTONS - PRECISE REFERENCE STYLE */
.btn-primary,
.btn-secondary {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 0;
    /* Sharp corners or very slight 2px */
}

.buy-now {
    background: #000;
    color: #fff;
    border: 1px solid #000;
}

.buy-now:hover {
    opacity: 0.9;
}

.add-to-cart {
    background: transparent;
    color: #000;
    border: 1px solid #ddd;
}

.add-to-cart:hover {
    border-color: #000;
}

/* Disabled Button Styles */
.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #e0e0e0;
    color: #999;
    border-color: #ccc;
}

.btn-primary:disabled:hover,
.btn-secondary:disabled:hover {
    opacity: 0.5;
    background: #e0e0e0;
    border-color: #ccc;
}

/* --- ACCORDIONS --- */
.accordion-group {
    border-top: 1px solid #eee;
}

.accordion-item {
    border-bottom: 1px solid #eee;
}

.accordion-header {
    width: 100%;
    padding: 20px 0;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000;
}

.accordion-header:hover {
    opacity: 0.7;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-right: 20px;
}

.accordion-content p {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 20px;
}

.active .accordion-content {
    max-height: 510px;
    /* Arbitrary large height */
}

.accordion-item.active .accordion-header i {
    transform: rotate(45deg);
    /* Plus to X effect if using plus icon, or minus */
}

/* --- RELATED PRODUCTS SECTION (Preserved) --- */
.section-related {
    padding: 0 40px;
    margin-top: 20px;
}

.section-title {
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- SOCIAL SHARE --- */
.social-share-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
}

.share-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    min-width: 50px;
}

.share-icons {
    display: flex;
    gap: 12px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    color: #fff;
}

/* Brand Colors on Hover */
.share-btn.whatsapp:hover {
    background: #25D366;
}

.share-btn.facebook:hover {
    background: #4267B2;
}

.share-btn.instagram:hover {
    background: #E1306C;
}

.share-btn.native:hover {
    background: #000;
}

.share-btn.native {
    display: none;
    /* Hidden by default, shown via JS if supported */
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {

    /* ===== REMOVE UNWANTED SPACING ===== */
    .pdp-gallery,
    .gallery-wrapper,
    .main-image-container {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* ===== MAIN IMAGE FULL HERO ===== */
    .main-image-container {
        width: 100%;
        height: auto;
        /* IMPORTANT */
        max-height: none;
        overflow: hidden;
        border-radius: 0;
        background: #fff;
        touch-action: pan-y;
    }

    .pdp-main-img {
        width: 100%;
        height: auto;
        /* IMPORTANT */
        display: block;
        object-fit: contain;
        /* show full outfit */
    }

    /* ===== REMOVE WHITE BAR ISSUE ===== */
    .gallery-wrapper {
        background: #fff;
    }

    /* ===== THUMBNAILS FIX ===== */
    .thumbnail-strip {
        margin: 0;
        padding: 12px 14px;
    }

    /* ===== PRODUCT INFO LAYOUT ===== */
    .pdp-info {
        padding: 18px 18px 28px;
        background: #fff;
    }

    .product-title {
        font-size: 21px;
        line-height: 1.35;
    }

    .price-section {
        margin-top: 6px;
        font-size: 18px;
    }

    /* ===== BUTTONS FULL PREMIUM ===== */
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 15px;
        font-size: 13px;
        letter-spacing: 1px;
    }

    .qty-wrapper {
        width: 140px;
    }

    /* ===== SHARE CENTER ===== */
    .social-share-section {
        justify-content: center;
        margin: 18px 0 6px;
    }

}

/* ===============================
   MOBILE OPTIMIZATION ONLY
================================ */
/* ===============================
   MOBILE OPTIMIZATION ONLY
================================ */
@media (max-width: 768px) {
    /* Safe-guard against horizontal scroll */
    .pdp-wrapper {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Fix box model issues */
    .pdp-wrapper * {
        box-sizing: border-box;
    }

    /* ===============================
     FULL WIDTH IMAGE AREA
  ================================ */

    .container.pdp-main-grid {
        padding: 0 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-top: 0 !important;
        box-sizing: border-box; /* Ensure padding doesn't overflow width */
    }

    .pdp-gallery,
    .main-image-container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        background: #fff;
        overflow: hidden; /* Constrain children */
    }

    .gallery-wrapper {
        width: 100%;
        max-width: 100%;
        min-width: 0; /* Flexbox containment */
        margin: 0;
        padding: 0;
        background: #fff;
        height: auto !important;
    }

    .gallery-wrapper {
        display: flex;
        flex-direction: column;
    }

    .main-image-container::before,
    .main-image-container::after {
        content: none !important;
        display: none !important;
    }

    .main-image-container {
        width: 100%;
        height: auto;
        overflow: visible;
        border-radius: 0;
        background: #fff;
        touch-action: pan-y;
    }

    .pdp-main-img {
        width: 100% !important;
        height: auto !important;
        position: relative !important;
        object-fit: contain !important;
        display: block;
        margin: 0;
    }

    /* ===============================
     THUMBNAILS (LIKE YOUR IMAGE)
  ================================ */

    .thumbnail-strip {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 12px;
        padding: 12px 0; /* Removed horizontal padding to align with edge if needed, or keep small */
        background: #fff;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        width: 100% !important;
        scrollbar-width: none; /* Hide scrollbar Firefox */
    }

    .thumbnail-strip::-webkit-scrollbar {
        display: none; /* Hide scrollbar Chrome/Safari */
    }

    .thumb-item {
        flex: 0 0 calc(25% - 9px); /* Exactly 4 items (100% - 3*12px gap) / 4 */
        width: auto; /* Let flex basis handle it */
        aspect-ratio: 3 / 4;
        border-radius: 8px;
        overflow: hidden;
        background: #f5f5f5;
        border: 1px solid #e5e5e5;
        scroll-snap-align: start;
        transition: all 0.25s ease;
    }

    .thumb-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .thumb-item.active {
        border: 2px solid #000;
        /* transform: scale(1.05); */
    }

    /* ===============================
     QUANTITY
  ================================ */
    .qty-wrapper {
        width: 140px;
        justify-content: space-between;
    }

    /* ===============================
     BUTTONS (PREMIUM)
  ================================ */
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 15px;
        font-size: 13px;
        letter-spacing: 1px;
    }

    /* ===============================
     SHARE
  ================================ */
    .social-share-section {
        justify-content: center;
        margin: 18px 0 6px;
    }

}



@media (max-width: 480px) {

    /* ===== MAIN LAYOUT ===== */
    .pdp-main-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 10px;
    }

    .pdp-gallery {
        width: 100%;
    }

    .pdp-info {
        padding: 15px 0;
    }

    /* ===== IMAGE SECTION ===== */
    .gallery-wrapper {
        flex-direction: column-reverse;
    }

    .main-image-container {
        width: 100%;
        height: auto;
        border-radius: 0;
        overflow: visible;
        aspect-ratio: auto;
        background: transparent;
        touch-action: pan-y;
    }

    .pdp-main-img {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }

    /* ===== THUMBNAILS ===== */
    .thumbnail-strip {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        /* gap: 8px; */
        margin-top: 10px;
        padding-bottom: 5px;
        justify-content: flex-start;
        overflow-x: auto;
        width: 100% !important;
        max-width: 100vw; /* Hard limit */
    }

    .thumb-item {
        width: 60px;
        height: 80px;
        border-radius: 8px;
        overflow: hidden;
        flex-shrink: 0; 
    }

    .thumb-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* ===== PRODUCT INFO ===== */
    .product-title {
        font-size: 20px;
        line-height: 1.3;
    }

    .category-line {
        font-size: 11px;
        margin-top: 4px;
    }

    .price-section {
        font-size: 18px;
        margin-top: 6px;
    }

    .stock-status {
        font-size: 12px;
        padding: 5px 10px;
        margin-top: 6px;
    }

    /* ===== QUANTITY & BUTTONS ===== */
    .action-group {
        gap: 12px;
        margin-top: 12px;
    }

    .qty-wrapper {
        width: 140px;
        justify-content: space-between;
    }

    .qty-wrapper input {
        width: 60px;
        text-align: center;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 14px 16px;
        font-size: 13px;
        letter-spacing: 1px;
    }

    /* ===== SHARE SECTION ===== */
    .social-share-section {
        justify-content: center;
        padding-top: 15px;
    }

    .share-icons {
        gap: 12px;
    }

    .share-btn {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    /* ===== ACCORDIONS ===== */
    .accordion-header {
        font-size: 13px;
        padding: 14px 10px;
    }

    .accordion-content {
        font-size: 13px;
        line-height: 1.6;
    }

}


/* =========================================
   RELATED PRODUCTS REFACTOR (Wishlist Style)
   ========================================= */

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding-bottom: 20px;
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Card Override to match Wishlist look */
.related-products-grid .product-card {
    width: 100%;
    border: none;
    background: transparent;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.related-products-grid .product-card .product-image-wrapper {
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
    background: #f4f4f4;
}

.related-products-grid .product-card .product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.related-products-grid .product-card:hover .product-image {
    transform: scale(1.08);
}

.related-products-grid .product-card .product-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
    margin-bottom: 8px;
}

/* HIDE ACTIONS AS REQUESTED */
/* HIDE ACTIONS AS REQUESTED (But keep wishlist visible) */
.related-products-grid .product-card .btn-buy-now,
.related-products-grid .product-card .btn-add-cart,
.related-products-grid .product-card .add-to-cart-btn,
.related-products-grid .product-card .cart-btn {
    display: none !important;
}

/* Position Wishlist Button: Bottom Right */
.related-products-grid .product-card .wishlist-btn {
    display: flex !important;
    /* Ensure it is visible override */
    position: absolute;
    top: auto;
    bottom: 15px;
    right: 15px;
    left: auto;
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 5;
    opacity: 1;
    /* Always visible or hover? Ref implies visible. */
}

.related-products-grid .product-card .wishlist-btn:hover {
    background: #000;
}

.related-products-grid .product-card .wishlist-btn:hover i {
    color: #fff !important;
}