/* Step 5: product-only presentation. Existing gallery, picker and purchase engines own state. */
body.frefta-product {
    --primary: #b63e20; --primary-hover: #923019;
    --primary-09: #fff0e9; --primary-08: #fff0e9; --primary-12: #b63e201f; --primary-16: #b63e2029;
    --pd-ink: #192f36; --pd-muted: #58686b; --pd-line: #e1e4dc; --pd-canvas: #faf8f5;
    background: #faf8f5 !important; color: #192f36;
}
body.frefta-product .layout { gap: 32px; margin-top: 24px; margin-bottom: 40px; }
body.frefta-product .layout > * { min-width: 0; }
body.frefta-product .shell .panel { background: #fff; border: 1px solid var(--pd-line); border-radius: 20px; box-shadow: none; }
body.frefta-product .shell .panel:hover { border-color: var(--pd-line); box-shadow: none; }
body.frefta-product .gallery-panel { padding: 16px; }
body.frefta-product .product-gallery .gallery-viewport { background: #f1f0eb; border: 1px solid var(--pd-line); box-shadow: none; border-radius: 14px; }
body.frefta-product .product-gallery .gallery-slide { background: #f1f0eb; }
body.frefta-product .product-gallery .gallery-placeholder { color: var(--pd-muted); font-weight: 500; }
body.frefta-product .product-gallery--style-boxed { border-color: var(--pd-line); background: #fff; border-radius: 14px; }
body.frefta-product .product-gallery .thumb { border-radius: 10px; border: 1px solid #aab6ab; box-shadow: none; transform: none; }
body.frefta-product .product-gallery .thumb.active { border: 2px solid var(--primary); box-shadow: 0 0 0 2px #fff0e9; }
body.frefta-product .product-gallery .gallery-skeleton { background: linear-gradient(100deg,#eeeee7 20%,#fafaf6 45%,#eeeee7 70%); background-size: 220% 100%; }
body.frefta-product .product-gallery .gallery-zoom-button { background: #192f36; color: #fff; border-radius: 10px; min-height: 44px; padding: 10px 14px; font-weight: 500; }
body.frefta-product .product-gallery :is(.swipe-arrow,.thumb-carousel-btn) { min-width: 44px; min-height: 44px; border-color: #718078; background: #fff; color: var(--pd-ink); box-shadow: none; }
body.frefta-product .content-panel { padding: clamp(24px,3vw,40px); }
body.frefta-product .breadcrumb { color: var(--pd-muted); font-size: .78rem; line-height: 1.6; gap: 6px; }
body.frefta-product .breadcrumb a { color: var(--primary); }
body.frefta-product .content-panel .pill { background: #f0eee5; color: var(--pd-muted); padding: 6px 10px; font-size: .68rem; font-weight: 500; letter-spacing: .08em; }
body.frefta-product .content-panel .product-title { color: var(--pd-ink); font-size: clamp(1.7rem,2.6vw,2.5rem); line-height: 1.2; letter-spacing: -.035em !important; }
body.frefta-product .price-row { gap: 8px 16px; margin-top: 24px; }
body.frefta-product .price-row strong { color: var(--pd-ink); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
body.frefta-product .price-row > span { color: var(--pd-muted); font-size: 1rem; }
body.frefta-product .discount-pill { color: #26634e; background: #eaf3ed; box-shadow: none; padding: 5px 10px; border-radius: 8px; font-size: .74rem; font-weight: 600; }
body.frefta-product .stock { font-size: .8rem; font-weight: 500; padding: 7px 12px; border-radius: 8px; }
body.frefta-product .stock--success { background: #eaf3ed; color: #26634e; border-color: #bdd3c3; }
body.frefta-product .stock--warning { background: #fff0e9; color: #923019; border-color: #e9c1ad; }
body.frefta-product .stock--danger { background: #fff0ef; color: #ad3030; border-color: #e6b7b2; }
body.frefta-product .variation-picker {
    --vp-border: #aab6ab; --vp-primary-09: #fff0e9; --vp-primary-16: #b63e2029;
    background: #fff !important; border-color: var(--pd-line) !important; border-radius: 14px;
    box-shadow: none; padding: 20px; margin-top: 24px;
}
body.frefta-product .frefta-vp-head strong { color: var(--pd-ink); font-size: .93rem; font-weight: 600; }
body.frefta-product .frefta-vp-default-hint { color: #26634e; font-weight: 400; }
body.frefta-product .frefta-vp-label { color: var(--pd-muted); font-size: .72rem; font-weight: 600; letter-spacing: .07em; }
body.frefta-product .frefta-vp :is(.frefta-vp-chip,.frefta-vp-select) { min-height: 44px; border-radius: 10px; font-weight: 500; line-height: 1.4; }
body.frefta-product .frefta-vp-chip:hover { transform: none; }
body.frefta-product .frefta-vp-select { max-width: 100%; border-color: #718078; }
body.frefta-product .frefta-vp .cj-swatch-selected { border-color: var(--primary) !important; background: #fff0e9 !important; }
body.frefta-product .frefta-vp-summary { color: var(--pd-muted); line-height: 1.65; overflow-wrap: anywhere; }
body.frefta-product .buy-box { background: #faf8f5; border: 1px solid var(--pd-line); border-radius: 14px; box-shadow: none; padding: 20px; margin-top: 24px; }
body.frefta-product .qty-row { gap: 0; width: fit-content; max-width: 100%; margin-bottom: 20px; }
body.frefta-product .qty-row :is(button,input) { border: 1px solid #718078; min-height: 48px; border-radius: 0; box-shadow: none; background: #fff; color: var(--pd-ink); }
body.frefta-product .qty-row button { width: 44px; transform: none; }
body.frefta-product .qty-row input { width: 64px; border-inline: 0; }
body.frefta-product .qty-row button:first-child { border-radius: 10px 0 0 10px; }
body.frefta-product .qty-row button:last-child { border-radius: 0 10px 10px 0; }
body.frefta-product :is(.buy-box .btn-primary,.sticky-atc-btn,.sticky-atc-buy) {
    min-height: 48px; padding: 12px 16px; background: var(--primary); color: #fff;
    border: 1px solid transparent; border-radius: 10px; box-shadow: none !important; transform: none;
    font-size: .88rem; font-weight: 600; white-space: normal; line-height: 1.4;
}
body.frefta-product .buy-box .btn-primary::after { display: none; }
body.frefta-product :is(.buy-box .btn-primary,.sticky-atc-btn):hover { background: var(--primary-hover); transform: none; }
body.frefta-product :is(.buy-box #buyNowBtn,.sticky-atc-buy) { background: var(--pd-ink) !important; color: #fff; }
body.frefta-product .buy-box .wishlist-toggle { border: 1px solid #718078 !important; border-radius: 10px !important; min-height: 48px; color: var(--primary) !important; background: #fff !important; }
body.frefta-product :is(.btn-primary,.sticky-atc-btn,.sticky-atc-buy):disabled { opacity: .65; cursor: not-allowed; transform: none; }
body.frefta-product .oos-message { border-radius: 10px; font-weight: 500; color: #ad3030; background: #fff0ef; border-color: #e6b7b2; }
body.frefta-product .highlight-strip { background: #192f36; color: #fff; box-shadow: none; border-radius: 14px; font-size: .88rem; font-weight: 500; }
body.frefta-product .highlight-strip i { color: #f4ad92 !important; }
body.frefta-product .product-cart-shortcut { font-size: .85rem; }
body.frefta-product .layout > .builder-product-tabs { border: 1px solid var(--pd-line); border-radius: 20px; background: #fff; padding: 32px; }
body.frefta-product .builder-tabs-nav { gap: 8px; border-color: var(--pd-line); margin-bottom: 24px; padding-bottom: 16px; }
body.frefta-product .builder-tab-btn { min-height: 44px; padding: 10px 16px; border: 1px solid #718078; border-radius: 10px; background: #fff; color: var(--pd-ink); box-shadow: none; font-weight: 500; }
body.frefta-product .builder-tab-btn.active { background: var(--pd-ink); border-color: var(--pd-ink); color: #fff; box-shadow: none; }
body.frefta-product :is(.builder-tab-panel,.copy) { color: var(--pd-muted); font-size: .95rem; line-height: 1.8; }
body.frefta-product .product-description-toggle { min-height: 44px; border-radius: 10px; border-color: #718078; color: var(--pd-ink); background: #fff; }
body.frefta-product .product-share-section { border-color: var(--pd-line); }
body.frefta-product .share-row a { border: 1px solid #718078; border-radius: 10px; min-height: 44px; font-weight: 500; transform: none; }
body.frefta-product .related-grid { gap: 24px; }
body.frefta-product .related-card { border: 1px solid var(--pd-line); border-radius: 14px; background: #fff; box-shadow: none; transform: none; }
body.frefta-product .related-card:hover { transform: none; box-shadow: 0 8px 24px #192f360a; }
body.frefta-product .related-card .image { background: #f1f0eb; }
body.frefta-product .related-card .body { padding: 20px; }
body.frefta-product .related-card h4 { color: var(--pd-ink); font-weight: 500; line-height: 1.45; min-height: 0; }
body.frefta-product .related-card p { color: var(--pd-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
body.frefta-product .reviews-section > .panel { border-radius: 20px; }
body.frefta-product .review-card { border-color: var(--pd-line) !important; }
body.frefta-product .review-form-wrap { background: #faf8f5 !important; border-color: var(--pd-line) !important; border-radius: 14px !important; }
body.frefta-product .review-form-wrap :is(input:not([type="hidden"]),textarea) { border-color: #718078 !important; border-radius: 10px !important; font-size: 16px !important; }
body.frefta-product :is(.shell,.sticky-atc-bar) :is(a,button,input,select,textarea):focus-visible { outline: 3px solid #1d677e; outline-offset: 3px; }
body.frefta-product .gallery-lightbox button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (max-width: 860px) {
    body.frefta-product .layout { gap: 20px; margin-top: 16px; }
    body.frefta-product .gallery-panel { border-radius: 14px; padding: 12px !important; }
    body.frefta-product .content-panel { padding: 24px !important; border-radius: 14px; }
    body.frefta-product .variation-picker { padding: 16px !important; }
    body.frefta-product .variation-picker select { font-size: 16px; }
    body.frefta-product .related-grid { gap: 12px; }
    body.frefta-product .related-card .body { padding: 12px; }
    body.frefta-product .reviews-section > .panel { padding: 20px !important; border-radius: 14px; }
}
@media (max-width: 760px) {
    body.frefta-product .toast { bottom: calc(var(--frefta-bottom-space, 90px) + 8px) !important; }
    /* Visibility stays with the existing scroll controller; keep its inline display state. */
    body.frefta-product .sticky-atc-bar {
        background: #fff !important; border: 1px solid #aab6ab !important;
        border-radius: 14px !important; box-shadow: 0 8px 32px #192f361c !important;
        bottom: calc(var(--frefta-nav-clearance) + 12px) !important;
        padding: 12px !important; animation: none;
    }
    body.frefta-product .sticky-atc-inner { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; max-width: none; }
    body.frefta-product .sticky-atc-info { display: flex !important; justify-content: space-between; align-items: baseline; gap: 12px; min-width: 0; }
    body.frefta-product .sticky-atc-name { font-size: .75rem; color: var(--pd-muted); font-weight: 500; min-width: 0; }
    body.frefta-product .sticky-atc-price { margin: 0; font-size: 1rem; font-weight: 650; color: var(--pd-ink); flex-shrink: 0; font-variant-numeric: tabular-nums; }
    body.frefta-product .sticky-atc-actions { display: flex; flex-wrap: wrap; gap: 8px !important; width: 100%; }
    body.frefta-product .sticky-atc-actions > button { flex: 1 1 90px; min-width: 0; min-height: 44px; padding: 10px; font-size: .8rem; }
    body.frefta-product .sticky-atc-qty { border: 1px solid #718078; border-radius: 10px; box-shadow: none; }
    body.frefta-product .sticky-atc-qty :is(input,button) { min-height: 44px; height: 44px; color: var(--pd-ink); font-size: .9rem; }
    body.frefta-product .sticky-atc-bar .oos-message { width: 100%; margin: 0; min-height: 44px; }
    body.frefta-product .layout > .builder-product-tabs { padding: 20px 16px; border-radius: 14px; }
    body.frefta-product .buy-box { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    body.frefta-product :is(.gallery-skeleton,.builder-tab-panel.active,.sticky-atc-bar) { animation: none !important; }
    body.frefta-product :is(.shell,.sticky-atc-bar) :is(a,button,img) { transition: none !important; }
}
