/* ==========================================================================
   Stancomp – vizuelni sistem
   Topla betonska podloga, grafitni tekst, tamne površine sa rasterom
   "tehničkog crteža", jedan akcenat (terakota), svetle pločice proizvoda
   i kotne linije kao prepoznatljiv motiv.
   ========================================================================== */

/* Fontovi: koriste se sistemski fontovi – bez spoljnih servisa i dodatnih fajlova. */

:root {
    /* Paleta */
    --background: #F3F0EA;
    --surface: #FFFFFF;
    --text: #1F1D1A;
    --muted: #625D56;
    --accent: #A95432;
    --border: #DDD6CB;

    /* Izvedene nijanse iste palete */
    --bg-deep: #EAE4DA;        /* peščana traka sekcija */
    --plate: #F5F2EC;          /* podloga fotografija proizvoda */
    --border-strong: #C7BEB1;
    --input-border: #A39A8E;
    --accent-hover: #8C4429;
    --accent-tint: #F6EAE3;
    --accent-soft: #E9A987;    /* akcenat na tamnoj podlozi */
    --stock: #4E6B3C;
    --stock-tint: #EAF0E4;
    --error: #B3261E;
    --error-tint: #FBEAE8;

    /* Tamne (grafitne) površine */
    --ink: #1D1C1A;
    --ink-2: #2A2825;
    --ink-line: rgba(243, 240, 234, .14);
    --ink-text: #F3F0EA;
    --ink-muted: #B9B1A5;
    --grid-dark:
        linear-gradient(rgba(243, 240, 234, .05) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, rgba(243, 240, 234, .05) 1px, transparent 1px) 0 0 / 32px 32px;

    --shadow: 0 1px 2px rgba(60, 45, 30, .06), 0 22px 40px -28px rgba(60, 45, 30, .45);
    --shadow-panel: 0 0 40px rgba(40, 30, 20, .2);
    --radius: 8px;
    --radius-sm: 6px;

    --font-body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

    --container: 1280px;
    --gutter: clamp(16px, 4vw, 40px);
    --header-h: 72px;
    --sticky-offset: 96px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Osnova ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: var(--sticky-offset);
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

html.has-drawer { overflow: hidden; }

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

::selection { background: var(--accent-tint); color: var(--text); }
a, button, label, summary { -webkit-tap-highlight-color: rgba(169, 84, 50, .15); }
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px var(--accent-tint) inset;
    caret-color: var(--text);
}

.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.narrow { max-width: calc(820px + 2 * var(--gutter)); }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 16px; top: -100px;
    z-index: 300;
    padding: 10px 16px;
    background: var(--text);
    color: var(--surface);
    font-weight: 700;
    border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

.icon { width: 20px; height: 20px; flex: none; }

.muted { color: var(--muted); font-size: 14px; }

/* ---------- Dugmad i linkovi ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { cursor: progress; opacity: .7; }

.btn--primary { background: var(--accent); color: var(--surface); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary.is-added { background: var(--text); }

.btn--ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); background: var(--surface); }

.btn--light { background: var(--surface); color: var(--text); }
.btn--light:hover { background: var(--accent-tint); }

.btn--outline-light { background: transparent; border-color: rgba(255, 255, 255, .55); color: var(--surface); }
.btn--outline-light:hover { background: rgba(255, 255, 255, .12); border-color: var(--surface); }

.btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn--lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn--block { width: 100%; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 44px; height: 44px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
}
.icon-btn:hover { background: var(--bg-deep); }

.link-btn {
    min-height: 24px;
    padding: 0;
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.link-btn:hover { color: var(--text); }

.text-link {
    color: var(--text);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}
.text-link:hover { color: var(--accent); }

/* ---------- Unos ---------- */

.input {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    background: var(--surface);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    color: var(--text);
}
.input:hover { border-color: var(--muted); }
.input:focus, .select:focus { border-color: var(--accent); }
.input::placeholder { color: var(--muted); }

.textarea { min-height: 112px; padding: 10px 12px; resize: vertical; line-height: 1.5; }

.select {
    min-height: 40px;
    padding: 0 36px 0 12px;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F1D1A' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") right 10px center / 16px no-repeat;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    appearance: none;
    cursor: pointer;
}

.qty {
    display: inline-flex;
    height: 44px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
}
.qty__btn {
    display: grid;
    place-items: center;
    width: 40px;
    padding: 0;
    background: none;
    border: 0;
    color: var(--text);
    cursor: pointer;
}
.qty__btn:hover { background: var(--background); }
.qty__btn .icon { width: 16px; height: 16px; }
.qty__input {
    width: 56px;
    min-width: 0;
    padding: 0;
    border: 0;
    border-inline: 1px solid var(--border);
    background: none;
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
    appearance: textfield;
}
.qty__input::-webkit-inner-spin-button,
.qty__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.qty--sm { height: 40px; }
.qty--sm .qty__btn { width: 32px; }
.qty--sm .qty__input { width: 44px; }

/* ---------- Cena ---------- */

