/* =============================================================================
   inde.ge — სტილი (v3: მარკეტპლეისის პრაქტიკა — სიმარტივე, მკაფიო ნავიგაცია)
   ფერები --primary/--accent/--bg/--text მოდის SiteConfig-იდან (base.html → :root).
   ეკრანები: ტელეფონი <900 (ქვედა ნავიგაცია) · დესკტოპი ≥900 · მარჯვენა რეკლამა ≥1280 · მარცხენა ≥1600
   ========================================================================== */

/* ---------- 1. ცვლადები ---------- */
:root {
  --primary: #4f46e5;
  --accent: #f59e0b;
  --bg: #f5f6fa;
  --text: #0f172a;

  --surface: #ffffff;
  --surface-2: #f1f4f8;
  --muted: #566173;            /* ≥5.5:1 თეთრზე */
  --border: #e4e7ec;
  --border-strong: #cfd4dc;
  --danger: #dc2626;
  --success: #15803d;
  --warning-bg: #fff8e6;
  --on-primary: #ffffff;
  --on-accent: #1a1405;
  --primary-hover: color-mix(in srgb, var(--primary) 86%, #000);
  --primary-soft: color-mix(in srgb, var(--primary) 8%, var(--surface));
  --primary-ink: color-mix(in srgb, var(--primary) 80%, #000);
  --primary-ring: color-mix(in srgb, var(--primary) 30%, transparent);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / .05);
  --shadow: 0 2px 6px rgb(15 23 42 / .05), 0 10px 28px rgb(15 23 42 / .07);
  --shadow-lg: 0 16px 48px rgb(15 23 42 / .16);

  --gap: clamp(12px, 1.5vw, 20px);
  --gutter: clamp(12px, 3vw, 28px);
  --shell-max: 1280px;
  --rail-left: 160px;
  --rail-right: 300px;
  --tabbar-h: 0px;

  --fs-xs: .8125rem;
  --fs-sm: .875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-h2: clamp(1.15rem, 1.05rem + .4vw, 1.375rem);
  --fs-h1: clamp(1.35rem, 1.15rem + .8vw, 1.75rem);
}
@media (min-width: 1280px) { :root { --shell-max: 1600px; } }
@media (min-width: 1600px) { :root { --shell-max: 1840px; } }

/* ---------- 2. საფუძველი ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--sticky-h, 0px) + 12px); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  font-family: "Noto Sans Georgian", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--fs-base); line-height: 1.55; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; padding-bottom: var(--tabbar-h);
}
img, svg, video { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2, .h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-lg); }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); }
code, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--fs-xs); }
:focus-visible { outline: 3px solid var(--primary-ring); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--primary) 20%, transparent); }

.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: -.25em; }
.i-emoji { display: inline-grid; place-items: center; font-size: 1.1em; line-height: 1; }

.container { width: 100%; max-width: var(--shell-max); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.text-danger { color: var(--danger) !important; }
.stack > * + * { margin-top: var(--gap); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.inline-form { display: inline; margin: 0; }
.only-sm { display: none !important; }
[hidden] { display: none !important; }   /* hidden ატრიბუტი ყოველთვის იმარჯვებს კლასის display-ზე */

/* ---------- 3. გვერდის გარსი და სარეკლამო ზოლები ---------- */
.page-shell {
  flex: 1 0 auto; width: 100%; max-width: var(--shell-max); margin-inline: auto;
  padding: var(--gap) var(--gutter) 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start;
}
.page-main { min-width: 0; }
.rail { display: none; position: sticky; top: calc(var(--sticky-h, 0px) + var(--gap)); }
@media (min-width: 1280px) {
  .page-shell:not(.no-rails) { grid-template-columns: minmax(0, 1fr) var(--rail-right); }
  .page-shell:not(.no-rails) .rail-right { display: block; }
}
@media (min-width: 1600px) {
  .page-shell:not(.no-rails) { grid-template-columns: var(--rail-left) minmax(0, 1fr) var(--rail-right); }
  .page-shell:not(.no-rails) .rail-left { display: block; }
}

/* ---------- 4. ზედა ზოლი ---------- */
.sticky-top { position: sticky; top: 0; z-index: 30; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 12px; min-height: 72px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--text); white-space: nowrap; letter-spacing: -.02em; flex: none; }
.brand:hover { text-decoration: none; }
.brand img { height: 36px; width: auto; }
.brand-logo { width: 36px; height: 36px; }
.logo-mark { flex: none; }

