/* Tevzina catalog – public pages */
:root {
  --accent: #1565C0;          /* main blue (Admin > Settings > Accent color) */
  --navy: #0A2540;
  --navy-2: #0E3460;
  --ink: #10233D;
  --ink-2: #48607E;
  --muted: #7C8DA3;
  --line: #DCE5F0;
  --bg: #F3F7FC;
  --sky: #E7F0FB;
  --card: #FFFFFF;
  --ok: #1B7F4B;
  --bad: #B3362B;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", "Noto Sans Georgian", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); font-weight: 500; }
h1, h2, h3 { font-family: "Archivo", "Noto Sans Georgian", sans-serif; letter-spacing: -.005em; }

/* ---------- Header + category bar ---------- */
.site-header { background: var(--navy); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; text-decoration: none; min-width: 0; }
.brand img { max-height: 48px; width: auto; }
.logo-svg { display: block; height: 44px; width: auto; max-width: 100%; }
.header-contact { display: flex; gap: 8px; flex-wrap: wrap; }
.hc-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: .9rem; padding: 7px 13px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); color: #DCE8F7; }
.hc-link:hover { border-color: #fff; color: #fff; }
.hc-wa { background: #fff; color: var(--navy); border-color: #fff; font-weight: 600; }
.hc-wa:hover { color: var(--navy); background: var(--sky); }

.catbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.catbar-inner { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.catbar-inner::-webkit-scrollbar { display: none; }
.catbar a { flex: none; padding: 14px 16px 12px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .95rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.catbar a:hover { color: var(--accent); }
.catbar a.on { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, var(--accent) 140%); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 46px; opacity: .14; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 20'%3E%3Cpath d='M0 10q15-10 30 0t30 0 30 0 30 0' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") repeat-x left bottom / 120px 20px; }
.hero-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 44px; padding-bottom: 56px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-sm .hero-inner { padding-top: 26px; padding-bottom: 40px; }
.hero-text { min-width: 0; max-width: 680px; }
.eyebrow { margin: 0 0 6px; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #9CC3F0; }
.hero h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 900; line-height: 1.1; }
.hero-desc { margin: 10px 0 0; color: #C9DAF0; }
.search { display: flex; background: #fff; border-radius: 10px; padding: 4px; width: min(420px, 100%); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.search input { flex: 1; border: 0; outline: 0; padding: 10px 14px; font: inherit; background: transparent; min-width: 0; color: var(--ink); }
.search button { border: 0; background: var(--accent); color: #fff; border-radius: 8px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.search button:hover { filter: brightness(1.1); }
.crumbs { font-size: .88rem; color: #9CC3F0; margin-bottom: 6px; }
.crumbs a { color: #DCE8F7; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs-dark { padding: 20px 0 12px; margin: 0; color: var(--muted); }
.crumbs-dark a { color: var(--ink-2); }

/* ---------- Sections ---------- */
.section { padding-top: 34px; padding-bottom: 8px; }
.section:last-child { padding-bottom: 56px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 1.35rem; font-weight: 800; }
.link { color: var(--accent); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Category directory */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.cat-tile { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.cat-tile:hover { border-color: #B9CDE6; box-shadow: 0 6px 20px rgba(16,35,61,.07); }
.cat-cover { display: grid; place-items: center; aspect-ratio: 16 / 9; background: linear-gradient(180deg, #fff, var(--sky)); border-bottom: 1px solid var(--line); }
.cat-cover img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.cat-initial { font-family: "Archivo", "Noto Sans Georgian", sans-serif; font-size: 3rem; font-weight: 900; color: var(--accent); opacity: .35; }
.cat-info { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.cat-info h3 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.cat-info h3 a { text-decoration: none; }
.cat-info h3 a:hover { color: var(--accent); }
.cat-count { font-size: .82rem; color: var(--muted); font-weight: 600; }
.cat-info p { margin: 8px 0 0; color: var(--ink-2); font-size: .92rem; }
.cat-children { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cat-children a { display: inline-block; text-decoration: none; font-size: .85rem; padding: 4px 10px; border-radius: 6px; background: var(--sky); color: var(--navy-2); font-weight: 500; }
.cat-children a:hover { background: var(--accent); color: #fff; }
.cat-children em { font-style: normal; opacity: .6; margin-left: 2px; }
.cat-open { margin-top: auto; padding-top: 14px; color: var(--accent); font-weight: 700; text-decoration: none; font-size: .92rem; }
.cat-open:hover { text-decoration: underline; }

/* ---------- Listing ---------- */
.listing { padding-top: 22px; padding-bottom: 56px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { text-decoration: none; padding: 8px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.chip em { font-style: normal; color: var(--muted); font-weight: 500; margin-left: 2px; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.on em { color: rgba(255,255,255,.75); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.toolbar-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.result-count { color: var(--ink-2); }
.result-count .clear { text-decoration: none; margin-left: 6px; color: var(--bad); font-weight: 700; }
select { font: inherit; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.viewtoggle { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.viewtoggle a { display: grid; place-items: center; width: 40px; height: 38px; color: var(--muted); }
.viewtoggle a.on { background: var(--sky); color: var(--accent); }
.btn-outline { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 600; font-size: .9rem; background: #fff; color: var(--ink-2); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 8px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; margin-top: 18px; }
.btn-primary:hover { filter: brightness(1.1); }

/* Info cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; }
.card:hover { border-color: #A9C3E3; box-shadow: 0 6px 18px rgba(16,35,61,.08); }
.card:hover .card-title { color: var(--accent); }
.card-img { aspect-ratio: 4 / 3; background: #fff; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.card-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .76rem; font-weight: 600; color: var(--accent); background: var(--sky); padding: 2px 7px; border-radius: 5px; letter-spacing: .02em; }
.pid { font-size: .74rem; font-weight: 700; color: #fff; background: var(--navy-2); padding: 2px 7px; border-radius: 5px; letter-spacing: .03em; }
.pid-lg { font-size: .85rem; padding: 3px 9px; margin-right: 4px; }
.code-lg { font-size: .85rem; padding: 3px 9px; }
.card-cat { font-size: .76rem; color: var(--muted); font-weight: 500; }
.card-title { margin: 2px 0 8px; font-size: 1rem; font-weight: 800; line-height: 1.3; }
.card-desc { margin: 0 0 10px; font-size: .86rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-specs { margin: 0 0 10px; display: grid; gap: 3px; font-size: .84rem; }
.card-specs div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 3px; }
.card-specs dt { color: var(--muted); flex: none; }
.card-specs dd { margin: 0; font-weight: 600; text-align: right; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.models { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.models span { font-size: .74rem; font-weight: 600; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line); color: var(--ink-2); background: #FAFCFF; }
.models .more { color: var(--accent); }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line); }
.price { font-weight: 700; color: var(--ink); }
.price.muted { font-weight: 500; color: var(--muted); font-size: .9rem; }
.old-price { color: var(--muted); font-size: .85rem; }
.more-link { color: var(--accent); font-weight: 600; font-size: .86rem; }
.badge { font-size: .76rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; white-space: nowrap; }
.badge-in { background: #E3F3EA; color: var(--ok); }
.badge-out { background: #F8E6E4; color: var(--bad); }

/* List view */
.rows { display: flex; flex-direction: column; gap: 10px; }
.row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-decoration: none; }
.row:hover { border-color: #A9C3E3; }
.row:hover .card-title { color: var(--accent); }
.row-img { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.row-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.row .card-title { margin-bottom: 6px; }
.row-specs { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .86rem; color: var(--ink); margin-bottom: 8px; }
.row-specs em { font-style: normal; color: var(--muted); }
.row .models { margin-bottom: 0; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; padding-right: 6px; }

.empty { background: #fff; padding: 48px 20px; border-radius: var(--radius); text-align: center; color: var(--muted); margin: 24px 0; border: 1px dashed var(--line); }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.pager a, .pager span { padding: 8px 13px; border-radius: 8px; background: #fff; text-decoration: none; border: 1px solid var(--line); }
.pager .current { background: var(--accent); color: #fff; border-color: var(--accent); }
.pager .dots { background: transparent; border: 0; }

/* ---------- Product page ---------- */
.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.gallery-main { aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: #fff; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumb { width: 72px; height: 72px; border: 2px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb.active { border-color: var(--accent); }
.info h1 { margin: 10px 0 8px; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.15; font-weight: 900; }
.lead { color: var(--ink-2); margin: 0 0 18px; }
.facts { width: 100%; border-collapse: collapse; font-size: .95rem; }
.facts th, .facts td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.facts th { width: 42%; color: var(--ink-2); font-weight: 500; background: #FAFCFF; }
.facts td { font-weight: 600; }
.facts td a { color: var(--accent); text-decoration: none; }
.facts tr:first-child th, .facts tr:first-child td { border-top: 1px solid var(--line); }
.facts-specs th { border-left: 3px solid var(--accent); }
.h-sm { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin: 24px 0 10px; font-weight: 800; color: var(--navy-2); }
.block { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 4px 28px 24px; margin-top: 18px; }
.prose { color: var(--ink-2); max-width: 75ch; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.vtable { width: 100%; border-collapse: collapse; min-width: 420px; }
.vtable th { background: var(--navy-2); color: #fff; text-align: left; padding: 13px 16px; font-family: "Archivo", "Noto Sans Georgian", sans-serif; text-transform: uppercase; font-size: .8rem; letter-spacing: .06em; font-weight: 700; }
.vtable td { padding: 12px 16px; border-top: 1px solid var(--line); }
.vtable tbody tr:nth-child(even) { background: #F8FBFF; }
main { min-height: 60vh; }
main > .wrap:last-child { padding-bottom: 56px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #AFC3DC; padding: 28px 0; font-size: .9rem; }
.site-footer strong { color: #fff; }
.site-footer a { color: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-contact { text-align: right; }
.footer-note { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); color: #8AA2C0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .product { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 20px; }
  .block { padding: 4px 16px 18px; }
  .footer-contact { text-align: left; }
  .row { grid-template-columns: 88px minmax(0, 1fr); }
  .row-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; padding: 0; }
}
@media (max-width: 560px) {
  .logo-svg { height: 38px; }
  .hero-inner { padding-top: 26px; padding-bottom: 40px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 10px 11px 12px; }
  .card-title { font-size: .92rem; }
  .card-specs { font-size: .78rem; }
  .card-specs div { flex-direction: column; gap: 0; }
  .card-specs dd { text-align: left; white-space: normal; }
  .card-cat, .more-link { display: none; }
  .cat-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cat-tile { flex-direction: row; }
  .cat-cover { flex: none; width: 112px; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); }
  .cat-cover img { padding: 6px; }
  .cat-initial { font-size: 2.2rem; }
  .cat-info { padding: 12px 14px; }
  .cat-info p { display: none; }
  .cat-open { padding-top: 8px; }
  .toolbar-right { width: 100%; }
  .sort-form { flex: 1; }
  .sort-form select { width: 100%; }
  .row { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 10px; }
  .row-specs { font-size: .8rem; }
}

/* Georgian: no forced capitals (Mtavruli) */
html[lang="ka"] *:not(.keep-caps) { text-transform: none !important; }

/* size picker */
.picker { margin: 4px 0 18px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #F6FAFF; }
.picker-head { font-weight: 700; font-size: .9rem; color: var(--ink-2); margin-bottom: 10px; }
.picker-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.picker .opt { font: inherit; font-weight: 700; font-size: .92rem; min-width: 64px; padding: 9px 14px; border-radius: 9px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.picker .opt:hover { border-color: var(--accent); color: var(--accent); }
.picker .opt.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(21,101,192,.25); }
.picker .opt[data-out] { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.picker .opt[data-out].on { color: #fff; }
.picker-v2 { margin-top: 10px; font-size: .9rem; color: var(--ink-2); font-weight: 600; }
.vtable tbody tr { cursor: pointer; }
.vtable tbody tr:hover { background: #EEF5FF; }
.vtable tbody tr.on { background: #DCEBFF !important; box-shadow: inset 4px 0 0 var(--accent); }
.vtable td.num, .vtable th.num { text-align: right; white-space: nowrap; }
.vtable td.mono { font-family: ui-monospace, Menlo, monospace; font-size: .86rem; color: var(--ink-2); }
.btn-wa { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; background: #1FA855 !important; }
.models-label { font-size: .74rem; font-weight: 700; color: var(--muted); margin-right: 2px; align-self: center; }
.models .models-title { width: 100%; font-size: .72rem; font-weight: 700; color: var(--muted); }
.vtable td.mono { white-space: nowrap; }
@media (max-width: 640px) {
  .vtable { min-width: 0; }
  .vtable th, .vtable td { padding: 10px 10px; font-size: .88rem; }
  .vtable th { font-size: .74rem; letter-spacing: .02em; }
}