.price {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}
.price--lg { font-size: 38px; letter-spacing: -.025em; }
.price--request { font-family: var(--font-body); font-size: 16px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.price--lg.price--request { font-size: 24px; }
.price-unit { font-size: 13px; color: var(--muted); }

/* Kotna linija – mera proizvoda prikazana kao na tehničkom crtežu */
.dim {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.dim::before,
.dim::after {
    content: "";
    flex: 1 1 auto;
    min-width: 12px;
    height: 9px;
    background: linear-gradient(var(--border-strong), var(--border-strong)) center / 100% 1px no-repeat;
}
.dim::before { border-left: 1px solid var(--border-strong); }
.dim::after { border-right: 1px solid var(--border-strong); }

/* Tehnička oznaka (npr. naslovi sekcija) */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.eyebrow::before {
    content: "";
    width: 28px; height: 2px;
    background: currentColor;
}

/* ---------- Zaglavlje (jedan red) ---------- */

.site-header {
    position: relative;
    z-index: 40;
    background: var(--background);
    border-bottom: 1px solid var(--border);
}

.header-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: var(--header-h);
}

.nav-toggle,
.search-toggle { display: none; }

.logo {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: var(--text);
    text-decoration: none;
    line-height: 1;
}
.logo__img {
    display: block;
    width: auto;
    height: 40px;
}

.header-nav { flex: none; margin-left: 4px; }
.nav-list {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nav-list a {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--header-h);
    padding: 0 11px;
    color: var(--text);
    font-size: 15px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}
.nav-list a:hover { color: var(--accent); }
.nav-list a[aria-current="page"] { color: var(--accent); }
.nav-list a[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 11px; right: 11px; bottom: -1px;
    height: 3px;
    background: var(--accent);
}

/* Pretraga proizvoda – polje u zaglavlju, na manjim ekranima padajući red */
.header-search {
    flex: 1 1 320px;
    min-width: 0;
    max-width: 460px;
    margin-left: auto;
}
.header-search__field { position: relative; }
.header-search__input {
    width: 100%;
    height: 44px;
    padding: 0 52px 0 14px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 15px;
}
.header-search__input::placeholder { color: var(--muted); }
.header-search__input:hover { border-color: var(--input-border); }
.header-search__input:focus { border-color: var(--accent); }
.header-search__submit {
    position: absolute;
    top: 4px; right: 4px; bottom: 4px;
    display: grid;
    place-items: center;
    width: 40px;
    padding: 0;
    background: var(--ink);
    border: 0;
    border-radius: 4px;
    color: var(--surface);
    cursor: pointer;
    transition: background-color .15s;
}
.header-search__submit:hover { background: var(--accent); }
.header-search__submit .icon { width: 18px; height: 18px; }

.header-actions {
    flex: none;
    display: flex;
    align-items: center;
    gap: 12px;
}
.search-toggle[aria-expanded="true"] { background: var(--bg-deep); color: var(--accent); }

.cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px;
    background: var(--ink);
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--surface);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .15s;
}
.cart-btn:hover { background: var(--accent); }
.cart-count {
    display: inline-grid;
    place-items: center;
    min-width: 22px; height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: var(--accent);
    color: var(--surface);
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.cart-btn:hover .cart-count { background: var(--ink); }

@media (min-width: 900px) {
    .site-header { position: sticky; top: 0; }
}

@media (max-width: 1099px) {
    .header-bar { gap: 12px; }
    .nav-list a { padding: 0 9px; font-size: 14.5px; }
    .nav-list a[aria-current="page"]::after { left: 9px; right: 9px; }
    .header-actions { margin-left: auto; gap: 8px; }
    .search-toggle { display: inline-grid; }
    .header-search {
        position: absolute;
        top: 100%; left: 0; right: 0;
        display: none;
        max-width: none;
        margin: 0;
        padding: 12px var(--gutter) 16px;
        background: var(--background);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 16px 24px -18px rgba(40, 30, 20, .35);
    }
    .header-search.is-open { display: block; }
    .header-search__field { max-width: 720px; margin-inline: auto; }
    .header-search__input { height: 48px; font-size: 16px; }
    .header-search__submit { width: 44px; }
}

@media (max-width: 899px) {
    :root { --sticky-offset: 16px; --header-h: 64px; }
    .header-bar { gap: 4px; }
    .nav-toggle { display: inline-grid; margin-left: -10px; }
    .logo__img { height: 36px; }
    .header-nav { display: none; }
    .header-actions { gap: 4px; }
    .cart-btn { height: 42px; margin-left: 4px; padding: 0 12px; font-size: 14px; }
}

@media (max-width: 379px) {
    .cart-btn__label { display: none; }
}

/* ---------- Bočni paneli (meni, porudžbina, filteri) ---------- */

.drawer-layer {
    position: fixed;
    inset: 0;
    z-index: 100;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear .28s;
}
.drawer-layer.is-open {
    visibility: visible;
    pointer-events: auto;
    transition: none;
}
.drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(29, 28, 26, .5);
    opacity: 0;
    transition: opacity .25s var(--ease);
}
.is-open > .drawer-backdrop { opacity: 1; }

.drawer {
    position: absolute;
    top: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(420px, 92vw);
    background: var(--surface);
    box-shadow: var(--shadow-panel);
    transition: transform .28s var(--ease);
}
.drawer:focus { outline: none; }
.drawer--left { left: 0; transform: translateX(-100%); }
.drawer--right { right: 0; transform: translateX(100%); }
.is-open > .drawer { transform: none; }

.drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 12px 24px;
    border-bottom: 1px solid var(--border);
}
.drawer__title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.01em;
}
.drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px 32px;
}

.drawer-nav, .drawer-cats { margin: 0; padding: 0; list-style: none; }
.drawer-nav a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 19px;
    font-weight: 700;
    text-decoration: none;
}
.drawer-nav a[aria-current="page"] { color: var(--accent); }
.drawer-nav__label {
    margin: 28px 0 4px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}
.drawer-cats a { display: block; padding: 8px 0; color: var(--text); text-decoration: none; }
.drawer-cats a:hover { color: var(--accent); }
.drawer-contact {
    display: grid;
    gap: 10px;
    margin-top: 32px;
    padding: 16px;
    background: var(--background);
    border-radius: var(--radius-sm);
}
.drawer-contact p { display: flex; align-items: center; gap: 10px; margin: 0; }
.drawer-contact .icon { color: var(--muted); }
.drawer-contact__note { color: var(--muted); font-size: 14px; font-weight: 600; }
.drawer-contact .drawer-contact__note .icon { color: var(--accent); }
.drawer-contact .btn { margin-top: 4px; }

