/* ============================================================
   SINGLE PRODUCT PAGE
   ============================================================ */

/* ── Breadcrumb ── */
.product-breadcrumb {
    padding: 152px 32px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: #888;
    letter-spacing: 0.5px;
}

.product-breadcrumb a {
    color: #888;
    text-decoration: none;
}

.product-breadcrumb a:hover { color: #1a1a1a; }

.product-breadcrumb span {
    margin: 0 6px;
}

/* ── Product Layout ──
   3-col: thumbnail strip | image stack | product info
   No align-items override — default stretch lets the sticky cols
   span the full row height (driven by the image stack) so that
   position:sticky works for the entire scroll duration.
   ── */
.product-layout {
    display: grid;
    grid-template-columns: 80px 1fr 420px;
    column-gap: 0;
    max-width: 1400px;
    margin: 0 auto;
}

/* ── Thumbnail Strip (col 1, sticky) ── */
.gallery-thumbnails {
    position: sticky;
    top: 142px;
    max-height: calc(100vh - 142px);
    overflow-y: auto;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 4px;
}

.gallery-thumbnails::-webkit-scrollbar { display: none; }

.thumb-btn {
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    background: #f5f5f5;
    overflow: hidden;
    aspect-ratio: 4/5;
    flex-shrink: 0;
    transition: border-color 0.2s ease;
}

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

.thumb-btn.active,
.thumb-btn:hover {
    border-color: #1a1a1a;
}

/* ── Image Stack (col 2, drives page scroll) ── */
.gallery-images {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gallery-image-item {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #f5f5f5;
    scroll-margin-top: 142px;
}

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

/* ── Product Info (col 3, sticky with internal scroll) ── */
.product-info {
    position: sticky;
    top: 142px;
    max-height: calc(100vh - 142px);
    overflow-y: auto;
    scrollbar-width: none;
    padding: 24px 32px 60px 48px;
}

.product-info::-webkit-scrollbar { display: none; }

/* ── Sticky offset: marquee hidden, nav at top ── */
body.scrolled-down .gallery-thumbnails,
body.scrolled-down .product-info {
    top: 90px;
    max-height: calc(100vh - 90px);
}

body.scrolled-down .gallery-image-item {
    scroll-margin-top: 90px;
}

/* ── Sticky offset: WordPress admin bar (+32px) ── */
body.admin-bar .gallery-thumbnails,
body.admin-bar .product-info {
    top: 162px;
    max-height: calc(100vh - 162px);
}

body.admin-bar .gallery-image-item {
    scroll-margin-top: 162px;
}

body.admin-bar.scrolled-down .gallery-thumbnails,
body.admin-bar.scrolled-down .product-info {
    top: 122px;
    max-height: calc(100vh - 122px);
}

body.admin-bar.scrolled-down .gallery-image-item {
    scroll-margin-top: 122px;
}

/* ── Product Info Content ── */
.product-type-badge {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: #1a1a1a;
    color: #ffffff;
    display: inline-block;
    padding: 4px 10px;
    margin-bottom: 12px;
}

.product-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1a1a1a;
    margin: 0 0 8px;
    line-height: 1.3;
}

.product-detail-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
}

.product-detail-sku {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: #888;
    letter-spacing: 0.5px;
    margin: 0 0 24px;
}

/* ── Variant Pickers ── */
.variant-section {
    margin-bottom: 20px;
}

.variant-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #1a1a1a;
    margin: 0 0 10px;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.variant-btn {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 8px 16px;
    border: 1px solid #d0d0d0;
    background: #ffffff;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 44px;
    text-align: center;
}

.variant-btn:hover {
    border-color: #1a1a1a;
}

