/* =========================================================
   Gjutjärnsguiden – formgivning
   1. Variabler och grund
   2. Layout
   3. Sidhuvud och meny
   4. Typografi och komponenter
   5. Sidspecifikt
   6. Sidfot
   7. Responsivt
   ========================================================= */

/* 1. Variabler och grund
   ------------------------------------------------------ */
:root {
    --ink: #1c1917;
    --ink-soft: #44403c;
    --muted: #78716c;
    --cream: #fbf8f4;
    --surface: #ffffff;
    --surface-warm: #f5efe6;
    --border: #e5ddd1;
    --border-strong: #d2c6b4;
    --ember: #b4451f;
    --ember-dark: #8f3517;
    --ember-tint: #fbeee7;
    --sage: #3f6151;
    --sage-tint: #ecf3ef;

    --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --wrap: 1120px;
    --wrap-narrow: 720px;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow: 0 1px 2px rgba(28, 25, 23, .05), 0 8px 24px -12px rgba(28, 25, 23, .18);
    --shadow-lift: 0 2px 4px rgba(28, 25, 23, .06), 0 16px 40px -16px rgba(28, 25, 23, .28);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--ember);
    text-underline-offset: .18em;
    text-decoration-thickness: from-font;
}

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

:focus-visible {
    outline: 3px solid var(--ember);
    outline-offset: 2px;
    border-radius: 3px;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 .5em;
    letter-spacing: -.01em;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.24rem + 1.1vw, 1.95rem); }
h3 { font-size: clamp(1.2rem, 1.1rem + .45vw, 1.4rem); }

p { margin: 0 0 1.1em; }

.visually-hidden {
    position: absolute;
    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: -999px;
    top: .5rem;
    z-index: 100;
    background: var(--ink);
    color: #fff;
    padding: .7rem 1.1rem;
    border-radius: var(--radius);
    text-decoration: none;
}

.skip-link:focus {
    left: .5rem;
    color: #fff;
}

/* 2. Layout
   ------------------------------------------------------ */
.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

.wrap--narrow { max-width: var(--wrap-narrow); }

.section {
    padding-block: clamp(2.75rem, 6vw, 4.5rem);
}

.section--tint {
    background: var(--surface-warm);
    border-block: 1px solid var(--border);
}

.section__head {
    max-width: 44rem;
    margin-bottom: 2rem;
}

.section__head p {
    color: var(--ink-soft);
    font-size: 1.075rem;
    margin-bottom: 0;
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ember);
    margin-bottom: .75rem;
}

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

/* 3. Sidhuvud och meny
   ------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251, 248, 244, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 4.25rem;
    flex-wrap: wrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    color: var(--ink);
    text-decoration: none;
    padding-block: .6rem;
}

.brand__mark {
    width: 2rem;
    height: 2rem;
    color: var(--ember);
    flex: none;
}

.brand__text { display: grid; }

.brand__name {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.15;
}

.brand__tagline {
    font-size: .72rem;
    color: var(--muted);
    letter-spacing: .02em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: .35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav__link {
    display: block;
    padding: .45rem .7rem;
    border-radius: var(--radius);
    color: var(--ink-soft);
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav__link:hover {
    background: var(--surface-warm);
    color: var(--ink);
}

.site-nav__link.is-active {
    color: var(--ember);
    background: var(--ember-tint);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: .25rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: .15rem .15rem .15rem .85rem;
}

.nav-search:focus-within {
    border-color: var(--ember);
    box-shadow: 0 0 0 3px var(--ember-tint);
}

.nav-search input {
    border: 0;
    background: none;
    font: inherit;
    font-size: .9rem;
    padding: .35rem 0;
    width: 8.5rem;
    color: var(--ink);
}

.nav-search input:focus { outline: none; }

.nav-search button {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: var(--ember);
    color: #fff;
    cursor: pointer;
    flex: none;
}

.nav-search button:hover { background: var(--ember-dark); }
.nav-search svg { width: 1rem; height: 1rem; }

.nav-toggle { display: none; }

.nav-button {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: .3rem;
    width: 2.75rem;
    height: 2.75rem;
    padding: .6rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
}

.nav-button span {
    display: block;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
}

/* 4. Typografi och komponenter
   ------------------------------------------------------ */
