/* ==============================================================
   Product Detail Page — Premium CSS (Reference-Image Match 2026)
   Layout: Single main image + thumbnail strip | Clean right sidebar
   ============================================================== */

/* ===== Layout: Two-Column Grid ===== */
.pdp-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* ===== Left: Image Column ===== */
.pdp-image-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== Main Image Wrapper ===== */
.pdp-main-image-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #f9f9f9;
    aspect-ratio: 4 / 5;
    cursor: zoom-in;
}

.pdp-main-image-wrap .main-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease, transform 0.5s ease;
}

.pdp-main-image-wrap:hover .main-product-image {
    transform: scale(1.03);
}

/* ===== Overlay buttons on image ===== */
.pdp-img-wishlist,
.pdp-img-share {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: background 0.2s, transform 0.2s;
}

.pdp-img-wishlist:hover,
.pdp-img-share:hover {
    background: #f0f0f0;
    transform: scale(1.08);
}

.pdp-img-share {
    top: 14px;
    right: 14px;
    color: #444;
}

.pdp-img-wishlist {
    top: 62px;
    right: 14px;
    color: #444;
}

.pdp-img-wishlist.active {
    color: #e11d48;
}

/* ===== Prev/Next Nav Arrows ===== */
.pdp-img-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: background 0.2s, opacity 0.2s;
    color: #222;
}

.pdp-img-prev { left: 12px; }
.pdp-img-next { right: 12px; }