.mini-empty p { margin: 8px 0 20px; }
.mini-lines { margin: 0; padding: 0; list-style: none; }
.mini-line {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.mini-line img {
    width: 56px; height: 56px;
    padding: 4px;
    object-fit: contain;
    background: var(--plate);
    border-radius: var(--radius-sm);
    mix-blend-mode: multiply;
}
.mini-line a { color: var(--text); font-size: 15px; font-weight: 700; line-height: 1.3; text-decoration: none; }
.mini-line a:hover { text-decoration: underline; }
.mini-line p { margin: 4px 0 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.mini-total {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0 4px;
    font-variant-numeric: tabular-nums;
}
.mini-note { margin: 4px 0; color: var(--muted); font-size: 13px; }
.mini-actions { display: grid; gap: 8px; margin-top: 20px; }

/* ---------- Uvodni deo ---------- */

.hero { padding-block: 28px 56px; }

.hero__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: center;
    gap: 32px;
}
.hero__copy { grid-column: 1 / span 5; }
.hero__board { grid-column: 6 / span 7; }

.hero__title {
    margin: 0 0 18px;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 1.35rem + 2.8vw, 4rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
}
.hero__lead {
    max-width: 34em;
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 18px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__facts {
    display: grid;
    gap: 8px;
    margin: 28px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--border-strong);
    list-style: none;
    font-size: 15px;
    font-weight: 600;
}
.hero__facts li { display: flex; align-items: flex-start; gap: 10px; }
.hero__facts .icon {
    width: 22px; height: 22px;
    padding: 3px;
    border-radius: 50%;
    background: var(--accent-tint);
    color: var(--accent);
}

/* Tabla materijala: tamna podloga sa rasterom, svetle pločice proizvoda */
.hero__board {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-areas: "a b" "a c" "d d";
    gap: 10px;
    padding: 36px 16px 16px;
    background: var(--grid-dark), var(--ink);
    border-radius: var(--radius);
}
/* Lenjir – podela na vrhu table */
.hero__board::before {
    content: "";
    position: absolute;
    top: 13px; left: 16px; right: 16px;
    height: 12px;
    background:
        repeating-linear-gradient(90deg, rgba(243, 240, 234, .38) 0 1px, transparent 1px 16px) left bottom / 100% 5px no-repeat,
        repeating-linear-gradient(90deg, rgba(243, 240, 234, .55) 0 1px, transparent 1px 80px) left bottom / 100% 12px no-repeat,
        linear-gradient(rgba(243, 240, 234, .38), rgba(243, 240, 234, .38)) left bottom / 100% 1px no-repeat;
}

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 14px 12px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    transition: transform .2s var(--ease), box-shadow .2s;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 20px 30px -18px rgba(0, 0, 0, .7); }
.tile:hover .tile__name { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.tile--a { grid-area: a; }
.tile--b { grid-area: b; }
.tile--c { grid-area: c; }
.tile--d { grid-area: d; }

.tile__img {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
}
.tile__img img { width: 100%; max-height: 104px; object-fit: contain; }
.tile--a .tile__img img { max-height: 248px; }

.tile__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 12px;
}
.tile__name { font-size: 15px; font-weight: 700; }
.tile__price { color: var(--accent); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile__price small { color: var(--muted); font-size: 12px; font-weight: 600; }

.tile--d {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    gap: 8px 20px;
}
.tile--d .tile__img { grid-row: 1 / 3; }
.tile--d .tile__img img { max-height: 76px; }
.tile--d .dim { align-self: end; }
.tile--d .tile__meta { flex-direction: column; align-items: flex-start; }

@media (max-width: 1279px) {
    .hero__copy { grid-column: 1 / span 6; }
    .hero__board { grid-column: 7 / span 6; gap: 8px; padding: 34px 12px 12px; }
    .hero__board::before { left: 12px; right: 12px; }
    .tile { padding: 12px; }
    .tile--a .tile__img img { max-height: 190px; }
    .tile__img img { max-height: 84px; }
    .tile--d .tile__img img { max-height: 64px; }
}

@media (max-width: 1000px) {
    .hero { padding-block: 24px 48px; }
    .hero__grid { grid-template-columns: minmax(0, 1fr); }
    .hero__copy, .hero__board { grid-column: 1 / -1; }
    .hero__title { max-width: 14em; }
    .hero__facts { margin-top: 22px; }
    .tile--a .tile__img img { max-height: 220px; }
    .tile__img img { max-height: 96px; }
}

@media (max-width: 560px) {
    .hero__lead { font-size: 17px; }
    .hero__actions .btn { flex: 1 1 100%; }
    .hero__board { grid-template-areas: "a a" "b c"; gap: 8px; padding: 32px 8px 8px; }
    .hero__board::before { top: 11px; left: 10px; right: 10px; }
    .tile { padding: 10px; }
    .tile--a .tile__img img { max-height: 160px; }
    .tile__img img { max-height: 88px; }
    .tile__meta { flex-direction: column; align-items: flex-start; }
    .tile--d { display: none; }
    .dim { font-size: 11px; }
}

/* ---------- Sekcije ---------- */

.section { padding-block: 88px; }
.section--tight { padding-block: 48px 88px; }
.section--band {
    background: var(--bg-deep);
    border-block: 1px solid var(--border);
}
.section--sand { background: var(--bg-deep); }

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 32px;
    margin-bottom: 36px;
}
.section-head--stack { display: block; max-width: 760px; }