.button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .8rem 1.4rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: var(--ember);
    color: #fff;
    font: inherit;
    font-size: .98rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}

.button:hover {
    background: var(--ember-dark);
    color: #fff;
    transform: translateY(-1px);
}

.button--small {
    padding: .5rem .9rem;
    font-size: .88rem;
}

.button--large {
    padding: .95rem 1.8rem;
    font-size: 1.05rem;
}

.button--ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--border-strong);
}

.button--ghost:hover {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--ink);
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
}

.card__media {
    aspect-ratio: 3 / 2;
    background: var(--surface-warm);
    overflow: hidden;
}

.card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem 1.35rem 1.4rem;
}

.card__title {
    font-size: 1.22rem;
    margin-bottom: .45rem;
}

.card__title a {
    color: var(--ink);
    text-decoration: none;
}

.card__title a:hover { color: var(--ember); }

.card__text {
    color: var(--ink-soft);
    font-size: .96rem;
    margin-bottom: 1rem;
}

.card__meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .8rem;
    color: var(--muted);
}

.tag {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 999px;
    background: var(--sage-tint);
    color: var(--sage);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.breadcrumbs {
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--ember); }
.breadcrumbs span { margin-inline: .4rem; }

/* Artikelinnehåll */
.prose {
    font-size: 1.09rem;
    line-height: 1.75;
    color: var(--ink-soft);
}

.prose h2 {
    margin-top: 2.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--border);
    color: var(--ink);
}

.prose h3 {
    margin-top: 1.9rem;
    color: var(--ink);
}

.prose > ul,
.prose > ol {
    margin: 0 0 1.3rem;
    padding-left: 1.3rem;
}

.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--ember); }

.prose strong { color: var(--ink); }

.figure {
    margin: 2rem 0;
}

.figure img {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.figure figcaption {
    margin-top: .6rem;
    font-size: .85rem;
    color: var(--muted);
}

/* Faktarutor */
.note {
    margin: 1.8rem 0;
    padding: 1.15rem 1.35rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--sage);
    background: var(--sage-tint);
}

.note__title {
    font-family: var(--font-sans);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: .35rem;
}

.note p { margin-bottom: 0; color: var(--ink-soft); }

.note--warning {
    border-left-color: var(--ember);
    background: var(--ember-tint);
}

.note--warning .note__title { color: var(--ember-dark); }

/* Stegvisa instruktioner */
.steps {
    list-style: none;
    counter-reset: step;
    margin: 1.8rem 0;
    padding: 0;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding: 0 0 1.4rem 3.4rem;
    border-left: 2px solid var(--border);
    margin-left: 1.1rem;
}

.steps li:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: -1.15rem;
    top: -.15rem;
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--ember);
    color: #fff;
    font-family: var(--font-sans);
    font-size: .95rem;
    font-weight: 700;
}

.steps h3 {
    margin: .25rem 0 .35rem;
    font-size: 1.15rem;
}

.steps p { margin-bottom: 0; }

/* Tabeller */
.table-scroll {
    overflow-x: auto;
    margin: 1.8rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
}

th, td {
    padding: .8rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

thead th {
    background: var(--surface-warm);
    font-family: var(--font-sans);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-soft);
    white-space: nowrap;
}

tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; color: var(--ink); }

/* Formulär */
.form-field { margin-bottom: 1.25rem; }

.form-field label {
    display: block;
    font-size: .92rem;
    font-weight: 600;
    margin-bottom: .4rem;
    color: var(--ink);
}

