/* ==========================================================================
   Save a Dream – stil sajta
   Mobile-first. Boje i mjere su u varijablama ispod.
   ========================================================================== */

/* ---------- Font: Manrope (lokalno, assets/fonts) ----------
   Fontsource @fontsource/manrope 5.3.0, samo težine koje koristimo (400, 600, 700, 800),
   subseti latin + latin-ext (č, ć, š, ž, đ). Licenca: SIL Open Font License 1.1 (assets/fonts/OFL.txt). */

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/manrope-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+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/manrope-latin-ext-400-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/manrope-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+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/manrope-latin-ext-600-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/manrope-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+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/manrope-latin-ext-700-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("../fonts/manrope-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+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("../fonts/manrope-latin-ext-800-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
    --brown: #5C4636;
    --brown-dark: #4a382b;
    --brown-warm: #A88B74;
    --cream: #F7F0E6;
    --beige: #EEE6DA;
    --green: #B9C7A5;
    --green-dark: #8FA07E;
    --white: #fffdf9;
    --text: #3f3128;
    --muted: #7a6a5d;
    --line: #e0d5c6;

    --viber: #7360f2;
    --whatsapp: #25d366;

    --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    --radius: 14px;
    --radius-sm: 10px;
    --radius-pill: 999px;
    --shadow: 0 2px 6px rgba(92, 70, 54, .06), 0 8px 24px rgba(92, 70, 54, .08);
    --shadow-hover: 0 4px 10px rgba(92, 70, 54, .08), 0 14px 32px rgba(92, 70, 54, .12);

    --gutter: 1.25rem;
    --container: 1180px;
    --section: 3.5rem;
}

@media (min-width: 900px) {
    :root {
        --gutter: 2rem;
        --section: 5.5rem;
    }
}

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

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--cream);
    /* footer ostaje na dnu i na kratkim stranicama */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body > main {
    flex: 1 0 auto;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--brown);
    text-underline-offset: .2em;
}

a:hover {
    color: var(--brown-dark);
}

:focus-visible {
    outline: 3px solid var(--green-dark);
    outline-offset: 3px;
    border-radius: 4px;
}

h1, h2, h3, .h3 {
    margin: 0 0 .6em;
    color: var(--brown);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.01em;
}

h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); }
h2 { font-size: clamp(1.55rem, 1.25rem + 1.4vw, 2.2rem); }
h3, .h3 { font-size: 1.2rem; font-weight: 700; }

p {
    margin: 0 0 1em;
}

.lead {
    font-size: 1.125rem;
    color: var(--muted);
}

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

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

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 100;
    padding: .6rem 1rem;
    background: var(--white);
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    top: 1rem;
}

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

.narrow {
    max-width: 720px;
}

.section {
    padding-block: var(--section);
}

.section--tight {
    padding-block: 0;
}

.section--alt {
    background: var(--beige);
}

.section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem 1.5rem;
    margin-bottom: 1.75rem;
}

.section__head h2 {
    margin: 0;
}

.eyebrow {
    margin-bottom: .75rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--green-dark);
}

.link-arrow {
    font-weight: 700;
    text-decoration: none;
}

.link-arrow::after {
    content: " →";
}

.link-arrow:hover {
    text-decoration: underline;
}

/* ---------- Dugmad ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 48px;
    padding: .7rem 1.4rem;
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}

.btn svg {
    flex: none;
}

.btn-primary {
    background: var(--brown);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--brown-dark);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-ghost {
    border-color: var(--brown);
    color: var(--brown);
}

.btn-ghost:hover {
    background: var(--brown);
    color: var(--white);
}

.btn-light {
    background: var(--white);
    color: var(--brown);
}

.btn-light:hover {
    background: var(--cream);
    color: var(--brown-dark);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-viber {
    background: var(--viber);
    color: #fff;
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: #10331e;
}

.btn-call {
    background: var(--beige);
    color: var(--brown);
}

.btn-viber:hover,
.btn-whatsapp:hover,
.btn-call:hover {
    box-shadow: var(--shadow);
    filter: brightness(1.05);
}

.btn-viber:hover { color: #fff; }
.btn-whatsapp:hover { color: #10331e; }
.btn-call:hover { color: var(--brown-dark); }

.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.contact-buttons--center {
    justify-content: center;
    margin-bottom: 1rem;
}

.contact-buttons--compact {
    margin-top: .75rem;
}

.contact-buttons--compact .btn {
    flex: 1 1 auto;
    min-height: 44px;
    padding: .55rem 1rem;
    font-size: .95rem;
}

/* ---------- Oznaka (tag) ---------- */