.section-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 1.2rem + 2vw, 2.75rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.03em;
}
.section-lead { max-width: 40em; margin: 12px 0 0; color: var(--muted); font-size: 17px; }

@media (max-width: 640px) {
    .section { padding-block: 60px; }
    .section--tight { padding-block: 32px 60px; }
}

/* ---------- Kategorije ---------- */

.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cat__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s;
}
.cat__link:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }

/* Ista podloga i odnos stranica kao fotografije na kartici proizvoda (data-fit u main.js) */
.cat__img {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--plate);
    border-bottom: 1px solid var(--border);
}
.cat__img img {
    position: absolute;
    inset: 14px;
    width: calc(100% - 28px); height: calc(100% - 28px);
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform .35s var(--ease);
}
.cat__link:hover .cat__img img { transform: scale(1.04); }

.cat__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px 16px; }
.cat__name {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
}
.cat__name::after {
    content: "";
    flex: none;
    width: 18px; height: 18px;
    background: var(--accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity .2s, transform .2s var(--ease);
}
.cat__link:hover .cat__name::after,
.cat__link:focus-visible .cat__name::after { opacity: 1; transform: none; }

.cat__meta { color: var(--muted); font-size: 14px; font-weight: 600; }
.cat__meta span { white-space: nowrap; }
.cat__subs {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Poslednje polje u mreži vodi na ceo katalog */
.cat--all .cat__link { justify-content: center; background: var(--background); }
.cat--all .cat__text { padding: 24px; }

@media (max-width: 1000px) {
    .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .cat__img img { inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
    .cat__text { padding: 12px; }
    .cat__name { font-size: 17px; }
    .cat__meta, .cat__subs { font-size: 13px; }
    .cat--all .cat__text { padding: 16px 12px; }
}

/* ---------- Kartica proizvoda ---------- */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
    gap: 16px;
}
.product-grid--shop { grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); }
@media (min-width: 1100px) {
    #featured-grid, .pdp ~ .section .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .2s, box-shadow .2s;
    container-type: inline-size;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }

/* Ista podloga i isti odnos stranica za sve fotografije, preko cele širine kartice */
.card__media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    padding: 14px;
    overflow: hidden;
    background: var(--plate);
    border-bottom: 1px solid var(--border);
}
.card__media img {
    width: 100%; height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform .35s var(--ease);
}
.card:hover .card__media img { transform: scale(1.04); }

.card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px 16px;
}
.card__title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; overflow-wrap: break-word; hyphens: auto; }
.card__title a { color: var(--text); text-decoration: none; }
.card__title a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.card__spec {
    margin: 2px 0 14px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.card__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 8px;
    margin-top: auto;
}

.card__buy {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    margin-top: 12px;
}

@container (max-width: 239px) {
    .card__body { padding-inline: 12px; }
}

/* Uska kartica: količina i dugme jedno ispod drugog */
@container (max-width: 209px) {
    .card__body { padding: 12px; }
    .card__buy { grid-template-columns: minmax(0, 1fr); }
    .card__buy .qty { width: 100%; }
    .card__buy .qty__btn { width: 44px; }
    .card__buy .qty__input { flex: 1; width: auto; }
}