.form-field .hint {
    display: block;
    font-weight: 400;
    font-size: .85rem;
    color: var(--muted);
    margin-top: .15rem;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: .75rem .9rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
}

.form-field textarea {
    min-height: 10rem;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--ember);
    box-shadow: 0 0 0 3px var(--ember-tint);
}

.form-field.has-error input,
.form-field.has-error textarea {
    border-color: var(--ember);
}

.field-error {
    display: block;
    margin-top: .35rem;
    font-size: .87rem;
    color: var(--ember-dark);
    font-weight: 500;
}

.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.75rem;
    border-left: 4px solid;
}

.alert--success {
    background: var(--sage-tint);
    border-color: var(--sage);
    color: #2c4a3d;
}

.alert--error {
    background: var(--ember-tint);
    border-color: var(--ember);
    color: var(--ember-dark);
}

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

/* 5. Sidspecifikt
   ------------------------------------------------------ */

/* Startsidans hero */
.hero {
    position: relative;
    background: var(--ink);
    color: #fff;
    overflow: hidden;
}

.hero__media {
    position: absolute;
    inset: 0;
}

.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .38;
}

.hero__inner {
    position: relative;
    padding-block: clamp(3.5rem, 9vw, 6.5rem);
    max-width: 40rem;
}

.hero h1 {
    color: #fff;
    margin-bottom: .6rem;
}

.hero__lead {
    font-size: clamp(1.05rem, 1rem + .35vw, 1.22rem);
    color: rgba(255, 255, 255, .84);
    margin-bottom: 1.9rem;
}

.hero .eyebrow { color: #f0a17c; }

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
}

.hero .button--ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, .45);
}

.hero .button--ghost:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border-color: #fff;
}

/* Snabbfakta under hero */
.facts {
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    background: var(--border);
    border-block: 1px solid var(--border);
}

.facts__item {
    background: var(--surface);
    padding: 1.5rem 1.35rem;
}

.facts__value {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--ember);
    line-height: 1.1;
    display: block;
    margin-bottom: .3rem;
}

.facts__label {
    font-size: .92rem;
    color: var(--ink-soft);
    margin: 0;
}

/* Utvald guide */
.feature {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.feature__media img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lift);
}

/* Innehållsförteckning i artiklar */
.toc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.4rem;
    margin-bottom: 2.25rem;
}

.toc h2 {
    font-family: var(--font-sans);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .7rem;
    border: 0;
    padding: 0;
}

.toc ol {
    margin: 0;
    padding-left: 1.1rem;
    font-size: .96rem;
}

.toc li { margin-bottom: .35rem; }

.article-header {
    max-width: var(--wrap-narrow);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    align-items: center;
    font-size: .88rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.article-lead {
    font-size: 1.22rem;
    line-height: 1.6;
    color: var(--ink-soft);
    margin-bottom: 1.5rem;
}

.article-nav {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.article-nav a {
    display: block;
    padding: 1rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    text-decoration: none;
}

.article-nav a:hover { border-color: var(--ember); }

.article-nav .label {
    display: block;
    font-size: .74rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .2rem;
}

.article-nav .title {
    color: var(--ink);
    font-weight: 600;
}

/* Vanliga frågor */
.faq-group { margin-bottom: 2.5rem; }

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    margin-bottom: .75rem;
    overflow: hidden;
}

.faq-item[open] { border-color: var(--border-strong); }

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "";
    flex: none;
    width: .65rem;
    height: .65rem;
    border-right: 2px solid var(--ember);
    border-bottom: 2px solid var(--ember);
    transform: rotate(45deg);
    transition: transform .2s ease;
    margin-top: -.3rem;
}

.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: .2rem; }

.faq-item summary:hover { background: var(--surface-warm); }

.faq-answer {
    padding: 0 1.25rem 1.25rem;
    color: var(--ink-soft);
}

.faq-answer p:last-child { margin-bottom: 0; }

