/* Shared responsive layer. Laptop layouts keep their existing composition. */
:root{--app-header:64px;--app-nav:68px;--app-safe-top:env(safe-area-inset-top,0px);--app-safe-bottom:env(safe-area-inset-bottom,0px)}
.app-nav,.mobile-checkout-action,.mobile-order-toggle{display:none}
#filters-dialog{padding:0;width:min(560px,calc(100% - 32px));max-height:calc(var(--form-vh,100dvh) - 32px);overflow:hidden}
#filters-dialog[open]{display:flex;flex-direction:column}
.sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border-bottom:1px solid #e3ebf0;background:#fff;flex-shrink:0}
.sheet-heading h2{font-size:24px;margin:0}
.sheet-heading .dialog-close{position:static;width:44px;height:44px;font-size:28px}
#mobile-filter-content{overflow-y:auto;overscroll-behavior:contain;min-height:0}
#mobile-filter-content .filters{margin:0;padding:20px;border:0;border-radius:0;background:#fff}
#mobile-filter-content .filter-title{justify-content:flex-end;padding:0 0 16px}
#mobile-filter-content .filter-title h2{display:none}
.sheet-footer{padding:16px 20px calc(16px + var(--app-safe-bottom));border-top:1px solid #e3ebf0;background:white;flex-shrink:0}
.sheet-footer .primary{width:100%;min-height:48px}

@media(max-width:1024px){
 html{scroll-padding-top:calc(var(--app-header) + var(--app-safe-top) + 20px)}
 .skip:focus,.skip-link:focus{z-index:60}
 body,body.shop-page{padding-top:calc(var(--app-header) + var(--app-safe-top));padding-bottom:calc(var(--app-nav) + var(--app-safe-bottom));background:#fff}
 .topbar{display:none}
 .site-header{position:fixed;inset:0 0 auto;z-index:35;padding-top:var(--app-safe-top);background:#ffffffed;backdrop-filter:blur(18px);border-bottom:1px solid #e7edf1}
 .site-header .nav-inner{min-height:var(--app-header);gap:12px}
 .site-header .header-logo{width:200px;height:50px;max-width:calc(100vw - 96px)}
 .site-header .mobile-nav{max-height:calc(var(--form-vh,100dvh) - var(--app-header) - var(--app-nav) - var(--app-safe-top) - var(--app-safe-bottom));overflow-y:auto;overscroll-behavior:contain;border-radius:0 0 20px 20px;padding-bottom:20px}
 .app-nav{position:fixed;inset:auto 0 0;z-index:40;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));height:calc(var(--app-nav) + var(--app-safe-bottom));padding:6px 12px calc(6px + var(--app-safe-bottom));background:#fffffff5;backdrop-filter:blur(18px);border-top:1px solid #e2eaf0;box-shadow:0 -4px 22px #15395008}
 .app-nav>a,.app-nav>button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:48px;padding:4px;border:0;border-radius:13px;color:#667b88;background:transparent;font:500 11px/1.3 'DM Sans',sans-serif;text-decoration:none}
 .app-nav svg{width:23px;height:23px;display:block}
 .app-nav [aria-current]{color:#008dbb;background:#eaf7fc}
 .app-nav .app-cart-count{position:absolute;top:0;left:calc(50% + 6px);display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border-radius:20px;background:var(--brand-blue);color:#fff;font-size:10px;border:2px solid #fff}
 body:has(dialog[open]) .app-nav,html[data-keyboard] .app-nav,html[data-keyboard] .mobile-checkout-action{visibility:hidden;pointer-events:none}
 .shop-page .floating-cart{display:none}
 .toast{bottom:calc(var(--app-nav) + var(--app-safe-bottom) + 14px)}
 .site-footer .social-links button{width:44px;height:44px}
 .site-footer .footer-columns a,.site-footer .footer-columns button{min-height:36px;display:flex;align-items:center}
 .site-footer .footer-bottom button,.site-footer .footer-bottom a{min-height:44px;display:inline-flex;align-items:center}

 /* Home: shorter opening and touch-friendly browsing while retaining the brand. */
 .home-page{--hero-height:clamp(420px,65svh,600px);--radius:36px}
 .home-page .container{width:calc(100% - 40px)}
 .home-page .opening-sections>.hero-background{height:calc(var(--hero-height) + var(--radius))}
 .home-page .hero::before{width:64%;height:105%;right:-12%;top:auto;bottom:-5%}
 .home-page .hero,.home-page .hero-inner{min-height:var(--hero-height)}
 .home-page .hero-inner{align-items:center;padding-block:38px}
 .home-page .hero-copy{max-width:55%;padding:0}
 .home-page .hero h1{font-size:clamp(32px,5.7vw,46px);line-height:1.13;letter-spacing:-1px}
 .home-page .hero p{font-size:15px;line-height:1.7;max-width:480px;margin-bottom:24px}
 .home-page .hero-actions .button{min-height:48px}
 .home-page .about-section,.home-page .quality-section,.home-page .fresh-section{padding-block:48px}
 .home-page .services-section{padding-bottom:48px}
 .home-page .pale-panel{padding:36px 24px;border-radius:28px}
 .home-page .product-overview .split{gap:28px}
 .home-page .product-overview .product-preview{height:280px;border-radius:24px}
 .home-page .product-category{padding:15px;border:1px solid #e1eaf0;border-radius:16px;background:#f7fafc}
 .home-page .product-features{gap:12px;margin-block:20px}
 .home-page .product-category strong{font-size:16px}
 .home-page .product-category>span>span{font-size:13px}
 .home-page .product-category .motion-icon{width:36px;height:36px;margin-bottom:12px}
 .home-page h2,.home-page .section-heading h2{font-size:clamp(28px,4.5vw,35px)}

 /* Shop: reachable categories, filters in a sheet, and a quiet cart tab. */
 .shop-page{--shop-gutter:20px}
 .shop-intro{padding:22px 0 16px;min-height:0;align-items:center}
 .shop-intro h1{font-size:32px}
 .shop-tools{padding:0;gap:8px}
 .browse-toolbar{position:sticky;top:calc(var(--app-header) + var(--app-safe-top));z-index:20;background:#fffffffa;backdrop-filter:blur(14px)}
 .category-navigation.has-overflow{padding-inline:0}
 .category-arrow{display:none}
 .category-bar{gap:20px;margin:0 -20px;padding:10px 20px 0;scroll-padding-inline:20px}
 .category{flex:0 0 auto;min-width:64px;min-height:72px;padding:4px 0 0;gap:8px}
 .category-icon{width:25px;height:25px}
 .category-caption{font-size:12px;padding-bottom:12px}
 .category-label-full{display:none}.category-label-short{display:inline}
 .filter-toggle{width:44px;height:44px;padding:10px}
 .filter-toggle>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
 #mobile-filter-content #filter-form{grid-template-columns:1fr;gap:20px}
 #mobile-filter-content .filter-row{padding:18px 0 0;border-left:0;border-top:1px solid #e3ebf0;gap:12px}
 #mobile-filter-content .filter-row:first-child{border-top:0;padding-top:0}
 #mobile-filter-content .filter-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 #mobile-filter-content .filter-chip{min-height:44px;font-size:14px}
 #mobile-filter-content .option-separator,#mobile-filter-content .filter-hint{grid-column:1/-1}
 #filters-dialog{width:100%;max-width:600px;margin:auto auto 0;max-height:calc(var(--form-vh,100dvh) - 20px);border-radius:22px 22px 0 0}

 /* Native sheets keep the heading/actions accessible and the body scrollable. */
 dialog.product-detail{height:var(--form-vh,100dvh);max-height:var(--form-vh,100dvh);width:100%;max-width:none;margin:0;border-radius:0}
 .detail-dialog-header{min-height:calc(58px + var(--app-safe-top));padding-top:calc(8px + var(--app-safe-top));flex-shrink:0}
 .product-detail .dialog-close{top:calc(7px + var(--app-safe-top))}
 .detail-scroll{padding:18px 20px 24px}
 .detail-layout{grid-template-columns:minmax(0,1fr);gap:16px}
 .detail-sheet-title{display:block;font-size:24px;line-height:1.2;margin:0;color:#102b4c}
 .detail-copy h2{display:none}
 .detail-layout .detail-main-image{height:clamp(150px,27dvh,260px);aspect-ratio:auto;width:100%;max-width:none;padding:14px;border-radius:16px}
 .detail-main-image img{inset:12px;width:calc(100% - 24px);height:calc(100% - 24px)}
 .detail-main-image img.softeners{width:calc(100% - 24px)}
 .detail-price strong{font-size:26px}.detail-price span{font-size:14px}
 .detail-copy>.product-brand,.detail-copy>.detail-sku,.detail-price>small,#detail-description{display:none}
 .detail-quantity{margin-top:14px}
 .quantity-stepper button,.quantity-stepper input{width:44px;height:44px}
 .detail-actions{grid-template-columns:minmax(0,1fr) 48px}
 .detail-actions #detail-buy{display:none}
 .detail-actions #detail-add{min-height:48px;background:var(--brand-blue);border-color:var(--brand-blue);color:#fff;font-size:16px}
 .detail-inquire{width:48px;min-height:48px}
 .detail-purchase-bar{padding:12px 20px calc(12px + var(--app-safe-bottom));gap:10px}
 #shop-cart[open],#cart-dialog[open]{display:flex;flex-direction:column}
 #shop-cart,#cart-dialog{width:100%;max-width:600px;height:min(760px,var(--form-vh,100dvh));max-height:var(--form-vh,100dvh);margin:auto auto 0;border-radius:24px 24px 0 0;padding:24px 20px calc(20px + var(--app-safe-bottom));overflow:hidden}
 #shop-cart h2,#cart-dialog h2{font-size:30px;margin:8px 48px 20px 0;flex-shrink:0}
 #cart-items{min-height:0;overflow-y:auto;overscroll-behavior:contain}
 #cart-summary,#cart-actions{flex-shrink:0}
 #shop-cart .cart-line{grid-template-columns:64px minmax(0,1fr);gap:12px;padding-block:18px}
 #shop-cart .bag-photo{width:64px;height:82px;grid-row:1/3}
 #shop-cart .cart-line strong{font-size:16px}
 #shop-cart .bag-item-price{grid-column:2;text-align:left;font-size:15px;padding:0}
 #shop-cart .quantity button{min-width:44px;width:44px;height:44px}
 #shop-cart .quantity .remove{width:auto;min-width:44px}
 .cart-item .quantity-control button{min-width:44px;min-height:44px}
 #inquiry-dialog,#water-test-dialog{width:min(600px,100%);height:var(--form-vh,100dvh);max-height:var(--form-vh,100dvh);margin:auto;border-radius:0}
 #inquiry-dialog .test-topline,#water-test-dialog .test-topline{min-height:calc(70px + var(--app-safe-top));padding-top:calc(12px + var(--app-safe-top))}
 #inquiry-dialog .dialog-close,#water-test-dialog .dialog-close{top:calc(8px + var(--app-safe-top))}
 #inquiry-form,#water-test-form{padding:22px 20px calc(24px + var(--app-safe-bottom))}
 #inquiry-dialog .dialog-heading h2,.test-step h2{font-size:28px}
 #inquiry-dialog .dialog-heading p,.test-description{font-size:14px;line-height:1.5}
 #inquiry-service-options{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(100px,1fr);grid-template-rows:none}
 #inquiry-service-options .inquiry-option strong{font-size:14px}
 .inquiry-property-options{height:auto;min-height:0}
 .test-choices,.test-source-options{flex:0;grid-template-rows:auto auto}
 .test-choice-body,.test-source-options label>span{height:auto;min-height:140px;aspect-ratio:1}
 #inquiry-form .test-back,#water-test-form .test-back{width:44px;height:44px;padding:10px}
 #inquiry-dialog .dialog-close,#water-test-dialog .dialog-close,dialog .dialog-close{min-width:44px;min-height:44px}
 .test-choice-body strong,.test-source-options label>span{font-size:14px}
 #question-dialog{width:100%;max-width:600px;max-height:var(--form-vh,100dvh);margin:auto auto 0;border-radius:24px 24px 0 0;padding:24px 20px calc(24px + var(--app-safe-bottom))}

 /* Checkout: order summary first; one reachable action while completing details. */
 body.checkout-page{padding-bottom:calc(110px + var(--app-safe-bottom))}
 .checkout-main{padding:24px 20px 36px}
 .checkout-main h1{font-size:36px}
 .checkout-airbnb-layout{display:flex;flex-direction:column;gap:20px}
 .checkout-form-stack,.checkout-order-card{width:100%}
 .checkout-order-card{order:-1;position:static;padding:20px;border-radius:18px}
 .checkout-section{padding:20px;border-radius:18px}
 .checkout-section h2{font-size:22px}
 .checkout-disclosure>summary{min-height:44px}
 .builder-fields label{font-size:14px}
 .builder-fields input,.builder-fields select{height:50px;font-size:16px}
 .mobile-order-toggle{display:inline-flex;align-items:center;min-height:44px;padding:6px 0;border:0;background:none;color:var(--brand-link);font-size:14px}
 .checkout-order-card.items-collapsed #order-items{display:none}
 .checkout-order-card>.checkout-button,.checkout-order-card>.preview-note{display:none}
 .mobile-checkout-action{position:fixed;inset:auto 0 0;z-index:30;display:grid;gap:8px;background:#fffffff5;backdrop-filter:blur(18px);padding:12px 20px calc(12px + var(--app-safe-bottom));border-top:1px solid #e0e9ef}
 .mobile-checkout-action>span{text-align:center;font-size:12px;color:#647985}
 .mobile-checkout-action .checkout-button{min-height:50px;font-size:16px;max-width:560px;margin:auto}
 #order-form[hidden] .mobile-checkout-action{display:none}
 .checkout-order-card .summary-heading a{min-height:44px;display:flex;align-items:center;font-size:13px}
 .checkout-order-card .order-fineprint{margin:14px 0 0}
}

@media(max-width:600px){
 .home-page{--hero-height:680px}
 .home-page .hero-inner{align-items:flex-start;padding-top:36px}
 .home-page .hero-copy{max-width:100%}
 .home-page .hero::before{width:460px;height:390px;right:-118px;top:auto;bottom:-32px}
 .home-page .product-overview .product-preview{display:none}
 .home-page .product-overview h2 br{display:none}
 .home-page .services-section .card-grid{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:88%;overflow-x:auto;gap:16px;scroll-snap-type:x mandatory;scroll-padding-inline:0;padding-bottom:14px;overscroll-behavior-x:contain}
 .home-page .service-card{scroll-snap-align:start}
 .home-page .card-image-button{aspect-ratio:1.25;border-radius:20px}
 .home-page .card-copy{padding:16px 0 0}
 .home-page .card-copy h3{font-size:20px}
 .home-page .service-switch{display:flex}
 .home-page .service-switch button{flex:1;justify-content:center;padding:12px 10px}
 .home-page .quality-section .quality-visual>.photo{aspect-ratio:1.3;border-radius:24px}
 .home-page .dealer-banner{border-radius:32px 0 32px 0;padding-block:44px}
 .home-page .fresh-grid{gap:28px}
 .home-page .subscription-details{padding:20px}
 .site-footer .footer-brand-row{grid-template-columns:minmax(0,1fr);gap:24px}
 .site-footer .footer-brand-row>.brand{grid-row:2;justify-self:center}
 .site-footer .footer-brand-row>.social-links{grid-row:3;justify-self:center}
 #reviews-dialog .reviews-close{width:44px;height:44px}
 .builder-fields{grid-template-columns:minmax(0,1fr)}
 .checkout-order-card .order-item{grid-template-columns:48px minmax(0,1fr);gap:12px}
 .checkout-order-card .order-item img{grid-row:1/3;width:48px}
 .checkout-order-card .order-item-price{grid-column:2;text-align:left}
 .checkout-order-card .order-item-price small{display:inline;margin-left:4px}
}
@media(max-width:380px){
 .shop-intro h1{font-size:26px;letter-spacing:-1px}
 .site-footer .footer-contact{grid-column:1/-1}
 .home-page .hero h1{font-size:32px}
 .home-page .hero-actions{gap:10px}
 .home-page .hero-actions .button{padding-inline:18px}
 .home-page .product-category{padding:12px}
 .home-page .product-category strong{font-size:14px}
 .product-card-open .card-title-row{gap:8px}
 .product-card-open .card-title-row .card-stock{font-size:10px}
 .cart-item{grid-template-columns:1fr;gap:10px}
 .cart-item .quantity-control{justify-self:start}
}
@media(max-width:1024px) and (max-height:600px){
 dialog.product-detail[open]{overflow:auto;display:block}
 .detail-dialog-header{position:sticky;top:0;z-index:2}
 .detail-scroll{overflow:visible}
 .detail-purchase-bar{position:relative}
 .detail-layout .detail-main-image{height:150px}
 #shop-cart,#cart-dialog{height:var(--form-vh,100dvh);overflow:auto;border-radius:0}
 #cart-items{overflow:visible;flex-shrink:0}
}

/* Match DigitalBiz: laptop-scale content, generous whitespace at 2000px+. */
@media(min-width:2000px){
 .home-page .opening-sections{max-width:1440px;margin-inline:auto}
 .home-page .hero-inner{width:calc(100% - 128px);max-width:1280px}
 .home-page .container,.home-page .site-footer .container{max-width:1180px}
 .topbar .container,.site-header .container{width:calc(100% - 64px);max-width:1376px}
 .home-page .hero-inner{max-width:1280px}
 .home-page .about-section,.home-page .quality-section,.home-page .fresh-section{padding-block:clamp(112px,10vh,160px)}
 .home-page .services-section{padding-bottom:clamp(112px,10vh,160px)}
 .home-page .dealer-banner{max-width:1440px;margin-inline:auto}
 .home-page .pale-panel{padding:80px 48px}
 .shop-page .shell{box-sizing:border-box;width:100%;max-width:1280px;padding-inline:50px}
 .shop-page .site-footer .container{width:calc(100% - 100px);max-width:1180px}
 .shop-intro{padding-top:72px}
 .shop-page .product-grid{gap:72px}
 .shop-page .floating-cart{right:max(32px,calc((100vw - 1440px)/2))}
 .checkout-main{padding-top:64px;padding-bottom:112px}
}
@media(prefers-reduced-motion:reduce){.app-nav a,.app-nav button{transition:none}}

@media(max-width:1024px){
 #water-test-form .test-back{width:46.2px;height:46.2px;min-width:46.2px;min-height:46.2px;padding:0}
}