.hsearch {
  flex: 1 1 auto; min-width: 0; max-width: 720px; margin-inline: clamp(4px, 2vw, 28px);
  display: flex; align-items: center; gap: 4px; height: 48px; padding: 4px;
  background: var(--surface-2); border: 1.5px solid transparent; border-radius: 14px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.hsearch:focus-within { background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.hsearch-ico { margin-left: 10px; color: var(--muted); }
.hsearch input { flex: 1; min-width: 0; height: 100%; min-height: 0; border: 0; background: transparent; padding: 0 6px; box-shadow: none !important; }
.hsearch input::-webkit-search-cancel-button { cursor: pointer; }
.hsearch .btn { min-height: 0; height: 38px; padding: 0 18px; border-radius: 10px; }

.hnav { display: flex; align-items: center; gap: 2px; flex: none; }
.hicon {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 48px; height: 52px; padding: 4px 8px; border-radius: 12px; color: var(--text); font-size: .75rem; font-weight: 600;
}
.hicon .i { width: 24px; height: 24px; }
.hicon:hover, .hicon.active { background: var(--surface-2); text-decoration: none; }
.hicon.active { color: var(--primary); }
.hicon .badge { position: absolute; top: 2px; left: calc(50% + 4px); }
.hicon-label { line-height: 1.2; white-space: nowrap; }
.hlink { padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; flex: none; }
.hlink:hover { background: var(--surface-2); text-decoration: none; }

.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: .6875rem; font-weight: 700; line-height: 1; vertical-align: middle; box-shadow: 0 0 0 2px var(--surface);
}
.closed-notice { background: var(--warning-bg); color: #6b4200; padding: 8px var(--gutter); text-align: center; font-size: var(--fs-sm); border-bottom: 1px solid #f3dca8; }

/* ---------- 5. ჩამოსაშლელი მენიუები (details/summary — მუშაობს JS-ის გარეშეც) ---------- */
.menu { position: relative; flex: none; }
.menu summary {
  list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; min-height: 44px; padding: 4px 10px;
  border-radius: 12px; color: var(--text); font-weight: 600; font-size: var(--fs-sm); user-select: none;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover, .menu[open] > summary { background: var(--surface-2); }
.menu .caret { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.menu[open] .caret { transform: rotate(180deg); }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; max-width: calc(100vw - 16px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px; z-index: 40;
}
.menu-pop a, .menu-pop button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 44px; padding: 8px 12px; border-radius: 10px;
  color: var(--text); background: none; border: 0; font: inherit; font-size: var(--fs-sm); font-weight: 500; cursor: pointer;
}
.menu-pop a .i, .menu-pop button .i { color: var(--muted); }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); text-decoration: none; }
.menu-pop .badge { margin-left: auto; }
.menu-pop button.danger, .menu-pop button.danger .i { color: var(--danger); }
.menu-pop hr { margin: 6px 4px; }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.menu-head > span { display: flex; flex-direction: column; min-width: 0; }
.menu-head strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-pop .menu-head a { display: inline; min-height: 0; padding: 0; color: var(--primary); font-size: var(--fs-xs); }
.menu-pop .menu-head a:hover { background: none; text-decoration: underline; }
.lang-code { font: 700 .8125rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; color: var(--text); }
.lang-menu summary .i { color: var(--muted); }
.lang-menu .menu-pop { min-width: 210px; }
.lang-menu .menu-pop button.active { background: var(--primary-soft); font-weight: 700; }
.lang-menu .menu-pop button.active::after { content: "✓"; margin-left: auto; color: var(--primary); }
.lang-note { margin: 6px 12px 4px; }
.account-menu summary { padding: 4px 6px 4px 4px; border-radius: 999px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }

/* ---------- 6. ღილაკები და ფორმები ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 12px; border: 1px solid transparent; background: var(--primary); color: var(--on-primary);
  font: inherit; font-size: var(--fs-sm); font-weight: 700; line-height: 1.2; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, box-shadow .15s, transform .1s;
}
.btn .i { width: 18px; height: 18px; }
.btn:hover { background: var(--primary-hover); color: var(--on-primary); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-accent, .btn-cta { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover, .btn-cta:hover { background: color-mix(in srgb, var(--accent) 88%, #000); color: var(--on-accent); }
.btn-cta { flex: none; padding-inline: 16px; }
.btn-cta .i { stroke-width: 2.4; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-ghost-light, .btn-ghost-light:hover { background: var(--surface); color: var(--primary); }
.btn-danger, .btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: var(--fs-xs); border-radius: 10px; }
.btn-lg { min-height: 50px; font-size: var(--fs-base); }
.btn-block { width: 100%; }
button.link { background: none; border: 0; font: inherit; cursor: pointer; color: var(--primary); padding: 0; }

input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 12px;
  font: inherit; font-size: var(--fs-base); color: var(--text); background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #6b7483; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
input:disabled { background: var(--surface-2); color: var(--muted); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--primary); flex: none; }
input[type="color"] { padding: 3px; height: 44px; width: 84px; }
input[type="file"] { padding: 8px; font-size: var(--fs-sm); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: var(--fs-sm); }
.field.checkbox label, .field .checkbox { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.field .help, .help { color: var(--muted); font-size: var(--fs-xs); margin-top: 6px; }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--danger); font-size: var(--fs-sm); font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 0 16px; }

/* ---------- 7. ბარათები, შეტყობინებები, სეგმენტები ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(16px, 2.2vw, 24px); }
.card-narrow { max-width: 480px; margin: clamp(12px, 4vw, 40px) auto; }
.narrow-page { max-width: 860px; margin: 8px auto; }
.messages { list-style: none; padding: 0; margin: 0 0 var(--gap); display: grid; gap: 8px; }
.messages li { padding: 12px 16px; border-radius: 12px; background: #ecfdf3; border: 1px solid #b7ebc9; color: #14532d; font-weight: 500; }
.messages li.error { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.messages li.warning, .messages li.info { background: var(--warning-bg); border-color: #f3dca8; color: #6b4200; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--surface-2); margin-bottom: 12px; }
.empty-ico .i { width: 28px; height: 28px; }
.section-title { display: flex; align-items: baseline; gap: 8px; margin: clamp(18px, 3vw, 28px) 0 14px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: center; }
.list li:last-child { border-bottom: 0; }
.seg { display: inline-flex; max-width: 100%; overflow-x: auto; white-space: nowrap; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 2px; scrollbar-width: none; }
.seg a { flex: none; padding: 8px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: var(--fs-sm); text-align: center; }
.seg a:hover { color: var(--text); text-decoration: none; }
.seg a.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(15 23 42 / .12); }

/* ---------- 8. მთავარი: ბანერი, კატეგორიები, ფილტრები ---------- */
.block { margin-top: clamp(20px, 3vw, 32px); }
.block-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.block-head h1, .block-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.block-head .star { color: var(--accent); fill: var(--accent); }
.count { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); background: var(--surface-2); padding: 2px 10px; border-radius: 999px; }

