/* =====================================================================
   search-ui.css · OWNED BY THE SEARCH BUILDER
   The instant search overlay (.hm-sx-*). Desktop: a panel that drops from the nav line
   under the header search. Mobile (<=860px): a full-screen sheet with its own input.
   ===================================================================== */
html.hm-sx-lock{overflow:hidden}
html.hm-sx-lock.hm-sx-gut{scrollbar-gutter:stable}
.hm-sx{position:fixed;inset:0;z-index:55;pointer-events:none}
.hm-sx[hidden]{display:none}
.hm-sx.on{pointer-events:auto}
.hm-sx-scrim{position:absolute;inset:var(--sx-top,0px) 0 0 0;background:rgba(20,18,17,.46);opacity:0;transition:opacity .25s ease}
.hm-sx.on .hm-sx-scrim{opacity:1}
.hm-sx-panel{position:absolute;left:50%;width:min(1200px,calc(100vw - 48px));background:#fff;border-radius:0 0 28px 28px;box-shadow:0 40px 90px rgba(26,23,21,.28);display:flex;flex-direction:column;overflow:hidden;opacity:0;transform:translate(-50%,-10px);transition:opacity .22s ease,transform .38s var(--out)}
.hm-sx.on .hm-sx-panel{opacity:1;transform:translate(-50%,0)}
.hm-sx-panel::before{content:"";position:absolute;top:0;inset-inline:0;height:3px;background:linear-gradient(90deg,var(--red),#d9bc8c,var(--red));z-index:2}
.hm-sx-mbar{display:none}
.hm-sx-body{overflow:auto;overscroll-behavior:contain;padding:24px 30px 6px;flex:1;min-height:0}

/* section headings */
.hm-sx-sec{margin-bottom:22px}
.hm-sx-sec h4,.hm-sx-main h4{display:flex;align-items:center;gap:10px;margin:0 0 12px;font-size:13px;font-weight:900;letter-spacing:.06em;color:var(--muted)}
.hm-sx-sec h4::after,.hm-sx-main h4::after{content:"";flex:1;height:1px;background:var(--line)}
.hm-sx-clear{font-size:13px;font-weight:700;color:var(--red);letter-spacing:0;order:2}
.hm-sx-clear:hover{text-decoration:underline}

/* the "we understood" strip */
.hm-sx-intent{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;background:var(--tile);border-radius:18px;padding:12px 16px;margin-bottom:22px;font-size:15px}
.hm-sx-ai{display:inline-flex;align-items:center;gap:7px;font-weight:900;color:var(--red)}
.hm-sx-ai svg{width:18px;height:18px}
.hm-sx-chips{display:flex;flex-wrap:wrap;gap:6px}
.hm-sx-ichip{display:inline-flex;align-items:center;height:30px;padding:0 12px;border-radius:999px;background:#fff;box-shadow:inset 0 0 0 1.5px rgba(163,29,43,.35);color:var(--red);font-weight:900;font-size:14px;white-space:nowrap}
.hm-sx-dym{font-weight:700;color:var(--ink)}
.hm-sx-dym a{color:var(--red);font-weight:900;border-bottom:2px solid currentColor}
.hm-sx-count{margin-inline-start:auto;color:var(--muted);font-weight:700;white-space:nowrap}
.hm-sx-count b{font-family:var(--disp);font-weight:900;font-size:26px;color:var(--ink);line-height:1;vertical-align:-3px}

/* results layout */
.hm-sx-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:30px}
.hm-sx-grid.solo{grid-template-columns:minmax(0,1fr)}
.hm-sx-rows{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.hm-sx-grid.solo .hm-sx-rows{grid-template-columns:1fr 1fr}
.hm-sx-rows.one{grid-template-columns:1fr}

/* product row */
.hm-sx-row{display:grid;grid-template-columns:68px minmax(0,1fr) auto 40px;align-items:center;gap:12px;padding:8px 10px 8px 8px;border-radius:18px;background:#fff;box-shadow:inset 0 0 0 1px var(--line);transition:background .18s,box-shadow .18s;cursor:pointer;min-width:0}
.hm-sx-row:hover,.hm-sx-row.is-act{background:var(--tile)}
.hm-sx-row.is-act{box-shadow:inset 0 0 0 2px var(--red)}
.hm-sx-tile{width:68px;height:68px;border-radius:14px;background:var(--tile);display:grid;place-items:center;overflow:hidden;position:relative}
.hm-sx-row:hover .hm-sx-tile,.hm-sx-row.is-act .hm-sx-tile{background:#fff}
.hm-sx-tile img{width:100%;height:60px;object-fit:contain;filter:drop-shadow(0 6px 5px rgba(25,23,22,.18));transition:transform .4s var(--out)}
.hm-sx-tile img.wb{mix-blend-mode:multiply;filter:none}
.hm-sx-row:hover .hm-sx-tile img{transform:translateY(-3px) rotate(-3deg)}
.hm-sx-info{min-width:0;display:flex;flex-direction:column;gap:4px}
.hm-sx-name{font-weight:700;font-size:15.5px;line-height:1.28;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hm-sx-name mark{background:none;color:var(--red);font-weight:900}
.hm-sx-meta{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden}
.hm-sx-meta img{width:16px;height:11px;object-fit:cover;border-radius:2px;flex:none}
.hm-sx-badge{font-size:11px!important;padding:3px 8px!important;flex:none}
.hm-sx-pr{display:flex;flex-direction:column;align-items:flex-end;line-height:1;gap:3px;text-align:left}
.hm-sx-pr b{font-family:var(--disp);font-weight:900;font-size:25px}
.hm-sx-pr b.red{color:var(--red)}
.hm-sx-pr s{font-size:12.5px;color:var(--muted)}
.hm-sx-act{display:flex;justify-content:center}
.hm-sx-plus{width:38px;height:38px;border-radius:50%;background:var(--ink);color:#fff;display:grid;place-items:center;transition:background .2s,transform .2s}
.hm-sx-plus svg{width:18px;height:18px}
.hm-sx-plus:hover{background:var(--red);transform:scale(1.08)}
.hm-sx-q{display:flex;flex-direction:column;align-items:center;background:var(--red);color:#fff;border-radius:999px;width:38px;padding:2px 0}
.hm-sx-q button{width:34px;height:24px;color:#fff;font-size:17px;font-weight:900;line-height:1}
.hm-sx-q output{font-family:var(--disp);font-weight:900;font-size:18px;line-height:1}

/* aside groups */
.hm-sx-aside{border-inline-start:1px solid var(--line);padding-inline-start:26px}
.hm-sx-cats,.hm-sx-brands{display:flex;flex-direction:column;gap:4px}
.hm-sx-cat{display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:12px;padding:5px 8px 5px 10px;border-radius:14px;font-weight:700;font-size:15.5px;transition:background .18s}
.hm-sx-cat img{width:42px;height:42px;border-radius:12px;object-fit:cover}
.hm-sx-cat small{font-size:12.5px;color:var(--muted2);font-weight:700}
.hm-sx-brand{display:grid;grid-template-columns:1fr auto;align-items:center;gap:2px 10px;padding:8px 12px;border-radius:14px;transition:background .18s}
.hm-sx-brand b{font-weight:900;font-size:16px}
.hm-sx-brand small{grid-row:2;font-size:12.5px;color:var(--muted)}
.hm-sx-brand svg{grid-row:1/3;grid-column:2;width:16px;height:16px;color:var(--muted2)}
.hm-sx-deal{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:16px;background:var(--red-soft);margin-bottom:6px;transition:background .18s,box-shadow .18s}
.hm-sx-deal .hm-badge{flex:none}
.hm-sx-deal .t{display:flex;flex-direction:column;min-width:0}
.hm-sx-deal b{font-weight:900;font-size:15px;line-height:1.25}
.hm-sx-deal small{font-size:12.5px;color:var(--muted)}
.hm-sx-rec{display:grid;grid-template-columns:54px 1fr;align-items:center;gap:12px;padding:6px 8px;border-radius:14px;transition:background .18s}
.hm-sx-rec img{width:54px;height:54px;border-radius:12px;object-fit:cover}
.hm-sx-rec b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:14.5px;font-weight:700;line-height:1.3}
.hm-sx-rec small{font-size:12.5px;color:var(--muted)}
.hm-sx-cat:hover,.hm-sx-brand:hover,.hm-sx-rec:hover,.hm-sx-cat.is-act,.hm-sx-brand.is-act,.hm-sx-rec.is-act{background:var(--tile)}
.hm-sx-deal:hover,.hm-sx-deal.is-act{box-shadow:inset 0 0 0 2px var(--red)}
:is(.hm-sx-cat,.hm-sx-brand,.hm-sx-rec,.hm-sx-ctile,.hm-sx-pill).is-act{box-shadow:inset 0 0 0 2px var(--red)}

/* footer */
.hm-sx-foot{position:sticky;bottom:-6px;z-index:3;display:flex;align-items:center;gap:20px;margin:6px -30px 0;padding:14px 30px 18px;border-top:1px solid var(--line);background:#fff}
.hm-sx-all{height:50px}
/* keyboard hints only for people who navigate with the keyboard (arrows / Tab); never clutter touch or mouse use */
.hm-sx-keys{margin-inline-start:auto;font-size:13px;color:var(--muted);display:none;align-items:center;gap:6px;animation:hmSxFade .3s ease}
.hm-sx.kb .hm-sx-keys{display:flex}
@media (hover:none),(pointer:coarse){.hm-sx.kb .hm-sx-keys{display:none}}
@keyframes hmSxFade{from{opacity:0}to{opacity:1}}
.hm-sx-keys kbd{font:inherit;font-weight:700;font-size:12px;min-width:24px;height:24px;display:inline-grid;place-items:center;padding:0 6px;border-radius:7px;background:var(--tile);box-shadow:inset 0 -2px 0 var(--tile2);color:var(--ink)}
.hm-sx-keys kbd+kbd{margin-inline-start:-2px}
.hm-sx-keys kbd svg{width:13px;height:13px}

/* discover (empty input) */
.hm-sx-disc{display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:34px;padding-bottom:16px}
.hm-sx-dcol.best{border-inline-start:1px solid var(--line);padding-inline-start:28px}
.hm-sx-pills{display:flex;flex-wrap:wrap;gap:8px}
.hm-sx-pill{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 16px;border-radius:999px;background:#fff;box-shadow:inset 0 0 0 1.5px var(--line);font-weight:700;font-size:15px;cursor:pointer;transition:box-shadow .18s,background .18s;white-space:nowrap}
.hm-sx-pill svg{width:18px;height:18px;color:var(--red);flex:none}
.hm-sx-pill:hover{box-shadow:inset 0 0 0 1.5px var(--ink)}
.hm-sx-pill.rec{background:var(--tile);box-shadow:none;padding-inline-end:6px}
.hm-sx-pill.rec svg{color:var(--muted)}
.hm-sx-pill.rec button{width:26px;height:26px;border-radius:50%;font-size:18px;line-height:1;color:var(--muted);display:grid;place-items:center}
.hm-sx-pill.rec button:hover{background:#fff;color:var(--red)}
.hm-sx-tip{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:14px 0 0;font-size:14px;color:var(--muted)}
.hm-sx-tip svg{width:16px;height:16px;color:var(--red)}
.hm-sx-tip b{color:var(--ink)}
.hm-sx-ctiles{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:10px}
.hm-sx-ctile{display:flex;flex-direction:column;align-items:center;gap:7px;padding:6px 4px 8px;border-radius:16px;font-weight:700;font-size:14px;text-align:center;line-height:1.15;transition:background .18s}
.hm-sx-ctile img{width:100%;aspect-ratio:1;border-radius:14px;object-fit:cover;transition:transform .4s var(--out)}
.hm-sx-ctile:hover{background:var(--tile)}
.hm-sx-ctile:hover img{transform:scale(1.04)}

/* no results */
.hm-sx-none{padding-bottom:10px}
.hm-sx-nhead{display:flex;align-items:center;gap:16px;margin-bottom:16px}
.hm-sx-nhead .ic{width:54px;height:54px;border-radius:50%;background:var(--red-soft);color:var(--red);display:grid;place-items:center;flex:none}
.hm-sx-nhead .ic svg{width:24px;height:24px}
.hm-sx-nhead b{font-family:var(--disp);font-weight:900;font-size:34px;line-height:1}
.hm-sx-nhead p{margin:6px 0 0;color:var(--muted)}
.hm-sx-nhead p a{color:var(--red);font-weight:900;border-bottom:2px solid currentColor}
.hm-sx-ntip{color:var(--muted);margin:0 0 14px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.hm-sx-help{display:grid;grid-template-columns:1fr auto;gap:2px 12px;align-items:center;margin:18px 0 22px;padding:14px 18px;border-radius:18px;background:var(--night);color:#fff;transition:background .2s}
.hm-sx-help b{font-weight:900;font-size:16.5px}
.hm-sx-help span{grid-row:2;font-size:14px;color:var(--stone)}
.hm-sx-help svg{grid-row:1/3;grid-column:2;width:18px;height:18px}
.hm-sx-help:hover{background:var(--red)}

/* loading */
.hm-sx-load{display:flex;align-items:center;gap:8px;padding:26px 4px;color:var(--muted);font-weight:700}
.hm-sx-load i{width:9px;height:9px;border-radius:50%;background:var(--red);animation:hm-sx-dot 1s infinite ease-in-out}
.hm-sx-load i:nth-child(2){animation-delay:.15s}.hm-sx-load i:nth-child(3){animation-delay:.3s}
@keyframes hm-sx-dot{0%,80%,100%{opacity:.25;transform:scale(.8)}40%{opacity:1;transform:none}}

@media (max-width:1100px){
 .hm-sx-grid{grid-template-columns:minmax(0,1fr) 280px;gap:22px}
 .hm-sx-rows{grid-template-columns:1fr}
 .hm-sx-disc{grid-template-columns:minmax(0,1fr) 330px}
 .hm-sx-ctiles{grid-template-columns:repeat(5,minmax(0,1fr))}
}

/* ---------- mobile: full-screen sheet ---------- */
@media (max-width:860px){
 .hm-sx{z-index:96}
 .hm-sx-scrim{display:none}
 .hm-sx-panel{inset:0;left:0;top:0!important;width:auto;max-height:none!important;border-radius:0;transform:translateY(14px);box-shadow:none}
 .hm-sx.on .hm-sx-panel{transform:none}
 .hm-sx-panel::before{display:none}
 .hm-sx-mbar{display:flex;align-items:center;gap:6px;padding:10px 10px 10px 12px;padding-top:max(10px,env(safe-area-inset-top));border-bottom:1px solid var(--line);background:#fff}
 .hm-sx-back{width:44px;height:44px;display:grid;place-items:center;border-radius:50%;flex:none}
 .hm-sx-back svg{width:24px;height:24px}
 .hm-sx-mform{flex:1;position:relative;margin:0;min-width:0}
 .hm-sx-mform input{width:100%;height:46px;border:1.5px solid var(--ink);background:#fff;border-radius:999px;padding:0 16px 0 84px;font:inherit;font-size:16px;outline:0;-webkit-appearance:none;appearance:none}
 .hm-sx-mform input::-webkit-search-cancel-button{display:none}
 .hm-sx-go{position:absolute;left:4px;top:4px;width:38px;height:38px;border-radius:50%;background:var(--red);color:#fff;display:grid;place-items:center}
 .hm-sx-go svg{width:18px;height:18px}
 .hm-sx-clr{position:absolute;left:46px;top:8px;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;color:var(--muted)}
 .hm-sx-clr[hidden]{display:none}
 .hm-sx-clr svg{width:16px;height:16px}
 .hm-sx-body{padding:16px 16px 24px}
 .hm-sx-intent{padding:10px 12px;font-size:14px;margin-bottom:16px;border-radius:16px}
 .hm-sx-count b{font-size:22px}
 .hm-sx-grid,.hm-sx-disc{grid-template-columns:minmax(0,1fr);gap:6px}
 .hm-sx-aside,.hm-sx-dcol.best{border:0;padding:0}
 .hm-sx-main{margin-bottom:22px}
 .hm-sx-rows,.hm-sx-grid.solo .hm-sx-rows{grid-template-columns:1fr;gap:6px}
 .hm-sx-row{grid-template-columns:60px minmax(0,1fr) auto 38px;gap:10px;padding:6px 8px 6px 6px;border-radius:16px}
 .hm-sx-tile{width:60px;height:60px}.hm-sx-tile img{height:54px}
 .hm-sx-name{font-size:14.5px}
 .hm-sx-pr b{font-size:22px}
 .hm-sx-cats{display:grid;grid-template-columns:1fr 1fr;gap:6px}
 .hm-sx-cat{grid-template-columns:38px 1fr auto;background:var(--tile);gap:8px;font-size:14.5px}
 .hm-sx-cat img{width:38px;height:38px}
 .hm-sx-foot{bottom:-24px;margin:0 -16px -24px;padding:10px 16px max(12px,env(safe-area-inset-bottom));box-shadow:0 -10px 24px rgba(26,23,21,.06)}
 .hm-sx-all{width:100%}
 .hm-sx-keys{display:none}
 .hm-sx-pill{height:38px;padding:0 14px;font-size:14.5px}
 .hm-sx-ctiles{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 .hm-sx-ctile{font-size:13.5px}
 .hm-sx-nhead b{font-size:28px}
}
@media (prefers-reduced-motion:reduce){.hm-sx-panel,.hm-sx-scrim{transition:none}}

/* joy layer: the no-results medallion carries the brand smile (kit/joy.js) */
.hm-sx-nhead .ic.joy{background:var(--tile)}
.hm-sx-nhead .ic.joy .hm-joy-sm{width:30px;margin-top:6px}
/* BRANDS builder: "all wineries & brands" link in the brands group */
.hm-sx-ball{order:3;font-size:12.5px;font-weight:900;letter-spacing:0;color:var(--red)}
.hm-sx-ball:hover{text-decoration:underline;text-underline-offset:3px}
.hm-sx-sec h4:has(.hm-sx-ball)::after{order:2}

/* no product hit but a recipe name hit ("negroni"): recipe rows as the answer */
.hm-sx-nrec{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:18px}
.hm-sx-rec small i{font-family:'Helvetica Neue',Arial,sans-serif;font-style:normal;font-weight:900;letter-spacing:.08em;text-transform:uppercase;font-size:.92em}
@media (max-width:860px){.hm-sx-nrec{grid-template-columns:1fr}}
.hm-sx-rtop{margin-bottom:14px}.hm-sx-rtop .hm-sx-nrec{margin-bottom:0}
/* occasion packs first, then an honest backfill under a quiet divider */
.hm-sx-div{display:flex;align-items:center;gap:10px;margin:10px 4px 6px;font-size:13.5px;font-weight:700;color:var(--muted)}
.hm-sx-div::before,.hm-sx-div::after{content:"";flex:1;height:1px;background:var(--line)}
.hm-sx-div::before{flex:0 0 14px}
.hm-sx-rows .hm-sx-div{grid-column:1/-1}