@media (max-width: 560px) {
    .product-grid, .product-grid--shop { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .card__media { padding: 8px; }
    .card__title { font-size: 15px; }
    .price { font-size: 18px; }
}

@media (max-width: 359px) {
    .product-grid, .product-grid--shop { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Kako funkcioniše porudžbina ---------- */

.process__head .section-head { margin-bottom: 0; }

.steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    margin: 56px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--border-strong);
    counter-reset: step;
}
.step {
    position: relative;
    padding: 30px 28px 0 0;
    counter-increment: step;
}
.step::before {
    content: counter(step);
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.step::after {
    content: "";
    position: absolute;
    top: -6px; left: 0;
    width: 11px; height: 11px;
    background: var(--background);
    border: 1.5px solid var(--border-strong);
    border-radius: 50%;
}
.step:last-child::before { color: var(--accent); }
.step:last-child::after { background: var(--accent); border-color: var(--accent); }
.step__title { margin: 0 0 8px; font-size: 17px; line-height: 1.3; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

@media (max-width: 1000px) {
    .steps { grid-template-columns: minmax(0, 1fr); margin-top: 40px; border-top: 0; border-left: 1px solid var(--border-strong); }
    .step { padding: 0 0 30px 32px; }
    .step:last-child { padding-bottom: 0; }
    .step::before { margin-bottom: 8px; font-size: 24px; }
    .step::after { top: 4px; left: -6px; }
}

/* ---------- O nama / prednosti ---------- */

.about {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 40px 24px;
}
.about__intro { grid-column: 1 / span 5; }
.about__intro .section-lead { font-size: 19px; color: var(--text); }

.about__materials {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}
.about__materials li {
    aspect-ratio: 1;
    padding: 8px;
    background: var(--bg-deep);
    border-radius: var(--radius-sm);
}
.about__materials li { overflow: hidden; }
.about__materials img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

.advantages {
    grid-column: 7 / span 6;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 32px;
    margin: 0;
}
.advantage {
    padding-top: 18px;
    border-top: 2px solid var(--text);
}
.advantage dt {
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.01em;
}
.advantage dd { margin: 0; color: var(--muted); font-size: 15px; }

@media (max-width: 1000px) {
    .about__intro, .advantages { grid-column: 1 / -1; }
    .about__materials { max-width: 520px; }
}
@media (max-width: 640px) {
    .advantages { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

/* ---------- Kontakt poziv ---------- */

.contact-cta { padding-block: 0 88px; }
.contact-cta :focus-visible { outline-color: var(--surface); }
.contact-cta__panel {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: center;
    gap: 32px 24px;
    padding: 52px 56px;
    background: var(--accent);
    border-radius: 12px;
    color: var(--surface);
}
.contact-cta__main { grid-column: 1 / span 6; }
.contact-cta__list { grid-column: 8 / span 5; }
.contact-cta__title {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-size: clamp(2rem, 1.3rem + 2.4vw, 3.25rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.035em;
}
.contact-cta__lead { max-width: 34em; margin: 0 0 28px; color: #FBEDE5; font-size: 17px; }
.contact-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-cta__list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.contact-cta__list li {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
    padding: 14px 0;
}
.contact-cta__list li + li { border-top: 1px solid rgba(255, 255, 255, .18); }
.contact-cta__label { color: #FBEDE5; font-size: 14px; font-weight: 600; }
.contact-cta__value { font-weight: 700; overflow-wrap: anywhere; }
.contact-cta__value a { color: var(--surface); }
.contact-cta__facts li { display: flex; align-items: flex-start; gap: 12px; font-weight: 600; }
.contact-cta__facts .icon { margin-top: 2px; color: #FBEDE5; }

@media (max-width: 900px) {
    .contact-cta__main, .contact-cta__list { grid-column: 1 / -1; }
    .contact-cta__panel { padding: 40px 32px; }
}
@media (max-width: 560px) {
    .contact-cta__panel { padding: 32px 20px; border-radius: var(--radius); }
    .contact-cta__actions .btn { flex: 1 1 100%; }
    .contact-cta__list li { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .contact-cta__facts li { gap: 10px; padding: 12px 0; }
}

/* ---------- Podnožje ---------- */

.site-footer {
    padding-top: 72px;
    background: var(--ink);
    color: var(--ink-text);
}
.site-footer :focus-visible { outline-color: var(--ink-text); }
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2.6fr));
    gap: 40px 32px;
}
.site-footer .logo { color: var(--ink-text); }
.logo--footer { margin-bottom: 18px; }
.logo--footer .logo__img { height: 48px; }
.footer-text { max-width: 36em; margin: 0 0 16px; color: var(--ink-muted); font-size: 15px; }
.footer-contact, .footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-contact {
    display: grid;
    gap: 2px;
    margin-top: 20px;
}
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; padding: 4px 0; font-size: 15px; }
.footer-contact .icon { margin-top: 2px; color: var(--accent-soft); }
.footer-contact a { color: var(--ink-text); text-decoration: underline; text-decoration-color: var(--accent-soft); text-underline-offset: 3px; }
.footer-contact a:hover { color: var(--accent-soft); }
.footer-title {
    margin: 0 0 12px;
    color: var(--ink-text);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
}
.footer-text + .footer-title, .footer-col nav + nav { margin-top: 24px; }
.footer-col li { padding: 4px 0; }
.footer-col a { color: var(--ink-muted); font-size: 15px; text-decoration: none; }
.footer-col a:hover { color: var(--ink-text); text-decoration: underline; text-decoration-color: var(--accent-soft); }
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 32px;
    margin-top: 56px;
    padding-block: 22px;
    border-top: 1px solid var(--ink-line);
    color: var(--ink-muted);
    font-size: 14px;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--ink-muted); }
.footer-bottom a:hover { color: var(--ink-text); }

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-company { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .site-footer { padding-top: 56px; }
    .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Unutrašnje strane ---------- */

.page { padding-block: 0 88px; }

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 14px;
}
.breadcrumbs li + li::before { content: "/"; margin: 0 8px; color: var(--border-strong); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }

/* Traka sa naslovom strane – peščana podloga preko cele širine */
.page > .container > .breadcrumbs { padding-block: 24px 20px; }
.page > .container > .breadcrumbs ol { margin-bottom: 0; }
#product-root > .breadcrumbs { padding-bottom: 0; }
#product-root > .breadcrumbs ol { margin-bottom: 24px; }
.page > .container > .breadcrumbs,
.page > .container > .page-head {
    background: var(--bg-deep);
    box-shadow: 0 0 0 100vmax var(--bg-deep);
    clip-path: inset(0 -100vmax);
}
#product-root > .breadcrumbs { background: none; box-shadow: none; clip-path: none; }

.page-head { max-width: 760px; margin-bottom: 32px; }
.page > .container > .page-head { max-width: none; margin-bottom: 32px; padding-bottom: 32px; }
.page > .container > .page-head > * { max-width: 760px; }
.page-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 1.5rem + 2.2vw, 3.25rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.035em;
}
.page-lead { margin: 12px 0 0; color: var(--muted); font-size: 17px; }

.panel {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 16px;
}
.panel__title {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.015em;
}
.panel__head .panel__title { margin: 0; }
.panel__hint { margin: 0; color: var(--muted); font-size: 14px; }

@media (max-width: 560px) {
    .panel { padding: 20px 16px; }
}

.empty-state {
    padding: 40px 32px;
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
}
.empty-state p { max-width: 56ch; margin: 8px 0 0; color: var(--muted); }
.empty-state__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.015em;
}
.empty-state__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
#product-root.narrow > .empty-state { margin-top: 40px; }

.notice {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--accent-tint);
    border-radius: var(--radius-sm);
    font-size: 15px;
}
.notice > .icon { margin-top: 2px; color: var(--accent); }
.notice ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.notice p { margin: 0; }
.notice--error { margin-bottom: 24px; background: var(--error-tint); }
.notice--error > .icon { color: var(--error); }

/* ---------- Prodavnica ---------- */

.shop {
    display: grid;
    grid-template-columns: 256px minmax(0, 1fr);
    align-items: start;
    gap: 32px;
}

.filters__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.filters__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.01em;
}