.carousel { position: relative; height: 148px; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--border); margin-bottom: clamp(12px, 2vw, 20px); }
.carousel-track { display: flex; height: 100%; transition: transform .45s ease; }
.slide { flex: 0 0 100%; height: 100%; display: flex; align-items: center; gap: 20px; padding: 0 72px 0 0; position: relative; color: var(--text); overflow: hidden; }
.slide:hover { text-decoration: none; }
.slide > img, .slide-noimg { height: 100%; aspect-ratio: 4 / 3; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.slide-noimg .i { width: 36px; height: 36px; }
.slide-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.slide-kicker { align-self: flex-start; font-size: .75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.slide-title { font-size: var(--fs-lg); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slide-price { font-weight: 800; font-size: var(--fs-lg); }
.slide-text { font-size: var(--fs-sm); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.slide-cta { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 12px; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: var(--fs-sm); }
.slide-cta .i { width: 16px; height: 16px; }
.slide-daypick { background: linear-gradient(100deg, var(--primary-soft), var(--surface) 70%); }
.slide-announcement { background: var(--slide-bg); color: #fff; padding-left: 28px; }
.slide-announcement > img { margin-left: -28px; }
.slide-announcement .slide-kicker { background: rgb(255 255 255 / .2); color: #fff; }
.slide-announcement .slide-text { color: rgb(255 255 255 / .92); }
.slide-announcement .slide-cta { background: #fff; color: #111; }
.slide-ad { padding: 0; }
.slide-ad > img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; box-shadow: var(--shadow-sm); padding: 0;
}
.carousel-nav .i { width: 18px; height: 18px; }
.carousel-nav:hover { background: var(--surface-2); }
.carousel-nav.prev { left: 12px; display: none; }
.carousel-nav.next { right: 14px; }
.carousel-dots { position: absolute; bottom: 10px; right: 16px; display: flex; gap: 6px; z-index: 2; }
.carousel-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: rgb(15 23 42 / .22); cursor: pointer; }
.carousel-dots button.active { background: var(--primary); width: 20px; border-radius: 4px; }
.carousel.single .carousel-nav, .carousel.single .carousel-dots { display: none; }
.carousel.single .slide { padding-right: 20px; }

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 4px; }
.cat {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 4px 8px; border-radius: 14px;
  color: var(--text); text-align: center; font-size: var(--fs-xs); font-weight: 600; line-height: 1.25; min-width: 0;
}
.cat:hover { text-decoration: none; background: var(--surface); }
.cat-ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--primary); transition: border-color .15s, background .15s, transform .15s; }
.cat-ico .i { width: 26px; height: 26px; stroke-width: 1.6; }
.cat:hover .cat-ico { border-color: var(--primary); transform: translateY(-2px); }
.cat.active .cat-ico { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.cat.active .cat-name { color: var(--primary-ink); font-weight: 700; }
.cat-name { max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: break-word; }
.cat-lf .cat-ico { color: #b45309; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar-controls { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.chip-menu summary, .chip-select {
  min-height: 40px; height: 40px; border: 1px solid var(--border-strong); border-radius: 999px; background-color: var(--surface);
  padding: 0 14px; font-size: var(--fs-sm); font-weight: 600; color: var(--text);
}
.chip-select {
  width: auto; max-width: 220px; appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23566173' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.chip-menu summary:hover, .chip-select:hover { border-color: var(--text); background-color: var(--surface); }
.chip-menu.on summary, .chip-select.on { border-color: var(--primary); background-color: var(--primary-soft); color: var(--primary-ink); }
.price-pop { left: 0; right: auto; min-width: 280px; padding: 14px; display: grid; gap: 12px; }
.price-range { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.price-range input { min-width: 0; }
.menu-pop .btn { justify-content: center; background: var(--primary); color: var(--on-primary); font-weight: 700; }
.menu-pop .btn:hover { background: var(--primary-hover); }

.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-ink); font-size: var(--fs-xs); font-weight: 600; border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent); }
.pill .i { width: 14px; height: 14px; }
.pill:hover { text-decoration: none; background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
.pill-clear { background: none; border-color: transparent; color: var(--muted); text-decoration: underline; padding-right: 12px; }

/* ---------- 9. ბადე და განცხადების ბარათი ---------- */
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid-full { grid-column: 1 / -1; }
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * var(--gap)) / 5); gap: var(--gap);
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin;
}
.strip > * { scroll-snap-align: start; }
.listing-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; color: var(--text); min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.listing-card:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-2px); border-color: transparent; }
.listing-card .thumb { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.listing-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.listing-card:hover .thumb img { transform: scale(1.03); }
.noimg { position: absolute; inset: 0; display: grid; place-items: center; color: #9aa3b2; }
.noimg .i { width: 40px; height: 40px; stroke-width: 1.4; }
.listing-card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.listing-card .price { font-weight: 800; font-size: 1.125rem; letter-spacing: -.01em; line-height: 1.3; }
.price-na { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.listing-card .title { font-size: .9375rem; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.listing-card .meta { display: flex; flex-wrap: wrap; color: var(--muted); font-size: var(--fs-xs); margin-top: 4px; }
.listing-card .meta span + span::before { content: "·"; margin: 0 6px; }
.listing-card .when { color: var(--muted); font-size: .75rem; margin-top: auto; padding-top: 2px; }
.listing-card.featured { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.tags { position: absolute; top: 8px; left: 8px; z-index: 1; display: flex; flex-wrap: wrap; gap: 4px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .75rem; font-weight: 700; line-height: 1.5; background: var(--accent); color: var(--on-accent); }
.tag.day { background: var(--primary); color: var(--on-primary); }
.tag.lost, .tag-inline.kind-lost { background: var(--danger); color: #fff; }
.tag.found, .tag-inline.kind-found { background: var(--success); color: #fff; }
.tag-inline { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: var(--fs-xs); font-weight: 700; }
.kind-label { font-weight: 800; }
.kind-label.kind-lost { color: var(--danger); }
.kind-label.kind-found { color: var(--success); }
.cond { display: inline-block; align-self: flex-start; padding: 2px 10px; border-radius: 6px; font-size: .75rem; font-weight: 700; border: 1px solid var(--border); color: var(--muted); }
.cond-new { color: #075985; border-color: #bae6fd; background: #f0f9ff; }
.cond-like_new { color: #065f46; border-color: #a7f3d0; background: #ecfdf5; }
.cond-used { color: #7c2d12; border-color: #fed7aa; background: #fff7ed; }
.play-badge { position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgb(15 23 42 / .7); color: #fff; }
.play-badge .i { width: 14px; height: 14px; stroke: none; margin-left: 2px; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.status-active, .status-open { background: #dcfce7; border-color: #bbf7d0; color: #14532d; }
.status-pending { background: #fef9c3; border-color: #fde68a; color: #713f12; }
.status-hidden, .status-closed { background: #e5e7eb; border-color: #d1d5db; color: #1f2937; }
.status-deleted, .status-removed, .status-banned { background: #fee2e2; border-color: #fecaca; color: #7f1d1d; }

/* ---------- 10. რეკლამა ---------- */
.ad-slot { display: grid; gap: 12px; }
.ad { position: relative; display: block; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.ad:hover { text-decoration: none; box-shadow: var(--shadow); }
.ad img { width: 100%; object-fit: cover; }
.ad-left .ad img { aspect-ratio: 160 / 600; }
.ad-right .ad img, .ad-sidebar .ad img { aspect-ratio: 6 / 5; }
.ad-inline .ad img { aspect-ratio: 8 / 1; min-height: 90px; }
.ad-text { display: block; padding: 10px 12px; font-size: var(--fs-sm); }
.ad-label { position: absolute; top: 8px; right: 8px; background: rgb(15 23 42 / .65); color: #fff; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.slide-ad .ad-text { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgb(0 0 0 / .7)); color: #fff; padding: 20px 16px 10px; }
.ad-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 16px;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--muted); font-size: var(--fs-sm); background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.ad-placeholder strong { color: var(--text); font-size: var(--fs-sm); }
.ad-left .ad-placeholder { aspect-ratio: 160 / 600; font-size: var(--fs-xs); }
.ad-right .ad-placeholder, .ad-sidebar .ad-placeholder { aspect-ratio: 6 / 5; }
.ad-inline .ad-placeholder { min-height: 88px; }

/* ---------- 11. განცხადების გვერდი ---------- */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: var(--fs-xs); color: var(--muted); margin-bottom: 12px; min-width: 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs .i { width: 14px; height: 14px; }
.crumbs span { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40ch; min-width: 0; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "media side" "desc side"; gap: var(--gap); align-items: start; }
.detail-media { grid-area: media; min-width: 0; }
.detail-side { grid-area: side; display: grid; gap: 12px; position: sticky; top: calc(var(--sticky-h, 0px) + var(--gap)); }
.detail-desc { grid-area: desc; min-width: 0; }
.detail-desc h2 { font-size: var(--fs-lg); }
.gallery-main { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: #0b0f14; aspect-ratio: 4 / 3; }
.gallery-main img, .gallery-main video { width: 100%; height: 100%; object-fit: contain; }
.gallery-main .zoom { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery-main .zoom[hidden], .gallery-main video[hidden] { display: none; }
.gallery-empty { display: grid; place-items: center; background: var(--surface-2); color: #9aa3b2; }
.gallery-empty .i { width: 64px; height: 64px; stroke-width: 1.2; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumbs button { position: relative; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; flex: 0 0 84px; background: none; opacity: .75; }
.gallery-thumbs button:hover { opacity: 1; }
.gallery-thumbs button.active { border-color: var(--primary); opacity: 1; }
.gallery-thumbs img { width: 84px; height: 63px; object-fit: cover; }
.gallery-thumbs .video-thumb .play-badge { right: 50%; bottom: 50%; transform: translate(50%, 50%); width: 26px; height: 26px; }
.buy-box .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.detail-title { font-size: clamp(1.2rem, 1.1rem + .4vw, 1.45rem); font-weight: 700; margin-bottom: 8px; overflow-wrap: anywhere; }
.price-big { font-size: clamp(1.6rem, 1.4rem + .8vw, 2rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px; }
.facts { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: var(--fs-sm); }
.facts li { display: inline-flex; align-items: center; gap: 6px; }
.facts .i { width: 16px; height: 16px; }
.contact-actions, .actions-row { display: grid; gap: 8px; }
.actions-row { grid-template-columns: 1fr 1fr; }
.actions-row form, .actions-row .btn { margin: 0; width: 100%; }
.phone-reveal, .phone-shown { justify-content: flex-start; font-variant-numeric: tabular-nums; }
.reveal-hint { margin-left: auto; color: var(--primary); font-size: var(--fs-xs); font-weight: 700; }
.seller { display: flex; align-items: center; gap: 12px; color: var(--text); }
.seller:hover { text-decoration: none; }
.seller > span { display: flex; flex-direction: column; min-width: 0; }
.seller-go { margin-left: auto; color: var(--muted); }
.seller-rating { margin-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mod-card strong { display: flex; align-items: center; gap: 6px; }
.description { white-space: pre-line; overflow-wrap: anywhere; font-size: var(--fs-base); line-height: 1.7; }
.desc-cat { display: flex; align-items: center; gap: 6px; margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--border); }
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(0 0 0 / .94); }
.lightbox::backdrop { background: rgb(0 0 0 / .8); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: 96vw; max-height: 90vh; object-fit: contain; }
.lb-close, .lb-nav { position: fixed; border: 0; background: rgb(255 255 255 / .16); color: #fff; border-radius: 50%; width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer; }
.lb-close:hover, .lb-nav:hover { background: rgb(255 255 255 / .3); }
.lb-close { top: 16px; right: 16px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
.lb-count { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: var(--fs-sm); }

/* ---------- 12. ტელეფონის ქვედა ნავიგაცია და „დაკავშირების“ ზოლი ---------- */
.tabbar, .cta-bar { display: none; }
/* ---------- 13. ფორმა: განცხადების ტიპი ---------- */
.kind-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.kind-option { position: relative; }
.kind-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kind-option span { display: block; min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--border-strong); cursor: pointer; font-weight: 700; background: var(--surface); color: var(--text); }
.kind-option input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--text); box-shadow: 0 0 0 3px var(--primary-ring); }
.kind-option.kind-lost input:checked + span { border-color: var(--danger); background: #fef2f2; box-shadow: 0 0 0 3px #fecaca; }
.kind-option.kind-found input:checked + span { border-color: var(--success); background: #f0fdf4; box-shadow: 0 0 0 3px #bbf7d0; }
.kind-option input:focus-visible + span { outline: 3px solid var(--primary-ring); outline-offset: 2px; }

/* ---------- 14. ცხრილები და პანელი ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; white-space: nowrap; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td .actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
td .actions form { display: flex; gap: 6px; align-items: center; margin: 0; flex-wrap: wrap; }
td .actions input, td .actions select { width: auto; min-height: 34px; padding: 4px 10px; font-size: var(--fs-xs); border-radius: 10px; }
td .actions input[type="text"] { width: 130px; }
td .actions input[type="number"] { width: 70px; }
tr.htmx-request { opacity: .5; }
.mini-thumb { width: 60px; height: 45px; object-fit: cover; border-radius: 8px; }
.num-col { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.panel-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: var(--gap); }
.panel-layout > section { min-width: 0; }
.panel-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--sticky-h, 64px) + var(--gap)); align-self: start; }
.panel-nav a { padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: var(--fs-sm); }
.panel-nav a.active, .panel-nav a:hover { background: var(--surface); text-decoration: none; box-shadow: var(--shadow-sm); }
.panel-nav a.active { color: var(--primary); }
.panel-nav .group { margin: 16px 12px 4px; font-size: .75rem; font-weight: 800; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters input, .filters select { width: auto; flex: 1 1 180px; min-width: 0; }
.filters label { display: inline-flex; gap: 8px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; color: var(--text); }
a.stat:hover { text-decoration: none; border-color: var(--primary); box-shadow: var(--shadow-sm); }
.stat .num { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); font-weight: 800; letter-spacing: -.02em; }
.stat .label { color: var(--muted); font-size: var(--fs-sm); }

/* ---------- 15. ჩატი, მეგობრები, ავატარი ---------- */
.chat-box { position: relative; display: flex; flex-direction: column; height: min(72vh, 720px); min-height: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.chat-status { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--border); background: var(--surface); }
.chat-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; flex: none; }
.chat-status[data-state="online"] .dot { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent); }
.chat-status[data-state="lost"] { color: #92400e; background: var(--warning-bg); }
.chat-status[data-state="lost"] .dot { background: var(--danger); animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .3; } }
.chat-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); overscroll-behavior: contain; }
.chat-empty { margin: auto; }
.msg-row { position: relative; display: flex; gap: 8px; align-items: flex-end; max-width: min(82%, 680px); align-self: flex-start; border-radius: 18px; }
.msg-row.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-row.pending { opacity: .6; }
.msg-row.flash .msg { animation: flash 1.2s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: var(--shadow-sm); } }
.msg { padding: 8px 12px 6px; border-radius: 18px 18px 18px 6px; background: var(--surface); border: 1px solid var(--border); overflow-wrap: anywhere; min-width: 0; box-shadow: var(--shadow-sm); }
.msg.mine { background: var(--primary); color: var(--on-primary); border-color: var(--primary); border-radius: 18px 18px 6px 18px; }
.msg .who { font-size: var(--fs-xs); font-weight: 700; color: var(--primary); margin-bottom: 2px; }
.msg-body { white-space: pre-wrap; line-height: 1.45; }
.msg-body.big-emoji { font-size: 2rem; line-height: 1.2; }
.msg-meta { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 2px; }
.msg .time { font-size: .6875rem; opacity: .7; white-space: nowrap; }
.msg-quote {
  display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; margin: 2px 0 6px; padding: 5px 10px; border: 0; border-left: 3px solid var(--primary);
  border-radius: 8px; background: var(--primary-soft); color: var(--text); font: inherit; font-size: var(--fs-xs); cursor: pointer;
}
.msg-quote strong { color: var(--primary-ink); }
.msg-quote span, .msg-quote em { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--muted); }
.msg.mine .msg-quote { background: rgb(255 255 255 / .16); border-left-color: rgb(255 255 255 / .8); color: inherit; }
.msg.mine .msg-quote strong, .msg.mine .msg-quote span, .msg.mine .msg-quote em { color: inherit; }
.msg-replies { border: 0; padding: 1px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-ink); font: inherit; font-size: .6875rem; font-weight: 700; cursor: pointer; }
.msg.mine .msg-replies { background: rgb(255 255 255 / .2); color: inherit; }
.msg-reply-btn {
  align-self: center; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 0; padding: 0;
  background: var(--surface); color: var(--muted); box-shadow: var(--shadow-sm); cursor: pointer; opacity: 0; transition: opacity .15s;
}
.msg-reply-btn .i { width: 16px; height: 16px; }
.msg-row:hover .msg-reply-btn, .msg-reply-btn:focus-visible { opacity: 1; }
.msg-reply-btn:hover { color: var(--primary); }
.msg-row.pending .msg-reply-btn { display: none; }
@media (hover: none) { .msg-reply-btn { opacity: .7; } }
.chat-new {
  position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border: 0; border-radius: 999px; background: var(--primary); color: var(--on-primary); font: inherit; font-size: var(--fs-xs); font-weight: 700; box-shadow: var(--shadow); cursor: pointer;
}
.chat-new .i { width: 16px; height: 16px; }
.chat-compose { position: relative; border-top: 1px solid var(--border); background: var(--surface); }
.reply-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px 0; }
.reply-bar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 4px 10px; border-left: 3px solid var(--primary); background: var(--primary-soft); border-radius: 8px; font-size: var(--fs-xs); }
.reply-bar-text strong { color: var(--primary-ink); }
.reply-bar-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px; }
.chat-form textarea { flex: 1; min-height: 44px; max-height: 140px; resize: none; padding: 10px 14px; line-height: 1.4; border-radius: 22px; }
.chat-send { flex: none; border-radius: 22px; }
.icon-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1.35rem; cursor: pointer; padding: 0; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--surface-2); }
.icon-btn .i { width: 18px; height: 18px; }
.emoji-pop {
  position: absolute; left: 10px; bottom: calc(100% + 6px); z-index: 5; width: min(340px, calc(100% - 20px)); max-height: 240px; overflow-y: auto;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.emoji-pop[hidden] { display: none; }
.emoji-pop button { aspect-ratio: 1; border: 0; border-radius: 8px; background: none; font-size: 1.35rem; cursor: pointer; padding: 0; line-height: 1; }
.emoji-pop button:hover { background: var(--surface-2); transform: scale(1.12); }
.chat-error { color: var(--danger); font-size: var(--fs-sm); font-weight: 600; min-height: 1.4em; margin-top: 6px; }

.av { border-radius: 50%; object-fit: cover; flex: none; display: inline-block; vertical-align: middle; background: var(--surface-2); }
.av-letter { display: inline-grid; place-items: center; background: var(--primary); color: var(--on-primary); font-weight: 700; line-height: 1; }
.avatar-edit { display: flex; gap: 16px; align-items: center; margin: 8px 0 20px; flex-wrap: wrap; }
.avatar-edit .av { box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--border); }
.people-list .person { gap: 14px; }
.person-main { flex: 1; min-width: 0; }
.person-actions, .friend-btn { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.friend-btn form { margin: 0; }
.friend-ok { color: var(--success); font-weight: 700; }
.friend-strip { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 8px; }
.friend-strip a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--text); flex: none; width: 68px; text-align: center; }
.friend-strip a:hover { text-decoration: none; }
.invite-list ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; max-height: 240px; overflow: auto; }
.invite-list label { display: flex; gap: 10px; align-items: center; font-weight: 500; }

/* ---------- 16. რეპუტაცია ---------- */
.rt-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 6px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; vertical-align: middle; border: 1px solid var(--border); background: var(--surface); white-space: nowrap; }
.rt-badge.rt-lg { font-size: var(--fs-sm); padding: 4px 14px 4px 8px; }
.rt-badge.rt-lg .rt-ico { width: 20px; height: 20px; }
.rt-icons { display: inline-flex; align-items: center; gap: 1px; }
.rt-ico { width: 15px; height: 15px; }
.rt-zero { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor; font-size: .75rem; font-weight: 800; line-height: 1; }
.lvl-very-bad { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.lvl-bad { color: #c81e1e; }
.lvl-neutral { color: #5b6472; }
.lvl-good, .lvl-high { color: #b45309; }
.lvl-super { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.lvl-diamond { color: #0369a1; background: linear-gradient(90deg, #e0f2fe, #f0f9ff); border-color: #7dd3fc; }
.rt-badge .rt-label { color: var(--text); }
.lvl-very-bad .rt-label { color: #7f1d1d; }
.rt-widget .rt-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.rt-choice input { position: absolute; opacity: 0; pointer-events: none; }
.rt-choice > span { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 96px; padding: 10px 8px; border: 1px solid var(--border-strong); border-radius: 12px; cursor: pointer; background: var(--surface); }
.rt-choice > span small { color: var(--text); font-weight: 700; font-size: var(--fs-xs); }
.rt-choice:hover > span { border-color: var(--primary); }
.rt-choice input:checked + span { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); background: var(--primary-soft); }
.rt-choice input:focus-visible + span { outline: 3px solid var(--primary-ring); }
.rt-list { margin-top: 12px; border-top: 1px solid var(--border); }
.rt-list li { padding: 10px 4px; }

/* ---------- 17. სტატისტიკა ---------- */
.period-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0 16px; }
.period-bar input[type="date"] { width: auto; }
.period-bar label { display: flex; align-items: center; gap: 6px; }
.chart-card { margin-bottom: 16px; }
.chart-box { position: relative; height: clamp(220px, 32vw, 320px); margin-top: 12px; }
.kpi-inline { color: var(--muted); font-size: var(--fs-sm); }
.kpi-inline strong { color: var(--text); }
.table-view { margin-top: 10px; }
.table-view summary { cursor: pointer; color: var(--primary); font-size: var(--fs-sm); font-weight: 600; }
.table-view .table-wrap { max-height: 280px; overflow: auto; margin-top: 8px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; }
.bar-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.bar-table td, .bar-table th { padding: 8px 6px; border-bottom: 1px solid var(--border); background: none; text-transform: none; letter-spacing: 0; }
.bar-table tr:last-child td { border-bottom: 0; }
.hbar { display: block; height: 10px; min-width: 2px; border-radius: 0 4px 4px 0; background: #2a78d6; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); margin-right: 6px; vertical-align: middle; box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent); }
.cc { display: inline-block; min-width: 30px; padding: 1px 5px; margin-right: 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); font: 700 .75rem ui-monospace, Menlo, Consolas, monospace; text-align: center; color: var(--muted); }

/* ---------- 18. ინფო-გვერდები, ფუტერი, პაგინაცია ---------- */
.info-page { max-width: 780px; margin: 8px auto; }
.page-body p { margin: 0 0 14px; line-height: 1.75; }
.contact-list { list-style: none; padding: 0; display: grid; gap: 8px; font-size: var(--fs-lg); }
.closed-page { min-height: 60vh; display: grid; place-items: center; text-align: center; }


/* ---------- 19. გახსნის ანიმაცია ---------- */
.intro-overlay { display: none; }
html.intro .intro-overlay {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 1000; color: #fff; text-align: center;
  background: radial-gradient(120% 120% at 50% 40%, color-mix(in srgb, var(--primary) 85%, #fff), var(--primary) 45%, color-mix(in srgb, var(--primary) 55%, #000));
  animation: intro-reveal .7s cubic-bezier(.7, 0, .3, 1) 1.65s forwards;
}
html.intro body { overflow: hidden; }
.intro-stage { display: grid; justify-items: center; gap: 10px; position: relative; padding: 0 16px; }
.intro-mark { width: 96px; height: 96px; border-radius: 26px; display: grid; place-items: center; overflow: hidden; box-shadow: 0 18px 50px rgb(0 0 0 / .3); animation: intro-pop .8s cubic-bezier(.2, 1.4, .4, 1) both; }
.intro-mark img, .intro-mark .logo-mark { width: 100%; height: 100%; object-fit: contain; }
.intro-ring { position: absolute; top: 48px; left: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 30px; border: 3px solid var(--accent); animation: intro-ring 1.3s ease-out .35s both; }
.intro-name { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; animation: intro-rise .6s ease-out .45s both; }
.intro-tag { opacity: .9; animation: intro-rise .6s ease-out .7s both; }
@keyframes intro-pop { from { transform: scale(.3) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes intro-ring { from { transform: scale(.9); opacity: .9; } to { transform: scale(2.4); opacity: 0; } }
@keyframes intro-rise { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes intro-reveal { from { clip-path: circle(150% at 50% 45%); } to { clip-path: circle(0% at 50% 45%); visibility: hidden; } }
html.intro .page-shell { animation: intro-rise .7s ease-out 1.9s both; }
.grid > .listing-card { animation: card-in .45s ease-out both; }
.grid > .listing-card:nth-child(2) { animation-delay: .04s; } .grid > .listing-card:nth-child(3) { animation-delay: .08s; }
.grid > .listing-card:nth-child(4) { animation-delay: .12s; } .grid > .listing-card:nth-child(n+5) { animation-delay: .16s; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html.intro .intro-overlay { display: none; }
  .grid > .listing-card, html.intro .page-shell { animation: none; }
  * { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}


/* ---------- 20. პაგინაცია და ფუტერი ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 32px 0 8px; flex-wrap: wrap; }
.pagination a, .pagination span { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); font-weight: 600; font-size: var(--fs-sm); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pagination .current { background: none; border-color: transparent; color: var(--muted); }

.site-footer { flex: none; margin-top: clamp(40px, 6vw, 72px); padding-top: 40px; background: var(--surface); border-top: 1px solid var(--border); color: var(--muted); font-size: var(--fs-sm); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; }
.footer-brand .brand { margin-bottom: 10px; }
.footer-brand p { margin: 0 0 14px; max-width: 34ch; }
.footer-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.footer-col h3 { margin: 0 0 2px; font-size: var(--fs-sm); font-weight: 700; color: var(--text); }
.footer-col a, .footer-col span { color: var(--muted); display: inline-flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.footer-col .i { width: 16px; height: 16px; }
.footer-col a:hover { color: var(--primary); }
.social { display: flex; gap: 8px; }
.social a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); font-weight: 700; color: var(--text); }
.social a:hover { background: var(--primary); color: var(--on-primary); border-color: var(--primary); text-decoration: none; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 32px; padding-block: 18px; font-size: var(--fs-xs); }

/* ---------- 21. ადაპტაცია ---------- */
@media (min-width: 1800px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}
@media (max-width: 1440px) {
  .strip { grid-auto-columns: calc((100% - 3 * var(--gap)) / 4); }
}
@media (max-width: 1200px) {
  .hicon-label { display: none; }
  .hicon { height: 44px; min-width: 44px; }
  .hicon .badge { top: 0; }
  .detail { grid-template-columns: minmax(0, 1fr) 340px; }
  .strip { grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); }
}
@media (max-width: 1100px) {
  .btn-cta span { display: none; }
  .btn-cta { width: 44px; padding: 0; }
  .hide-md { display: none !important; }
}

/* პლანშეტი და ტელეფონი: ზედა ზოლი = ლოგო + ძებნა, ნავიგაცია ქვემოთ */
@media (max-width: 899px) {
  :root { --tabbar-h: calc(64px + env(safe-area-inset-bottom)); }
  .sticky-top { position: static; }
  .header-row { flex-wrap: wrap; min-height: 0; padding-block: 10px; gap: 8px; }
  .brand { margin-right: auto; }
  .hsearch { order: 10; flex: 1 1 100%; max-width: none; margin: 0; height: 46px; }
  .hnav, .account-menu, .btn-cta, .hlink { display: none !important; }

  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    height: var(--tabbar-h); padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 20px rgb(15 23 42 / .06);
  }
  .tabbar > a, .tab-menu > summary {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0;
    height: 64px; padding: 6px 2px; color: var(--muted); font-size: .75rem; font-weight: 600; line-height: 1.15; text-align: center; border-radius: 0;
  }
  .tabbar > a > span:last-child, .tab-menu > summary > span:last-child { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tabbar > a:hover { text-decoration: none; }
  .tabbar .i { width: 24px; height: 24px; }
  .tabbar > a.active, .tab-menu[open] > summary { color: var(--primary); background: none; }
  .tabbar .badge { position: absolute; top: 6px; left: calc(50% + 6px); }
  .tab-cta { color: var(--text) !important; }
  .tab-plus { width: 40px; height: 32px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
  .tab-plus .i { width: 22px; height: 22px; stroke-width: 2.4; }
  .tab-menu { position: static; }
  .tab-menu > summary:hover { background: none; }
  .tab-menu .av { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px currentColor; }
  .tab-menu .menu-pop { top: auto; bottom: calc(100% + 8px); right: 8px; left: auto; width: min(320px, calc(100vw - 16px)); max-height: calc(100dvh - var(--tabbar-h) - 24px); overflow-y: auto; }

  .cta-bar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 20px rgb(15 23 42 / .08);
  }
  .cta-bar .btn { min-height: 48px; font-size: var(--fs-base); }
  body:has(.cta-bar) { --tabbar-h: calc(70px + env(safe-area-inset-bottom)); }
  body:has(.cta-bar) .contact-actions { display: none; }

  .cats { display: flex; overflow-x: auto; gap: 4px; margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter) 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .cat { flex: 0 0 auto; min-width: 76px; max-width: 112px; scroll-snap-align: start; padding-inline: 4px; }
  .cat-ico { width: 52px; height: 52px; border-radius: 16px; }

  .detail { grid-template-columns: minmax(0, 1fr); grid-template-areas: "media" "side" "desc"; }
  .detail-side { position: static; }
  .gallery-main { margin-inline: calc(-1 * var(--gutter)); border-radius: 0; }
  .panel-layout { grid-template-columns: minmax(0, 1fr); }
  .panel-nav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; scrollbar-width: thin; }
  .panel-nav a { flex: none; background: var(--surface); border: 1px solid var(--border); }
  .panel-nav .group { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .carousel { height: 112px; }
  .slide { gap: 14px; padding-right: 16px; }
  .slide-announcement { padding-left: 16px; }
  .slide-announcement > img { margin-left: -16px; }
  .slide-title { font-size: var(--fs-base); }
  .slide-price { font-size: var(--fs-base); }
  .slide-cta, .carousel-nav { display: none !important; }
  .ad-inline .ad img { aspect-ratio: 4 / 1; }
  .chat-box { height: calc(100dvh - var(--tabbar-h) - 250px); min-height: 320px; border-radius: 14px; }
  .chat-send span { display: none; }
  .chat-send { width: 44px; padding: 0; }
}

/* ტელეფონი */
@media (max-width: 640px) {
  .toolbar .kind-seg { flex: 1 1 100%; }
  .kind-seg a { flex: 1 1 auto; padding-inline: 8px; }
  .toolbar-controls { flex: 1 1 100%; margin: 0; display: grid; grid-template-columns: auto 1fr 1fr; }
  .chip-select { max-width: none; width: 100%; min-width: 0; text-overflow: ellipsis; }
  .price-pop { min-width: 0; width: calc(100vw - 2 * var(--gutter)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .strip { grid-auto-columns: calc((100% - 10px) / 2.15); gap: 10px; }
  .listing-card { border-radius: 14px; }
  .listing-card .body { padding: 8px 10px 10px; }
  .listing-card .price { font-size: 1rem; }
  .listing-card .title { font-size: var(--fs-sm); }
  .tag { padding: 1px 6px; }
  .tags { top: 6px; left: 6px; }
  .card { border-radius: 14px; }
  .msg-row { max-width: 94%; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .actions-row { grid-template-columns: 1fr; }

  .table-wrap.stack-sm { background: none; border: 0; overflow: visible; }
  .stack-sm table, .stack-sm tbody, .stack-sm tr, .stack-sm td { display: block; width: 100%; }
  .stack-sm thead, .stack-sm tr:has(th) { display: none; }
  .stack-sm tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; padding: 6px 4px; }
  .stack-sm td { border: 0; padding: 6px 12px; }
  .stack-sm td:empty { display: none; }
  .stack-sm .mini-thumb { width: 72px; height: 54px; }
  .stack-sm td .actions input[type="text"] { flex: 1 1 140px; width: auto; }
  .people-list .person { flex-wrap: wrap; }
  .person-actions { width: 100%; padding-left: 62px; }
}
@media (max-width: 400px) {
  .brand-name { font-size: 1.05rem; }
  .rt-choice > span { min-width: 84px; }
  .cat { min-width: 70px; }
}