.tag {
    display: inline-block;
    padding: .3rem .85rem;
    border-radius: var(--radius-pill);
    background: var(--green);
    color: var(--brown);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .02em;
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--brown);
    color: var(--cream);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
}

.site-logo img {
    width: auto;
    height: 52px;
}

/* Rezerva dok ne postoji logo-light.png: smeđi logo posvijetljen filterom */
.site-logo img.is-filtered {
    filter: brightness(0) invert(1) sepia(.25) brightness(.97);
}

.nav-toggle {
    position: relative;
    width: 48px;
    height: 48px;
    margin-right: -.6rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
    position: absolute;
    left: 13px;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--cream);
    transition: transform .2s, opacity .2s;
}

.nav-toggle__bar { top: 23px; }
.nav-toggle__bar::before { content: ""; left: 0; top: -7px; }
.nav-toggle__bar::after { content: ""; left: 0; top: 7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: .5rem var(--gutter) 1.5rem;
    background: var(--brown);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .15);
}

.site-nav.is-open {
    display: block;
}

/* Bez JS-a meni je uvijek vidljiv */
.no-js .site-nav {
    display: block;
    position: static;
    box-shadow: none;
}

.site-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    display: block;
    padding: .75rem 0;
    color: var(--cream);
    font-weight: 600;
    text-decoration: none;
}

.site-nav li + li {
    border-top: 1px solid rgba(247, 240, 230, .12);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: var(--green);
}

.site-nav .site-nav__phone {
    display: inline-block;
    margin-top: .75rem;
    padding: .55rem 1.1rem;
    border: 2px solid var(--green);
    border-radius: var(--radius-pill);
    color: var(--green);
    font-weight: 700;
}

@media (min-width: 900px) {
    .site-header__inner {
        min-height: 84px;
    }

    .site-logo img {
        height: 64px;
    }

    .nav-toggle {
        display: none;
    }

    .site-nav,
    .no-js .site-nav {
        display: flex;
        position: static;
        align-items: center;
        gap: 2rem;
        padding: 0;
        background: none;
        box-shadow: none;
    }

    .site-nav ul {
        display: flex;
        gap: 1.75rem;
    }

    .site-nav li + li {
        border: 0;
    }

    .site-nav a {
        padding: .5rem 0;
    }

    .site-nav .site-nav__phone {
        margin: 0;
    }

    .site-nav .site-nav__phone:hover {
        background: var(--green);
        color: var(--brown);
    }
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 1.25rem 0 0;
    list-style: none;
    font-size: .875rem;
    color: var(--muted);
}

.breadcrumbs li + li::before {
    content: "/";
    margin: 0 .5rem;
    color: var(--brown-warm);
}

.breadcrumbs a {
    color: var(--muted);
}

.breadcrumbs [aria-current] {
    color: var(--brown);
    font-weight: 600;
}

/* ---------- Hero ---------- */

.hero {
    padding-block: 2.5rem var(--section);
}

.hero__grid {
    display: grid;
    gap: 2rem;
    align-items: center;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.75rem;
}

.hero__media img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: 50% 62%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

@media (min-width: 900px) {
    .hero {
        padding-top: 4rem;
    }

    .hero__grid {
        grid-template-columns: 1.05fr 1fr;
        gap: 4rem;
    }

    .hero__media img {
        aspect-ratio: 4 / 5;
        object-position: 50% 55%;
    }
}

/* ---------- Kartice proizvoda ---------- */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 1.25rem;
}

.product-card {
    height: 100%;
}

