/* =========================================================================
   Hrana na javi - dizajn sistem
   Jedan CSS fajl za cijeli sajt; admin panel dodatno učitava admin.css.
   ========================================================================= */

/* ---------- Font (lokalno, radi i bez interneta) ---------- */
@font-face { font-family: "Jakarta"; font-weight: 400; font-display: swap; src: url("/fonts/plus-jakarta-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jakarta"; font-weight: 400; font-display: swap; src: url("/fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jakarta"; font-weight: 500; font-display: swap; src: url("/fonts/plus-jakarta-sans-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jakarta"; font-weight: 500; font-display: swap; src: url("/fonts/plus-jakarta-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jakarta"; font-weight: 600; font-display: swap; src: url("/fonts/plus-jakarta-sans-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jakarta"; font-weight: 600; font-display: swap; src: url("/fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jakarta"; font-weight: 700; font-display: swap; src: url("/fonts/plus-jakarta-sans-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jakarta"; font-weight: 700; font-display: swap; src: url("/fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jakarta"; font-weight: 800; font-display: swap; src: url("/fonts/plus-jakarta-sans-latin-ext-800-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jakarta"; font-weight: 800; font-display: swap; src: url("/fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokeni ---------- */
:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --surface-2: #F4EFE8;
  --ink: #231A16;
  --ink-2: #4A3F38;
  --muted: #6B5F57;
  --line: #ECE4DA;
  --line-2: #E0D6CA;

  --accent: #C2410C;
  --accent-hover: #A3360A;
  --accent-soft: #FFF0E6;
  --accent-ink: #9A3412;

  --success: #15803D;  --success-soft: #EAF7EE;
  --danger: #B91C1C;   --danger-soft: #FDEEEE;
  --warning: #B45309;  --warning-soft: #FEF5E7;
  --info: #1D4ED8;     --info-soft: #EEF3FE;
  --violet: #6D28D9;   --violet-soft: #F3EEFE;

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(35, 26, 22, .06);
  --shadow: 0 1px 2px rgba(35, 26, 22, .05), 0 6px 20px -6px rgba(35, 26, 22, .12);
  --shadow-lg: 0 12px 40px -12px rgba(35, 26, 22, .28);

  --on-ink: #FFFFFF;
  --ink-hover: #3A2E28;
  --on-accent: #FFFFFF;
  --line-hover: #CBBFB1;
  --placeholder: #8F8278;
  --track: #D8CEC3;
  --cancel: #7A6F68; --cancel-soft: #F1EEEC;
  --danger-ink: #7F1D1D; --success-ink: #14532D; --warning-ink: #78350F;
  --toast-bg: #231A16; --toast-ink: #FFFFFF;
  --brand: #C2410C;
  --tabbar-h: 64px;

  --font: "Jakarta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 68px;
  --container: 1200px;
}

/* ---------- Tamna tema (data-theme="dark" postavlja skripta u <head>) ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16110E;
  --surface: #1F1915;
  --surface-2: #2A221D;
  --ink: #F3ECE6;
  --ink-2: #D6CBC2;
  --muted: #A89C93;
  --line: #322923;
  --line-2: #43382F;
  --line-hover: #5A4C42;
  --placeholder: #7D7068;
  --track: #4A3E36;

  --accent: #EC7A43;
  --accent-hover: #F48D5A;
  --accent-soft: #3A2316;
  --accent-ink: #FDBA8C;
  --on-accent: #1A0E08;
  --on-ink: #16110E;
  --ink-hover: #FFFFFF;

  --success: #4ADE80; --success-soft: #11291A; --success-ink: #BBF7D0;
  --danger: #F87171;  --danger-soft: #361717;  --danger-ink: #FECACA;
  --warning: #FBBF24; --warning-soft: #33270F; --warning-ink: #FDE68A;
  --info: #93B4FF;    --info-soft: #18213A;
  --violet: #C4B5FD;  --violet-soft: #251E3B;
  --cancel: #B5AAA2;  --cancel-soft: #2C2521;
  --toast-bg: #2E2621; --toast-ink: #F3ECE6;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px -6px rgba(0, 0, 0, .6);
  --shadow-lg: 0 12px 40px -12px rgba(0, 0, 0, .8);
}
:root[data-theme="dark"] .hero-visual img,
:root[data-theme="dark"] .product-card .thumb img,
:root[data-theme="dark"] .ca-trigger img { filter: brightness(.92); }
:root[data-theme="dark"] .ca-item.open .ca-trigger img { filter: brightness(.95); }
:root[data-theme="dark"] .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A89C93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }

/* ---------- Osnova ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; font-weight: 750; }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.i { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.i-sm { width: 15px; height: 15px; }
.i-lg { width: 22px; height: 22px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; }
.tnum { font-variant-numeric: tabular-nums; }
.inline { display: inline; }

/* ---------- Dugmad ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 650; font-size: 14.5px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-dark { background: var(--ink); color: var(--on-ink); }
.btn-dark:hover { background: var(--ink-hover); }
.btn-outline { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #991b1b; }
.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13.5px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; box-shadow: none; }

/* ---------- Forme ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 46px; padding: 0 14px; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.select { appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2385786E' 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; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-hover); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(194, 65, 12, .12); }
.input::placeholder, .textarea::placeholder { color: var(--placeholder); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); }
.field.has-error .input:focus { box-shadow: 0 0 0 4px rgba(185, 28, 28, .12); }
.error-text { font-size: 12.5px; color: var(--danger); font-weight: 550; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
.input-icon { position: relative; }
.input-icon > .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon > .input { padding-left: 42px; }
.checkbox { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; user-select: none; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Prekidač (switch) */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 40px; height: 24px; border-radius: 999px; background: var(--track); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch input:checked ~ .track { background: var(--success); }
.switch input:checked ~ .track::after { transform: translateX(16px); }
.switch input:focus-visible ~ .track { outline: 2px solid var(--accent); outline-offset: 2px; }
button.switch { background: none; border: 0; padding: 0; }
button.switch .track.on { background: var(--success); }
button.switch .track.on::after { transform: translateX(16px); }

/* ---------- Kartice, oznake, obavještenja ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.card-pad { padding: 24px; }
.card-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h3 { font-size: 16px; }
.card-body { padding: 22px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px;
  border-radius: 4px; font-size: 12.5px; font-weight: 650; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2);
}
.pill-new    { background: var(--info-soft); color: var(--info); }
.pill-prep   { background: var(--warning-soft); color: var(--warning); }
.pill-ship   { background: var(--violet-soft); color: var(--violet); }
.pill-done   { background: var(--success-soft); color: var(--success); }
.pill-cancel { background: var(--cancel-soft); color: var(--cancel); }
.pill-accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); font-size: 14px; }
.alert .i { margin-top: 1px; }
.alert-error { background: var(--danger-soft); color: var(--danger-ink); }
.alert-success { background: var(--success-soft); color: var(--success-ink); }
.alert-info { background: var(--surface-2); color: var(--ink-2); }
.alert-warning { background: var(--warning-soft); color: var(--warning-ink); }

/* Toast poruka */
.toast {
  position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px);
  padding: 12px 14px 12px 16px; border-radius: var(--radius); background: var(--toast-bg); color: var(--toast-ink);
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 550;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast .i { color: #86efac; }
.toast.error .i { color: #fca5a5; }
.toast #toastText { flex: 1; min-width: 0; }
.toast a { color: #fdba74; font-weight: 700; margin-left: 4px; white-space: nowrap; }
.toast button { background: none; border: 0; color: #bfb3aa; cursor: pointer; padding: 4px; display: flex; }

/* ---------- Zaglavlje ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .container { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14.5px; color: var(--ink-2); transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { color: var(--ink); background: var(--surface-2); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.cart-btn { position: relative; gap: 10px; padding: 0 16px 0 14px; }
.cart-btn .badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: 11.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}
.cart-btn .badge.bump { animation: bump .4s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }
.menu-toggle { display: none; }

/* Korisnički meni */
.user-menu { position: relative; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: 14px; border: 0; cursor: pointer; flex: none;
}
.avatar-sm { width: 34px; height: 34px; font-size: 12.5px; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px;
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .15s, transform .15s;
}
.user-menu.open .dropdown { opacity: 1; transform: none; pointer-events: auto; }
.dropdown .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dropdown .who strong { display: block; font-size: 14px; }
.dropdown .who span { font-size: 12.5px; color: var(--muted); }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 9px;
  font-size: 14px; font-weight: 550; color: var(--ink-2); background: none; border: 0; cursor: pointer; text-align: left;
}
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); color: var(--ink); }
.dropdown .i { color: var(--muted); }

/* ---------- Podnožje ---------- */
.site-footer { margin-top: 80px; border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .container { padding-top: 40px; padding-bottom: 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 14px; font-weight: 700; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14.5px; }
.footer-grid li { display: flex; align-items: center; gap: 9px; color: var(--ink-2); }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Naslovi stranica, prazna stanja ---------- */
.page-head { padding: 40px 0 24px; }
.page-head p { color: var(--muted); margin-top: 8px; font-size: 16px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .i { width: 14px; height: 14px; }
.empty { text-align: center; padding: 64px 20px; }
.empty .empty-icon { width: 56px; height: 56px; border-radius: var(--radius); margin: 0 auto 18px; background: var(--surface-2); color: var(--muted); display: flex; align-items: center; justify-content: center; }
.empty .empty-icon .i { width: 28px; height: 28px; }
.empty h3 { font-size: 20px; margin-bottom: 8px; }
.empty p { color: var(--muted); margin-bottom: 22px; }

/* ---------- Početna ---------- */
.hero { padding: 40px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); margin-left: 4px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -0.025em; word-spacing: 0.04em; margin: 20px 0 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 18px; color: var(--ink-2); max-width: 30em; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-facts { display: flex; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.hero-facts div { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); font-weight: 550; }
.hero-facts .i { color: var(--accent); }
.hero-visual { position: relative; }
.hero-visual img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-lg); }
.hero-badge {
  position: absolute; left: -22px; bottom: 30px; background: var(--surface); border-radius: 16px; padding: 14px 18px;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px; font-size: 14px;
}
.hero-badge .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.hero-badge strong { display: block; font-size: 15px; }
.hero-badge span { color: var(--muted); font-size: 13px; }

.section { padding: 56px 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head p { color: var(--muted); margin-top: 6px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 14.5px; color: var(--accent); white-space: nowrap; }
.link-arrow:hover { gap: 9px; }
.link-arrow, .link-arrow .i { transition: gap .15s; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { padding: 26px; }
.step .num { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14.5px; }

/* ---------- Harmonika kategorija (početna) ----------
   Kategorije su uske trake sa fotografijom; otvorena se raširi, a preko fotografije
   uklizi kartica sa detaljima. Širine i pomjeraj (--ow, --x) računa app.js. */
.cat-accordion {
  --s: 76px; --g: 8px; --h: 440px; --ease: cubic-bezier(.7, 0, .2, 1);
  --ow: calc(100% - (var(--n) - 1) * (var(--s) + var(--g)));
  position: relative;
}
.ca-track { display: flex; gap: var(--g); height: var(--h); transition: transform .7s var(--ease); }
.cat-accordion.js { overflow: hidden; }
.cat-accordion.js .ca-track { transform: translateX(var(--x, 0px)); touch-action: pan-y; }
.ca-item {
  position: relative; flex: 0 0 var(--s); min-width: 0; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--surface-2);
  transition: flex-basis .7s var(--ease);
}
.ca-item.open { flex-basis: var(--ow); }
.ca-trigger { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; display: block; }
.ca-trigger img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.82); transition: filter .3s; }
.ca-trigger:hover img { filter: brightness(.95); }
.ca-item.open .ca-trigger img { filter: none; }
.ca-trigger::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,12,8,.7), transparent 55%); transition: opacity .3s; }
.ca-item.open .ca-trigger::after { opacity: 0; }
.ca-label {
  position: absolute; left: 50%; bottom: 18px; z-index: 1; transform: translateX(-50%) rotate(180deg);
  writing-mode: vertical-rl; white-space: nowrap; color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .01em;
  transition: opacity .2s;
}
.ca-label { transition: opacity .25s .45s; }
.ca-item.open .ca-label { opacity: 0; transition-delay: 0s; }
.ca-panel {
  position: absolute; z-index: 2; top: 12px; bottom: 12px; left: 12px; width: min(330px, calc(100% - 24px));
  display: flex; flex-direction: column; padding: 24px; background: var(--surface); border-radius: var(--radius);
  opacity: 0; visibility: hidden; transform: translateX(-28px);
  transition: opacity .2s, transform .2s, visibility 0s .2s;
}
.ca-item.open .ca-panel {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .35s .4s, transform .5s .4s var(--ease), visibility 0s .4s;
}
.ca-kicker { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ca-panel h3 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 18px; }
.ca-list { list-style: none; margin: 0; padding: 0; }
.ca-list li { border-top: 1px solid var(--line); }
.ca-list a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; font-size: 14.5px; font-weight: 550; }
.ca-list a:hover { color: var(--accent); }
.ca-price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ca-panel .btn { margin-top: auto; align-self: flex-start; }

@media (max-width: 760px) {
  .cat-accordion { --s: 44px; --g: 6px; --h: 470px; --ow: 78vw; overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
  .cat-accordion.js { margin: 0; padding: 0; overflow: hidden; }
  .ca-label { font-size: 13.5px; bottom: 14px; }
  .ca-panel { top: auto; left: 10px; right: 10px; bottom: 10px; width: auto; padding: 18px; transform: translateY(24px); }
  .ca-panel h3 { font-size: 22px; margin: 4px 0 10px; }
  .ca-list a { padding: 8px 0; font-size: 14px; }
  .ca-panel .btn { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ca-track, .ca-item, .ca-panel, .ca-item.open .ca-panel { transition: none !important; }
}

/* ---------- Meni / lista proizvoda ---------- */
.shop-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.shop-toolbar .input-icon { flex: 1; max-width: 420px; }
.shop-toolbar .select { width: auto; min-width: 190px; }
.chips-bar { position: sticky; top: var(--header-h); z-index: 20; background: var(--bg); padding: 12px 0; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface);
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--ink-2); transition: all .15s;
}
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip .count { font-size: 12px; opacity: .6; font-weight: 600; }
.results-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; color: var(--muted); font-size: 14px; }
.results-meta strong { color: var(--ink); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.product-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s; }
.product-card:hover { border-color: var(--line-hover); }
.product-card .thumb { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card .tag { position: absolute; top: 12px; left: 12px; background: var(--surface); padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 650; color: var(--ink-2); }
.product-card .body { padding: 16px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.product-card h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; }
.product-card h3 a:hover { color: var(--accent); }
.product-card .desc { color: var(--muted); font-size: 13.5px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.product-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 2px; gap: 8px; }
.price { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.price-sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.add-btn { height: 38px; padding: 0 14px 0 12px; }
.product-card.unavailable .thumb img { filter: grayscale(1); opacity: .55; }
.product-card.unavailable .tag { background: var(--ink); color: var(--on-ink); }
.in-cart-note { font-size: 12px; color: var(--success); font-weight: 650; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Stranica proizvoda ---------- */
.product-page { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; padding-top: 8px; }
.product-page .media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-lg); background: var(--surface-2); }
.product-page .info { position: sticky; top: calc(var(--header-h) + 24px); }
.product-page h1 { margin: 12px 0 10px; }
.product-page .meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 22px; }
.product-page .meta span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.product-page .big-price { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.product-page .description { color: var(--ink-2); font-size: 16px; line-height: 1.7; }
.buy-box { margin-top: 26px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); display: flex; gap: 12px; align-items: center; }
.buy-box .btn { flex: 1; }

.qty { display: inline-flex; align-items: center; height: 46px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.qty button { width: 42px; height: 100%; border: 0; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ink-2); }
.qty button:hover { background: var(--surface-2); color: var(--ink); }
.qty input { width: 38px; text-align: center; border: 0; background: none; font-weight: 700; outline: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm { height: 36px; }
.qty-sm button { width: 34px; }
.qty-sm input { width: 30px; font-size: 14px; }

/* ---------- Korpa i checkout ---------- */
.checkout-steps { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; font-size: 13.5px; font-weight: 650; color: var(--muted); flex-wrap: wrap; }
.checkout-steps .s { display: inline-flex; align-items: center; gap: 8px; }
.checkout-steps .n { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.checkout-steps .s.on { color: var(--ink); }
.checkout-steps .s.on .n { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.checkout-steps .s.done .n { background: var(--success); border-color: var(--success); color: #fff; }
.checkout-steps .sep { width: 28px; height: 1.5px; background: var(--line-2); }

.two-col { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
.summary { position: sticky; top: calc(var(--header-h) + 20px); }
.summary .card-body { display: grid; gap: 12px; }
.summary .line { display: flex; justify-content: space-between; font-size: 14.5px; color: var(--ink-2); }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.summary .total strong { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.summary .note { display: flex; gap: 10px; font-size: 13px; color: var(--muted); }
.summary .note .i { color: var(--success); }

.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-item { display: grid; grid-template-columns: 84px 1fr auto auto; gap: 18px; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }
.cart-item h3 { font-size: 15.5px; font-weight: 700; }
.cart-item h3 a:hover { color: var(--accent); }
.cart-item .sub { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.cart-item .line-total { font-weight: 800; min-width: 84px; text-align: right; font-variant-numeric: tabular-nums; }
.cart-item .actions { display: flex; align-items: center; gap: 6px; }

.mini-items { display: grid; gap: 12px; max-height: 300px; overflow: auto; padding-right: 4px; }
.mini-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.mini-item img { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-2); }
.mini-item .q { color: var(--muted); font-size: 12.5px; }
.mini-item strong { font-variant-numeric: tabular-nums; }

.form-section + .form-section { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.form-section h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; margin-bottom: 16px; }
.form-section h3 .n { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.pay-option { font-size: 14.5px; color: var(--ink-2); }
.pay-option .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--surface); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.pay-option strong { display: block; font-size: 14.5px; }
.pay-option span { font-size: 13px; color: var(--ink-2); }

/* Mobilna traka korpe (pojavljuje se na meniju kada korpa nije prazna) */
.cart-bar { display: none; }

/* ---------- Porudžbine ---------- */
.order-hero { text-align: center; padding: 40px 20px 32px; }
.order-hero .check { width: 72px; height: 72px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.order-hero .check .i { width: 34px; height: 34px; }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.order-hero p { color: var(--muted); margin-top: 10px; font-size: 16px; }

.tracker { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; padding: 6px 0; }
.tracker .t { position: relative; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.tracker .t::before { content: ""; position: absolute; top: 17px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.tracker .t:first-child::before { display: none; }
.tracker .t .dot { position: relative; z-index: 1; width: 36px; height: 36px; margin: 0 auto 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.tracker .t .dot .i { width: 16px; height: 16px; }
.tracker .t.done { color: var(--ink); }
.tracker .t.done::before { background: var(--success); }
.tracker .t.done .dot { background: var(--success); border-color: var(--success); color: #fff; }
.tracker .t.current .dot { box-shadow: 0 0 0 6px var(--success-soft); }

.order-list { display: grid; gap: 12px; }
.order-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 18px; align-items: center; padding: 16px 20px; transition: border-color .15s, box-shadow .15s; }
.order-row:hover { border-color: var(--line-hover); }
.order-row .thumbs { display: flex; }
.order-row .thumbs img { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; border: 2px solid var(--surface); margin-left: -12px; background: var(--surface-2); }
.order-row .thumbs img:first-child { margin-left: 0; }
.order-row strong { font-size: 15px; }
.order-row .sub { font-size: 13px; color: var(--muted); }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 16px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; }

/* ---------- Prijava / registracija ---------- */
.auth { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - var(--header-h) - 40px); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-form .box { width: 100%; max-width: 400px; }
.auth-form h1 { font-size: 30px; }
.auth-form .sub { color: var(--muted); margin: 8px 0 28px; }
.auth-side { position: relative; margin: 16px 16px 16px 0; border-radius: 28px; overflow: hidden; background: var(--ink); }
.auth-side img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.auth-side .quote { position: absolute; left: 32px; right: 32px; bottom: 32px; color: #fff; }
.auth-side .quote strong { font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; display: block; font-weight: 750; }
.auth-side .quote span { opacity: .8; font-size: 15px; display: block; margin-top: 8px; }
.auth-side::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,12,8,.8), transparent 55%); }
.auth-side .quote { z-index: 1; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.pw-toggle:hover { color: var(--ink); background: var(--surface-2); }
.google-btn { gap: 10px; }

/* ---------- Greške ---------- */
.error-page { text-align: center; padding: 96px 20px; }
.error-page .code { font-size: 96px; font-weight: 800; letter-spacing: -0.05em; color: var(--accent); line-height: 1; }
.error-page h1 { font-size: 28px; margin: 18px 0 10px; }
.error-page p { color: var(--muted); margin-bottom: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .product-page { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { order: -1; }
  .hero-visual img { aspect-ratio: 16 / 10; }
  .hero-badge { left: 16px; bottom: 16px; }
  .product-page .info { position: static; }
  .two-col { grid-template-columns: 1fr; }
  .summary { position: static; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: span 2; }
}
@media (max-width: 760px) {
  :root { --header-h: 62px; }
  .site-header .container { gap: 10px; }
  .brand img { height: 36px; }
  .menu-toggle { display: inline-flex; }
  .nav { position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 16px; }
  .cart-btn .label, .cart-btn .cart-total { display: none; }
  .cart-btn { padding: 0 12px; }
  .steps { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .shop-toolbar { flex-wrap: wrap; }
  .shop-toolbar .input-icon { max-width: none; flex-basis: 100%; }
  .shop-toolbar .select { flex: 1; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card .body { padding: 12px; }
  .product-card h3 { font-size: 14.5px; }
  .product-card .desc { display: none; }
  .product-card .foot { flex-direction: column; align-items: stretch; }
  .add-btn { width: 100%; }
  .cart-item { grid-template-columns: 64px 1fr; gap: 12px 14px; padding: 16px; }
  .cart-item img { width: 64px; height: 64px; }
  .cart-item .actions { grid-column: 2; justify-content: space-between; }
  .cart-item .line-total { grid-column: 2; text-align: left; grid-row: 2; }
  .order-row { grid-template-columns: 1fr auto; }
  .order-row .thumbs { display: none; }
  .tracker .t { font-size: 11.5px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid > :first-child { grid-column: auto; }
  .cart-bar {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; height: 56px; padding: 0 8px 0 18px;
    align-items: center; justify-content: space-between; border-radius: var(--radius); background: var(--ink); color: #fff; box-shadow: var(--shadow-lg);
    font-weight: 650;
  }
  .cart-bar .btn { height: 42px; }
  body.has-cart-bar { padding-bottom: 76px; }
  .toast { bottom: 80px; left: 12px; right: 12px; max-width: none; transform: translateY(20px); }
  .toast.show { transform: none; }
  .toast a { display: none !important; }
  .checkout-steps .sep { width: 12px; }
  .checkout-steps { gap: 6px; font-size: 12.5px; }
  .buy-box { flex-wrap: wrap; }
}

/* ---------- Štampa ---------- */
@media print {
  .site-header, .site-footer, .no-print, .toast, .cart-bar, .admin-sidebar, .admin-topbar { display: none !important; }
  body { background: #fff; }
  .card { border-color: #ddd; }
}

/* ---------- Brend: ikonica + naziv ---------- */
.brand img { border-radius: 8px; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
@media (max-width: 420px) { .site-header .brand-name { display: none; } }

/* ---------- Baner: potvrda emaila ---------- */
.verify-banner { background: var(--warning-soft); border-bottom: 1px solid var(--line); color: var(--warning-ink); font-size: 14px; }
.verify-banner .container { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.verify-banner span { flex: 1; }
.verify-banner .btn { background: transparent; }
@media (max-width: 760px) { .verify-banner .container { flex-wrap: wrap; } }

/* ---------- Izbor načina plaćanja ---------- */
.pay-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-choice { position: relative; cursor: pointer; }
.pay-choice input { position: absolute; opacity: 0; }
.pay-choice .pc-body { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line-2); border-radius: var(--radius); background: var(--surface); transition: border-color .15s, background .15s; height: 100%; }
.pay-choice .pc-body .i { color: var(--muted); margin-top: 2px; }
.pay-choice strong { display: block; font-size: 14.5px; }
.pay-choice .pc-body span span { font-size: 13px; color: var(--muted); }
.pay-choice:hover .pc-body { border-color: var(--line-hover); }
.pay-choice input:checked + .pc-body { border-color: var(--accent); background: var(--accent-soft); }
.pay-choice input:checked + .pc-body .i { color: var(--accent); }
.pay-choice input:focus-visible + .pc-body { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 520px) { .pay-choices { grid-template-columns: 1fr; } }

/* ---------- Probna forma za karticu ---------- */
.pay-form { display: grid; gap: 16px; }
.card-visual {
  aspect-ratio: 1.586; max-width: 340px; width: 100%; margin: 0 auto 8px; padding: 20px 22px; border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, #2b211c, #4a3a32); display: flex; flex-direction: column; justify-content: space-between;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.cv-top { display: flex; justify-content: space-between; align-items: center; }
.cv-chip { width: 38px; height: 28px; border-radius: 5px; background: #d6b97a; }
.cv-brand { font-family: var(--font); font-weight: 800; letter-spacing: .04em; font-size: 15px; }
.cv-number { font-size: clamp(16px, 4.6vw, 21px); letter-spacing: .08em; }
.cv-bottom { display: flex; justify-content: space-between; font-size: 13px; text-transform: uppercase; opacity: .85; gap: 12px; }
.cv-bottom span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono-num { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.pay-busy { display: none; align-items: center; gap: 10px; }
#payBtn.busy .pay-label { display: none; }
#payBtn.busy .pay-busy { display: inline-flex; }
#payBtn.busy { pointer-events: none; opacity: .9; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Profil ---------- */
.profile-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.profile-tabs a { padding: 10px 14px; font-weight: 650; font-size: 14.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px; }
.profile-tabs a:hover { color: var(--ink); }
.profile-tabs a.active { color: var(--ink); border-bottom-color: var(--accent); }
.profile-tabs .count { font-size: 12px; background: var(--surface-2); border-radius: 999px; padding: 1px 8px; }
.profile-section { margin-bottom: 16px; }
.profile-section h2 { font-size: 18px; margin-bottom: 16px; }
.profile-section .alert { margin-bottom: 16px; align-items: center; }
.current-email { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; font-size: 15px; }
.reset-link { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

/* =========================================================================
   Tema i jezik (popover u zaglavlju + grupa u profilu)
   ========================================================================= */
.prefs { position: relative; }
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: inline-block; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
.prefs-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 300px; padding: 16px; display: grid; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 60;
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .15s, transform .15s;
}
.prefs.open .prefs-panel { opacity: 1; transform: none; pointer-events: auto; }
.pref-group { display: grid; gap: 8px; }
.pref-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: var(--radius-sm); }
.segmented button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink-2); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap;
}
.segmented button:hover { color: var(--ink); }
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* =========================================================================
   Profil: grupisane sekcije (kao podešavanja na telefonu)
   ========================================================================= */
.profile { padding-top: 32px; }
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.profile-head h1 { font-size: 26px; }
.profile-head .muted { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: 14.5px; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.set-title { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 4px 8px; }
.set-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.set-row { display: block; border-top: 1px solid var(--line); }
.set-row:first-child { border-top: 0; }
.set-row > summary, .set-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; list-style: none; }
.set-row > summary::-webkit-details-marker { display: none; }
.set-row > summary:hover, .set-link:hover { background: var(--surface-2); }
.set-ic { width: 34px; height: 34px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); display: flex; align-items: center; justify-content: center; flex: none; }
.set-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.set-text strong { font-size: 15px; font-weight: 650; }
.set-text span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-chev { color: var(--muted); transition: transform .2s; }
details[open] > summary .set-chev { transform: rotate(180deg); }
.set-body { padding: 4px 16px 18px 64px; display: grid; gap: 14px; }
.set-body .alert { align-items: center; }
.set-prefs { padding: 16px; display: grid; gap: 16px; }
.reset-link { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }

/* Checkout: dostava / preuzimanje */
.pickup-info { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); }
.pickup-info > .i { color: var(--accent); margin-top: 2px; }
#checkoutForm[data-ful="DOSTAVA"] .js-pickup-only { display: none; }
#checkoutForm[data-ful="PREUZIMANJE"] .js-delivery-only { display: none; }
.round-icon { width: 56px; height: 56px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }

/* =========================================================================
   Donji meni (mobilni)
   ========================================================================= */
.tabbar { display: none; }
@media (max-width: 760px) {
  .hide-mobile { display: none !important; }
  .nav { display: none !important; }
  .site-header .container { justify-content: space-between; }
  .header-actions { margin-left: 0; }
  .prefs-panel { position: fixed; top: calc(var(--header-h) + 8px); left: 12px; right: 12px; width: auto; }

  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; z-index: 55; left: 0; right: 0; bottom: 0;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--line);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    font-size: 11.5px; font-weight: 650; color: var(--muted); -webkit-tap-highlight-color: transparent;
  }
  .tabbar a .i { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--accent); }
  .tabbar a:active { transform: scale(.94); }
  .tab-icon { position: relative; display: inline-flex; }
  .tab-icon .badge {
    position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid var(--surface);
  }
  .toast { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px); }
  .sticky-actions { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .profile { padding-top: 20px; }
  .set-body { padding: 4px 16px 18px; }
  .chips-bar { top: var(--header-h); }
}

/* =========================================================================
   iOS 26+ "Liquid Glass": providni, zamućeni meniji (klasa ios-glass na <html>)
   ========================================================================= */
.ios-glass .site-header {
  background: rgba(250, 247, 242, .78);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
}
:root[data-theme="dark"].ios-glass .site-header { background: rgba(22, 17, 14, .76); }
@media (max-width: 760px) {
  .ios-glass .tabbar {
    left: 14px; right: 14px; bottom: calc(10px + env(safe-area-inset-bottom)); height: var(--tabbar-h); padding: 0 6px;
    border-radius: 32px; border: 1px solid rgba(255, 255, 255, .55);
    background: rgba(255, 255, 255, .68);
    -webkit-backdrop-filter: saturate(190%) blur(30px); backdrop-filter: saturate(190%) blur(30px);
    box-shadow: 0 12px 36px -10px rgba(35, 26, 22, .28), inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 -1px 0 rgba(255, 255, 255, .2);
  }
  .ios-glass .tabbar a { border-radius: 26px; margin: 6px 0; transition: background .2s, color .2s; }
  .ios-glass .tabbar a.active { background: rgba(255, 255, 255, .6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 8px -2px rgba(35, 26, 22, .18); }
  :root[data-theme="dark"].ios-glass .tabbar { background: rgba(38, 31, 27, .7); border-color: rgba(255, 255, 255, .12); box-shadow: 0 12px 36px -10px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.14); }
  :root[data-theme="dark"].ios-glass .tabbar a.active { background: rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
  .ios-glass .tab-icon .badge { border-color: transparent; }
  .ios-glass body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px); }
  .ios-glass .prefs-panel { background: rgba(255,255,255,.72); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); }
  :root[data-theme="dark"].ios-glass .prefs-panel { background: rgba(38,31,27,.7); }
}

/* =========================================================================
   Animacija pri pokretanju (mobilni, jednom po posjeti)
   ========================================================================= */
.splash { display: none; }
.show-splash body { overflow: hidden; }
.show-splash .splash {
  display: flex; position: fixed; inset: 0; z-index: 300; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--brand); color: #fff;
}
.splash-mark { width: 112px; height: 112px; overflow: visible; }
.splash .sp-plate, .splash .sp-plate2 { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sp-draw .7s cubic-bezier(.6,0,.2,1) forwards; }
.splash .sp-plate2 { animation-delay: .18s; }
.splash .sp-fork { opacity: 0; transform: translateX(-12px); animation: sp-in .5s .35s cubic-bezier(.2,.8,.2,1) forwards; }
.splash .sp-knife { opacity: 0; transform: translateX(12px); animation: sp-in .5s .45s cubic-bezier(.2,.8,.2,1) forwards; }
.splash-name { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; opacity: 0; transform: translateY(8px); animation: sp-in .45s .65s ease-out forwards; }
.splash.out { animation: sp-out .5s cubic-bezier(.7,0,.3,1) forwards; }
@keyframes sp-draw { to { stroke-dashoffset: 0; } }
@keyframes sp-in { to { opacity: 1; transform: none; } }
@keyframes sp-out { to { opacity: 0; transform: scale(1.08); visibility: hidden; } }