.variant-btn.active {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

.custom-size-btn {
    border-style: dashed;
    color: #888;
}

.custom-size-btn:hover {
    border-color: #888;
    color: #1a1a1a;
    border-style: solid;
}

/* ── Add to Cart ── */
.add-to-cart-btn {
    width: 100%;
    padding: 16px;
    background: #1a1a1a;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    margin: 24px 0;
    transition: background 0.2s ease;
}

.add-to-cart-btn:hover {
    background: #333333;
}

.add-to-cart-btn:disabled,
.add-to-cart-btn.oos {
    background: #aaa;
    cursor: not-allowed;
}

.add-to-cart-btn:disabled:hover,
.add-to-cart-btn.oos:hover {
    background: #aaa;
}

/* ── Product Accordions ── */
.product-accordions {
    border-top: 1px solid #e5e5e5;
}

.product-accordion {
    border-bottom: 1px solid #e5e5e5;
}

.product-accordion summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #1a1a1a;
    user-select: none;
}

.product-accordion summary::-webkit-details-marker { display: none; }

.product-accordion summary svg {
    flex-shrink: 0;
    stroke: #888;
}

.accordion-icon {
    margin-left: auto;
    font-size: 18px;
    font-weight: 300;
    color: #888;
    line-height: 1;
}

.accordion-body {
    padding: 0 0 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    line-height: 1.7;
    color: #444;
    white-space: pre-line;
}

/* ── Product Flags ── */
.product-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.flag-badge {
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 3px 8px;
}

.flag-badge.flag-new      { background: #1a1a1a; color: #fff; }
.flag-badge.flag-flash    { background: #b71c1c; color: #fff; }
.flag-badge.flag-sale     { background: #c62828; color: #fff; }
.flag-badge.flag-shipping { background: #2e7d32; color: #fff; }

/* ── Compare-at Price ── */
.product-compare-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #aaa;
    text-decoration: line-through;
    margin-left: 10px;
}

/* ── Size Info ── */
.product-size-info {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: #666;
    font-style: italic;
    margin: -10px 0 18px;
}

/* ── Size Chart ── */
.size-chart-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
}

.size-chart-table th {
    background: #f5f5f5;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 8px 12px;
    text-align: left;
    border-bottom: 2px solid #1a1a1a;
    white-space: nowrap;
}

.size-chart-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e5e5e5;
    color: #444;
}

/* ── Additional Info ── */
.addinfo-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
}

.addinfo-table tr {
    border-bottom: 1px solid #e5e5e5;
}

.addinfo-table .addinfo-key {
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 8px 16px 8px 0;
    color: #1a1a1a;
    width: 38%;
    vertical-align: top;
}

.addinfo-table .addinfo-value {
    padding: 8px 0;
    color: #444;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet: narrow the columns, keep sticky */
@media (max-width: 1024px) {
    .product-layout {
        grid-template-columns: 72px 1fr 320px;
    }

    .product-info {
        padding: 16px 24px 48px 32px;
    }
}

/* Mobile: single column, no sticky, thumbnails below images */
@media (max-width: 768px) {
    .product-breadcrumb { padding: 120px 16px 0; }

    .product-layout {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    /* Reorder: images → thumbnails → info */
    .gallery-images     { order: 1; }
    .gallery-thumbnails { order: 2; }
    .product-info       { order: 3; }

    /* Remove sticky on mobile */
    .gallery-thumbnails {
        position: static;
        max-height: none;
        overflow-y: visible;
        flex-direction: row;
        overflow-x: auto;
        padding: 8px 0;
        gap: 6px;
    }

    .thumb-btn {
        width: 64px;
    }

    .gallery-image-item {
        scroll-margin-top: 110px;
    }

    .product-info {
        position: static;
        max-height: none;
        overflow-y: visible;
        padding: 16px 0 48px;
    }
}

@media (max-width: 480px) {
    .product-name { font-size: 16px; }
    .product-detail-price { font-size: 18px; }
    .variant-btn { padding: 8px 12px; font-size: 10px; }
    .add-to-cart-btn { font-size: 12px; padding: 14px; }
}

/* ── WhatsApp order button ── */
.wa-order-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 16px;
    margin-top: 10px;
    background: #1a1a1a;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.wa-order-btn:hover { background: #333; color: #fff; }
