/* One stylesheet for SSale (index.html) and its drinks brand თამადა (drinks.html).
   Shell and shared parts are unprefixed; .sx scopes the shop and dish cards (a shelf of
   price tags: sale price on a yellow tag, other stores' prices beneath); .dr scopes the
   drinks list (one row per bottle, cheapest price large). drinks.html overrides the tokens
   with its wine palette, so everything below reads colours only through the tokens. */
:root {
  --bg: #f3f5f1;
  --surface: #ffffff;
  --fg: #1d231f;
  --muted: #5f6b63;
  --line: #dde3dc;
  --tag: #ffd84d;
  --tag-fg: #1d1a08;
  --sale: #d7263d;
  --accent: #1f7a4d;
  --wine: #1f7a4d;
  --wine-fg: #ffffff;
  --amber: #e0a800;
  --good: #1f7a4d;
  --font-body: "Noto Sans Georgian", "Sylfaen", system-ui, sans-serif;
  --font-num: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121613; --surface: #1b211d; --fg: #e8ede9; --muted: #9aa69e; --line: #2c352f;
    --tag: #f2c935; --tag-fg: #1d1a08; --sale: #ff5a6e; --accent: #4cc68a;
    --wine: #4cc68a; --wine-fg: #0d130f; --amber: #f2c935; --good: #4cc68a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121613; --surface: #1b211d; --fg: #e8ede9; --muted: #9aa69e; --line: #2c352f;
  --tag: #f2c935; --tag-fg: #1d1a08; --sale: #ff5a6e; --accent: #4cc68a;
  --wine: #4cc68a; --wine-fg: #0d130f; --amber: #f2c935; --good: #4cc68a; color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.45; }
[hidden] { display: none !important; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
header.top { padding-block: 22px 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.brand { font-weight: 800; font-size: 28px; letter-spacing: -0.5px; margin: 0; }
.brand a { color: inherit; text-decoration: none; }
.brand b { background: var(--tag); color: var(--tag-fg); padding: 0 6px; border-radius: 4px; }
.lede { color: var(--muted); margin: 0; flex: 1 1 260px; }
/* Section tabs: one row that scrolls sideways on a phone. */
nav.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-block: 4px 10px; }
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs a { flex: none; color: var(--fg); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
nav.tabs a[aria-current="page"] { background: var(--fg); color: var(--bg); border-color: var(--fg); font-weight: 700; }
nav.tabs .n { font-family: var(--font-num); font-size: 12px; margin-left: 4px; }
.sec-lede { color: var(--muted); font-size: 13px; margin: 14px 0 0; }
footer { color: var(--muted); font-size: 12px; padding-block: 0 32px; }
footer a { color: var(--muted); }
.q { width: 100%; font: inherit; font-size: 16px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); }
.q:focus-visible, button:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* ★ list: every followed item from every section, grouped by section. */
.fav-group { padding-block: 8px 4px; }
.fav-group > h2 { font-size: 19px; font-weight: 800; margin: 18px 0 0; }
.fav-empty { padding: 48px 0; text-align: center; color: var(--muted); }
.fav-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; }
.fav-head p { margin: 0; color: var(--muted); font-size: 13px; }
.linkish { font: inherit; font-size: 13px; background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; }
/* ---- Shops, pharmacies and dishes ---- */
.sx .bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding-block: 10px; border-bottom: 1px solid var(--line); }
.sx .bar .wrap { display: flex; flex-direction: column; gap: 10px; }
.sx .q:focus-visible, .sx button:focus-visible, .sx select:focus-visible, .sx a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sx .controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sx .chip { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; }
.sx .chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.sx select { font: inherit; font-size: 13px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); margin-left: auto; }
.sx .summary { color: var(--muted); font-size: 13px; padding-block: 12px 4px; font-variant-numeric: tabular-nums; }
.sx .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding-block: 8px 24px; }
.sx .card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sx .head { display: flex; gap: 10px; align-items: flex-start; }
.sx .thumb { width: 56px; height: 56px; flex: none; border-radius: 8px; background: var(--bg); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-weight: 700; }
.sx .thumb img { width: 100%; height: 100%; object-fit: contain; }
.sx .name { font-size: 14px; font-weight: 500; margin: 0; min-width: 0; overflow-wrap: anywhere; flex: 1; }
.sx .star { flex: none; border: 0; background: none; cursor: pointer; font-size: 20px; line-height: 1; color: var(--muted); padding: 2px; }
.sx .star[aria-pressed="true"] { color: var(--sale); }
.sx .best { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sx .price { font-family: var(--font-num); font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; }
.sx .price.on { background: var(--tag); color: var(--tag-fg); padding: 1px 8px; border-radius: 4px; clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }
.sx .was { font-family: var(--font-num); color: var(--muted); text-decoration: line-through; font-size: 13px; }
.sx .pct { font-family: var(--font-num); font-weight: 700; color: var(--sale); font-size: 13px; }
.sx .meta { font-size: 12px; color: var(--muted); }
.sx .meta strong { color: var(--fg); font-weight: 500; }
.sx .offers { list-style: none; margin: 0; padding: 0; border-top: 1px dashed var(--line); display: flex; flex-direction: column; }
.sx .offers li { display: flex; justify-content: space-between; gap: 8px; padding-block: 6px 0; font-size: 13px; }
.sx .offers a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line); }
.sx .offers a:hover { border-color: var(--accent); }
.sx .offers .p { font-family: var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sx .offers .p.on { color: var(--sale); font-weight: 700; }
.sx .out { font-family: var(--font-body); font-size: 11px; color: var(--muted); }
.sx .save { font-size: 12px; color: var(--accent); font-weight: 700; }
.sx .more { display: block; margin: 0 auto 32px; font: inherit; padding: 10px 22px; border-radius: 10px; border: 1px solid var(--fg); background: var(--surface); color: var(--fg); cursor: pointer; }
.sx .empty { padding: 40px 0; text-align: center; color: var(--muted); }
@media (max-width: 520px) { .sx select { margin-left: 0; } .sx .brand { font-size: 24px; } }
/* Home: today's highlights above the full list. Rails scroll sideways on their own. */
.sx .home { display: flex; flex-direction: column; gap: 28px; padding-block: 20px 8px; }
.sx .home[hidden] { display: none; }
.sx .sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sx .sec-head h2 { font-size: 19px; font-weight: 800; margin: 0; text-wrap: balance; }
.sx .sec-head p { margin: 0; color: var(--muted); font-size: 13px; }
.sx .link { font: inherit; font-size: 13px; color: var(--accent); background: none; border: 0; cursor: pointer; padding: 0; white-space: nowrap; }
.sx .compare { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; grid-template-columns: 96px 1fr; gap: 16px; }
.sx .compare .thumb { width: 96px; height: 96px; }
.sx .compare h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.sx .compare .verdict { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.sx .compare .verdict b { color: var(--accent); }
.sx .bars { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sx .barrow { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: center; font-size: 13px; }
.sx .barrow .who { color: var(--fg); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx .track { position: relative; height: 26px; }
.sx .fill { height: 100%; border-radius: 4px; background: var(--line); display: flex; align-items: center; justify-content: flex-end; padding-inline: 8px; min-width: fit-content; }
.sx .fill span { font-family: var(--font-num); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sx .fill.best { background: var(--tag); color: var(--tag-fg); }
.sx .fill s { font-weight: 500; opacity: .65; margin-right: 6px; }
.sx .picker { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sx .picker .chip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx .rail { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.sx .mini { scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; text-align: left; font: inherit; color: var(--fg); }
.sx .mini:hover { border-color: var(--fg); }
.sx .mini .thumb { width: 100%; height: 96px; }
.sx .mini .nm { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.sx .mini .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sx .mini .price { font-size: 17px; }
.sx .mini .meta { font-size: 11px; }
.sx .stores { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.sx .storecard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-align: left; font: inherit; color: var(--fg); cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.sx .storecard:hover { border-color: var(--fg); }
.sx .storecard b { font-size: 16px; }
.sx .storecard .n { font-family: var(--font-num); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sx .storecard .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx .all-head { font-size: 19px; font-weight: 800; margin: 8px 0 0; }
@media (max-width: 520px) { .sx .compare { grid-template-columns: 1fr; } .sx .compare .thumb { width: 72px; height: 72px; } .sx .barrow { grid-template-columns: 78px 1fr; } }
.sx .brandline { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.sx .none { font-size: 12px; color: var(--muted); }
/* ---- Drinks ---- */
.dr .bar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); padding-block: 10px; border-bottom: 1px solid var(--line); }
.dr header.top { padding-block: 22px 6px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dr .brand { margin: 0; font-weight: 800; font-size: 32px; letter-spacing: -0.8px; color: var(--wine); }
.dr .brand span { color: var(--amber); }
.dr .lede { margin: 0; color: var(--muted); font-size: 14px; }
.dr .q { width: 100%; font: inherit; font-size: 16px; padding: 12px 16px 12px 42px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23998877' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat 14px center; color: var(--fg); transition: border-color .15s ease; }
.dr .q:focus { border-color: var(--wine); outline: 0; }
.dr .q:focus-visible, .dr button:focus-visible, .dr select:focus-visible, .dr a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.dr .types { display: flex; gap: 8px; overflow-x: auto; padding-block: 10px 2px; scrollbar-width: none; }
.dr .types::-webkit-scrollbar { display: none; }
.dr .types.stores { padding-block: 6px 2px; }
.dr .types.stores .chip { font-size: 13px; padding: 5px 12px; }
.dr .types[hidden] { display: none; }
.dr .chip { flex: none; font: inherit; font-size: 14px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.dr .chip:hover { border-color: color-mix(in srgb, var(--wine) 45%, var(--line)); }
.dr .chip[aria-pressed="true"] { background: var(--wine); color: var(--wine-fg); border-color: var(--wine); }
.dr .controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dr .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 12px 4px; flex-wrap: wrap; }
.dr .summary { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.dr select { font: inherit; font-size: 13px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); }
.dr .picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-block: 10px 4px; }
.dr .picks[hidden] { display: none; }
.dr .pick { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--wine) 35%, var(--line)); box-shadow: 0 14px 34px -22px color-mix(in srgb, var(--wine) 80%, transparent); border-radius: 20px; padding: 14px; color: var(--fg); text-decoration: none; min-width: 0; }
.dr .pick:hover { border-color: var(--amber); }
.dr .pick .label { font-size: 13px; font-weight: 700; letter-spacing: 0.3px; color: var(--wine); text-transform: uppercase; }
.dr .pick .big { position: absolute; top: 12px; right: 12px; font-family: var(--font-num); font-weight: 700; font-size: 18px; color: var(--wine-fg); background: var(--sale); padding: 4px 10px; border-radius: 999px; }
.dr .pick .thumb { grid-row: auto; width: 100%; height: 120px; border-radius: 12px; font-size: 40px; }
.dr .pick .thumb { background: transparent; }
.dr .pick .thumb img { height: 120px; width: 100%; object-fit: contain; }
.dr .pick .pname { font-size: 15px; font-weight: 500; margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dr .pick .now { font-family: var(--font-num); font-weight: 700; font-size: 26px; color: var(--sale); }
.dr .pick .was { font-size: 14px; margin-left: 6px; }
.dr .pick .where { font-size: 13px; }
.dr h2.sec { font-size: 15px; margin: 18px 0 0; }
.dr h2.sec[hidden] { display: none; }
@media (max-width: 640px) {
  .dr .picks { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .dr .picks::-webkit-scrollbar { display: none; }
  .dr .pick { scroll-snap-align: start; }
}
.dr .star { position: absolute; top: 6px; right: 6px; border: 0; background: var(--surface); border-radius: 999px; width: 32px; height: 32px; cursor: pointer; font-size: 20px; line-height: 1; color: var(--muted); padding: 0; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.dr .star[aria-pressed="true"] { color: var(--amber); }
.dr .buy { margin-top: auto; text-align: center; font-size: 14px; font-weight: 700; color: var(--wine-fg); background: var(--wine); padding: 8px 10px; border-radius: 10px; text-decoration: none; }
.dr .alert { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--amber); color: #2a1d16; font-weight: 500; }
.dr .alert[hidden] { display: none; }
.dr .alert button { font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 6px 12px; background: #2a1d16; color: #fff; cursor: pointer; }
.dr .hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.dr .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; padding-block: 6px 24px; }
.dr .list > .hint, .dr .list > .empty { grid-column: 1 / -1; }
.dr .card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.dr .card:hover { border-color: color-mix(in srgb, var(--wine) 40%, var(--line)); transform: translateY(-2px); box-shadow: 0 12px 28px -16px rgba(0,0,0,.35); }
.dr .ph { position: relative; }
.dr .thumb { width: 100%; height: 150px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-weight: 700; font-size: 36px; text-decoration: none; }
.dr .thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.dr .badge { position: absolute; top: 8px; left: 8px; font-family: var(--font-num); font-size: 13px; font-weight: 700; color: var(--wine-fg); background: var(--sale); padding: 3px 8px; border-radius: 6px; }
.dr .name { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dr .name a { color: var(--fg); text-decoration: none; }
.dr .name a:hover { text-decoration: underline; }
.dr .where { font-size: 12px; color: var(--muted); }
.dr .where strong { font-weight: 700; color: var(--fg); }
.dr .price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; white-space: nowrap; }
.dr .price b { font-family: var(--font-num); font-size: 20px; font-variant-numeric: tabular-nums; }
.dr .price b.on { color: var(--sale); }
.dr .was { font-family: var(--font-num); font-size: 12px; color: var(--muted); text-decoration: line-through; }
.dr .pct { font-family: var(--font-num); font-size: 12px; font-weight: 700; color: var(--wine-fg); background: var(--sale); padding: 1px 6px; border-radius: 4px; margin-left: 4px; }
.dr .litre { font-family: var(--font-num); font-size: 11px; color: var(--muted); }
.dr .offers { list-style: none; margin: 0; padding: 6px 0 0; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.dr .offers li { display: flex; justify-content: space-between; gap: 6px; }
.dr .offers a { color: var(--fg); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr .offers a:hover { text-decoration: underline; }
.dr .offers .p { font-family: var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dr .offers .p.on { color: var(--sale); font-weight: 700; }
.dr .offers .p.cheap { color: var(--good); font-weight: 700; }
.dr .offers .p.out { color: var(--muted); text-decoration: line-through; }
.dr .shelf { padding-block: 18px 0; }
.dr .shelf-head { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 10px; }
.dr .shelf-head h2 { margin: 0; font-size: 19px; font-weight: 700; }
.dr .shelf-head .note { font-size: 12px; color: var(--muted); }
.dr .shelf-head .linkish { white-space: nowrap; }
.dr .shelf-head .arrows { margin-left: auto; display: flex; gap: 6px; }
.dr .shelf-head .arrows button { width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; font-size: 18px; line-height: 1; }
.dr .strip { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 12px) / 6); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.dr .strip::-webkit-scrollbar { display: none; }
.dr .strip > .card { scroll-snap-align: start; }
.dr [data-k="shelves"][hidden] { display: none; }
@media (max-width: 1000px) { .dr .strip { grid-auto-columns: calc((100% - 3 * 12px) / 4); } }
@media (max-width: 640px) {
  .dr .strip { grid-auto-columns: 44%; }
  .dr .shelf-head .arrows { display: none; }
  .dr .shelf-head .linkish { margin-left: auto; }
  .dr .list { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dr .thumb { height: 130px; }
}
.dr .more { display: block; margin: 0 auto 32px; font: inherit; padding: 10px 22px; border-radius: 10px; border: 1px solid var(--fg); background: var(--surface); color: var(--fg); cursor: pointer; }
.dr .more[hidden] { display: none; }
.dr .empty { padding: 40px 0; text-align: center; color: var(--muted); }
.dr footer { color: var(--muted); font-size: 12px; padding-block: 0 32px; }
.dr footer a { color: var(--muted); }
.gate { position: fixed; inset: 0; z-index: 20; background: var(--bg); display: grid; place-items: center; padding: 16px; text-align: center; }
.gate[hidden] { display: none; }
.gate p { font-size: 18px; margin: 0 0 16px; }
.gate button { font: inherit; font-size: 16px; padding: 12px 22px; border-radius: 12px; border: 0; background: var(--wine); color: var(--wine-fg); cursor: pointer; margin: 4px; }
.gate button.no { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
@media (max-width: 520px) {
  .dr .price b { font-size: 19px; }
}
.sheet { position: fixed; inset: 0; z-index: 15; background: rgba(0, 0, 0, 0.45); display: grid; place-items: end center; padding: 16px; }
.sheet[hidden] { display: none; }
.sheet .box { width: 100%; max-width: 440px; background: var(--surface); color: var(--fg); border-radius: 18px; padding: 18px; }
.sheet h3 { margin: 0 0 4px; font-size: 18px; }
.sheet p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.sheet label { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.sheet label.off { color: var(--muted); }
.sheet input { width: 20px; height: 20px; accent-color: var(--wine); }
.sheet .soon { margin-left: auto; font-size: 12px; color: var(--muted); }
.sheet .go { width: 100%; margin-top: 12px; font: inherit; font-weight: 700; font-size: 16px; padding: 12px; border: 0; border-radius: 12px; background: var(--wine); color: var(--wine-fg); cursor: pointer; }
@media (min-width: 640px) { .sheet { place-items: center; } }

/* ---- AI assistant (chat.js): a button at the bottom right, and a panel that is a side
   drawer on a computer and the whole screen on a phone. Colours come from the tokens. ---- */
.ai { --ai: var(--wine); --ai-fg: var(--wine-fg); font-family: var(--font-body); }
.ai[hidden] { display: none; }
.ai-fab { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 12; display: flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: 15px; padding: 13px 20px 13px 16px; border: 0; border-radius: 999px; color: var(--ai-fg); background: linear-gradient(135deg, var(--ai), color-mix(in srgb, var(--ai) 60%, var(--amber))); box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--ai) 70%, transparent), 0 2px 6px rgba(0,0,0,.15); cursor: pointer; transition: transform .15s ease; }
.ai-fab:hover { transform: translateY(-2px); }
.ai.open .ai-fab { display: none; }
.ai-spark { font-size: 18px; line-height: 1; }
.ai-panel { position: fixed; z-index: 30; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); display: flex; flex-direction: column; background: var(--bg); border-left: 1px solid var(--line); box-shadow: -18px 0 50px -20px rgba(0,0,0,.35); animation: ai-in .22s ease; }
.ai-panel[hidden] { display: none; }
@keyframes ai-in { from { transform: translateX(24px); opacity: 0; } }
@media (max-width: 640px) { .ai-panel { width: 100vw; border-left: 0; } html.ai-on body { overflow: hidden; } }
.ai-head { display: flex; align-items: center; gap: 10px; padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 12px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(10px); }
.ai-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ai-id b { font-size: 16px; }
.ai-id small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-avatar { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; color: var(--ai-fg); background: linear-gradient(135deg, var(--ai), color-mix(in srgb, var(--ai) 55%, var(--amber))); }
.ai-avatar.big { width: 52px; height: 52px; border-radius: 16px; font-size: 26px; }
.ai-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.ai-icon:hover { background: var(--surface); color: var(--fg); }
.ai-icon[hidden] { display: none; }
.ai-log { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.ai-hello { margin: auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 4px; }
.ai-hello h3 { margin: 6px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.ai-hello p { margin: 0; color: var(--muted); font-size: 14px; max-width: 340px; }
.ai-sugs { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 10px; }
.ai-sug { font: inherit; font-size: 14px; text-align: left; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.ai-sug:hover { border-color: var(--ai); transform: translateY(-1px); }
.ai-msg { max-width: 100%; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.ai-msg.me { align-self: flex-end; max-width: 85%; padding: 10px 14px; border-radius: 18px 18px 4px 18px; background: var(--ai); color: var(--ai-fg); white-space: pre-wrap; }
.ai-msg.bot { display: flex; gap: 10px; align-items: flex-start; }
.ai-body { flex: 1; min-width: 0; padding-top: 3px; }
.ai-body p { margin: 0 0 8px; }
.ai-body p.ai-h { font-weight: 700; margin-top: 4px; }
.ai-body ul, .ai-body ol { margin: 0 0 8px; padding-left: 20px; }
.ai-body li { margin: 2px 0; }
.ai-body a { color: var(--ai); }
.ai-body a.ai-card { color: var(--fg); }
.ai-status { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.ai-typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.ai-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: ai-dot 1s infinite ease-in-out; }
.ai-typing i:nth-child(2) { animation-delay: .15s; } .ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-err { color: var(--sale); font-size: 14px; }
.ai-cards { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 10px; }
.ai-card { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-decoration: none; transition: border-color .15s ease; }
.ai-card:hover { border-color: var(--ai); }
.ai-card .thumb { flex: none; width: 56px; height: 56px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-weight: 700; font-size: 20px; }
.ai-card .thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ai-card-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ai-card .nm { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ai-card .pr { display: flex; align-items: baseline; gap: 6px; }
.ai-card .pr b { font-family: var(--font-num); font-size: 16px; }
.ai-card .pr b.on { color: var(--sale); }
.ai-card .pr s { font-family: var(--font-num); font-size: 12px; color: var(--muted); }
.ai-card .pr em { font-style: normal; font-family: var(--font-num); font-size: 11px; font-weight: 700; color: var(--wine-fg); background: var(--sale); padding: 1px 5px; border-radius: 4px; }
.ai-card .sh { font-size: 12px; color: var(--muted); }
.ai-branch .pin { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); font-size: 20px; }
.ai-branch .go { font-size: 12px; color: var(--ai); font-weight: 700; }
.ai-form { display: flex; align-items: flex-end; gap: 8px; margin: 8px 12px 0; padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 4px 18px -10px rgba(0,0,0,.25); }
.ai-form:focus-within { border-color: var(--ai); }
.ai-form textarea { flex: 1; resize: none; border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: 16px; line-height: 1.4; padding: 7px 0; max-height: 140px; }
.ai-send { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--ai); color: var(--ai-fg); font-size: 18px; font-weight: 700; cursor: pointer; }
.ai.busy .ai-send { opacity: .45; pointer-events: none; }
.ai-note { margin: 0; padding: 6px 16px calc(10px + env(safe-area-inset-bottom, 0px)); text-align: center; color: var(--muted); font-size: 11px; }
/* The ask box at the top of თამადა: the way into the assistant. */
.dr .hero { padding-block: 6px 14px; }
.dr .ask { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 14px 40px -24px color-mix(in srgb, var(--wine) 80%, transparent); cursor: text; }
.dr .ask:focus-within { border-color: var(--wine); }
.dr .ask .spark { color: var(--wine); font-size: 20px; }
.dr .ask input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; color: var(--fg); padding: 10px 0; }
.dr .ask button { flex: none; font: inherit; font-weight: 700; font-size: 15px; border: 0; border-radius: 14px; padding: 11px 16px; color: var(--wine-fg); background: linear-gradient(135deg, var(--wine), color-mix(in srgb, var(--wine) 60%, var(--amber))); cursor: pointer; }
.dr .ask-sugs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-top: 10px; }
.dr .ask-sugs::-webkit-scrollbar { display: none; }
.dr .ask-sugs button { flex: none; font: inherit; font-size: 13px; padding: 7px 12px; border-radius: 999px; border: 1px dashed color-mix(in srgb, var(--wine) 45%, var(--line)); background: transparent; color: var(--fg); cursor: pointer; }
.dr .ask-sugs button:hover { border-style: solid; border-color: var(--wine); }
@media (max-width: 520px) { .dr .ask button .t { display: none; } .dr .ask input { font-size: 16px; } }
/* Where the viewer is: a line under the chat header, and a picker sheet over the chat. */
.ai-place { display: flex; align-items: center; gap: 6px; padding: 7px 16px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.ai-place .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-place .linkish { color: var(--ai); font-weight: 700; text-decoration: none; }
.ai-picker { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; max-height: 78%; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px calc(18px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; box-shadow: 0 -18px 40px -16px rgba(0,0,0,.35); animation: ai-up .2s ease; }
.ai-picker[hidden] { display: none; }
@keyframes ai-up { from { transform: translateY(24px); opacity: 0; } }
.ai-picker-head { display: flex; align-items: center; justify-content: space-between; }
.ai-picker-head b { font-size: 18px; }
.ai-picker p { margin: 0; font-size: 13px; color: var(--muted); }
.ai-picker .ai-gps-err { color: var(--sale); }
.ai-gps { font: inherit; font-weight: 700; font-size: 15px; padding: 12px; border: 0; border-radius: 14px; color: var(--ai-fg); background: var(--ai); cursor: pointer; }
.ai-gps:disabled { opacity: .6; }
.ai-picker input { font: inherit; font-size: 16px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--fg); }
.ai-picker input:focus { outline: 0; border-color: var(--ai); }
.ai-place-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-place-opt { font: inherit; font-size: 14px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; text-align: left; }
.ai-place-opt:hover { border-color: var(--ai); }
.ai-none { font-size: 13px; color: var(--muted); margin: 0; }
