/* Public product pages: a quiet, stable layout around the existing control system. */
html:has(body.product-ui),
html.product-ui-document {
    background: #131415;
    color-scheme: dark;
    scrollbar-gutter: stable;
}

body.product-ui {
    --product-bg: #131415;
    --product-surface: #1d1e20;
    --product-raised: #242526;
    --product-border: #414244;
    --product-text: #f2f0ec;
    --product-muted: #b6b2aa;
    --product-accent: #e19173;
    --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    margin: 0;
    background: var(--product-bg);
    color: var(--product-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
}

body.product-ui .fb-header { right: var(--product-scrollbar-compensation, 0px); }
body.product-ui :is(.particle-canvas, #particleCanvas, .noise-overlay) { display: none; }
body.product-ui .product-page,
body.product-ui .product-page * { box-sizing: border-box; }
body.product-ui .product-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 104px 24px 64px;
    position: relative;
}

body.product-ui .product-header { display: grid; gap: 12px; margin: 0 0 24px; }
body.product-ui .breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; color: var(--product-muted); font-size: 14px; }
body.product-ui .breadcrumbs a { color: var(--product-muted); text-decoration: none; text-underline-offset: 4px; }
body.product-ui .breadcrumbs a:hover { color: var(--product-text); text-decoration: underline; }
body.product-ui .breadcrumbs .sep { opacity: .6; }
body.product-ui .product-page-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -.025em;
    color: var(--product-text);
    margin: 0;
    overflow-wrap: anywhere;
    text-wrap: pretty;
}
body.product-ui .product-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0; }
body.product-ui .product-page-brand { color: var(--product-muted); font-size: 14px; }
body.product-ui .product-page-brand span { font: inherit; color: var(--product-text); letter-spacing: 0; text-shadow: none; }
body.product-ui .wb-article-copy { position: relative; white-space: nowrap; font-variant-numeric: tabular-nums; }
body.product-ui .wb-article-value { letter-spacing: .015em; }
body.product-ui .article-toast { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); opacity: 0; pointer-events: none; white-space: nowrap; border: 1px solid #5c8268; border-radius: 6px; padding: 4px 8px; font-size: 12px; }
body.product-ui .wb-article-copy.copied .article-toast { opacity: 1; }

