:root {
  --bg: #faf6f0;
  --surface: #ffffff;
  --ink: #2a1a14;
  --muted: #7a6a62;
  --line: #e8ddd2;
  --wine: #7b1e2b;
  --wine-ink: #ffffff;
  --gold: #b8873a;
  --amber: #d99a3a;
  --white-wine: #e6d98a;
  --err: #b3261e;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1210;
    --surface: #251a17;
    --ink: #f3e9e2;
    --muted: #b3a29a;
    --line: #3a2c27;
    --wine: #c0475a;
    --gold: #d9a85a;
    --err: #ff8a80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1a1210;
  --surface: #251a17;
  --ink: #f3e9e2;
  --muted: #b3a29a;
  --line: #3a2c27;
  --wine: #c0475a;
  --gold: #d9a85a;
  --err: #ff8a80;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "Noto Sans Georgian", system-ui, sans-serif;
}
h1, h2, .logo { font-family: "Noto Serif Georgian", Georgia, serif; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* სატესტო რეჟიმის ზოლი */
.demo-banner { background: #f5c542; color: #2a1a14; text-align: center; font-size: 14px; font-weight: 600; padding: 8px 16px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 12px; height: 60px; }
.logo { font-size: 22px; font-weight: 700; color: var(--ink); text-decoration: none; margin-right: auto; }
.logo span { color: var(--wine); }
.langs { display: flex; gap: 2px; }
.langs button {
  border: 0; background: none; color: var(--muted); padding: 6px 8px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 14px;
}
.langs button.on { color: var(--ink); background: var(--line); font-weight: 600; }
.cart-btn {
  position: relative; border: 0; background: var(--wine); color: var(--wine-ink);
  border-radius: 999px; padding: 8px 14px; display: flex; gap: 6px; align-items: center; cursor: pointer; font: inherit; font-weight: 600;
}

/* hero */
.hero { padding: 48px 0 28px; }
.hero h1 { font-size: clamp(26px, 5vw, 40px); line-height: 1.2; margin: 0 0 12px; max-width: 720px; }
.hero p { margin: 0 0 8px; color: var(--muted); max-width: 620px; }
.delivery-note { display: inline-block; color: var(--ink) !important; background: var(--surface); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font-size: 14px; }

/* products */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; padding-bottom: 40px; }
.cat { font-size: 24px; margin: 8px 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--wine); display: inline-block; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; }
.card h2 { font-size: 20px; margin: 12px 0 6px; }
.desc { color: var(--muted); margin: 0 0 12px; flex: 1; }
.price { margin: 0 0 14px; }
.price strong { font-size: 26px; color: var(--wine); }
.bottle { height: 120px; border-radius: 10px; background: linear-gradient(160deg, var(--white-wine), #f7f0cf); position: relative; }
.bottle.amber { background: linear-gradient(160deg, var(--amber), #f2c98a); }
.photo { height: 260px; border-radius: 10px; overflow: hidden; background: radial-gradient(ellipse at 50% 85%, #efe3d3, #f8f2ea 70%); padding: 14px 0 10px; }
.photo img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 10px 12px rgba(60,30,10,.28)); }
.card { position: relative; }
.soon-badge {
  position: absolute; top: 28px; left: 28px; background: var(--gold); color: #2a1a14;
  font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 999px;
}
.brand { margin-top: 12px; font-size: 12px; letter-spacing: .12em; color: var(--gold); font-weight: 600; }
.brand + h2 { margin-top: 2px; }
.vessels {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; height: 345px;
  background: radial-gradient(ellipse at 50% 85%, #efe3d3, #f8f2ea 70%); border-radius: 10px; padding: 12px;
}
.vessel {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px;
  border: 2px solid transparent; border-radius: 10px; background: rgba(255,255,255,.35); cursor: pointer;
  font: inherit; color: #2a1a14; padding: 8px 4px; transition: border-color .15s, background .15s;
}
.vessel:hover { background: rgba(255,255,255,.7); }
.vessel.on { border-color: var(--wine); background: rgba(255,255,255,.85); }
.vessel .pet { display: block; filter: drop-shadow(0 6px 8px rgba(60,30,10,.22)); }
.vessel .pet1 { height: 205px; }
.vessel .pet5 { height: 225px; }
.v-size { font-weight: 700; font-size: 15px; }
.v-price { font-size: 13px; color: #6b5a52; }
.pick { grid-template-columns: 1fr; }
.bottle.red { background: linear-gradient(160deg, #6d1424, #b03a4c); }
.bottle.clear { background: linear-gradient(160deg, #d9e4e8, #f4f8f9); }
.bottle.oak { background: linear-gradient(160deg, #8a5a2b, #c99158); }
.bottle::after {
  content: ""; position: absolute; left: 50%; bottom: 14px; width: 34px; height: 86px; transform: translateX(-50%);
  background: rgba(255,255,255,.45); border-radius: 8px 8px 6px 6px;
  clip-path: polygon(35% 0, 65% 0, 65% 22%, 100% 38%, 100% 100%, 0 100%, 0 38%, 35% 22%);
}
.pick { display: grid; grid-template-columns: 1fr 90px; gap: 10px; margin-bottom: 12px; }
.pick label, .checkout label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
select, input, textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; width: 100%;
}
select:focus, input:focus, textarea:focus { outline: 2px solid var(--wine); outline-offset: 0; }

.btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 11px 18px; border-radius: 10px; cursor: pointer; }
.btn.primary { background: var(--wine); color: var(--wine-ink); border-color: var(--wine); }
.btn:disabled { opacity: .6; cursor: wait; }
.wide { width: 100%; }
.link { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 20; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); z-index: 30;
  background: var(--surface); padding: 16px 20px 28px; overflow-y: auto; box-shadow: -8px 0 30px rgba(0,0,0,.2);
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-head h2 { margin: 0; }
.x { border: 0; background: none; font-size: 30px; line-height: 1; cursor: pointer; color: var(--ink); }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line-r { text-align: right; }
.stepper { display: flex; gap: 4px; justify-content: flex-end; align-items: center; margin-top: 4px; }
.stepper button:not(.link) { width: 28px; height: 28px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; cursor: pointer; }
.tot { display: flex; justify-content: space-between; padding: 6px 0; }
.tot.big { font-weight: 700; font-size: 18px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.checkout { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.checkout h3 { margin: 6px 0 0; }
.checkout .check { flex-direction: row; align-items: flex-start; gap: 8px; color: var(--ink); font-size: 14px; }
.checkout .check input { width: auto; margin-top: 3px; }
.err { color: var(--err); margin: 0; }

/* modal */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(20,10,8,.85); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: var(--radius); padding: 28px; max-width: 420px; text-align: center; }
.modal h2 { margin-top: 0; }
.row { display: flex; gap: 10px; justify-content: center; }

/* location */
.location { padding: 8px 0 48px; }
.loc-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.loc-map { position: relative; display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.loc-map img { display: block; width: 100%; height: auto; transition: transform .3s; }
.loc-map:hover img { transform: scale(1.02); }
.loc-hint {
  position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.72); color: #fff;
  font-size: 13px; padding: 6px 10px; border-radius: 999px;
}
.loc-info { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.loc-addr { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.loc-list { padding-left: 18px; margin: 8px 0 18px; }
.loc-list li { margin: 4px 0; }
.loc-info .btn { display: inline-block; text-decoration: none; }
.loc-phone { margin: 14px 0 0; }
.loc-phone a, .foot a { color: inherit; }
@media (max-width: 720px) { .loc-grid { grid-template-columns: 1fr; } }

/* status pages */
.status { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px 16px; }
.status .icon { font-size: 54px; }

.foot { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); }
.foot p { margin: 4px 0; }

/* admin */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--line); }
.badge.paid { background: #2e7d32; color: #fff; }
.badge.failed { background: var(--err); color: #fff; }
.table-wrap { overflow-x: auto; }
