/* Babyfood V57 — Customer mobile polish. Keeps the existing V54/V55/V56 design and logic; mobile storefront only. */
:root{
  --bf-v57-green:#176b46;
  --bf-v57-green-deep:#0f5135;
  --bf-v57-border:#e5ebe7;
  --bf-v57-card:#ffffff;
  --bf-v57-page:#f8faf9;
  --bf-v57-shadow:0 5px 18px rgba(15,23,42,.055);
}

@media (max-width:767px){
  body.bf-v57-storefront{background:var(--bf-v57-page)!important;padding-bottom:72px!important}
  body.bf-v57-storefront .bf-site-shell{background:var(--bf-v57-page)!important}

  /* Header: retain brand look, reduce visual weight. */
  body.bf-v57-storefront .bf-app-header{background:rgba(255,255,255,.98)!important;box-shadow:0 2px 12px rgba(15,23,42,.045)!important}
  body.bf-v57-storefront .bf-main-header-row{height:54px!important;padding:0 12px!important}
  body.bf-v57-storefront .bf-main-header-row>a img{width:34px!important;height:34px!important;border-radius:50%!important}
  body.bf-v57-storefront .bf-main-header-row>a>div>div:first-child{font-size:13.5px!important;font-weight:700!important;color:#2f6e55!important}
  body.bf-v57-storefront .bf-header-search{padding:7px 12px 9px!important;border-bottom:1px solid rgba(15,23,42,.045)!important}
  body.bf-v57-storefront .bf-header-search input{height:40px!important;border:1px solid #b8c9c0!important;border-radius:11px!important;background:#fffdfa!important;font-size:13px!important;padding-left:40px!important;padding-right:70px!important;box-shadow:none!important}
  body.bf-v57-storefront .bf-header-search button[type="submit"]{height:32px!important;top:4px!important;right:4px!important;border-radius:9px!important;font-size:12px!important}

  /* Home: keep original text hero, make it app-sized so products appear sooner. */
  body.bf-v57-home .bf-home-page>section:first-of-type{padding:18px 0 17px!important;background:linear-gradient(135deg,#fff8ee 0%,#f7faf6 68%,#f1f8f4 100%)!important;border-bottom:1px solid var(--bf-v57-border)!important}
  body.bf-v57-home .bf-home-page>section:first-of-type>div.relative{padding-left:16px!important;padding-right:16px!important}
  body.bf-v57-home .bf-home-page>section:first-of-type h1{font-size:23px!important;line-height:1.22!important;margin-bottom:8px!important;letter-spacing:-.01em!important}
  body.bf-v57-home .bf-home-page>section:first-of-type p{font-size:12.5px!important;line-height:1.5!important;margin-bottom:12px!important}
  body.bf-v57-home .bf-home-page>section:first-of-type button{border-radius:11px!important;min-height:36px!important}
  body.bf-v57-home .bf-home-page>section:nth-of-type(3){padding:18px 0 22px!important;background:#fbfcfb!important}
  body.bf-v57-home .bf-home-page>section:nth-of-type(3) h2{font-size:19px!important}

  /* Products route: one search only. The global header search remains visible. */
  body.bf-v57-products .bf-v57-duplicate-search{display:none!important}
  body.bf-v57-products .products-hero-compact{padding:10px 0!important;background:linear-gradient(90deg,#f4f8f5,#fff)!important;border-bottom:1px solid var(--bf-v57-border)!important}
  body.bf-v57-products .products-hero-compact .container{padding-left:16px!important;padding-right:16px!important}
  body.bf-v57-products .products-hero-compact .products-hero-title{font-size:18px!important;letter-spacing:-.01em!important}
  body.bf-v57-products .products-hero-compact .products-hero-sort select{height:36px!important;min-width:116px!important;border-radius:999px!important;background:#fff!important;border-color:#dbe4df!important;font-size:11px!important;padding:0 10px!important}
  body.bf-v57-products .products-hero-compact+div.container{padding-top:12px!important;padding-bottom:20px!important}
  body.bf-v57-products p.bf-v57-hide-customer-admin{display:none!important}

  /* Category picker stays familiar but becomes compact and premium. */
  body.bf-v57-products button.md\:hidden.w-full.h-14{height:48px!important;border-radius:14px!important;padding-left:15px!important;padding-right:15px!important;border-color:#dfe7e2!important;box-shadow:0 2px 9px rgba(15,23,42,.04)!important;font-size:14px!important;background:#fff!important;margin-bottom:2px!important}
  body.bf-v57-products button.md\:hidden.w-full.h-14 svg{width:19px!important;height:19px!important}

  /* Product grid/cards: preserve two-column shop layout, reduce dead space. */
  body.bf-v57-storefront .bf-product-grid{gap:10px!important}
  body.bf-v57-storefront .product-card{padding:8px!important;border:1px solid #e7ece9!important;border-radius:15px!important;background:#fff!important;box-shadow:var(--bf-v57-shadow)!important}
  body.bf-v57-storefront .product-card>div:first-of-type{border-radius:11px!important;overflow:hidden!important;background:#fafbfa!important}
  body.bf-v57-storefront .product-card img{object-position:center!important}
  body.bf-v57-storefront .product-card .pt-3{padding-top:7px!important;gap:3px!important}
  body.bf-v57-storefront .product-card h3{font-size:13px!important;line-height:1.32!important;min-height:34px!important;margin:0!important}
  body.bf-v57-storefront .product-card p{font-size:10.5px!important;line-height:1.3!important;margin:0!important}
  body.bf-v57-storefront .product-card .font-bold.text-primary{font-size:14px!important;line-height:1.25!important}
  body.bf-v57-storefront .product-card button{min-height:35px!important;border-radius:10px!important;font-size:10.5px!important;margin-top:5px!important}

  /* Bottom navigation: no oversized floating centre button; same five destinations. */
  body.bf-v57-storefront .bf-mobile-nav{left:0!important;right:0!important;bottom:0!important;height:calc(64px + env(safe-area-inset-bottom))!important;border-radius:0!important;background:rgba(255,255,255,.985)!important;box-shadow:0 -6px 22px rgba(15,23,42,.08)!important;padding-bottom:env(safe-area-inset-bottom)!important}
  body.bf-v57-storefront .bf-mobile-nav>a,
  body.bf-v57-storefront .bf-mobile-nav>button{font-size:10px!important;gap:2px!important;padding-top:5px!important}
  body.bf-v57-storefront .bf-mobile-nav svg{width:21px!important;height:21px!important}
  body.bf-v57-storefront .bf-mobile-nav>a:nth-child(3)>span:first-child,
  body.bf-v57-storefront .bf-mobile-nav>button:nth-child(3)>span:first-child{width:auto!important;height:auto!important;margin-top:0!important;border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;border-radius:0!important}
  body.bf-v57-storefront .bf-mobile-nav>a:nth-child(3)>span:first-child svg,
  body.bf-v57-storefront .bf-mobile-nav>button:nth-child(3)>span:first-child svg{width:22px!important;height:22px!important}

  /* Menu sheet: keep current function, refine dimensions. */
  body.bf-v57-storefront .bf-mobile-menu-overlay>div{border-radius:24px 24px 0 0!important;padding:16px 14px calc(80px + env(safe-area-inset-bottom))!important;box-shadow:0 -20px 50px rgba(15,23,42,.15)!important}
  body.bf-v57-storefront .bf-mobile-menu-overlay h2{font-size:20px!important}
  body.bf-v57-storefront .bf-mobile-menu-overlay a{border-radius:15px!important;min-height:54px!important}

  /* Product detail/cart/checkout: conservative spacing polish only. */
  body.bf-v57-product .container,
  body.bf-v57-cart .container,
  body.bf-v57-checkout .container{padding-left:12px!important;padding-right:12px!important}
  body.bf-v57-product main,
  body.bf-v57-cart main,
  body.bf-v57-checkout main{padding-bottom:84px!important}
  body.bf-v57-product button,
  body.bf-v57-cart button,
  body.bf-v57-checkout button{border-radius:11px}
  body.bf-v57-cart .rounded-xl,
  body.bf-v57-checkout .rounded-xl{border-radius:15px!important}

  /* Chat stays clear of bottom nav without covering product actions. */
  body.bf-v57-storefront .bf-site-shell [aria-label="Open live chat"],
  body.bf-v57-storefront .bf-site-shell [aria-label="Close live chat"]{bottom:78px!important;right:12px!important;transform:scale(.82)!important;transform-origin:bottom right!important}
}

@media (display-mode:standalone) and (max-width:767px){
  body.bf-v57-storefront .bf-app-header{padding-top:env(safe-area-inset-top)}
}
