/* v2 product page (.com) — close visual parity with v1 hero/info layout */

.v2-scope.v2-product-com {
    padding-bottom: 0;
}

/* Trim default Journal3 grid-row padding around Recently Viewed (footer area row 4)
   on v2 product page — was 60px top + 60px bottom = 120px of dead space.
   Keep symmetric padding so cards aren't flush against the dark background edge. */
body:has(.v2-product-com) .grid-row.grid-row-4 {
    padding-top: 24px;
    padding-bottom: 24px;
}

/* Hide cross-sell carousels in Module Bottom area (Most Popular / Bestsellers).
   Recently Viewed lives in Module Footer (.module-side_products inside grid-module-footer-*)
   and stays visible. */
body:has(.v2-product-com) [class*="grid-module-bottom"],
body:has(.v2-product-com) .grid-cols-bottom,
body:has(.v2-product-com) .bottom.bottom-row {
    display: none !important;
}

/* ─── Breadcrumbs (visual parity with category v2) ─── */
.v2-product-com .v2-breadcrumbs {
    padding: var(--space-2) 0;
    font-size: 13px;
    color: var(--ink-muted);
}
.v2-product-com .v2-breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
    justify-content: center;
}
.v2-product-com .v2-breadcrumbs a {
    color: var(--brand-teal);
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 4px 8px;
}
.v2-product-com .v2-breadcrumbs__sep {
    margin: 0 8px;
    font-size: 14px;
    color: var(--ink-muted);
}
.v2-product-com .v2-breadcrumbs [aria-current="page"] {
    color: var(--ink);
}

/* ─── Hero: gallery + info, 2 columns on desktop ─── */
.v2-product__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
    gap: var(--space-5);
    align-items: start;
    padding-top: var(--space-3);
    max-width: 1280px;
    margin: 0 auto;
}

/* ─── Gallery ─── */
.v2-product__gallery {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.v2-product__main {
    position: relative;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(28, 32, 33, 0.05);
}
.v2-product__main-link {
    display: block;
    width: 100%;
    height: 100%;
}
.v2-product__main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}
.v2-product__main:hover img {
    transform: scale(1.02);
}
.v2-product__badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--hot-pink);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    z-index: 2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(229, 23, 104, 0.25);
}

.v2-product__thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: var(--space-1);
}
.v2-thumb {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.18s, transform 0.18s;
}
.v2-thumb:hover {
    border-color: var(--brand-teal);
    transform: translateY(-1px);
}
.v2-thumb.is-active {
    border: 2px solid var(--brand-teal);
    box-shadow: 0 0 0 3px rgba(74, 143, 168, 0.18);
}
.v2-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ─── Info column ─── */
.v2-product__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.v2-product__title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
    margin: 0;
}

.v2-product__price {
    font-size: 28px;
    color: var(--ink);
    font-family: var(--ff-head);
    font-weight: 600;
    display: flex;
    gap: var(--space-2);
    align-items: baseline;
}
.v2-product__price-old {
    font-size: 18px;
    color: var(--ink-muted);
    text-decoration: line-through;
    font-weight: 400;
}
.v2-product__price-now {
    color: var(--ink);
}

.v2-product__meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-1) 0 var(--space-2);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-2);
}
.v2-product__meta-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: var(--ink-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.v2-product__meta-list li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.v2-product__meta-list strong {
    color: var(--ink);
    font-weight: 500;
}
.v2-product__meta-list li:first-child::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(79, 148, 54, 0.18);
    flex-shrink: 0;
}
.v2-product__meta-list li span {
    color: var(--ink);
}
.v2-product__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    font-size: 12px;
    color: var(--ink-muted) !important;
    flex-shrink: 0;
}
.v2-product__brand img {
    max-width: 100px;
    height: auto;
    display: block;
}

/* ─── Purchase block — heaviest card (primary CTA zone) ─── */
.v2-product__purchase {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: 16px;
    border: 1px solid #D8D4CA;
    border-radius: 12px;
    background: var(--bg-white);
    box-shadow: 0 4px 16px rgba(28, 32, 33, 0.08), 0 1px 3px rgba(28, 32, 33, 0.04);
}