.filter-group {
    min-width: 0;
    margin: 0;
    padding: 16px 0;
    border: 0;
    border-top: 1px solid var(--border);
}
.filter-group__label { display: block; margin-bottom: 8px; padding: 0; font-size: 14px; font-weight: 800; }
.filter-group__hint { margin: 6px 0 0 28px; color: var(--muted); font-size: 13px; }

.cat-filter, .cat-filter__sub { margin: 0; padding: 0; list-style: none; }
.cat-filter > li > .choice .choice__text,
.cat-filter__row .choice__text { font-weight: 600; }
.cat-filter__row { display: flex; align-items: center; gap: 2px; }
.cat-filter__row > .choice { flex: 1; min-width: 0; }
.cat-filter__toggle {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px; height: 32px;
    margin-right: -6px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--muted);
    cursor: pointer;
}
.cat-filter__toggle:hover { background: var(--bg-deep); color: var(--text); }
.cat-filter__toggle .icon { width: 16px; height: 16px; }
.cat-filter__toggle[aria-expanded="true"] .icon { rotate: 180deg; }
.cat-filter__sub { padding-left: 28px; }
.cat-filter__sub .choice { font-size: 14px; }

.choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 15px;
    line-height: 1.4;
    cursor: pointer;
}
.choice input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.choice__text { flex: 1; }
.choice:hover .choice__text { color: var(--accent); }
.choice input:checked ~ .choice__text { font-weight: 700; }
.choice__count {
    min-width: 26px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--background);
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.price-range__label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; }

.filters__actions { display: grid; gap: 8px; padding-top: 20px; border-top: 1px solid var(--border); }

/* Traka iznad proizvoda: pretraga, sortiranje i broj rezultata */
.toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "search sort" "count count";
    align-items: center;
    gap: 12px 16px;
    margin-bottom: 18px;
}
.shop-search { grid-area: search; position: relative; max-width: 560px; }
.shop-search > .icon {
    position: absolute;
    top: 50%; left: 14px;
    translate: 0 -50%;
    color: var(--muted);
    pointer-events: none;
}
.shop-search__input { min-height: 48px; padding-left: 44px; border-color: var(--border-strong); font-size: 16px; }
.filters-toggle { grid-area: filters; }
.toolbar__count { grid-area: count; margin: 0; color: var(--muted); font-size: 15px; }
.toolbar__count strong { color: var(--text); }
.toolbar__sort { grid-area: sort; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.toolbar__sort .select { min-height: 44px; }

.badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px; height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--surface);
    font-size: 12px;
    font-weight: 800;
}

.filters-toggle__count { margin-left: -4px; color: var(--accent); font-variant-numeric: tabular-nums; }