/* Pannjämförelse */
.brand-card {
    display: grid;
    grid-template-columns: 15rem 1fr;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    scroll-margin-top: 6rem;
}

.brand-card--no-media { grid-template-columns: 1fr; }

.brand-card__media {
    background: var(--surface-warm);
}

.brand-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 13rem;
}

.brand-card__body { padding: 1.5rem 1.6rem; }

.brand-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .5rem .85rem;
    margin-bottom: .6rem;
}

.brand-card__head h3 { margin: 0; }

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

.brand-card__summary { color: var(--ink-soft); }

.pros-cons {
    display: grid;
    gap: 1rem 2rem;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    margin-top: 1rem;
}

.pros-cons h4 {
    font-family: var(--font-sans);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .5rem;
}

.pros-cons ul {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .94rem;
    color: var(--ink-soft);
}

.pros-cons li {
    position: relative;
    padding-left: 1.4rem;
    margin-bottom: .35rem;
}

.pros-cons li::before {
    position: absolute;
    left: 0;
    font-weight: 700;
}

.pros h4 { color: var(--sage); }
.pros li::before { content: "+"; color: var(--sage); }

.cons h4 { color: var(--ember-dark); }
.cons li::before { content: "−"; color: var(--ember); }

/* ---------- Butik ---------- */

.demo-banner {
    background: #4a3b2a;
    color: #f7ecdc;
    font-size: .88rem;
    line-height: 1.5;
    padding-block: .7rem;
    border-bottom: 2px solid var(--ember);
}

.demo-banner strong { color: #ffd9a8; }

.demo-banner code {
    background: rgba(255, 255, 255, .12);
    padding: .05em .35em;
    border-radius: 4px;
    font-size: .92em;
}

/* Verktygsrad ovanför produktlistan */
.shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

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

.chip {
    display: inline-block;
    padding: .45rem .95rem;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: .92rem;
    font-weight: 500;
    text-decoration: none;
}

.chip:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.chip.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.sort-form {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    color: var(--ink-soft);
}

.sort-form select {
    padding: .5rem .7rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    font: inherit;
    font-size: .9rem;
    color: var(--ink);
}

.sort-form select:focus {
    outline: none;
    border-color: var(--ember);
    box-shadow: 0 0 0 3px var(--ember-tint);
}

/* Produktrutnät */
.product-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
}

.product-card__media {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    background: var(--surface-warm);
    overflow: hidden;
}

.product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card__placeholder {
    display: grid;
    place-items: center;
    height: 100%;
}

.product-card__placeholder img {
    object-fit: contain;
}

.badge {
    position: absolute;
    top: .7rem;
    left: .7rem;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.badge--sale {
    background: var(--ember);
    color: #fff;
}

.product-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.1rem 1.25rem 1.3rem;
}

.product-card__eyebrow {
    margin: 0 0 .5rem;
}

.product-card__title {
    font-size: 1.12rem;
    margin-bottom: .4rem;
}

.product-card__title a {
    color: var(--ink);
    text-decoration: none;
}

.product-card__title a:hover { color: var(--ember); }

.product-card__text {
    color: var(--ink-soft);
    font-size: .92rem;
    margin-bottom: 1rem;
}

.product-card__foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}

/* Pris */
.price {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: .5rem;
    flex-wrap: wrap;
}

.price__now {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}

.price__old {
    font-size: .92rem;
    color: var(--muted);
    text-decoration: line-through;
    white-space: nowrap;
}

.price--large .price__now { font-size: 2.1rem; color: var(--ember); }
.price--large .price__old { font-size: 1.05rem; }

