/* Frontend presentation only. Breakpoints use CSS pixels, including OS scaling.
   Keep long text/authentication readable and full-bleed templates opt-in. */
/* Homepage posters keep their intrinsic ratio; copy never determines height.
   Legacy fixed-height/overlay values remain saved for rollback, but are not used. */
.hero-slider.hero-slider--natural{overflow:hidden}
.hero-slider.hero-slider--natural .hero-slide{display:block;min-height:0;height:auto}
.hero-slider.hero-slider--natural .hero-slide.is-leaving{position:absolute;inset:0 0 auto}
.hero-slider.hero-slider--natural .hero-slide[hidden]{display:none}
.hero-slider--natural .hero-slide>picture{display:block}
.hero-slider.hero-slider--natural .hero-image{display:block;position:static;inset:auto;width:100%;height:auto;object-fit:contain;filter:none;opacity:1}
.hero-slider.hero-slider--natural .hero-shade{display:none}
.hero-slider.hero-slider--natural .hero-copy{position:absolute;inset:0;height:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding-block:clamp(20px,4vw,72px)}
.hero-slider--natural .hero-copy[data-align=center]{align-items:center}
.hero-slider--natural .hero-copy[data-align=right]{align-items:flex-end}
.hero-slider--natural .hero-slide[data-position=start] .hero-copy{justify-content:flex-start}
.hero-slider--natural .hero-slide[data-position=end] .hero-copy{justify-content:flex-end}
.hero-slider--natural .hero-copy :is(h1,h2){text-shadow:none}
.hero-slider--natural .slide-dot:not(.is-active){background:#60778280}
.hero-slider--natural .slide-counter{color:#1f4152;background:#ffffffe0;border-radius:4px;padding:1px 6px}
@media(min-width:601px) and (max-width:1000px){
 .hero-slider.hero-slider--natural .hero-copy{padding:20px 40px 48px}
 .hero-slider.hero-slider--natural .hero-copy :is(h1,h2){font-size:32px;line-height:1.3;margin-bottom:12px}
 .hero-slider--natural .hero-kicker{margin-bottom:10px}
 .hero-slider.hero-slider--natural .hero-copy>p:not(.hero-kicker){font-size:13px;margin-bottom:16px}
}
@media(max-width:600px){
 .hero-slider.hero-slider--natural .hero-copy{padding:12px 36px 32px}
 .hero-slider.hero-slider--natural .hero-copy :is(h1,h2){max-width:80%;font-size:clamp(16px,4.5vw,22px);line-height:1.25;letter-spacing:0;margin-bottom:8px}
 .hero-slider.hero-slider--natural .hero-copy>p{display:none}
 .hero-slider.hero-slider--natural .hero-copy .button{min-width:0;min-height:32px;padding:6px 12px;font-size:12px}
 .hero-slider--natural .slide-controls{bottom:10px;gap:12px}
 .hero-slider--natural .slide-dot{width:8px;height:8px}
 .hero-slider--natural .slide-pause{bottom:7px;left:36px;padding:2px 8px;font-size:10px}
}
body:not(.bg-login-embedded){--bgr-max:1280px;--bgr-gutter:32px}
@media(min-width:1920px){body:not(.bg-login-embedded){--bgr-max:1680px;--bgr-gutter:40px}}
@media(min-width:2560px){body:not(.bg-login-embedded){--bgr-max:2000px;--bgr-gutter:48px}}
@media(min-width:3840px){body:not(.bg-login-embedded){--bgr-max:2400px;--bgr-gutter:64px}}
@media(max-width:1100px){body:not(.bg-login-embedded){--bgr-gutter:24px}}
@media(max-width:600px){body:not(.bg-login-embedded){--bgr-gutter:16px}}

body:not(.bga-audience-dealer):not(.bg-login-embedded){--bg-page-width:var(--bgr-max);--bg-page-gutter:var(--bgr-gutter)}
body:not(.bg-login-embedded) .wrap,
body:not(.bg-login-embedded) .bgn-header .bgn-header-inner,
body.bga-audience-dealer .bga-dealer-shell main.content,
body.bga-audience-dealer .bga-dealer-shell .wrap,
body.bga-audience-dealer .bga-workspace-heading,
body.bga-audience-dealer .bdc-navbar,
body.bga-audience-dealer .bga-compact-footer>.wrap{
 width:min(var(--bgr-max),calc(100% - var(--bgr-gutter)*2));
 max-width:var(--bgr-max);margin-inline:auto;box-sizing:border-box;min-width:0;
}
/* Nested feature containers use their parent's frame, not another pair of gutters. */
body:not(.bg-login-embedded) main.content>.entry,
body.bga-audience-dealer .bga-dealer-shell .entry,
body.bga-audience-dealer :is(.bdc-portal,.bgp-wrap),
body.bga-audience-dealer .bgp-wrap:has(.bdpu-form),
body.bga-audience-dealer .bgp-wrap:has(.bpl-order){max-width:none;min-width:0;width:100%;box-sizing:border-box}
body:not(.bg-login-embedded) main .wrap .wrap{width:100%;max-width:none}
/* Verification keeps the common page width. Only the controls have a measure;
   remove the tinted panel and underline that visually stretched across it. */
body:not(.bg-login-embedded) main .bgv-intro{margin-inline:auto;text-align:center}
body:not(.bg-login-embedded) main .bgv-form.bgo-search{
 width:100%;max-width:560px;margin-inline:auto;box-sizing:border-box;text-align:center;
 padding:0;background:transparent;border:0;box-shadow:none;
}
body:not(.bg-login-embedded) main .bgv-input-row{
 flex-direction:column;align-items:center;gap:16px;
}
body:not(.bg-login-embedded) main .bgv-input-row #security-code{
 flex:none;width:min(100%,560px)!important;min-height:48px;
 border:1px solid #c7d5df;border-radius:4px;background:#fff;
 padding:12px 16px;box-shadow:none;text-align:center;
}
body:not(.bg-login-embedded) main .bgv-input-row #security-code:focus{
 border-color:#1880b5;outline:2px solid #1880b530;outline-offset:2px;box-shadow:none;
}
body:not(.bg-login-embedded) main .bgv-input-row #security-code:user-invalid{border-color:#a41f35}
body:not(.bg-login-embedded) main .bgv-input-row button{align-self:center;width:auto}
/* Keep authentication fields at a usable width inside a growing service frame. */
body.bg-member-login-page:not(.bg-login-embedded) main.content>.entry{max-width:none!important}
body:not(.bg-login-embedded) .bgca-entry{grid-template-columns:minmax(0,1fr) minmax(0,640px);justify-content:space-between;gap:clamp(24px,3vw,64px)}
body.bdc-login-page:not(.bg-login-embedded) main.content>.entry{max-width:1060px}
body.bga-audience-dealer .bdu-settings{width:100%;max-width:1200px;margin-inline:auto}
body.bga-audience-dealer .bdu-settings-compact .bdu-settings-actions{padding-inline:0}
body.bga-audience-dealer .bdu-settings-compact .bdu-settings-action-inner{width:min(1200px,calc(100% - var(--bgr-gutter)*2));max-width:1200px}
body:not(.bg-login-embedded) :is(.bgca-service-options,.bgca-form-card,.bps-detail-info,.product-image,.bdu-form-grid>label){min-width:0;box-sizing:border-box}
body:not(.bg-login-embedded) :is(.brp-card-copy,.bdpu-product-info,.bgcs-card){min-width:0;overflow-wrap:anywhere}
body:not(.bg-login-embedded) main :is(img,video,iframe){max-width:100%}
body:not(.bg-login-embedded) main :is(input,select,textarea){max-width:100%;box-sizing:border-box}
/* Full-width keeps the template's direct-text gutters and edge-to-edge bands. */
body:not(.bg-login-embedded) main.site-full-width-content{width:100%;max-width:none}