.product-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--beige);
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: box-shadow .25s, transform .25s;
}

.section--alt .product-card__link {
    background: var(--white);
}

.product-card__link:hover {
    color: inherit;
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.product-card__media {
    background: var(--green);
}

.product-card__media img {
    width: 100%;
    aspect-ratio: 5 / 3;
    object-fit: cover;
}

.product-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
    padding: 1.1rem 1.25rem 1.3rem;
}

.product-card__title {
    margin: .3rem 0 0;
    font-size: 1.15rem;
    font-weight: 800;
}

.product-card__meta {
    margin: 0;
    font-size: .9rem;
    color: var(--muted);
}

.product-card__price {
    margin: auto 0 0;
    padding-top: .5rem;
    color: var(--muted);
}

.product-card__price strong {
    color: var(--brown);
    font-size: 1.15rem;
}

/* ---------- Koraci ---------- */

.steps {
    display: grid;
    gap: 1.25rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

.step {
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--beige);
}

.step h3 {
    margin-bottom: .35rem;
}

.step p {
    margin: 0;
    color: var(--muted);
}

.step__num {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-bottom: .9rem;
    border-radius: 50%;
    background: var(--brown-warm);
    color: var(--white);
    font-weight: 800;
}

@media (min-width: 760px) {
    .steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- Traka "Izrada po mjeri" ---------- */

.custom-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding: 1.75rem;
    border-radius: var(--radius);
    background: var(--green-dark);
    color: var(--white);
}

.custom-strip p {
    margin: 0;
}

.custom-strip .custom-strip__title {
    margin: 0 0 .25rem;
    color: var(--white);
    font-size: 1.35rem;
}

@media (min-width: 900px) {
    .custom-strip {
        padding: 2rem 2.5rem;
    }
}

.contact-cta .lead {
    margin-bottom: 1.5rem;
}

/* ---------- Stranica proizvoda ---------- */

.product {
    padding-bottom: var(--section);
}

.product__head {
    padding-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.product__title {
    margin: .75rem 0 .25rem;
}

.product__height {
    margin: 0;
    font-size: 1.1rem;
    color: var(--muted);
}

.product__height strong {
    color: var(--brown);
}

.product__grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.product__media {
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--green);
    box-shadow: var(--shadow);
}

.product__composition {
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--beige);
}

.layers {
    display: grid;
    gap: .9rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.layer {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
}

.layer__num {
    display: grid;
    flex: none;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--brown-warm);
    color: var(--white);
    font-size: .95rem;
    font-weight: 800;
}

.layer__text {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
    padding-top: .1rem;
}

.layer__name {
    color: var(--brown);
}

.layer__family,
.layer__desc {
    font-size: .9rem;
    color: var(--muted);
}

.layer__family {
    font-weight: 600;
}

.layer__desc {
    margin-top: .25rem;
    line-height: 1.45;
}

.firmness-note {
    margin: 0 0 1.5rem;
    padding: .85rem 1rem;
    border-left: 4px solid var(--brown-warm);
    border-radius: var(--radius-sm);
    background: var(--white);
    font-size: .95rem;
}

.firmness-note strong {
    color: var(--brown);
}

.cover {
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.cover__title {
    margin-bottom: .6rem;
    font-size: 1rem;
}

.checklist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.checklist li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: .3rem;
}

.checklist li::before {
    content: "";
    position: absolute;
    left: .15rem;
    top: .45em;
    width: .7rem;
    height: .4rem;
    border-left: 2px solid var(--green-dark);
    border-bottom: 2px solid var(--green-dark);
    transform: rotate(-45deg);
}

@media (min-width: 900px) {
    .product__grid {
        grid-template-columns: 1.35fr 1fr;
        gap: 2rem;
        align-items: start;
    }

    .product__composition {
        padding: 2rem;
    }
}

/* Birač dimenzije */

.buy-box {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.size-option {
    position: relative;
    cursor: pointer;
}

.size-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.size-option span {
    display: inline-block;
    padding: .6rem 1rem;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--cream);
    font-weight: 600;
    font-size: .95rem;
    transition: border-color .15s, background-color .15s;
}