/* Lagerstatus */
.stock {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.stock::before {
    content: "";
    width: .55rem;
    height: .55rem;
    border-radius: 999px;
    background: currentColor;
}

.stock--in { color: var(--sage); }
.stock--low { color: #a06010; }
.stock--order { color: var(--muted); }
.stock--out { color: var(--ember-dark); }

/* Produktsida */
.product-detail {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
    margin-bottom: 3rem;
}

.product-detail__media {
    background: var(--surface-warm);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

.product-detail__eyebrow {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}

.product-detail h1 { margin-bottom: .6rem; }

.product-detail__short {
    font-size: 1.13rem;
    line-height: 1.6;
    color: var(--ink-soft);
    margin-bottom: 1.25rem;
}

.product-detail .price--large { margin-bottom: 1.5rem; }

.usp {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 1rem 0 0;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.5rem;
    font-size: .88rem;
    color: var(--ink-soft);
}

.usp li {
    position: relative;
    padding-left: 1.3rem;
}

.usp li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--sage);
    font-weight: 700;
}

.feature-list {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
    font-size: .96rem;
    color: var(--ink-soft);
}

.feature-list li {
    position: relative;
    padding-left: 1.4rem;
    margin-bottom: .45rem;
}

.feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .55em;
    width: .5rem;
    height: .5rem;
    border-radius: 999px;
    background: var(--ember);
}

.product-body {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.product-body h2 { font-size: 1.4rem; }
.product-body__text .prose { font-size: 1.03rem; }
.product-body__specs .table-scroll { margin-top: 0; }

/* Kategorikort på startsidan */
.category-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.category-card {
    display: block;
    padding: 1.5rem 1.6rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform .18s ease, border-color .18s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: var(--ember);
}

.category-card h3 {
    margin-bottom: .4rem;
    color: var(--ink);
}

.category-card p {
    color: var(--ink-soft);
    font-size: .95rem;
    margin-bottom: .8rem;
}

.category-card__count {
    font-size: .82rem;
    font-weight: 600;
    color: var(--ember);
}

/* Skötselråd */
.tips {
    display: grid;
    gap: 1.5rem;
}

.tip {
    display: grid;
    grid-template-columns: 12rem 1.5fr 1fr;
    gap: clamp(1.25rem, 3vw, 2.25rem);
    padding: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    scroll-margin-top: 6rem;
    align-items: start;
}

.tip__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.tips--compact { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.tips--compact .tip { grid-template-columns: 1fr; }

.tip h2, .tip h3 { margin-bottom: .35rem; }

.tip__lead {
    font-size: 1.05rem;
    color: var(--ember);
    font-weight: 500;
    margin-bottom: .9rem;
}

.tip__text p:last-child { margin-bottom: 0; }
.tip__text { color: var(--ink-soft); }

.tip__products {
    background: var(--surface-warm);
    border-radius: var(--radius);
    padding: 1.15rem 1.25rem;
    align-self: start;
}

.tip__products h3 {
    font-family: var(--font-sans);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .7rem;
}

.tip__products ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: .93rem;
}

.tip__products li {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    padding: .45rem 0;
    border-bottom: 1px solid var(--border);
}

.tip__products li:last-child { border-bottom: 0; }

.tip__price {
    color: var(--muted);
    white-space: nowrap;
}

/* Formulärgrupper */
.fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem .5rem;
    margin: 0 0 1.5rem;
    background: var(--surface);
}

.fieldset legend {
    padding-inline: .5rem;
    font-family: var(--font-sans);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1rem;
}

.form-field--grow { flex: 1 1 12rem; }
.form-field--narrow { flex: 0 1 9rem; }

/* Sökresultat */
.search-form {
    display: flex;
    gap: .6rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-form input[type="search"] {
    flex: 1 1 16rem;
    padding: .85rem 1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font: inherit;
    font-size: 1rem;
    background: var(--surface);
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--ember);
    box-shadow: 0 0 0 3px var(--ember-tint);
}

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

.result-list li {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
}

.result-list li:first-child { border-top: 1px solid var(--border); }

.result {
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
}

.result__thumb {
    flex: none;
    width: 6.5rem;
    aspect-ratio: 3 / 2;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-warm);
}