@media(min-width:1600px){
 body:not(.bg-login-embedded) .product-grid{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
 body.bga-audience-dealer .bgp-catalog{grid-template-columns:repeat(auto-fit,minmax(340px,1fr))}
}
/* Home recommendations: 3 / 4 / 5 visible products, based on usable CSS width.
   Keep the existing mobile swipe treatment and larger configured lists. */
body #recommended.recommended-adaptive .product-card:nth-child(n+4){display:none}
@media(min-width:651px){
 body #recommended.recommended-adaptive .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(min-width:1600px){
 body #recommended.recommended-adaptive .product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
 body #recommended.recommended-adaptive .product-card:nth-child(4){display:block}
}
@media(min-width:2240px){
 body #recommended.recommended-adaptive .product-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
 body #recommended.recommended-adaptive .product-card:nth-child(5){display:block}
}
@media(max-width:900px){
 body:not(.bg-login-embedded) .product-detail{grid-template-columns:minmax(0,1fr);gap:28px}
 body:not(.bg-login-embedded) .bgca-entry{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
}
@media(max-width:650px){
 body:not(.bg-login-embedded) .bgca-entry{grid-template-columns:minmax(0,1fr);gap:22px}
 body:not(.bg-login-embedded) main :is(.product-detail,.editorial-grid,.coupon-grid){grid-template-columns:minmax(0,1fr)}
 body:not(.bg-login-embedded) main :is(.member-strip>.wrap,.contact-band>.wrap){flex-wrap:wrap}
 body:not(.bg-login-embedded) main .entry>table{display:block;max-width:100%;overflow-x:auto}
 body:not(.bg-login-embedded) main pre{max-width:100%;overflow-x:auto}
}

/* Frontend typography: native sans-serif glyphs and readable text contrast.
   Keep OS text rasterisation native; no downloaded font, scale, or text stroke. */
body:not(.wp-admin){
 --bg-site-font:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Noto Sans SC","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
 --bga-ui-font:var(--bg-site-font);
 --bg-site-text:#30343b;--bg-site-muted:#555e68;--ink:#202124;--muted:var(--bg-site-muted);
 font-family:var(--bg-site-font);
}
body:not(.wp-admin) :is(button,input,select,textarea){font-family:var(--bg-site-font)}
body:not(.wp-admin) main.content{color:var(--bg-site-text)}
body:not(.wp-admin) main :is(h1,h2,h3,h4){font-family:var(--bg-site-font);font-weight:600}
body:not(.wp-admin) main .bg-brand-page{--brand-muted:var(--bg-site-muted)}
body:not(.wp-admin) main :is(.entry>p,.bgv-intro,.bps-summary,.bg-brand-hero-copy>p,.brp-card-copy>.brp-function){
 color:var(--bg-site-text);font-size:16px;line-height:1.8;
}
body:not(.wp-admin) main :is(.bgv-muted,.bg-brand-note,.bgca-first-use,.bgca-service-options small,.bgca-form-card>p,.bgca-help,.bps-detail-info>.muted,.brp-fit,.brp-stock){color:var(--bg-site-muted)}
body:not(.wp-admin) main :is(.bgv-muted,.bgca-first-use,.bgca-help){font-size:13px;line-height:1.8}
body:not(.wp-admin) main .bgca-form-card label{font-size:15px}
body:not(.wp-admin) main :is(input,textarea)::placeholder{color:#69717d;opacity:1}
body:not(.wp-admin) .bgn-header .nav>a:not([aria-current]){font-weight:500}
/* Public product cards read public retail prices only. */
/* Catalogue page size is 12: keep each full page in complete rows. */
body main.content>.product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(min-width:1600px){body main.content>.product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:2560px){body main.content>.product-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:600px){body main.content>.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
body main.content>.product-grid>.product-card{display:flex;flex-direction:column}
body main.content>.product-grid>.product-card>a{display:flex;flex:1;flex-direction:column}
body main.content>.product-grid>.product-card .bg-card-purchase{margin-top:auto}
body .product-grid .product-card .bg-card-purchase{display:grid;grid-template-rows:minmax(38px,auto) auto;justify-items:start}
body .product-grid .product-card .bg-card-purchase>.product-button{grid-row:2}
/* Cover remains visible underneath, including while a secondary image loads. */
body .product-card img.bg-card-hover-image{opacity:0;pointer-events:none;transition:opacity .2s}
@media(hover:hover) and (pointer:fine){body .product-card:hover img.bg-card-hover-image{opacity:1}}
@media(prefers-reduced-motion:reduce){body .product-card img.bg-card-hover-image{transition:none}}
body .product-grid .product-card .bg-card-retail{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;margin:0 0 6px;font-size:12px;line-height:1.5;color:var(--bg-site-muted,#6f7d86)}
body .product-grid .product-card .bg-card-purchase>.bg-card-retail{grid-row:1}
body .product-grid .product-card .bg-card-retail strong{font-size:21px;font-weight:600;font-variant-numeric:tabular-nums;color:var(--blue,#1684ad)}
@media(max-width:600px){body .product-grid .product-card .bg-card-retail strong{font-size:18px}body .product-grid .product-card .bg-card-purchase{grid-template-rows:minmax(33px,auto) auto}}

/* Local form shorthands must not consume the space used by dropdown arrows.
   Preserve each control's existing arrow, and leave listboxes/multi-selects alone. */
body:not(.wp-admin) select:not([multiple]):is(:not([size]),[size="0"],[size="1"]){
 padding-inline-end:36px!important;
 text-overflow:ellipsis;white-space:nowrap;
}