.size-option:hover span {
    border-color: var(--green-dark);
}

.size-option input:checked + span {
    border-color: var(--brown);
    background: var(--brown);
    color: var(--white);
}

.size-option input:focus-visible + span {
    outline: 3px solid var(--green-dark);
    outline-offset: 2px;
}

.buy-box__summary {
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--beige);
}

.buy-box__label {
    margin: 0;
    color: var(--muted);
    font-size: .95rem;
}

.buy-box__price {
    margin: 0 0 1rem;
    color: var(--brown);
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
}

@media (min-width: 900px) {
    .buy-box {
        grid-template-columns: 1.35fr 1fr;
        gap: 2rem;
        padding: 2rem;
    }
}

/* Tabela cijena */

.prices {
    margin-bottom: 2rem;
}

.price-table {
    width: 100%;
    max-width: 640px;
    border-collapse: collapse;
    margin-bottom: .75rem;
}

.price-table th,
.price-table td {
    padding: .7rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.price-table thead th {
    font-size: .8rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.price-table tbody th {
    font-weight: 600;
}

.price-table td {
    color: var(--brown);
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.price-table tr.is-selected {
    background: var(--beige);
}

/* Na mobilnom tabela ide u jednu kolonu: svaki red je kartica */
@media (max-width: 559px) {
    .price-table thead {
        display: none;
    }

    .price-table,
    .price-table tbody,
    .price-table tr,
    .price-table th,
    .price-table td {
        display: block;
    }

    .price-table tr {
        padding: .75rem 1rem;
        border-bottom: 1px solid var(--line);
    }

    .price-table th,
    .price-table td {
        padding: 0;
        border: 0;
        text-align: left;
    }

    .price-table td {
        font-size: 1.1rem;
    }
}

.product__description {
    max-width: 760px;
    margin-top: 2.5rem;
}

.product__description p {
    font-size: 1.075rem;
}

/* Ostali modeli: na mobilnom horizontalni scroll */
@media (max-width: 759px) {
    .product-grid--scroll {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 78%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: .75rem;
    }

    .product-grid--scroll > * {
        scroll-snap-align: start;
    }
}

/* ---------- Footer ---------- */

.site-footer {
    padding-top: 3rem;
    background: var(--brown);
    color: rgba(247, 240, 230, .82);
}

.site-footer a {
    color: var(--cream);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--green);
}

.site-footer__grid {
    display: grid;
    gap: 2rem;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li {
    margin-bottom: .4rem;
}

.site-footer .site-footer__title {
    margin-bottom: .75rem;
    color: var(--green);
    font-size: .85rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.site-logo--footer img {
    height: 88px;
    margin-bottom: .75rem;
}

.site-footer__bottom {
    margin-top: 2.5rem;
    padding-block: 1.25rem;
    border-top: 1px solid rgba(247, 240, 230, .14);
    font-size: .85rem;
}

.site-footer__bottom p {
    margin: 0;
}

@media (min-width: 640px) {
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1000px) {
    .site-footer__grid {
        grid-template-columns: 1.3fr .8fr 1fr 1.1fr;
    }
}

/* ---------- Uvodni tekst na listama ---------- */

.page-head p:not(.lead) {
    color: var(--text);
}

/* ---------- Česta pitanja (početna) ---------- */

.faq {
    display: grid;
    gap: .75rem;
    margin-top: 2rem;
}

.faq__item {
    border-radius: var(--radius-sm);
    background: var(--white);
    box-shadow: 0 1px 3px rgba(92, 70, 54, .08);
}

.faq__question {
    position: relative;
    padding: 1.1rem 3.25rem 1.1rem 1.25rem;
    color: var(--brown);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.faq__question::-webkit-details-marker {
    display: none;
}

.faq__question::after {
    content: "+";
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--green);
    color: var(--brown);
    font-weight: 800;
    line-height: 1;
}

.faq__item[open] .faq__question::after {
    content: "–";
}

.faq__question:focus-visible {
    outline-offset: -3px;
}

.faq__answer {
    padding: 0 1.25rem 1.1rem;
}

.faq__answer p {
    margin-bottom: .6rem;
}

.faq__answer p:last-of-type {
    margin-bottom: 0;
}

/* ---------- Privatnost ---------- */

.prose {
    padding-bottom: var(--section);
}

.prose section + section {
    margin-top: 2rem;
}

.prose h2 {
    font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
}

.prose ul {
    padding-left: 1.25rem;
}

.form-privacy {
    margin-top: .25rem;
}

.site-footer__bottom a {
    text-decoration: underline;
}

/* ---------- Izrada po mjeri ---------- */

.prose-grid {
    display: grid;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.prose-block h2 {
    font-size: clamp(1.35rem, 1.15rem + .8vw, 1.75rem);
}

.prose-block h3 {
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

.prose-block--wide {
    max-width: 820px;
}

.steps--list {
    grid-template-columns: 1fr;
    margin-top: 1rem;
}

.steps--list .step {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1rem;
    padding: 1.25rem;
}

.steps--list .step__num {
    grid-row: span 2;
    margin: 0;
}

.steps--list .step h3 {
    margin: .2rem 0 .3rem;
}

.size-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.size-list li {
    padding: .4rem .85rem;
    border-radius: var(--radius-pill);
    background: var(--beige);
    font-weight: 600;
    font-size: .92rem;
}

@media (min-width: 900px) {
    .prose-grid {
        grid-template-columns: 1.1fr 1fr;
        gap: 3rem;
    }
}

/* ---------- Katalog (početna) ---------- */

.catalog-card {
    display: grid;
    gap: 2rem;
    align-items: center;
    padding: 1.75rem;
    border-radius: var(--radius);
    background: var(--beige);
}

.catalog-card h2 {
    margin-bottom: .4em;
}

.catalog-card .lead {
    max-width: 560px;
}

.catalog-card__meta {
    margin: .6rem 0 0;
    font-size: .9rem;
    color: var(--muted);
}

.catalog-card__qr {
    justify-self: center;
    margin: 0;
    padding: 1rem 1rem .75rem;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
    text-align: center;
}

.catalog-card__qr svg {
    display: block;
    width: 168px;
    height: 168px;
}

.catalog-card__qr figcaption {
    margin-top: .5rem;
    font-size: .9rem;
    font-weight: 700;
    color: var(--brown);
}

/* Na mobilnom QR nema smisla (korisnik je već na telefonu): samo dugme */
@media (max-width: 759px) {
    .catalog-card__qr {
        display: none;
    }
}

@media (min-width: 760px) {
    .catalog-card {
        grid-template-columns: 1fr auto;
        padding: 2.25rem 2.5rem;
    }
}

/* ---------- Lokacije ---------- */

.locations {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.location {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.location__label {
    font-size: .85rem;
    color: var(--muted);
}

.location__address {
    font-style: normal;
    font-weight: 700;
    color: var(--brown);
}

.location__hours,
.location__note {
    font-size: .9rem;
    color: var(--muted);
}

.location__note {
    font-style: italic;
}

.location__map {
    font-size: .9rem;
    font-weight: 600;
}

.site-footer .location {
    margin: 0;
}

.site-footer .location__label {
    color: rgba(247, 240, 230, .65);
}

.site-footer .location__address {
    color: var(--cream);
    font-weight: 400;
}

.site-footer .location__hours,
.site-footer .location__note {
    color: rgba(247, 240, 230, .75);
}

.site-footer .location__map {
    color: var(--green);
}

.site-footer .location__map:hover {
    text-decoration: underline;
}

.locations--contact {
    margin-bottom: 1.5rem;
}

/* ---------- Provjerena pjena (materijali) ---------- */

.trust-card {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 1.75rem;
    border-radius: var(--radius);
    background: var(--white);
    border-left: 6px solid var(--green-dark);
    box-shadow: var(--shadow);
}

.trust-card__text p {
    max-width: 680px;
}

.trust-card__text p:last-child {
    margin-bottom: 0;
}

.certificates {
    align-self: center;
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.certificate {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: 1.1rem 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--beige);
}

.certificate > span:last-child {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.certificate__badge {
    display: grid;
    flex: none;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--green);
    color: var(--brown);
    font-weight: 800;
}

.certificate__name {
    color: var(--brown);
}

.certificate__meta {
    font-size: .9rem;
    color: var(--muted);
}

.certificate__file {
    font-size: .9rem;
    font-weight: 700;
}

@media (min-width: 900px) {
    .trust-card {
        grid-template-columns: 1.6fr 1fr;
        gap: 2.5rem;
        padding: 2.25rem 2.5rem;
    }
}

/* ---------- Zaglavlje podstranica ---------- */

.page-head {
    max-width: 760px;
    padding-top: 1.5rem;
    margin-bottom: 2rem;
}

.page-head h1 {
    margin-bottom: .4em;
}

.section--spaced {
    padding-block: var(--section);
}

.hero__actions--center {
    justify-content: center;
}

.h4 {
    margin: 0 0 .4em;
    color: var(--brown);
    font-size: 1rem;
    font-weight: 700;
}

/* ---------- Filter (madraci) ---------- */

.filters {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding: 1.25rem;
    border-radius: var(--radius);
    background: var(--beige);
}

.filters__group {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.filters__group legend {
    margin-bottom: .6rem;
    padding: 0;
    color: var(--brown);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.chip {
    position: relative;
    cursor: pointer;
}

.chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip span {
    display: inline-block;
    padding: .45rem 1rem;
    border: 2px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--white);
    font-size: .92rem;
    font-weight: 600;
    transition: border-color .15s, background-color .15s;
}

.chip:hover span {
    border-color: var(--green-dark);
}

.chip input:checked + span {
    border-color: var(--green-dark);
    background: var(--green);
    color: var(--brown);
}

.chip input:focus-visible + span {
    outline: 3px solid var(--green-dark);
    outline-offset: 2px;
}

.filters__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1.25rem;
}

.filters__count {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
}

.filters__reset {
    font-weight: 700;
}

.empty-state {
    padding: 2.5rem 1rem;
    text-align: center;
    border-radius: var(--radius);
    background: var(--beige);
}

[hidden] {
    display: none !important;
}

@media (min-width: 900px) {
    .filters {
        grid-template-columns: auto 1fr;
        padding: 1.5rem 2rem;
        gap: 1.25rem 3rem;
    }

    .filters__footer {
        grid-column: 1 / -1;
    }
}

/* ---------- Materijali ---------- */

.material-families {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 2.5rem 1.25rem;
    align-items: start;
    margin-bottom: 3rem;
}

/* Naslov i kartice svake porodice dijele redove roditelja (subgrid),
   pa kartice u istom redu počinju u istoj liniji i kad se naslov prelomi */
.material-family {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: .9rem;
}

/* Porodica sa više materijala zauzima cijeli red; njene kartice prate iste kolone */
.material-family--wide {
    grid-column: 1 / -1;
}

.material-family__title {
    align-self: end;
    margin: 0;
    font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
}

.material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 1.25rem;
}

.material-card {
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--beige);
}

/* Uzorak materijala: boja iz products.json (--swatch) + blaga tekstura pora pjene */
.swatch {
    display: block;
    width: 100%;
    height: 88px;
    margin-bottom: 1.1rem;
    border-radius: 12px;
    background-color: var(--swatch, var(--line));
    /* nepravilne pore (SVG šum) + blagi prelaz svjetla */
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 -.38'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
        linear-gradient(160deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .1));
    background-size: 160px 160px, 100% 100%;
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, .08),
        inset 0 -8px 14px rgba(0, 0, 0, .07),
        0 1px 2px rgba(92, 70, 54, .08);
}

/* Isječak sa slike presjeka (materials[].image): isti okvir kao uzorak u boji */
.swatch--photo {
    height: 110px;
    object-fit: cover;
    background: var(--white);
}

.swatch--springs {
    display: grid;
    place-items: center;
    background-image: linear-gradient(160deg, rgba(255, 255, 255, .35), rgba(0, 0, 0, .06));
    background-size: 100% 100%;
    color: #6f6a72;
}

.swatch--springs svg {
    width: auto;
    height: 60px;
}

.material-card__code {
    margin-bottom: .2rem;
    font-size: 1.3rem;
    font-weight: 800;
}

.material-card__family {
    margin-bottom: 1rem;
    color: var(--green-dark);
    font-weight: 700;
    font-size: .92rem;
}

.material-card__desc {
    margin-bottom: 1rem;
    font-size: .95rem;
}

.material-card__specs {
    display: grid;
    gap: .25rem;
    margin: 0 0 1rem;
    padding: .75rem .9rem;
    border-radius: var(--radius-sm);
    background: var(--white);
    font-size: .9rem;
}

.material-card__specs div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.material-card__specs dt {
    color: var(--muted);
}

.material-card__specs dd {
    margin: 0;
    font-weight: 700;
    color: var(--brown);
}

.material-card__label {
    margin-bottom: .35rem;
    font-size: .85rem;
    color: var(--muted);
}

.material-card__products {
    margin: 0;
    padding: 0;
    list-style: none;
}

.material-card__products li {
    padding: .3rem 0;
    border-top: 1px solid var(--line);
}

.material-card__products a {
    font-weight: 600;
    text-decoration: none;
}

.material-card__products a:hover {
    text-decoration: underline;
}


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

.contact-layout {
    display: grid;
    gap: 1.5rem;
    padding-bottom: var(--section);
}

.form-card,
.contact-card {
    padding: 1.5rem;
    border-radius: var(--radius);
}

.form-card {
    background: var(--white);
    box-shadow: var(--shadow);
}

.contact-card {
    align-self: start;
    background: var(--beige);
}

.contact-card .contact-buttons .btn {
    flex: 1 1 auto;
}

.contact-card__note {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.contact-card__note p {
    margin: 0;
    color: var(--muted);
}

.contact-list {
    margin: 0 0 1.25rem;
}

.contact-list dt {
    color: var(--muted);
    font-size: .85rem;
}

.contact-list dd {
    margin: 0 0 .75rem;
    font-weight: 700;
    color: var(--brown);
}

.inquiry-form {
    display: grid;
    gap: 1rem;
}

.inquiry-form .btn {
    justify-self: start;
}

.form-row {
    display: grid;
    gap: 1rem;
    /* bez rastezanja: greška ispod jednog polja ne pomjera i ne izdužuje susjedno */
    align-items: start;
}

.field {
    display: grid;
    gap: .35rem;
    align-content: start;
}

/* napomena / zajednička greška preko cijele širine reda, ispod oba polja */
.form-row__full {
    grid-column: 1 / -1;
    margin: -.5rem 0 0;
}

.form-row--contact .field__error.form-row__full {
    margin-top: -.75rem;
}

.field label {
    color: var(--brown);
    font-weight: 700;
    font-size: .92rem;
}

.req {
    color: var(--brown-warm);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 48px;
    padding: .65rem .9rem;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--cream);
    color: var(--text);
    font: inherit;
}

.field textarea {
    resize: vertical;
}

.field select:disabled {
    opacity: .6;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--green-dark);
    outline: none;
    box-shadow: 0 0 0 3px rgba(143, 160, 126, .35);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
    border-color: #b4553f;
}

.field__error {
    margin: 0;
    color: #a2412b;
    font-size: .88rem;
    font-weight: 600;
}

.field__hint {
    margin: -.25rem 0 0;
    color: var(--muted);
    font-size: .85rem;
}

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

.alert {
    margin-bottom: 1.25rem;
    padding: .9rem 1.1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.alert--success {
    background: #e3ebd8;
    color: #3e5230;
    border-left: 4px solid var(--green-dark);
}

.alert--error {
    background: #f6e1da;
    color: #7c2f1f;
    border-left: 4px solid #b4553f;
}

#poruka:focus {
    outline: none;
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 900px) {
    .contact-layout {
        grid-template-columns: 1.6fr 1fr;
        gap: 2rem;
    }

    .form-card,
    .contact-card {
        padding: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