body.product-ui .product-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
body.product-ui .product-gallery { min-width: 0; width: 100%; overflow: hidden; border: 1px solid var(--product-border); border-radius: 12px; background: var(--product-surface); transform: none; box-shadow: none; }
body.product-ui .gallery-main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--product-surface);
    cursor: zoom-in;
}
body.product-ui .gallery-main img { display: block; width: 100%; height: 100%; object-fit: contain; transform: none; transition: none; }
body.product-ui .gallery-thumbs { display: flex; gap: 8px; padding: 12px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-color: #656667 var(--product-surface); scrollbar-width: thin; }
body.product-ui .gallery-thumbs::-webkit-scrollbar { height: 8px; background: var(--product-surface); }
body.product-ui .gallery-thumbs::-webkit-scrollbar-track { background: var(--product-surface); }
body.product-ui .gallery-thumbs::-webkit-scrollbar-thumb { background: #656667; border: 2px solid var(--product-surface); border-radius: 6px; }
body.product-ui .gallery-thumb { display: block; flex: 0 0 64px; width: 64px; height: 64px; min-height: 44px; padding: 0; overflow: hidden; border: 2px solid var(--product-border); border-radius: 8px; background: var(--product-raised); cursor: pointer; opacity: .75; }
body.product-ui .gallery-thumb:hover, body.product-ui .gallery-thumb.active { opacity: 1; }
body.product-ui .gallery-thumb.active { border-color: var(--product-accent); }
body.product-ui .gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }

body.product-ui .product-summary { display: grid; gap: 20px; min-width: 0; }
body.product-ui .product-page-desc { margin: 0; color: #dedbd5; font-size: 17px; line-height: 1.7; overflow-wrap: anywhere; }
body.product-ui .product-commerce { display: grid; gap: 6px; padding: 18px 20px; border: 1px solid var(--product-border); border-radius: 10px; background: var(--product-surface); }
body.product-ui .product-commerce p { margin: 0; }
body.product-ui .stock-status { color: var(--product-muted); font-size: 15px; font-weight: 600; }
body.product-ui .stock-status--in_stock { color: #b8d4c0; }
body.product-ui .stock-status--out_of_stock { color: var(--product-muted); }
body.product-ui .catalog-meta { color: var(--product-muted); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
body.product-ui .catalog-price { color: var(--product-text); font-size: 28px; font-weight: 650; line-height: 1.3; font-variant-numeric: tabular-nums; }
body.product-ui .catalog-price span { color: var(--product-muted); font-size: 14px; font-weight: 400; }
body.product-ui .price-note { font-size: 16px; color: var(--product-text); line-height: 1.55; }
body.product-ui .buy-section { display: grid; gap: 10px; margin: 0; }
body.product-ui .btn-buy { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border-radius: 8px; border: 1px solid var(--product-accent); background: var(--product-accent); color: #211a17; font: 600 15px/1.4 var(--font-body); text-decoration: none; text-align: center; }
body.product-ui .btn-buy svg { flex: 0 0 18px; width: 18px; height: 18px; }
body.product-ui .buy-note { display: block; color: var(--product-muted); font-size: 13px; line-height: 1.55; margin: 0; }
body.product-ui .product-promo { display: grid; gap: 12px; padding: 16px 18px; margin: 0; border: 1px solid #554236; border-radius: 10px; background: #24211f; }
body.product-ui .product-promo-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
body.product-ui .product-promo-badge { display: inline-flex; padding: 4px 10px; border: 1px solid #735343; border-radius: 99px; color: #f2b79d; background: #342820; font-size: 12px; font-weight: 650; letter-spacing: .035em; line-height: 1.5; }
body.product-ui .product-promo-dates { color: var(--product-muted); font-size: 12px; }
body.product-ui .product-promo-row { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
body.product-ui .product-promo-code { color: var(--product-text); font-size: 20px; font-weight: 650; letter-spacing: .035em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
body.product-ui .promo-copy-btn { width: 168px; flex: 0 0 168px; min-height: 44px; padding: 10px 12px; white-space: nowrap; font: 600 14px/1.4 var(--font-body); }
body.product-ui .product-promo-text { margin: 0; color: #dedbd5; font-size: 14px; line-height: 1.6; }
body.product-ui .product-promo-info { color: var(--product-muted); font-size: 13px; line-height: 1.5; }
body.product-ui .product-promo-info-mark { display: none; }

body.product-ui .product-content { display: grid; gap: 32px; width: 100%; margin: 48px 0 0; min-width: 0; }
body.product-ui .product-content:empty { display: none; }
body.product-ui .product-content > :is(section, .pump-section) { width: 100%; max-width: none; margin: 0; padding: 0; scroll-margin-top: 96px; }
body.product-ui .product-content h2 { font: 650 26px/1.25 var(--font-display); letter-spacing: -.015em; color: var(--product-text); margin: 0 0 16px; }
body.product-ui .product-content h3 { font: 600 18px/1.4 var(--font-display); color: var(--product-text); margin: 0 0 8px; }
body.product-ui .product-content p { max-width: 80ch; margin: 0; color: #dedbd5; font-size: 17px; line-height: 1.75; overflow-wrap: anywhere; }
body.product-ui .product-content p + p { margin-top: 14px; }
body.product-ui .product-content a { color: #f2b79d; text-underline-offset: 4px; }
body.product-ui .product-content ol { max-width: 80ch; padding-left: 24px; margin: 0; }
body.product-ui .product-content li { color: #dedbd5; font-size: 17px; line-height: 1.75; padding-left: 4px; overflow-wrap: anywhere; }
body.product-ui .product-content li + li { margin-top: 8px; }
body.product-ui .product-content ol + p { margin-top: 14px; }
body.product-ui .product-use-notes { display: grid; gap: 20px; margin-top: 20px; }
body.product-ui .pump-specs { margin: 0; width: 100%; max-width: 960px; }
body.product-ui .pump-specs > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--product-border); font-size: 16px; line-height: 1.6; }
body.product-ui .pump-specs dt { min-width: 0; color: var(--product-muted); overflow-wrap: anywhere; }
body.product-ui .pump-specs dd { min-width: 0; margin: 0; color: var(--product-text); overflow-wrap: anywhere; }
body.product-ui .pump-faq-list { display: grid; gap: 8px; max-width: 960px; }
body.product-ui .pump-faq-list details { min-width: 0; border: 1px solid var(--product-border); background: var(--product-surface); border-radius: 10px; overflow: hidden; }
body.product-ui .pump-faq-list summary { color: var(--product-text); font-weight: 600; line-height: 1.5; }
body.product-ui .pump-faq-list details p { padding: 4px 16px 16px; font-size: 16px; }
body.product-ui .pump-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
body.product-ui .pump-related a { display: flex; flex-direction: column; gap: 8px; padding: 16px; color: var(--product-text); border: 1px solid var(--product-border); background: var(--product-surface); border-radius: 10px; text-decoration: none; overflow-wrap: anywhere; }
body.product-ui .pump-related a:hover { border-color: var(--product-accent); }
body.product-ui .pump-related small { font-size: 13px; color: var(--product-muted); }
body.product-ui .pump-related + p { margin-top: 16px; }
body.product-ui .product-loading { grid-column: 1 / -1; width: 100%; min-height: 160px; display: grid; place-content: center; gap: 12px; padding: 32px; color: var(--product-muted); text-align: center; }
body.product-ui .product-loading p { margin: 0; }
body.product-ui .product-loading a { color: #f2b79d; }
body.product-ui .product-loading .loader { margin: 0 auto; width: 32px; height: 32px; border: 2px solid var(--product-border); border-top-color: var(--product-accent); border-radius: 50%; animation: product-loading-spin 1s linear infinite; }
@keyframes product-loading-spin { to { transform: rotate(360deg); } }

body.product-ui .lightbox-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; background: #131415f5; opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .18s ease, visibility .18s ease; }
body.product-ui .lightbox-modal.active { opacity: 1; pointer-events: auto; visibility: visible; }
body.product-ui .lightbox-content { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; position: relative; }
body.product-ui .lightbox-img { display: block; max-width: calc(100vw - 120px); max-height: calc(100vh - 104px); object-fit: contain; user-select: none; }
body.product-ui .lightbox-close { position: absolute; top: 16px; right: 16px; z-index: 10001; }
body.product-ui .lightbox-counter { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); color: var(--product-muted); font-size: 14px; z-index: 10001; font-variant-numeric: tabular-nums; }
body.product-ui .lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10001; }
body.product-ui .lightbox-nav.prev { left: 16px; }
body.product-ui .lightbox-nav.next { right: 16px; }
body.product-ui :is(.gallery-main, .gallery-thumb, .product-content a):focus-visible { outline: 2px solid #f6baa1; outline-offset: 3px; }

@media (max-width: 768px) {
    body.product-ui .product-page { padding: 88px 20px 48px; }
    body.product-ui .product-page-title { font-size: 26px; }
    body.product-ui .product-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    body.product-ui .product-summary { gap: 16px; }
    body.product-ui .product-content { gap: 32px; margin-top: 32px; }
    body.product-ui .product-content h2 { font-size: 23px; }
    body.product-ui .product-content > :is(section, .pump-section) { scroll-margin-top: 84px; }
    body.product-ui .pump-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    body.product-ui .product-page { padding-right: 16px; padding-left: 16px; }
    body.product-ui .product-page-desc, body.product-ui .product-content :is(p, li) { font-size: 16px; }
    body.product-ui .pump-specs > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; font-size: 15px; }
    body.product-ui .pump-related { grid-template-columns: minmax(0, 1fr); }
    body.product-ui .product-commerce { padding: 16px; }
    body.product-ui .product-promo { padding: 16px; }
    body.product-ui .lightbox-img { max-width: 100vw; max-height: calc(100dvh - 120px); }
    body.product-ui .lightbox-nav { top: auto; bottom: 16px; transform: none; }
    body.product-ui .lightbox-nav.prev { left: calc(50% - 54px); }
    body.product-ui .lightbox-nav.next { right: calc(50% - 54px); }
}
@media (max-width: 360px) {
    body.product-ui .fb-header-inner { gap: 8px; }
    body.product-ui .fb-primary > a, body.product-ui .fb-menu > summary { white-space: nowrap; }
    body.product-ui .promo-copy-btn { width: 100%; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    body.product-ui .product-page *, body.product-ui .lightbox-modal { animation: none; transition: none; scroll-behavior: auto; }
}
@media print {
    body.product-ui { background: white; color: black; }
    body.product-ui :is(.fb-header, .fb-footer, .site-footer, .gallery-thumbs, .buy-section, .wb-article-copy, .promo-copy-btn, .lightbox-modal) { display: none; }
    body.product-ui .product-page { padding: 0; }
    body.product-ui .product-layout { grid-template-columns: 1fr 1fr; }
    body.product-ui .product-content :is(h2, h3, p, li, dt, dd), body.product-ui .product-page-title { color: black; }
}