/* Aktivni filteri iznad proizvoda */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: -4px 0 20px;
}
.active-filters__label { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.active-filters__list { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; margin: 0; padding: 0; list-style: none; }
.active-filters__list li { min-width: 0; max-width: 100%; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-height: 36px;
    padding: 0 8px 0 12px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip__key { color: var(--muted); font-weight: 500; }
.chip .icon { width: 16px; height: 16px; color: var(--muted); }
.chip:hover .icon { color: var(--accent); }
.active-filters__clear { min-height: 36px; color: var(--accent); font-weight: 700; }
.active-filters__clear:hover { color: var(--accent-hover); }
.toolbar__count:focus { outline: none; }

.results .empty-state { margin-top: 8px; }

/* Na većim ekranima filteri su obična kolona – bez sopstvenog skrolovanja */
@media (min-width: 900px) {
    .filters-layer { display: contents; }
    .filters-layer .drawer-backdrop,
    .filters__close,
    .filters-toggle { display: none; }
    .filters {
        padding: 18px 20px 4px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
    }
    .js .filters__apply { display: none; }
    .js .filters__actions { padding-bottom: 16px; }
}

@media (max-width: 1100px) {
    .shop { grid-template-columns: 228px minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 899px) {
    .shop { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .filters-layer {
        position: fixed;
        inset: 0;
        z-index: 100;
        visibility: hidden;
        pointer-events: none;
        transition: visibility 0s linear .28s;
    }
    .filters-layer.is-open { visibility: visible; pointer-events: auto; transition: none; }
    .filters {
        position: absolute;
        top: 0; bottom: 0; left: 0;
        width: min(380px, 92vw);
        overflow-y: auto;
        padding: 12px 20px 24px;
        background: var(--surface);
        box-shadow: var(--shadow-panel);
        transform: translateX(-100%);
        transition: transform .28s var(--ease);
    }
    .filters:focus { outline: none; }
    .filters-layer.is-open .filters { transform: none; }
    .filters__actions { position: sticky; bottom: -24px; margin-inline: -20px; padding: 16px 20px; background: var(--surface); }
    .toolbar {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas: "search search" "filters sort" "count count";
    }
    .shop-search { max-width: none; }
    .toolbar__sort { justify-self: end; min-width: 0; }
    /* Veće površine za dodir u panelu filtera */
    .filters .choice { align-items: center; min-height: 44px; padding-block: 8px; }
    .filters .choice input { margin: 0; }
    .cat-filter__toggle { width: 44px; height: 44px; margin-right: -10px; }
    .chip, .active-filters__clear { min-height: 40px; }
    .active-filters { margin-top: 0; }
    .active-filters__label { flex-basis: 100%; }
}

@media (max-width: 560px) {
    .toolbar { gap: 10px; }
    .toolbar__sort label {
        position: absolute;
        width: 1px; height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .toolbar__sort .select { max-width: 200px; }
}

/* ---------- Strana proizvoda ---------- */

.pdp {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
    gap: 40px 24px;
}
.pdp__gallery { grid-column: 1 / span 6; }
.pdp__info { grid-column: 7 / span 6; padding-left: clamp(0px, 2.5vw, 40px); }

.gallery-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 24px 24px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.gallery-main__img { display: block; aspect-ratio: 5 / 4; overflow: hidden; }
.gallery-main__img img { width: 100%; height: 100%; object-fit: contain; }

.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.gallery-thumb {
    width: 72px; height: 72px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.gallery-thumb:hover { border-color: var(--border-strong); }
.gallery-thumb[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }

.pdp__cat { margin: 0 0 10px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.pdp__cat a { color: var(--accent); text-decoration: none; }
.pdp__cat a:hover { color: var(--accent-hover); text-decoration: underline; }
.pdp__cat span { margin: 0 4px; color: var(--border-strong); }

.pdp__title {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: clamp(2rem, 1.5rem + 1.6vw, 2.9rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -.035em;
}
.pdp__excerpt { margin: 0 0 20px; color: var(--muted); font-size: 17px; }

.pdp__buybox {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.pdp__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.key-facts { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.key-facts__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.key-facts__title { margin: 0; font-size: 15px; font-weight: 800; }
.key-facts__more { color: var(--text); font-size: 14px; font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.key-facts__more:hover { color: var(--accent); }
.key-facts__list { margin: 0; }
.key-facts__item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: 6px 0; font-size: 15px; }
.key-facts__item + .key-facts__item { border-top: 1px solid var(--border); }
.key-facts dt { color: var(--muted); }
.key-facts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.pdp__variants { margin: 16px 0 0; font-size: 15px; font-weight: 600; }
.pdp__variants span { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; font-weight: 500; }
.pdp__note { display: flex; gap: 8px; margin: 12px 0 0; font-size: 15px; font-weight: 700; }
.pdp__note .icon { margin-top: 2px; color: var(--accent); }

.pdp__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 22px 0 20px; }
.pdp__qty-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.pdp__form .qty { height: 52px; }
.pdp__form .qty__btn { width: 48px; }
.pdp__form .qty__input { width: 72px; font-size: 17px; }
.pdp__add { flex: 1 1 220px; }

.pdp__details {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 32px 24px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}
.pdp__details > :first-child { grid-column: 1 / span 6; }
.pdp__details > :nth-child(2) { grid-column: 7 / span 6; padding-left: clamp(0px, 2.5vw, 40px); }
.pdp__section-title {
    margin: 0 0 16px;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.015em;
}
.pdp__section p { max-width: 62ch; margin: 0 0 12px; }

.specs { margin: 0; }
.specs__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 16px;
    padding: 10px 12px;
    font-size: 15px;
}
.specs__row:nth-child(odd) { background: var(--bg-deep); border-radius: 4px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
    .pdp { gap: 24px; }
    .pdp__gallery, .pdp__info { grid-column: 1 / -1; padding-left: 0; }
    .pdp__details > :first-child,
    .pdp__details > :nth-child(2) { grid-column: 1 / -1; padding-left: 0; }
    .pdp__details { padding-top: 32px; }
    .gallery-main { padding: 16px 16px 12px; }
    .gallery-main__img { aspect-ratio: 4 / 3; max-height: 340px; }
}
@media (max-width: 560px) {
    .pdp__buybox { padding: 18px 16px; }
    .pdp__qty { flex: 1 1 100%; }
    .pdp__form .qty { display: flex; width: 100%; }
    .pdp__form .qty__input { flex: 1; }
    .pdp__add { flex-basis: 100%; }
    .gallery-main__img { max-height: 260px; }
}

/* ---------- Porudžbina ---------- */

.checkout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 24px 32px;
}
.checkout__main { display: grid; gap: 24px; min-width: 0; }
.checkout__summary { position: sticky; top: var(--sticky-offset); }

.lines { margin: 0; padding: 0; list-style: none; }
.line {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr) auto auto;
    grid-template-areas: "img info qty total" "img remove qty total";
    align-items: center;
    gap: 4px 20px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
}
.line__img { grid-area: img; }
.line__img img {
    width: 80px; height: 80px;
    padding: 6px;
    object-fit: contain;
    background: var(--plate);
    border-radius: var(--radius-sm);
    mix-blend-mode: multiply;
}
.line__info { grid-area: info; min-width: 0; }
.line__cat { margin: 0; color: var(--accent); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.line__name { margin: 2px 0; font-size: 16px; line-height: 1.3; }
.line__name a { color: var(--text); text-decoration: none; }
.line__name a:hover { text-decoration: underline; }
.line__unit { margin: 0; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.line__qty { grid-area: qty; display: flex; align-items: center; gap: 8px; }
.line__unit-short { min-width: 32px; color: var(--muted); font-size: 14px; }
.line__total {
    grid-area: total;
    min-width: 110px;
    margin: 0;
    font-weight: 800;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.line__remove { grid-area: remove; justify-self: start; }

.summary .panel__title { margin-bottom: 8px; }
.summary__list { margin: 0; }
.summary__list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}
.summary__list dt { color: var(--muted); }
.summary__list dd { margin: 0; font-weight: 800; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.summary__unpriced { margin: 12px 0 0; font-size: 14px; }
.summary__notes { display: grid; gap: 8px; margin: 20px 0; padding: 14px; list-style: none; font-size: 14px; background: var(--background); border-radius: var(--radius-sm); }
.summary__notes li { display: flex; gap: 8px; }
.summary__notes .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--accent); }
.summary {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

@media (max-width: 1000px) {
    .checkout { grid-template-columns: minmax(0, 1fr); }
    .checkout__main { display: contents; }
    .checkout__main > :first-child { order: 1; }
    .checkout__summary { order: 2; position: static; }
    .checkout__main > :last-child { order: 3; }
}

@media (max-width: 640px) {
    .line {
        grid-template-columns: 64px minmax(0, 1fr) auto;
        grid-template-areas: "img info info" "img qty total" "img remove remove";
        gap: 8px 12px;
    }
    .line__img img { width: 64px; height: 64px; }
    .line__total { min-width: 0; }
}

/* ---------- Forme ---------- */

.form-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px 16px;
}
.field { grid-column: span 3; min-width: 0; margin: 0; padding: 0; border: 0; }
.field--full { grid-column: 1 / -1; }
.field--wide { grid-column: span 4; }
.field--wide + .field { grid-column: span 2; }

.field__label { display: block; margin-bottom: 6px; padding: 0; font-size: 15px; font-weight: 700; }
.req { color: var(--accent); }
.field__hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.field__error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 6px 0 0;
    color: var(--error);
    font-size: 14px;
    font-weight: 700;
}
.field__error::before {
    content: "";
    flex: none;
    width: 16px; height: 16px;
    margin-top: 2px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.4v.1'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.4v.1'/%3E%3C/svg%3E") center / contain no-repeat;
}
.input[aria-invalid="true"] { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }

.pay-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pay-option {
    display: flex;
    gap: 10px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.pay-option:hover { border-color: var(--muted); }
.pay-option input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.pay-option:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); box-shadow: inset 0 0 0 1px var(--accent); }
.pay-option:has(input:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; }
.pay-option__label { display: block; font-size: 15px; font-weight: 800; }
.pay-option__hint { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.is-invalid .pay-option { border-color: var(--error); }

.order-form__submit { display: grid; justify-items: start; gap: 12px; margin-top: 28px; }
.order-form__legal { max-width: 56ch; margin: 0; color: var(--muted); font-size: 13px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-alert {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--error-tint);
    border: 1px solid var(--error);
    border-radius: var(--radius-sm);
}
.form-alert:focus { outline: 2px solid var(--error); outline-offset: 2px; }
.form-alert__title { display: flex; gap: 8px; margin: 0; color: var(--error); font-weight: 800; }
.form-alert__title .icon { margin-top: 2px; }
.form-alert ul { display: grid; gap: 2px; margin: 8px 0 0 28px; padding: 0; }
.form-alert a { color: var(--error); font-weight: 600; }

.form-success { padding: 20px; background: var(--stock-tint); border: 1px solid var(--border); border-left: 4px solid var(--stock); border-radius: var(--radius-sm); }
.form-success__title .icon { color: var(--stock); }
.form-success:focus { outline: 2px solid var(--text); outline-offset: 2px; }
.form-success__title { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.form-success p:last-child { margin: 0; }

@media (max-width: 800px) {
    .pay-options { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .field, .field--wide, .field--wide + .field { grid-column: 1 / -1; }
    .order-form__submit .btn { width: 100%; }
}

/* ---------- Potvrda ---------- */

.success { display: grid; gap: 24px; padding-top: 48px; }
.success__mark {
    display: grid;
    place-items: center;
    width: 56px; height: 56px;
    background: var(--stock);
    border-radius: var(--radius-sm);
    color: var(--surface);
}
.success__mark .icon { width: 28px; height: 28px; }
.success .page-lead { margin: 0; }
.success__ref { color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.success .empty-state__actions { margin-top: 0; }

.next-steps { display: grid; gap: 8px; margin: 0; padding-left: 20px; }

.table-wrap { overflow-x: auto; }
.order-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.order-table th, .order-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.order-table th:not(:first-child), .order-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.order-table thead th { color: var(--muted); font-size: 13px; font-weight: 700; }
.order-table tfoot th { text-align: right; }
.order-table tfoot td { font-weight: 800; }

/* ---------- Kontakt ---------- */

.contact {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    gap: 24px;
}
.contact__info { display: grid; gap: 24px; }
.contact-list { margin: 0; }
.contact-list div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
}
/* Linija samo između vidljivih redova (prazni podaci o firmi su sakriveni) */
.contact-list div:not([hidden]) ~ div { border-top: 1px solid var(--border); }
.contact-list dt { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.contact-list dt .icon { color: var(--accent); }
.contact-list dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.contact-list__sub { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; font-weight: 400; }
.plain-list { display: grid; gap: 6px; margin: 0; padding-left: 18px; }

.map { margin-top: 24px; }
.map__frame {
    position: relative;
    aspect-ratio: 16 / 6;
    overflow: hidden;
    background: var(--plate);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.map__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.plain-list li::marker { color: var(--accent); }

@media (max-width: 900px) {
    .contact { grid-template-columns: minmax(0, 1fr); }
    .map__frame { aspect-ratio: 4 / 3; }
    .contact__form { order: -1; }
}
@media (max-width: 480px) {
    .contact-list div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* ---------- Tekst strane (politika privatnosti) ---------- */

.prose { max-width: 70ch; }
.prose h2 { margin: 36px 0 8px; font-size: 20px; letter-spacing: -.01em; }
.prose p, .prose li { color: var(--text); }

/* ---------- Obaveštenje o dodavanju ---------- */

.toast {
    position: fixed;
    left: 50%; bottom: 24px;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: 10px 10px 10px 16px;
    background: var(--ink);
    border-radius: var(--radius);
    box-shadow: 0 16px 36px -14px rgba(40, 30, 20, .55);
    color: var(--surface);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 12px);
    transition: opacity .2s, transform .2s var(--ease), visibility 0s linear .2s;
}
.toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity .2s, transform .2s var(--ease);
}
.toast__icon { color: var(--accent-soft); }
.toast__text { margin: 0; font-size: 15px; }
.toast__link {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: var(--radius-sm);
    color: var(--surface);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.toast__link:hover { background: rgba(255, 255, 255, .1); }
.toast :focus-visible { outline-color: var(--surface); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