/* ─── CTA: qty + Add to Cart in one row ─── */
.v2-product__cta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-1);
}
.v2-product__qty {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-white);
    overflow: hidden;
}
.v2-product__qty input {
    width: 48px;
    min-height: 52px;
    border: none;
    text-align: center;
    font-family: var(--ff-body);
    font-size: 16px;
    color: var(--ink);
    background: transparent;
    outline: none;
}
.v2-product__qty-btn {
    width: 44px;
    min-height: 52px;
    border: 0;
    background: var(--brand-green);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: filter 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.v2-product__qty-btn:hover { filter: brightness(1.05); }

.v2-product__add,
.v2-product__buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    min-height: 52px;
    padding: 0 16px;
    background: var(--brand-teal);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-family: var(--ff-body);
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s;
}
.v2-product__add .j3i {
    font-size: 18px;
    line-height: 1;
}
.v2-product__add {
    background: var(--brand-teal);
    transition: filter 0.18s ease, background 0.15s ease;
}
.v2-product__add:hover {
    filter: brightness(1.1);
    background: var(--brand-teal);
}
.v2-product__buy {
    background: var(--hot-pink); /* primary — urgency CTA */
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 14px rgba(229, 23, 104, 0.25);
    transition: filter 0.18s ease, box-shadow 0.18s ease;
}
.v2-product__buy:hover {
    background: var(--hot-pink);
    filter: brightness(1.08);
    box-shadow: 0 6px 18px rgba(229, 23, 104, 0.35);
}

.v2-product__wish {
    align-self: center;
    background: transparent;
    border: 0;
    padding: 10px 4px;
    min-height: 44px;
    margin-top: 4px;
    color: var(--ink-muted);
    font-family: var(--ff-body);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s;
}
.v2-product__wish .j3i {
    font-size: 14px;
    line-height: 1;
    color: var(--brand-teal);
}
.v2-product__wish:hover {
    color: var(--ink);
    text-decoration: none;
}
.v2-product__wish:hover .j3i {
    color: var(--hot-pink);
}

