/* SB-MHEAD — telefono antraštė (2026-12).
   Bendra dalis (paieška, tarpas virš banerių) veikia visada; meniu variantai įsijungia klase ant <body>
   (sb-mh-c / sb-mh-d / sb-mh-e – aprašyti žemiau). Viskas tik telefonams (≤767px). */

/* pagrindiniame puslapyje tarp antraštės ir banerių nebelieka šviesaus tarpo */
body.sb-tactical-header:has(.sb-bento-band) .h-m { margin-bottom: 0 !important; }

@media (max-width: 767px) {
  /* ---------- tarpai po antrašte kituose puslapiuose: buvo 20 + 14 px virš ir 14 + 16 px po naršymo kelio ---------- */
  body.sb-tactical-header .h-m { margin-bottom: 0 !important; }
  html body ul.breadcrumb { padding: 12px 0 10px !important; margin-bottom: 4px !important; }

  /* ---------- paieška: vienas apvalus laukas, mygtukas jo viduje ---------- */
  html body.sb-tactical-header header #search {
    display: flex !important; align-items: center; height: 50px; margin: 8px 0 !important; padding: 4px !important;
    border-radius: 999px !important; background: rgba(255, 255, 255, .07) !important; border: 1px solid rgba(255, 255, 255, .16) !important;
    box-shadow: none !important; overflow: hidden;
  }
  html body.sb-tactical-header header #search:focus-within { border-color: #8d9a73 !important; background: rgba(255, 255, 255, .1) !important; }
  html body.sb-tactical-header header #search input[name="search"].form-control {
    flex: 1; min-width: 0; height: 100% !important; padding: 0 10px 0 16px !important; border: 0 !important; border-radius: 0 !important;
    background: transparent !important; box-shadow: none !important; color: #f4f1ea !important; font-size: 16px !important;
  }
  html body.sb-tactical-header header #search input[name="search"].form-control::placeholder { color: rgba(244, 241, 234, .55); }
  html body.sb-tactical-header header #search .input-group-btn { display: block !important; width: auto !important; height: 42px; }
  html body.sb-tactical-header header #search .input-group-btn .btn {
    width: 42px; height: 42px !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important;
    background: #74825c !important; color: #fff !important; box-shadow: none !important; font-size: 16px; line-height: 42px;
  }
  html body.sb-tactical-header header #search .input-group-btn .btn:active { transform: scale(.94); }
}

/* =================== variantai (tik telefonai) ===================
   sb-mh-c – ☰ kairiame kampe, logotipas centre, krepšelis dešinėje; meniu išvažiuoja iš kairės;
   sb-mh-d – logotipas kairėje, krepšelis ir ☰ dešiniame kampe; meniu išvažiuoja iš dešinės;
   sb-mh-e – programėlės stilius: apačioje juosta (Pradžia, Kategorijos, Paieška, Krepšelis, Paskyra); meniu iškyla iš apačios. */