.result__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result__body { flex: 1; min-width: 0; }
.result__body .price { margin-top: .5rem; }
.result__body .price__now { font-size: 1.05rem; }

.result-list h2 {
    font-size: 1.2rem;
    margin-bottom: .3rem;
}

.result-list h2 a {
    color: var(--ink);
    text-decoration: none;
}

.result-list h2 a:hover { color: var(--ember); }

.result-list p {
    margin: 0;
    color: var(--ink-soft);
    font-size: .96rem;
}

mark {
    background: #fde8c8;
    color: inherit;
    padding: 0 .12em;
    border-radius: 2px;
}

/* Bildkällor */
.credits-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}

.credit {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .85rem;
    font-size: .9rem;
}

.credit img {
    width: 5.5rem;
    height: 4rem;
    object-fit: cover;
    border-radius: 6px;
    flex: none;
}

.credit__meta {
    color: var(--muted);
    line-height: 1.5;
}

.credit__meta strong {
    display: block;
    color: var(--ink);
    font-weight: 600;
}

/* Felsida */
.error-page {
    text-align: center;
    padding-block: clamp(3rem, 10vw, 6rem);
}

.error-page__code {
    font-family: var(--font-serif);
    font-size: clamp(4rem, 12vw, 7rem);
    color: var(--ember);
    line-height: 1;
    margin-bottom: .5rem;
}

/* 6. Sidfot
   ------------------------------------------------------ */
.site-footer {
    margin-top: clamp(3rem, 7vw, 5rem);
    background: var(--ink);
    color: rgba(255, 255, 255, .75);
    font-size: .94rem;
}

.site-footer__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1.6fr 1fr 1fr;
    padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

.site-footer__name {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: .5rem;
}

.site-footer h2 {
    font-family: var(--font-sans);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
    margin-bottom: .8rem;
}

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

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

.site-footer a {
    color: rgba(255, 255, 255, .82);
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, .14);
    padding-block: 1.25rem;
    font-size: .85rem;
    color: rgba(255, 255, 255, .55);
}

.site-footer__bottom p { margin: 0; }

/* 7. Responsivt
   ------------------------------------------------------ */
@media (max-width: 900px) {
    .feature { grid-template-columns: 1fr; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .site-footer__about { grid-column: 1 / -1; }
    .product-detail { grid-template-columns: 1fr; }
    .product-body { grid-template-columns: 1fr; }
    .tip { grid-template-columns: 10rem 1fr; }
    .tip__products { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
    .nav-button { display: flex; }

    .site-header__inner {
        justify-content: space-between;
        padding-block: .5rem;
    }

    .site-nav {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding-bottom: 1rem;
    }

    .nav-toggle:checked ~ .site-nav { display: flex; }

    .site-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: .15rem;
    }

    .site-nav__link {
        padding: .7rem .85rem;
        font-size: 1rem;
    }

    .nav-search { width: 100%; }
    .nav-search input { width: 100%; }
}

@media (max-width: 560px) {
    body { font-size: 1rem; }
    .prose { font-size: 1.03rem; }
    .site-footer__grid { grid-template-columns: 1fr; }
    .steps li { padding-left: 2.9rem; }
    .brand__tagline { display: none; }
    .shop-toolbar { flex-direction: column; align-items: stretch; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); }
    .product-card__foot { flex-direction: column; align-items: flex-start; }
    .fieldset { padding-inline: 1rem; }
    .form-field--narrow { flex: 1 1 100%; }
    .tip { grid-template-columns: 1fr; padding: 1.25rem; }
    .tip__image { aspect-ratio: 16 / 9; }
    .result { flex-direction: column; }
    .result__thumb { width: 100%; }
}

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

@media print {
    .site-header, .site-footer, .article-nav, .toc { display: none; }
    body { background: #fff; font-size: 11pt; }
}
