:root {
  --bg: oklch(0.985 0.003 262);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.955 0.006 262);
  --border: oklch(0.885 0.009 262);
  --text: oklch(0.2 0.012 262);
  --text-2: oklch(0.44 0.014 262);
  --text-3: oklch(0.58 0.014 262);
  --accent: #14b8a6;
  --accent-ink: oklch(1 0 0);
}
:root[data-theme="dark"] {
  --bg: oklch(0.16 0.012 262);
  --surface: oklch(0.205 0.014 262);
  --surface-2: oklch(0.245 0.015 262);
  --border: oklch(0.32 0.014 262);
  --text: oklch(0.96 0.004 262);
  --text-2: oklch(0.74 0.014 262);
  --text-3: oklch(0.56 0.014 262);
  --accent: #5eead4;
  --accent-ink: oklch(0.16 0.012 262);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Manrope', system-ui, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
h1, h2, h3, .display { font-family: 'Unbounded', system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.85; }
button { font-family: inherit; cursor: pointer; }
main { flex: 1; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ── HEADER ── */
.topbar { background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-3); text-align: center; padding: 7px 16px; }
.header { position: sticky; top: 0; z-index: 20; background: color-mix(in oklch, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 16px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: 'Unbounded', sans-serif; font-size: 18px; font-weight: 600; white-space: nowrap; }
.logo-2 { color: var(--text-2); font-weight: 400; font-size: 15px; }
.nav { display: flex; gap: 24px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.cart-link { position: relative; display: flex; align-items: center; }
.theme-toggle { display:flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:50%; border:1px solid var(--border); background: var(--surface); color: var(--text-2); flex-shrink:0; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.cart-badge { position: absolute; top: -8px; right: -9px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0 3px; }

/* ── FOOTER ── */
.footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 48px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 40px 32px 24px; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; font-size: 13px; }
.footer-logo { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 16px; margin-bottom: 10px; }
.footer-inner p { color: var(--text-3); line-height: 1.6; }
.footer-head { display: block; font-weight: 700; margin-bottom: 10px; }
.footer-inner a { display: block; color: var(--text-3); margin-bottom: 8px; }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding: 16px 32px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); }

/* ── ДУГМИЊА ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px; padding: 13px 24px; border-radius: 10px; border: none; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-outline { border: 1px solid var(--border); color: var(--text); background: transparent; }

/* ── КАРТИЧКИ ЗА ПРОИЗВОД ── */
.grid-proizvodi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.prod-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.15s; }
.prod-card:hover { border-color: var(--text-3); }
.prod-img { position: relative; aspect-ratio: 1.3; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-badge { position: absolute; top: 10px; left: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 6px; }
.prod-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.prod-cat { font-size: 12px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.prod-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.prod-price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 6px; }
.prod-price { font-family: 'Unbounded', sans-serif; font-size: 18px; font-weight: 700; }
.prod-price-old { font-size: 13px; color: var(--text-3); text-decoration: line-through; }

/* ── КАТЕГОРИИ ── */
.grid-kategorii { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.cat-card { display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px 12px; text-align: center; }
.cat-card.active, .cat-card:hover { border-color: var(--accent); }
.cat-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--accent); }

/* ── ХЕРО ── */
.hero { padding: 56px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: center; }
.hero h1 { font-size: 46px; line-height: 1.08; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.hero p { font-size: 16px; line-height: 1.6; color: var(--text-2); max-width: 460px; }
.hero-visual { position: relative; aspect-ratio: 1.15; border-radius: 24px; background: linear-gradient(155deg, var(--surface) 0%, var(--surface-2) 100%); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }

/* ── ФОРМЕ ── */
input, textarea, select { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; color: var(--text); font-size: 14px; outline: none; font-family: inherit; width: 100%; }
label { font-size: 13px; font-weight: 600; color: var(--text-2); display: block; margin-bottom: 6px; }
.field { margin-bottom: 16px; }

/* ── SCROLL TO TOP ── */
.scroll-top {
  position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  display: flex; align-items: center; justify-content: center; z-index: 40;
  opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 8px 24px oklch(0 0 0 / 0.35);
}
.scroll-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.scroll-top:hover { border-color: var(--accent); color: var(--accent); }

/* ── ЧЕТ ── */
.chat-wrap { position: fixed; bottom: 24px; left: 24px; z-index: 40; }
.chat-toggle { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); border: none; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px oklch(0 0 0 / 0.35); }
.chat-panel { position: absolute; bottom: 64px; left: 0; width: 300px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 16px 40px oklch(0 0 0 / 0.4); }
.chat-head { background: var(--surface-2); padding: 12px 16px; font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.chat-head button { background: none; border: none; color: var(--text-2); font-size: 18px; }
.chat-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.chat-hint { font-size: 12px; color: var(--text-3); margin: 0 0 4px; }
.chat-send { background: var(--accent); color: var(--accent-ink); border: none; border-radius: 10px; padding: 10px; font-weight: 700; font-size: 14px; }
.chat-status { font-size: 12px; color: var(--text-3); margin: 0; min-height: 14px; }

@media (max-width: 900px) {
  .grid-proizvodi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-kategorii { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero h1 { font-size: 34px; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero > div:first-child { display: flex; flex-direction: column; align-items: center; }
  .hero > div:first-child > div { justify-content: center; }
  .nav { display: none; }
}
