/* GOATBUY — one search bar per page (PC) + the mobile app layout (phones up to 760 px).
   The PC layout above 760 px is unchanged apart from the search bar. */

/* ---------- PC: the home and Search pages already have their own search bar ---------- */
body[data-route="home"] .hdr .hdr-search,
body[data-route="search"] .hdr .hdr-search { display: none; }
.hs-go, .m-only, .m-hero-cta, .bnav, .cur-btn, .hs-plats { display: none; }

@media (max-width: 760px) {
  body { background: #F6F4F2; }

  /* ---------- header: logo + round buttons, then the search pill ---------- */
  .hdr { background: rgba(246,244,242,.92); border-bottom: 0; }
  .hdr-top { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; row-gap: 12px; column-gap: 8px; }
  .brand { order: 0; margin-right: auto; }
  .brand img.ic { width: 34px; height: 34px; } .brand img.wm { height: 16px; }
  .hdr-actions { order: 1; flex-wrap: nowrap; margin-left: 0; gap: 8px; }
  .menu-btn { order: 2; }
  .hdr-actions > a.icon-btn[href="#/cart"], .hdr-actions > a.icon-btn[href="#/notifications"], .hdr-actions > .btn, .hdr-actions .user-chip, .hdr-actions > div:has(.user-chip) { display: none; }
  .lc-wrap { display: flex; gap: 8px; }
  .lc-btn, .cur-btn, .menu-btn { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); font-weight: 700; font-size: 17px; color: var(--ink); cursor: pointer; transition: transform .15s var(--ease-out); }
  .lc-btn span { display: none; }
  .lc-btn svg { width: 20px; height: 20px; color: var(--ink); }
  .menu-btn svg { width: 20px; height: 20px; }
  .lc-btn:active, .cur-btn:active, .menu-btn:active { transform: scale(.92); }
  .lc-drop { right: -50px; }

  body[data-route] .hdr .hdr-search { display: flex; align-items: center; gap: 10px; order: 10; flex: 1 0 100%; max-width: none; }
  body[data-route="search"] .hdr .hdr-search { display: none; }
  .hdr-search label + svg, .hdr-search > svg { left: 18px; z-index: 1; }
  .hdr-search .input { flex: 1; min-height: 50px; border-radius: 999px; padding-left: 48px; padding-right: 16px; font-size: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); }
  .hdr-search .input:focus { border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(242,182,0,.14); }
  .hdr-search .hs-go { display: grid; place-items: center; flex: none; width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer; box-shadow: 0 6px 16px rgba(242,182,0,.35); transition: transform .15s var(--ease-out); }
  .hdr-search .hs-go:active { transform: scale(.92); }
  .hdr-search .hs-go svg { position: static; transform: none; color: #fff; width: 20px; height: 20px; }
  .hdr-search input::-webkit-search-cancel-button { display: none; }

  /* ---------- home ---------- */
  body[data-route="home"] .hero2, .d-only { display: none; }
  .m-only { display: block; }
  .m-home { padding-top: 4px; }
  .m-note { display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
  .m-note svg { color: var(--brand-600); flex: none; }

  /* big promotion card: the real -30% shipping discount */
  .m-promo { position: relative; display: flex; align-items: center; gap: 14px; min-height: 172px; padding: 20px 18px; border-radius: 26px; overflow: hidden; color: #fff; text-decoration: none !important;
    background: radial-gradient(120% 90% at 85% 0%, #FF9A3C 0%, rgba(255,154,60,0) 55%), linear-gradient(135deg, #F2B600 0%, #D93A06 55%, #B32C02 100%); box-shadow: 0 14px 34px rgba(217,58,6,.32); animation: rise .6s var(--ease-out) both; }
  .m-promo::before { content: ""; position: absolute; inset: auto -30px -60px auto; width: 190px; height: 190px; border-radius: 50%; background: rgba(255,255,255,.1); }
  .m-promo::after { content: ""; position: absolute; left: -40px; top: -50px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.08); }
  .m-promo:active { transform: scale(.985); }
  .mp-goat { position: relative; z-index: 1; width: 86px; height: 86px; border-radius: 22px; flex: none; transform: rotate(-8deg); box-shadow: 0 10px 22px rgba(0,0,0,.25); border: 3px solid rgba(255,255,255,.9); }
  .mp-tx { position: relative; z-index: 1; display: grid; flex: 1; min-width: 0; }
  .mp-big { font-family: var(--f-display); font-style: italic; font-weight: 900; font-size: 54px; line-height: .9; letter-spacing: -.04em; text-shadow: 0 4px 0 rgba(120,30,0,.25); }
  .mp-off { font-family: var(--f-display); font-style: italic; font-weight: 900; font-size: 22px; text-transform: uppercase; letter-spacing: -.01em; line-height: 1.05; }
  .mp-tx small { margin-top: 6px; font-size: 12.5px; color: #FFF3C8; font-weight: 600; }
  .mp-cta { position: absolute; z-index: 1; right: 14px; bottom: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.95); color: var(--brand-700); font-size: 12.5px; font-weight: 700; }
  .mp-cta svg { width: 14px; height: 14px; }

  /* four shortcuts: rounded squares with coloured icons */
  .m-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 22px 0 6px; }
  .m-tiles a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--ink); font-size: 12.5px; font-weight: 600; line-height: 1.25; text-decoration: none !important; animation: rise .5s var(--ease-out) both; }
  .m-tiles a:nth-child(2) { animation-delay: .05s; } .m-tiles a:nth-child(3) { animation-delay: .1s; } .m-tiles a:nth-child(4) { animation-delay: .15s; }
  .m-tiles .mt { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: #fff; box-shadow: 0 6px 16px rgba(22,17,14,.08); transition: transform .15s var(--ease-out); }
  .m-tiles .mt svg { width: 30px; height: 30px; stroke-width: 2; padding: 6px; box-sizing: content-box; border-radius: 12px; color: #fff; }
  .m-tiles .g1 svg { background: linear-gradient(140deg, #FF8A4C, #F2B600); }
  .m-tiles .g2 svg { background: linear-gradient(140deg, #FFB648, #F5820B); }
  .m-tiles .g3 svg { background: linear-gradient(140deg, #FF6B6B, #E2364A); }
  .m-tiles .g4 svg { background: linear-gradient(140deg, #8A7CFF, #5B4CE0); }
  .m-tiles .mt svg { width: 22px; height: 22px; }
  .m-tiles a:active .mt { transform: scale(.92); }

  /* shipping estimate card */
  .m-ship { margin-top: 18px; padding: 18px 16px 16px; border-radius: 24px; background: #fff; box-shadow: 0 6px 22px rgba(22,17,14,.06); }
  .m-ship h2 { font-family: var(--f-body); font-size: 17px; font-weight: 700; letter-spacing: 0; margin: 0 0 14px; }
  .ms-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .ms-row > * { min-width: 0; }
  .m-cards, .bento, .reco-row { scroll-padding-inline: var(--gut); }
  .ms-f { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 14px; border-radius: 999px; background: #F6F4F2; border: 1px solid transparent; transition: border-color .15s; }
  .ms-f:focus-within { border-color: var(--brand-600); background: #fff; }
  .ms-f svg { color: var(--muted); flex: none; width: 19px; height: 19px; }
  .ms-f select, .ms-f input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 15px; height: 50px; -webkit-appearance: none; appearance: none; }
  .ms-go { margin-top: 12px; min-height: 54px; border-radius: 999px; font-size: 17px; background: var(--brand); border-color: var(--brand); box-shadow: 0 8px 20px rgba(242,182,0,.3); }
  .ms-res { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: var(--brand-50); animation: rise .3s var(--ease-out) both; }
  .ms-res span { flex: 1; font-size: 13px; color: var(--muted); } .ms-res em { font-style: normal; color: var(--ok); font-weight: 700; }
  .ms-res b { font-family: var(--f-display); font-size: 26px; font-weight: 800; color: var(--brand-700); letter-spacing: -.02em; }
  .ms-res a { font-size: 13px; font-weight: 700; }
  .ms-msg { margin: 12px 2px 0; font-size: 13.5px; color: var(--bad); }

  /* swipeable promo cards */
  .m-cards { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 18px calc(-1 * var(--gut)) 0; padding: 2px var(--gut) 10px; scrollbar-width: none; }
  .m-cards::-webkit-scrollbar { display: none; }
  .mcard { position: relative; flex: 0 0 74%; min-height: 112px; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 16px 70px 16px 16px; border: 0; border-radius: 22px; text-align: left; color: var(--ink); text-decoration: none !important; cursor: pointer; overflow: hidden; font: inherit; transition: transform .15s var(--ease-out); }
  .mcard:active { transform: scale(.98); }
  .mcard b { font-size: 16px; line-height: 1.25; font-family: var(--f-display); font-weight: 800; letter-spacing: -.01em; }
  .mcard small { font-size: 12.5px; color: var(--ink-2); }
  .mcard .mcard-ic { position: absolute; right: -6px; bottom: -8px; width: 76px; height: 76px; stroke-width: 1.4; opacity: .9; }
  .mcard.c1 { background: linear-gradient(135deg, #FFE1CF, #FFC7A6); } .mcard.c1 .mcard-ic { color: #E2560F; }
  .mcard.c2 { background: linear-gradient(135deg, #FFE0E6, #FFC2CF); } .mcard.c2 .mcard-ic { color: #D63A5C; }
  .mcard.c3 { background: linear-gradient(135deg, #E6E2FF, #CFC7FF); } .mcard.c3 .mcard-ic { color: #5B4CE0; }

  /* the other home sections */
  .sec { padding: 34px 0; }
  .sec.tint { background: transparent; border: 0; }
  .sec-hd { flex-direction: row; align-items: center; margin-bottom: 16px; gap: 12px; }
  .sec-hd h2 { font-size: 21px; margin: 0; }
  .sec-hd .btn { width: auto; min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 999px; }
  .bento { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 calc(-1 * var(--gut)); padding: 2px var(--gut) 8px; scrollbar-width: none; }
  .bento::-webkit-scrollbar { display: none; }
  .bento .tile, .tile.t1, .tile.t2, .tile.t3, .tile.t4 { flex: 0 0 78%; min-height: 260px; scroll-snap-align: start; border-radius: 24px; }
  .team-ph { aspect-ratio: 4 / 3; border-radius: 22px; }
  .team-tx h2 { font-size: 22px; } .team-tx p { font-size: 15px; }
  .faq2 { gap: 16px; }
  details.qa { border-radius: 16px; border-color: transparent; box-shadow: 0 2px 10px rgba(22,17,14,.04); }

  /* recommended products */
  .m-reco { padding: 34px 0 6px; }
  .reco-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gut)); padding: 2px var(--gut) 10px; scrollbar-width: none; }
  .reco-row::-webkit-scrollbar { display: none; }
  .reco { flex: 0 0 46%; scroll-snap-align: start; display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden; color: inherit; text-decoration: none !important; box-shadow: 0 6px 18px rgba(22,17,14,.07); transition: transform .15s var(--ease-out); }
  .reco:active { transform: scale(.97); }
  .rp { display: block; aspect-ratio: 1; background: #F1EEEB; overflow: hidden; }
  .rp img { width: 100%; height: 100%; object-fit: cover; }
  .rb { display: grid; gap: 6px; padding: 10px 12px 12px; justify-items: start; }
  .rb b { font-weight: 600; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .rpr { font-family: var(--f-display); font-weight: 800; font-size: 16px; color: var(--brand-600); }

  /* ---------- bottom bar: the current tab rises in an orange circle ---------- */
  .bnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 65; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 28px rgba(22,17,14,.08); }
  .bnav a { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-height: 52px; color: var(--ink-2); font-size: 11.5px; font-weight: 600; text-decoration: none !important; -webkit-tap-highlight-color: transparent; }
  .bnav a > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bnav .bi { position: relative; display: grid; place-items: center; width: 30px; height: 28px; transition: transform .3s var(--ease-out); }
  .bnav .bi svg { width: 22px; height: 22px; }
  .bnav a.on { color: var(--brand-600); }
  .bnav a.on .bi { position: absolute; top: -26px; left: 50%; width: 56px; height: 56px; margin-left: -28px; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(242,182,0,.4), 0 0 0 5px #fff; animation: pop .3s var(--ease-out); }
  .bnav a.on .bi svg { width: 24px; height: 24px; }
  .bnav a:active .bi { transform: scale(.9); }
  .bnav .bi b { position: absolute; top: -5px; right: -8px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; border: 2px solid #fff; background: var(--brand-600); color: #fff; font-size: 10px; display: grid; place-items: center; }
  .bnav a.on .bi b { top: 0; right: 0; background: var(--ink); }

  /* nothing hidden behind the bar */
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .chat-fab { bottom: calc(88px + env(safe-area-inset-bottom)); right: 12px; width: 48px; height: 48px; border-radius: 16px; }
  .chat-fab svg { width: 22px; height: 22px; }
  .chat { bottom: calc(150px + env(safe-area-inset-bottom)); height: calc(100dvh - 220px - env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .cookie { bottom: calc(150px + env(safe-area-inset-bottom)); }
  .selbar { bottom: calc(86px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .m-tiles a, .m-promo, .ms-res { animation: none; }
}

/* order page: the status badge goes above the product on phones, so the title and price get the full width */
@media (max-width: 760px) {
  .oi-badge { position: static !important; margin-bottom: 10px; }
  .oi-row { padding-right: 0 !important; }
}