.sb-mh-burger, .sbs-cancel, .sbm-tab, .sbm-top { display: none; }   /* kompiuteryje ir planšetėje – niekada */
@media (max-width: 767px) {
  html body.sb-mh-c header, html body.sb-mh-d header, html body.sb-mh-e header { display: grid !important; align-items: center; padding-bottom: 12px; }
  html body.sb-mh-c header { grid-template-columns: 16px 48px minmax(0, 1fr) 48px 16px; }
  html body.sb-mh-d header { grid-template-columns: 16px minmax(0, 1fr) 48px 8px 48px 16px; }
  html body.sb-mh-e header { grid-template-columns: 16px minmax(0, 1fr) 16px; }
  html body:is(.sb-mh-c, .sb-mh-d, .sb-mh-e) header > .container:not(.sb-menu-full),
  html body:is(.sb-mh-c, .sb-mh-d, .sb-mh-e) header > .container > .row { display: contents; }
  html body:is(.sb-mh-c, .sb-mh-d, .sb-mh-e) header > #top { grid-column: 1 / -1; grid-row: 1; margin-bottom: 12px !important; }
  html body:is(.sb-mh-c, .sb-mh-d, .sb-mh-e) header .sb-menu-full { display: none !important; }
  html body:is(.sb-mh-c, .sb-mh-d, .sb-mh-e) #sb-menu-sentinel { grid-column: 1 / -1; grid-row: 9; }
  html body:is(.sb-mh-c, .sb-mh-d, .sb-mh-e) header .row > div:first-child { grid-row: 2; padding: 0; min-width: 0; }
  html body:is(.sb-mh-c, .sb-mh-d, .sb-mh-e) header .row > div:nth-child(2) { grid-row: 3; padding: 0; }
  html body:is(.sb-mh-c, .sb-mh-d, .sb-mh-e) header #logo { margin: 0 !important; padding: 0 !important; }
  html body:is(.sb-mh-c, .sb-mh-d) header #logo .sb-logo-anim { width: 100%; max-width: 210px; }

  /* C */
  html body.sb-mh-c .sb-mh-burger { grid-column: 2; grid-row: 2; }
  html body.sb-mh-c header .row > div:first-child { grid-column: 3; }
  html body.sb-mh-c header #logo { justify-content: center; text-align: center; }
  html body.sb-mh-c header #l-nav { grid-column: 4; grid-row: 2; }
  html body.sb-mh-c header .row > div:nth-child(2) { grid-column: 2 / 5; }
  /* D */
  html body.sb-mh-d header .row > div:first-child { grid-column: 2; padding-right: 12px; }
  html body.sb-mh-d header #logo { justify-content: flex-start; text-align: left; }
  html body.sb-mh-d header #l-nav { grid-column: 3; grid-row: 2; }
  html body.sb-mh-d .sb-mh-burger { grid-column: 5; grid-row: 2; }
  html body.sb-mh-d header .row > div:nth-child(2) { grid-column: 2 / 6; }
  /* E */
  html body.sb-mh-e header .row > div:first-child, html body.sb-mh-e header .row > div:nth-child(2) { grid-column: 2; }
  html body.sb-mh-e header #logo { justify-content: center; text-align: center; }
  html body.sb-mh-e header #logo .sb-logo-anim { width: 100%; max-width: 280px; }
  html body.sb-mh-e header #l-nav { display: none !important; }   /* krepšelis – apatinėje juostoje */
  html body.sb-mh-e #top .top-account { display: none !important; }   /* „Prisijungti“ – apatinėje juostoje */
  html body.sb-mh-e header #logo { padding: 4px 0 2px !important; }
  /* paieška antraštėje nerodoma: ji nusileidžia iš viršaus paspaudus „Paieška“ apatinėje juostoje.
     Laukas lieka toje pačioje vietoje DOM'e (antraštėje), kad veiktų esama paieška ir pasiūlymai. */
  html body.sb-mh-e header .row > div:nth-child(2) {
    position: fixed !important; top: 0; left: 0; right: 0; z-index: 10075; display: flex; align-items: center; gap: 10px;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px !important; background: #1e231a; box-shadow: 0 0 0 100vmax rgba(15, 17, 12, 0);
    transform: translateY(-105%); visibility: hidden; transition: transform .32s cubic-bezier(.22, 1, .36, 1), visibility 0s .32s;
  }
  html body.sb-mh-e.sbs-on header .row > div:nth-child(2) { transform: none; visibility: visible; box-shadow: 0 0 0 100vmax rgba(15, 17, 12, .55); transition: transform .32s cubic-bezier(.22, 1, .36, 1), box-shadow .3s; }
  html body.sb-mh-e header .row > div:nth-child(2) #search { flex: 1; margin: 0 !important; }
  html body.sb-mh-e .sbs-cancel { display: block; flex: none; padding: 10px 2px; border: 0; background: none; color: #f4f1ea; font: 500 14px Poppins, sans-serif; cursor: pointer; }

  html body.sb-mh-e .cart-fab { display: none !important; }

  /* kampo mygtukai: ☰ ir krepšelis – vienodi 48 px kvadratai */
  html body:is(.sb-mh-c, .sb-mh-d) .sb-mh-burger {
    display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%;
    background: rgba(255, 255, 255, .06); color: #f4f1ea; cursor: pointer; transition: background-color .2s, transform .1s;
  }
  html body:is(.sb-mh-c, .sb-mh-d) .sb-mh-burger:active { transform: scale(.94); background: rgba(255, 255, 255, .12); }
  .sb-mh-burger i, .sb-mh-burger i::before, .sb-mh-burger i::after { display: block; width: 20px; height: 2px; border-radius: 1px; background: currentColor; }
  .sb-mh-burger i { position: relative; }
  .sb-mh-burger i::before, .sb-mh-burger i::after { content: ""; position: absolute; left: 0; }
  .sb-mh-burger i::before { top: -6px; }
  .sb-mh-burger i::after { top: 6px; width: 13px; }
  html body:is(.sb-mh-c, .sb-mh-d) header #l-nav { padding: 0; }
  html body:is(.sb-mh-c, .sb-mh-d) #l-nav #cart { display: block; margin: 0 !important; }
  html body:is(.sb-mh-c, .sb-mh-d) #l-nav #cart > .btn {
    display: grid !important; place-items: center; width: 48px; height: 48px; margin: 0 !important; padding: 0 !important; border: 0 !important;
    border-radius: 50% !important; background: #74825c !important; box-shadow: none !important; color: #fff !important;
  }
  html body:is(.sb-mh-c, .sb-mh-d) #l-nav #cart > .btn:active { transform: scale(.94); }
  html body:is(.sb-mh-c, .sb-mh-d) #l-nav #cart > .btn > i,
  html body:is(.sb-mh-c, .sb-mh-d) #l-nav #cart #cart-total,
  html body:is(.sb-mh-c, .sb-mh-d) #l-nav #cart .sb-cart-price { display: none !important; }
  html body:is(.sb-mh-c, .sb-mh-d) #l-nav #cart .sb-cart-icon-wrap { position: relative; display: block; line-height: 0; }
  html body:is(.sb-mh-c, .sb-mh-d) #l-nav #cart .sb-cart-svg { width: 24px; height: 24px; }
  html body:is(.sb-mh-c, .sb-mh-d) #l-nav #cart .sb-cart-count {
    display: block; position: absolute; top: -4px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: #b8362a; color: #fff; font: 700 11px/18px Poppins, sans-serif; text-align: center; box-shadow: 0 0 0 2px #1e231a;
  }

  /* E: apatinė juosta */
  html body.sb-mh-e { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  html body.sb-mh-e .sbm-tab {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); background: #1a1e16; border-top: 1px solid rgba(255, 255, 255, .08);
    transform: translateZ(0);
  }
  .sbm-tab a, .sbm-tab button {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 52px; padding: 0; border: 0; border-radius: 12px;
    background: none; color: rgba(244, 241, 234, .72) !important; font: 500 11px/1 Poppins, sans-serif; text-decoration: none !important; cursor: pointer;
  }
  .sbm-tab a:active, .sbm-tab button:active { background: rgba(255, 255, 255, .08); }
  .sbm-tab .on { color: #fff !important; }
  .sbm-tab .on svg { stroke: #a9b68c; }
  .sbm-tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .sbm-tab-n { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #b8362a; color: #fff; font: 700 10px/17px Poppins, sans-serif; }
  .sbm-tab-n:empty { display: none; }
  /* nuslinkus žemiau antraštės – plona juosta su logotipu viršuje */
  html body.sb-mh-e .sbm-top {
    position: fixed; left: 0; right: 0; top: 0; z-index: 1030; display: flex; align-items: center; justify-content: center;
    height: calc(52px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); background: #1a1e16; border-bottom: 1px solid rgba(255, 255, 255, .08);
    transform: translateY(-101%); transition: transform .3s cubic-bezier(.22, 1, .36, 1); box-shadow: 0 8px 20px -14px rgba(0, 0, 0, .7);
  }
  html body.sb-mh-e.sbm-top-on .sbm-top { transform: none; }
  html body.sb-mh-e.sbs-on .sbm-top { transform: translateY(-101%); }   /* atidarius paiešką – juosta pasitraukia */
  .sbm-top a { display: block; line-height: 0; }
  .sbm-top svg, .sbm-top img { width: 150px; height: auto; pointer-events: none; }
}

/* =================== meniu skydelis (C/D – iš šono, E – iš apačios) =================== */
.sbm-scrim, .sbm { display: none; }
@media (max-width: 767px) {
  body:is(.sb-mh-c, .sb-mh-d, .sb-mh-e) .sbm-scrim { display: block; position: fixed; inset: 0; z-index: 10060; background: rgba(15, 17, 12, .55); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
  body.sbm-on .sbm-scrim { opacity: 1; visibility: visible; transition: opacity .3s; }
  body:is(.sb-mh-c, .sb-mh-d, .sb-mh-e) .sbm {
    display: flex; flex-direction: column; position: fixed; z-index: 10070; top: 0; bottom: 0; left: 0; width: min(340px, 88vw);
    background: #1e231a; color: #f4f1ea; font-family: Poppins, system-ui, sans-serif; box-shadow: 24px 0 60px -30px rgba(0, 0, 0, .8);
    transform: translateX(-100%); visibility: hidden; transition: transform .38s cubic-bezier(.22, 1, .36, 1), visibility 0s .38s; overscroll-behavior: contain;
  }
  body.sb-mh-d .sbm { left: auto; right: 0; transform: translateX(100%); box-shadow: -24px 0 60px -30px rgba(0, 0, 0, .8); }
  body.sb-mh-e .sbm { top: auto; left: 0; right: 0; width: auto; max-height: 82vh; border-radius: 20px 20px 0 0; transform: translateY(100%); box-shadow: 0 -24px 60px -30px rgba(0, 0, 0, .8); }
  body.sbm-on .sbm { transform: none; visibility: visible; transition: transform .38s cubic-bezier(.22, 1, .36, 1); }
  html.sbm-lock { overflow: hidden; }

  .sbm-grab { display: none; }
  body.sb-mh-e .sbm-grab { display: block; width: 40px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: rgba(255, 255, 255, .25); }
  .sbm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 12px 12px 20px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .sbm-head b { font: 600 20px/1 Oswald, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
  .sbm-x { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .07); color: #f4f1ea; cursor: pointer; }
  .sbm-x svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }
  .sbm-list { flex: 1; overflow-y: auto; padding: 6px 0 10px; }
  .sbm-list a, .sbm-list summary {
    display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 20px; color: #f4f1ea !important; font: 500 15px/1.3 Poppins, sans-serif;
    text-decoration: none !important; cursor: pointer; list-style: none;
  }
  .sbm-list summary::-webkit-details-marker { display: none; }
  .sbm-list a:active, .sbm-list summary:active { background: rgba(255, 255, 255, .06); }
  .sbm-list > * + * { border-top: 1px solid rgba(255, 255, 255, .06); }
  .sbm-list .sbm-t { flex: 1; min-width: 0; }
  .sbm-list summary::after, .sbm-list > a::after { content: ""; flex: none; width: 7px; height: 7px; border: solid rgba(244, 241, 234, .45); border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); }
  .sbm-list summary::after { transform: rotate(45deg); margin-top: -4px; transition: transform .25s cubic-bezier(.22, 1, .36, 1); }
  .sbm-list details[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
  .sbm-list details[open] > summary { color: #c4cfa6 !important; }
  /* subkategorijos – plytelės po dvi: didelė nuotrauka šviesiame fone (balta nuotraukos dalis susilieja su plytele) */
  .sbm-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 2px 16px 16px; }
  .sbm-list .sbm-sub a {
    flex-direction: column; justify-content: center; gap: 6px; min-height: 0; padding: 10px 8px 11px; border-radius: 14px; background: #efeee8;
    color: #20221b !important; font-size: 13px; font-weight: 500; line-height: 1.25; text-align: center;
  }
  .sbm-list .sbm-sub a:active { background: #e2e1d9; }
  .sbm-list .sbm-sub a::after { display: none; }
  .sbm-sub a img { display: block; width: 100%; height: 64px; object-fit: contain; mix-blend-mode: multiply; }
  .sbm-sub a .sbm-t { flex: none; }
  .sbm-list .sbm-sub a.sbm-noimg { min-height: 56px; }
  .sbm-list .sbm-sub a.sbm-all { grid-column: 1 / -1; flex-direction: row; min-height: 44px; padding: 0 14px; background: none; border: 1px solid rgba(169, 182, 140, .45); color: #c4cfa6 !important; }
  .sbm-list a.sbm-sale { color: #ec8272 !important; font-weight: 600; }
  .sbm-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px 20px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(0, 0, 0, .18); }
  .sbm-foot a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; color: #f4f1ea !important; font: 500 13px Poppins, sans-serif; text-decoration: none !important; }
  .sbm-foot a svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  /* sniego jungiklis: piliulė su mažu slankikliu */
  .sbm-foot .sbm-snow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px 7px 14px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; background: none; color: #f4f1ea; font: 500 13px Poppins, sans-serif; cursor: pointer; }
  .sbm-snow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .sbm-snow i { position: relative; width: 30px; height: 18px; border-radius: 9px; background: rgba(255, 255, 255, .18); transition: background .2s; }
  .sbm-snow i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
  .sbm-snow[aria-pressed="true"] i { background: #74825c; }
  .sbm-snow[aria-pressed="true"] i::after { transform: translateX(12px); }
}
@media (prefers-reduced-motion: reduce) { .sbm, .sbm-scrim, .sbm-list summary::after { transition: none !important; } }