/* ─── Description card — medium weight ─── */
.v2-product__desc {
    margin-top: var(--space-2);
    padding: 18px 20px;
    border: 1px solid #EDEBE4;
    border-radius: 10px;
    background: var(--bg-white);
    box-shadow: 0 2px 8px rgba(28, 32, 33, 0.05);
}
.v2-product__desc-title {
    font-family: var(--ff-head);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.v2-product__desc-title::before {
    content: "";
    width: 18px;
    height: 2px;
    background: var(--brand-teal);
    border-radius: 2px;
}
.v2-product__desc-body {
    color: var(--ink-secondary);
    font-size: 15px;
    line-height: 1.7;
}
.v2-product__desc-body p { margin: 0 0 var(--space-1); }
.v2-product__desc-body p:last-child { margin-bottom: 0; }
.v2-product__desc-body ul,
.v2-product__desc-body ol {
    margin: 0 0 var(--space-1);
    padding-left: 24px;
}
.v2-product__desc-body strong { color: var(--ink); }

/* ─── Share — lightest weight, almost transparent ─── */
.v2-product__share {
    margin-top: var(--space-1);
    padding: 12px 4px;
    border: 0;
    border-top: 1px dashed #ECEAE3;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}
.v2-product__share-title {
    font-family: var(--ff-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}
.v2-product__share-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    gap: var(--space-1);
}
.v2-product__share-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 1px solid var(--border);
    color: var(--ink-muted);
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.v2-product__share-list a:hover {
    background: var(--brand-teal);
    color: #fff !important;
    border-color: var(--brand-teal);
    text-decoration: none;
    transform: translateY(-1px);
}
.v2-product__share-list svg { display: block; }

/* ─── Newsletter — same styling as category/home v2 ─── */
.v2-newsletter {
    background: var(--brand-teal);
    color: #fff;
    text-align: center;
    padding: var(--space-5) 0;
    margin-top: var(--space-6);
}
.v2-newsletter .v2-newsletter__title {
    color: #fff;
    font-size: 28px;
    margin-bottom: var(--space-1);
}
.v2-newsletter .v2-newsletter__sub {
    color: #fff;
    font-size: 16px;
    margin: 0 auto var(--space-3);
    max-width: 600px;
}
.v2-newsletter__form {
    display: flex;
    gap: var(--space-1);
    max-width: 480px;
    margin: 0 auto;
}
.v2-newsletter__form input {
    flex: 1;
    padding: 14px 16px;
    border: 0;
    border-radius: var(--radius);
    font-size: 16px; /* 16px+ avoids iOS Safari auto-zoom on focus */
    color: var(--ink);
}
.v2-newsletter__form .v2-btn {
    background: var(--brand-teal-deep);
}
.v2-newsletter__form .v2-btn:hover {
    background: var(--ink);
}

/* ─── Sticky mobile add-to-cart bar (hidden on desktop) ─── */
.v2-product__sticky { display: none; }

/* ─── Mobile ─── */
@media (max-width: 900px) {
    .v2-product__grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
    .v2-product__title { font-size: 22px; }
    .v2-product__price { font-size: 24px; }
    .v2-product__cta {
        grid-template-columns: auto 1fr;
    }
    .v2-product__qty {
        justify-self: start;
    }
    .v2-newsletter__form {
        flex-direction: column;
    }
    .v2-product__desc-body {
        font-size: 16px;
    }

    /* Reserve space below the WHOLE page (footer included) for: our sticky bar (76px)
       + Journal3 bottom menu (var, set by JS) + iOS safe-area inset. Applying to global-wrapper
       (not <main>) so footer/Recently Viewed don't get hidden under the bar. */
    body:has(.v2-product-com) .global-wrapper {
        padding-bottom: calc(76px + var(--j3-bottom-menu-h, 0px) + env(safe-area-inset-bottom, 0px));
    }

    .v2-product__sticky {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        /* Sit ABOVE Journal3's existing bottom menu (height set by JS to --j3-bottom-menu-h). */
        bottom: var(--j3-bottom-menu-h, 0px);
        /* Above floating buttons (whatsapp, scroll-top: 98), cookie consent;
           below Journal3 toast notifications (z 15000). */
        z-index: 9000;
        background: var(--bg-white);
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06);
        padding: 8px 12px calc(0px + env(safe-area-inset-bottom, 0px));
    }

    /* Lift scroll-to-top button above our sticky bar AND any J3 bottom menu. */
    body:has(.v2-product-com) .scroll-top {
        bottom: calc(var(--j3-bottom-menu-h, 0px) + 92px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .v2-product__sticky-form {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 8px;
        align-items: stretch;
        max-width: 720px;
        margin: 0 auto;
    }
    .v2-product__qty--sticky {
        height: 44px;
    }
    .v2-product__qty--sticky input {
        width: 32px;
        min-height: 44px;
        font-size: 16px;
    }
    .v2-product__qty--sticky .v2-product__qty-btn {
        width: 38px;
        min-height: 44px;
    }
    .v2-product__add--sticky {
        height: 44px;
        min-height: 44px;
        width: 100%;
        padding: 0 12px;
        font-size: 14px;
        border-radius: 8px;
    }
    .v2-product__sticky-buy {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-height: 44px;
        background: var(--brand-teal-deep);
        color: #fff;
        border: 0;
        border-radius: 8px;
        cursor: pointer;
        font-size: 18px;
    }
    .v2-product__sticky-buy:hover { background: var(--brand-teal-dark); }
    .v2-product__sticky-wish {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
        padding: 6px;
        font-size: 13px;
        color: var(--brand-teal);
        text-align: center;
    }
    .v2-product__sticky-wish .j3i {
        font-size: 14px;
    }
    .v2-product__sticky-wish:hover {
        color: var(--brand-teal-dark);
    }
}

/* ─── lightGallery popup overrides ─── */
.lg-outer .lg-item .lg-img-wrap {
    padding: 12px;
}
.lg-outer .lg-object {
    background: #fff;
    border-radius: 8px;
}
.lg-next,
.lg-prev {
    background: #fff !important;
    border-radius: 50% !important;
    color: #222 !important;
    width: 50px !important;
    height: 50px !important;
    padding: 0 !important;
    margin-top: -25px;
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: "lg" !important;
    font-size: 22px !important;
}
.lg-content .lg-prev::after {
    display: block !important;
}
.lg-next:hover:not(.disabled),
.lg-prev:hover:not(.disabled) {
    color: #000 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.lg-outer .lg-zoom-in::after {
    content: "\e311" !important;
}
.lg-outer .lg-thumb-outer {
    background: rgba(0,0,0,.85);
}
.lg-outer .lg-thumb-item {
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.lg-outer .lg-thumb-item img {
    object-fit: contain;
    background: #fff;
}
.lg-outer .lg-thumb-item.active,
.lg-outer .lg-thumb-item:hover {
    border-color: var(--brand-teal, #4A8FA8);
}
