/* Vyhľadávanie + 404 (návrh: HiggyStavy.dc.html) */
.s-main { flex: 1; display: flex; flex-direction: column; }
.hg input[type="search"]::-webkit-search-cancel-button, .hg input[type="search"]::-webkit-search-decoration { display: none; -webkit-appearance: none; }
.s-input::placeholder, .nf-input::placeholder { color: #8A8590; }
.s-h2 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Režim „hľadanie“: pätička a spodná navigácia sa skryjú, na mobile aj bežná hlavička */
.hg[data-mode="search"] > footer, .hg[data-mode="search"] > svg[aria-hidden], .hg[data-mode="search"] > .hg-tabbar { display: none !important; }
.hg[data-mode="search"] > svg[aria-hidden] { display: none !important; }
.hg[data-mode="search"] .hg-search { border-color: var(--ink); }
.s-mhead { display: none; position: sticky; top: 0; z-index: 20; align-items: center; gap: 4px; height: 68px; padding: 0 12px 0 4px; background: #FFFFFF; border-bottom: 1px solid rgba(29, 27, 38, .10); }
@media (max-width: 899.98px) {
  .hg[data-mode="search"] .hg-top { display: none; }
  .hg[data-mode="search"] .s-mhead { display: flex; }
}

/* ---------- Pole hľadania ---------- */
.s-form { position: relative; flex: 1; min-width: 0; margin: 0; }
.s-input { box-sizing: border-box; width: 100%; border: 0; background: var(--cream); box-shadow: inset 0 0 0 2px var(--ink); color: var(--ink); outline: none; border-radius: 999px; font-family: 'Figtree', sans-serif; font-weight: 500; -webkit-appearance: none; appearance: none; }
.s-form-m .s-input { height: 48px; padding: 0 48px 0 18px; font-size: 17px; }
.s-form-d .s-input { height: 60px; padding: 0 56px 0 58px; font-size: 19px; }
.s-lens { position: absolute; top: 18px; left: 22px; pointer-events: none; }
.s-clear { position: absolute; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.s-form-m .s-clear { top: 2px; right: 2px; }
.s-form-d .s-clear { top: 8px; right: 8px; }
.s-clear:hover { background: rgba(29, 27, 38, .07); color: var(--ink); }
.s-back { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; transition: background .2s; }
.s-back:hover { background: rgba(29, 27, 38, .07); }
.s-closebtn { flex: none; height: 48px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: var(--ink); font: 600 16px 'Figtree', sans-serif; cursor: pointer; transition: background .2s; }
.s-closebtn:hover { background: rgba(29, 27, 38, .07); }

/* ---------- Panel hľadania (prázdne / našepkávač) ---------- */
.s-search { flex: 1; display: flex; flex-direction: column; }
.s-panel { background: #FFFFFF; padding: clamp(20px, 2.4cqw, 32px) var(--pad) clamp(28px, 3cqw, 44px); border-bottom: 1px solid rgba(29, 27, 38, .10); }
.s-panel-in { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(24px, 2.6cqw, 36px); }
.s-drow { display: flex; align-items: center; gap: 16px; }
.s-scrim { flex: 1; min-height: 360px; background: rgba(29, 27, 38, .45); cursor: pointer; }
@media (max-width: 899.98px) { .s-panel-in { gap: 24px; } }

.s-cols { display: flex; flex-wrap: wrap; gap: 28px clamp(32px, 4cqw, 64px); }
.s-cols--top { align-items: flex-start; }
.s-col { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.s-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.s-chip { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(29, 27, 38, .12); color: var(--ink); font: 600 15px 'Figtree', sans-serif; cursor: pointer; transition: box-shadow .2s; }
.s-chip:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.s-chip svg { flex: none; }
.s-chip--white { background: #FFFFFF; }
.s-catlink { display: flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 999px; background: #EFEAE2; color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; transition: background .2s; }
.s-catlink:hover { background: #E4DDD1; }

/* našepkávač */
.s-hitcol { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.s-hitcol--wide { flex: 3 1 480px; }
.s-list { display: flex; flex-direction: column; }
.s-opt { color: var(--ink); text-decoration: none; }
.s-catrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 4px; border-bottom: 1px solid rgba(29, 27, 38, .10); font-size: 16px; font-weight: 600; transition: color .2s; }
.s-catrow small { font-size: 14px; font-weight: 500; color: var(--muted); }
.s-catrow:hover, .s-catrow.is-active { color: var(--red); }
.s-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 4px 24px; }
.s-prod { display: flex; align-items: center; gap: 14px; padding: 8px; margin: 0 -8px; border-radius: 16px; transition: background .2s; }
.s-prod:hover, .s-prod.is-active { background: var(--cream); }
.s-prod-img { position: relative; flex: none; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--cream); }
.s-prod-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.s-prod-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.s-prod-t b { font-size: 16px; font-weight: 500; }
.s-prod-t b span { font-weight: 800; }
.s-prod-t small { font-size: 14px; color: var(--muted); }
.s-prod-p { flex: none; font-size: 16px; font-weight: 700; }
.s-all { align-self: flex-start; display: flex; align-items: center; gap: 10px; height: 52px; margin-top: 12px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--ink); color: var(--cream); font: 700 16px 'Figtree', sans-serif; cursor: pointer; transition: background .2s, transform .25s var(--ease); }
.s-all:hover, .s-all.is-active { background: #3A3645; transform: translateY(-2px); }
.s-none { display: flex; flex-direction: column; gap: 20px; }
.s-none p { margin: 0; font-size: 18px; text-wrap: pretty; }

/* ---------- Výsledky ---------- */
.s-results { padding: clamp(24px, 3.4cqw, 48px) var(--pad) clamp(56px, 6.6cqw, 104px); }
.s-results-in { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(20px, 2.4cqw, 32px); }
.s-rhead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.s-rhead-t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.s-rhead-t > span { font-size: 15px; font-weight: 600; color: var(--muted); }
.s-rhead-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.s-h1 { margin: 0; font-family: var(--display); font-optical-sizing: auto; font-stretch: 85%; font-weight: 800; font-size: clamp(34px, 3.6cqw, 52px); line-height: 1.02; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.s-h1:focus { outline: none; }
.s-count { font-size: 16px; color: var(--muted); }
.s-edit { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: #FFFFFF; box-shadow: inset 0 0 0 1.5px rgba(29, 27, 38, .16); color: var(--ink); font: 700 15px 'Figtree', sans-serif; cursor: pointer; transition: box-shadow .2s; }
.s-edit:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.s-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.s-filter { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--pad)); padding: 2px var(--pad); scrollbar-width: none; max-width: 100%; }
.s-filter::-webkit-scrollbar { display: none; }
.s-fchip { flex: none; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: #FFFFFF; box-shadow: inset 0 0 0 1.5px rgba(29, 27, 38, .16); color: var(--ink); font: 600 15px 'Figtree', sans-serif; white-space: nowrap; cursor: pointer; transition: background .2s, box-shadow .2s; }
.s-fchip:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.s-fchip span { font-weight: 500; opacity: .7; }
.s-fchip[aria-pressed="true"] { background: var(--ink); color: var(--cream); box-shadow: none; }
.s-sort { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--muted); }
.s-sort .hs-btn { width: auto; height: 44px; padding: 0 14px 0 18px; border: 0; border-radius: 999px; background: #FFFFFF; box-shadow: inset 0 0 0 1.5px rgba(29, 27, 38, .16); color: var(--ink); font: 600 15px 'Figtree', sans-serif; cursor: pointer; }
.s-sort .hs-btn:hover, .s-sort .hs-btn.is-open { box-shadow: inset 0 0 0 1.5px var(--ink); }
.s-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(150px, calc((100% - 72px) / 4)), 1fr)); gap: 32px clamp(12px, 1.7cqw, 24px); }
.s-empty { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: clamp(40px, 5.6cqw, 80px) 20px; border-radius: 24px; background: #EFEAE2; text-align: center; }
.s-empty-ico { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background: #FFFFFF; color: var(--ink); }
.s-empty h2 { margin: 0; font-family: var(--display); font-stretch: 85%; font-weight: 800; font-size: clamp(26px, 2.4cqw, 34px); line-height: 1.1; text-wrap: balance; }
.s-empty p { margin: 0; max-width: 30em; color: var(--soft); text-wrap: pretty; }
.s-empty .s-chips { justify-content: center; max-width: 640px; margin-top: 4px; }
.s-best { display: flex; flex-direction: column; gap: clamp(20px, 2.2cqw, 28px); padding-top: clamp(16px, 2cqw, 24px); }
.s-best h2 { margin: 0; font-family: var(--display); font-stretch: 85%; font-weight: 700; font-size: clamp(28px, 2.6cqw, 40px); line-height: 1.05; }

/* ---------- 404 ---------- */
.nf { flex: 1; display: flex; align-items: center; padding: clamp(32px, 5cqw, 80px) var(--pad) clamp(56px, 6.6cqw, 104px); }
.nf-in { width: 100%; max-width: 1280px; margin: 0 auto; display: flex; flex-wrap: wrap-reverse; align-items: center; gap: clamp(32px, 5cqw, 80px); }
.nf-txt { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: clamp(18px, 2cqw, 24px); }
.nf-tag { align-self: flex-start; display: flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: var(--cream); font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.nf h1 { margin: 0; font-family: var(--display); font-optical-sizing: auto; font-stretch: 85%; font-weight: 800; font-size: clamp(40px, 5cqw, 72px); line-height: 1; letter-spacing: -0.015em; text-wrap: balance; }
.nf-lead { margin: 0; max-width: 30em; font-size: clamp(17px, 1.3cqw, 19px); color: var(--soft); text-wrap: pretty; }
.nf-form { position: relative; max-width: 520px; margin: 0; }
.nf-lens { position: absolute; top: 16px; left: 20px; pointer-events: none; }
.nf-input { box-sizing: border-box; width: 100%; height: 52px; padding: 0 120px 0 52px; border: 0; border-radius: 999px; background: #FFFFFF; box-shadow: inset 0 0 0 1.5px rgba(29, 27, 38, .16); color: var(--ink); font: 500 17px 'Figtree', sans-serif; outline: none; -webkit-appearance: none; appearance: none; transition: box-shadow .2s; }
.nf-input:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.nf-go { position: absolute; top: 4px; right: 4px; height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--ink); color: var(--cream); font: 700 15px 'Figtree', sans-serif; cursor: pointer; transition: background .2s; }
.nf-go:hover { background: #3A3645; }
.nf-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.nf-b1, .nf-b2 { display: flex; align-items: center; height: 52px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.nf-b1 { padding: 0 26px; background: var(--ink); color: var(--cream); transition: background .2s, transform .25s var(--ease); }
.nf-b1:hover { background: #3A3645; transform: translateY(-2px); }
.nf-b2 { padding: 0 24px; box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); transition: background .2s; }
.nf-b2:hover { background: rgba(29, 27, 38, .06); }
.nf-cats { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.nf-cats nav { display: flex; flex-wrap: wrap; gap: 8px; }
.nf-cats .s-catlink { padding: 0 16px; }
.nf-art { flex: 1 1 300px; max-width: 480px; margin: 0 auto; position: relative; aspect-ratio: 1 / 1.05; }
.nf-art > span { position: absolute; inset: 0 6% 0 6%; border-radius: 999px 999px 36px 36px; background: var(--pink); }
.nf-art > b { position: absolute; top: 8%; left: 0; right: 0; text-align: center; font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: clamp(88px, 11cqw, 168px); line-height: 1; color: var(--cream); letter-spacing: -0.02em; }
.nf-art img { position: absolute; left: 10%; right: 10%; bottom: 4%; width: 80%; height: 62%; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(29, 27, 38, .18)); }

/* pole má vlastný krúžok (box-shadow) – globálny oranžový outline sa tu nepoužije */
.hg .s-input:focus-visible { outline: none; }
.hg .nf-input:focus-visible { outline: none; }

/* ---------- Animácia otvorenia hľadania ---------- */
.s-panel { position: relative; background: none; border-bottom: 0; isolation: isolate; }
.s-panel::before { content: ''; position: absolute; inset: 0; z-index: -1; background: #FFFFFF; border-bottom: 1px solid rgba(29, 27, 38, .10); transform-origin: top center; animation: sOpen .45s var(--ease) backwards; }
.s-scrim { animation: sFade .4s ease both; }
.s-mhead { animation: sFade .3s ease both; }
.s-lens { animation: sLens .7s var(--ease) .1s both; transform-origin: 50% 50%; }
.s-form-d .s-input, .s-form-m .s-input { animation: sGlow .9s ease-out .2s backwards; }
.s-col > .s-h2 { animation: sRise .45s var(--ease) .1s both; }
#s-popular .s-chip, #s-cats .s-catlink { animation: sRise .5s var(--ease) both; animation-delay: calc(.14s + var(--i, 0) * 40ms); }
#s-popular .s-chip:nth-child(1), #s-cats .s-catlink:nth-child(1) { --i: 0; }
#s-popular .s-chip:nth-child(2), #s-cats .s-catlink:nth-child(2) { --i: 1; }
#s-popular .s-chip:nth-child(3), #s-cats .s-catlink:nth-child(3) { --i: 2; }
#s-popular .s-chip:nth-child(4), #s-cats .s-catlink:nth-child(4) { --i: 3; }
#s-popular .s-chip:nth-child(5), #s-cats .s-catlink:nth-child(5) { --i: 4; }
#s-popular .s-chip:nth-child(6), #s-cats .s-catlink:nth-child(6) { --i: 5; }
#s-popular .s-chip:nth-child(n+7), #s-cats .s-catlink:nth-child(n+7) { --i: 6; }
/* našepkávač: riadky naskakujú postupne */
#s-hits .s-catrow, #s-hits .s-prod { animation: sRise .35s var(--ease) both; }
#s-hits .s-opt:nth-child(2) { animation-delay: .03s; }
#s-hits .s-opt:nth-child(3) { animation-delay: .06s; }
#s-hits .s-opt:nth-child(4) { animation-delay: .09s; }
#s-hits .s-opt:nth-child(n+5) { animation-delay: .12s; }
@keyframes sOpen { from { transform: scaleY(0); } }
@keyframes sFade { from { opacity: 0; } }
@keyframes sRise { from { opacity: 0; transform: translateY(12px); } }
@keyframes sLens { 0% { opacity: 0; transform: scale(.5) rotate(-35deg); } 60% { opacity: 1; transform: scale(1.15) rotate(6deg); } 100% { transform: none; } }
@keyframes sGlow { 0% { box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 0 rgba(247, 137, 47, .55); } 100% { box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 12px rgba(247, 137, 47, 0); } }

/* desktop: linky a pole v hlavičke sú „preč“ – pole sa presunulo do panela */
@media (min-width: 900px) {
  .hg[data-mode="search"] .hg-nav, .hg[data-mode="search"] .hg-search { visibility: hidden; }
  /* zatváranie samostatnej stránky /hladanie = animácia otvorenia pospiatky (search.js, animateClose) */
  .hg.is-closing .hg-nav { visibility: visible; }
  .hg.is-closing .hg-nav a { opacity: 0; transform: translateY(-6px); transition: opacity .2s ease, transform .25s var(--ease); }
  .hg.is-closing-go .hg-nav a { opacity: 1; transform: none; }
  .hg.is-closing-go .hg-nav a:nth-child(2) { transition-delay: .03s; }
  .hg.is-closing-go .hg-nav a:nth-child(3) { transition-delay: .06s; }
  .hg.is-closing-go .hg-nav a:nth-child(4) { transition-delay: .09s; }
  .hg.is-closing-go .hg-nav a:nth-child(n+5) { transition-delay: .12s; }
  .hg.is-closing .s-panel::before { transform: scaleY(0); transition: transform .34s cubic-bezier(.65, 0, .35, 1); animation: none; }
  .hg.is-closing .s-cols, .hg.is-closing .s-closebtn, .hg.is-closing .s-scrim { opacity: 0; transition: opacity .16s ease; }
  .hg.is-closing .s-form-d { visibility: hidden; }
  .hg.is-closing .s-closebtn { pointer-events: none; }
}

/* ---------- Panel hľadania nad stránkou (otvára ho search.js na všetkých stránkach okrem /hladanie) ---------- */
html.s-lock { overflow: hidden; }
html.s-lock body { padding-right: var(--s-sb, 0px); }
/* je v <body> mimo .hg – písmo a container query jednotky (cqw) si nesie sám */
.s-ov { position: fixed; top: var(--s-top, 0px); left: 0; right: 0; z-index: 19; height: calc(100vh - var(--s-top, 0px)); overflow-y: auto; overscroll-behavior: contain;
  container-type: inline-size; color: var(--ink); font-family: 'Figtree', system-ui, sans-serif; font-size: 17px; line-height: 1.55; }
.s-ov input[type="search"]::-webkit-search-cancel-button, .s-ov input[type="search"]::-webkit-search-decoration { display: none; -webkit-appearance: none; }
.s-ov .s-input:focus-visible { outline: none; }
/* závoj je pod celým panelom od prvého snímku – panel sa rozbaľuje už nad stlmenou stránkou */
.s-ov .s-scrim { position: absolute; inset: 0; z-index: -1; min-height: 0; }
/* desktop, krok 1 (pole ide do stredu hlavičky): panel je zbalený a jeho animácie čakajú – spustí ich trieda is-open na začiatku kroku 2 */
.s-ov:not(.is-open) .s-panel::before { transform: scaleY(0); }
.s-ov:not(.is-open) .s-panel *, .s-ov:not(.is-open) .s-panel::before { animation: none !important; }
.s-ov:not(.is-open) .s-panel-in > :not(.s-drow), .s-ov:not(.is-open) .s-closebtn { visibility: hidden; }
.s-ov.is-open .s-closebtn, .s-ov.is-open .s-back { animation: sFade .3s ease .15s both; }
/* skutočný vstup sa ukáže až po dolete klonu (is-landed); dovtedy je priehľadný, ale už prijíma písanie */
.s-ov:not(.is-landed) .s-form { opacity: 0; }
.s-ov .s-lens, .s-ov .s-input, .s-ov .s-mhead { animation: none; }
.s-ov.is-landed .s-input { animation: sGlow .9s ease-out backwards; }
/* zatvorenie: panel sa zbalí, obsah a závoj zmiznú (pole letí späť ako klon) */
.s-ov.is-closing { pointer-events: none; }
.s-ov.is-closing .s-panel::before { transform: scaleY(0); transition: transform .34s cubic-bezier(.65, 0, .35, 1); animation: none; }
.s-ov.is-closing .s-cols, .s-ov.is-closing .s-none, .s-ov.is-closing .s-closebtn, .s-ov.is-closing .s-back { opacity: 0; transition: opacity .16s ease; }
.s-ov.is-closing .s-scrim { opacity: 0; transition: opacity .34s ease; }
/* mobil: celoobrazovkový biely list sa rozbalí zhora (cez hlavičku aj spodnú lištu) */
@media (max-width: 899.98px) {
  .s-ov { top: 0; height: 100vh; height: 100dvh; z-index: 66; background: #FFFFFF; clip-path: inset(0); }  /* inset(0) – aby sa zbalenie dalo plynulo interpolovať */
  .s-ov .s-mhead { display: flex; position: relative; }
  .s-ov.is-open { animation: sSheet .42s cubic-bezier(.65, 0, .35, 1) backwards; }  /* rovnaká krivka ako lupa, ktorá sa ťahá do poľa */
  .s-ov.is-closing { clip-path: inset(0 0 100% 0); transition: clip-path .36s cubic-bezier(.65, 0, .35, 1); animation: none; }
}
@keyframes sSheet { from { clip-path: inset(0 0 100% 0); } }

/* systémové zvýraznenie ťuknutia (modrý štvorec v mobilnom Chrome) by pri štarte animácie bliklo */
.hg-head-m a.ibtn[href="/hladanie"], .s-back, .s-closebtn, .s-scrim { -webkit-tap-highlight-color: transparent; }

/* letiaci klon poľa (vzhľad na začiatku a na konci letu nastavuje search.js podľa skutočných prvkov) */
.s-fly { position: fixed; z-index: 70; display: flex; align-items: center; box-sizing: border-box; margin: 0; padding: 0 16px 0 0; border: 0; border-radius: 999px; overflow: hidden; white-space: nowrap; font: 500 15px 'Figtree', sans-serif; pointer-events: none; }
.s-fly svg { flex: none; }
.s-fly-t { display: grid; min-width: 0; }
.s-fly-t > span { grid-area: 1 / 1; overflow: hidden; text-overflow: ellipsis; }