.pdp-img-nav:hover { background: #fff; }

/* ===== Zoom Button ===== */
.zoom-btn {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    color: #444;
    transition: background 0.2s;
}
.zoom-btn:hover { background: #fff; }

/* ===== Badges ===== */
.pdp-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 5;
}

.pdp-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1;
}
.pdp-badge-discount { background: #ef4444; color: #fff; }
.pdp-badge-trending  { background: #f97316; color: #fff; }
.pdp-badge-new       { background: #000; color: #fff; }

/* ===== Thumbnail Strip ===== */
.pdp-thumb-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 4px;
    scrollbar-width: none;
}

.pdp-thumb-strip::-webkit-scrollbar { display: none; }

.thumb-btn {
    flex: 0 0 auto;
    width: 72px;
    height: 90px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    padding: 0;
    background: #f5f5f5;
    cursor: pointer;
    transition: border-color 0.2s;
}

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

.thumb-btn.active {
    border-color: #000;
}

.thumb-btn:hover:not(.active) {
    border-color: #999;
}

/* ===== Right: Sticky Info Sidebar ===== */
.sticky-info-wrapper {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: none;
    padding-right: 4px;
}

.sticky-info-wrapper::-webkit-scrollbar { display: none; }

/* ===== Brand ===== */
.pdp-brand {
    font-size: 0.82rem;
    font-weight: 600;
    color: #888;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

/* ===== Product Title ===== */
.pdp-title {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.25;
    color: #111;
    margin: 0 0 12px;
    letter-spacing: -0.2px;
}

/* ===== Price + Sold + Rating row ===== */
.pdp-price-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.pdp-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.original-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.current-price-display {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.current-price-display .currency {
    font-size: 1rem;
    font-weight: 600;
    color: #111;
}

.current-price-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.5px;
    line-height: 1;
}

.discount-badge {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
}

/* ===== Sold + Rating ===== */
.pdp-sold-rating-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.pdp-sold-count {
    font-size: 0.8rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pdp-rating-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #92400e;
}

.pdp-rating-count {
    font-weight: 400;
    color: #a8783a;
}

/* ===== Divider ===== */
.pdp-divider {
    border: none;
    border-top: 1px solid #ebebeb;
    margin: 14px 0;
}

/* ===== Description ===== */
.pdp-desc-section {
    margin-bottom: 4px;
}

.pdp-desc-text {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pdp-desc-text.expanded {
    -webkit-line-clamp: unset;
    overflow: visible;
}

.pdp-see-more {
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    display: inline-block;
    margin-top: 4px;
}
.pdp-see-more:hover { color: #000; }

/* ===== Labels ===== */
.pdp-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: block;
}
.pdp-label strong {
    font-weight: 700;
    color: #111;
}

.pdp-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.pdp-label-row .pdp-label { margin-bottom: 0; }
.pdp-label-row .size-guide-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.pdp-label-row .size-guide-link:hover { color: #000; }

/* ===== Color Swatches ===== */
.color-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-option {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 2px;
    cursor: pointer;
    background: none;
    transition: border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-option .color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: block;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
}

.color-option.active {
    border-color: #111;
}

.color-option:hover:not(.active) {
    border-color: #bbb;
}

/* ===== Size Buttons ===== */
.size-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.size-option {
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.size-option:hover:not(.disabled) {
    border-color: #333;
    color: #111;
}

.size-option.active {
    background: #111;
    border-color: #111;
    color: #fff;
}

.size-option.disabled {
    color: #ccc;
    border-color: #eee;
    background: #fafafa;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.6;
}

/* ===== Quantity Selector ===== */
.quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    height: 44px;
}

.qty-btn {
    width: 40px;
    height: 100%;
    background: #f5f5f5;
    border: none;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    color: #333;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-btn:hover { background: #ebebeb; }

.quantity-selector input[type="number"] {
    width: 56px;
    text-align: center;
    border: none;
    border-left: 1.5px solid #ddd;
    border-right: 1.5px solid #ddd;
    font-size: 1rem;
    font-weight: 700;
    outline: none;
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    background: #fff !important;
    opacity: 1 !important;
    -moz-appearance: textfield;
    appearance: textfield;
}

.quantity-selector input[type="number"]::-webkit-inner-spin-button,
.quantity-selector input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ===== Primary CTA Buttons ===== */
.pdp-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pdp-btn-add-to-cart,
.pdp-btn-checkout-now {
    height: 52px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdp-btn-add-to-cart {
    background: #111;
    color: #fff;
    border: 2px solid #111;
}
.pdp-btn-add-to-cart:hover {
    background: #333;
    border-color: #333;
}

.pdp-btn-checkout-now {
    background: #fff;
    color: #111;
    border: 2px solid #bbb;
}
.pdp-btn-checkout-now:hover {
    border-color: #111;
    color: #111;
}

/* ===== Delivery T&C ===== */
.pdp-delivery-tc {
    margin-top: 14px;
}
.pdp-tc-link {
    font-size: 0.8rem;
    color: #777;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.pdp-tc-link:hover { color: #333; }

/* ===== Secondary Actions (Wishlist / Compare) ===== */
.pdp-secondary-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.pdp-btn-wishlist {
    display: flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}
.pdp-btn-wishlist:hover { color: #e11d48; }
.pdp-btn-wishlist.active { color: #e11d48; }

.pdp-compare-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}
.pdp-compare-btn:hover { color: #111; }

/* ===== Social Share ===== */
.pdp-social-share {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdp-share-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #666;
}

.social-icons {
    display: flex;
    gap: 8px;
}

.social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}
.social-icon:hover {
    background: #111;
    color: #fff;
}

/* ===== Stock Dots ===== */
.stock-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}
.stock-dot.warning { background: #f59e0b; }
.stock-dot.out     { background: #ef4444; }

/* ===== Size Guide Drawer ===== */
.size-guide-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 100vw;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 30px rgba(0,0,0,0.12);
    z-index: 9990;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 40px 28px 40px;
}
.size-guide-drawer.active {
    transform: translateX(0);
}
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9980;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.drawer-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.size-guide-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.size-guide-drawer h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}
#sizeGuideClose {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: none;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: background 0.2s;
}
#sizeGuideClose:hover { background: #f5f5f5; }

.size-guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.size-guide-table th,
.size-guide-table td {
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    text-align: center;
}
.size-guide-table th {
    background: #f9f9f9;
    font-weight: 700;
}

/* ===== Lightbox ===== */
.pdp-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.pdp-lightbox.active {
    opacity: 1;
    pointer-events: all;
}
.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
#lightboxImg {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 0.2s ease;
    user-select: none;
    -webkit-user-drag: none;
}
#lightboxClose {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}
#lightboxClose:hover { background: rgba(255,255,255,0.25); }
.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: background 0.2s;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
#lightboxPrev { left: 18px; }
#lightboxNext { right: 18px; }
#lightboxCounter {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    z-index: 10001;
}

/* ===== Tabs ===== */
.pdp-tabs {
    margin-top: 32px;
    border-top: 1px solid #e5e7eb;
}
.pdp-tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
}
.pdp-tab-btn {
    padding: 14px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #888;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.pdp-tab-btn.active {
    color: #111;
    border-bottom-color: #111;
}
.pdp-tab-btn:hover:not(.active) { color: #444; }
.pdp-tab-panel {
    display: none;
    padding: 28px 0;
}
.pdp-tab-panel.active { display: block; }

/* ===== Related Products ===== */
.pdp-related-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #ebebeb;
}
.pdp-related-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* ===== Responsive Tablet ===== */
@media (max-width: 1024px) {
    .pdp-layout {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    .pdp-title {
        font-size: 1.3rem;
    }
    .current-price-value {
        font-size: 1.35rem;
    }
}

/* ===== Responsive Mobile ===== */
@media (max-width: 768px) {
    .pdp-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .pdp-main-image-wrap {
        border-radius: 0;
        aspect-ratio: 1 / 1;
    }
    .sticky-info-wrapper {
        position: static;
        max-height: none;
        overflow: visible;
        padding: 20px 0 0;
    }
    .pdp-title {
        font-size: 1.2rem;
    }
    .pdp-actions {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .pdp-btn-add-to-cart,
    .pdp-btn-checkout-now {
        height: 48px;
        font-size: 0.85rem;
    }
    .pdp-sold-rating-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .pdp-price-meta-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .size-guide-drawer {
        width: 100vw;
        transform: translateX(100%);
    }
    .size-guide-drawer.active {
        transform: translateX(0);
    }
    .thumb-btn {
        width: 60px;
        height: 75px;
    }
}

/* ===== Zoom Lens (desktop) ===== */
.zoom-lens {
    position: absolute;
    width: 160px;
    height: 160px;
    border: 2px solid rgba(0,0,0,0.15);
    border-radius: 50%;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.15s ease;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}
.zoom-lens.active { opacity: 1; }

.zoom-result {
    position: absolute;
    top: 0;
    left: calc(100% + 16px);
    width: 400px;
    height: 400px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-repeat: no-repeat;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    background-color: #fff;
}
.zoom-result.active { opacity: 1; }

/* ===== Measurements ===== */
.measurement-text {
    font-size: 0.85rem;
    color: #555;
    font-weight: 400;
}

/* ===== Sticky Bottom Bar (Mobile) ===== */
.pdp-sticky-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 12px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    align-items: center;
    gap: 12px;
}
@media (max-width: 768px) {
    .pdp-sticky-bar { display: flex; }
}
.sticky-bar-price {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 800;
    color: #111;
}
.sticky-bar-cart {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.sticky-bar-cart:hover { background: #333; }