/* ==========================================================================
   Köpa dörrar – site.css
   ========================================================================== */

:root {
  --bg: #f8f5ef;
  --surface: #ffffff;
  --surface-2: #f0ebe2;
  --ink: #1c2321;
  --ink-2: #3f4946;
  --muted: #687370;
  --line: #e4ddd1;
  --line-2: #d6cdbf;

  --brand: #1f4d45;
  --brand-600: #183f39;
  --brand-700: #12302b;
  --brand-tint: #e4ede9;
  --accent: #b5793f;
  --accent-600: #9c6531;
  --accent-tint: #f5e9da;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;

  --step--1: clamp(.83rem, .8rem + .1vw, .9rem);
  --step-0: clamp(1rem, .97rem + .15vw, 1.075rem);
  --step-1: clamp(1.15rem, 1.08rem + .35vw, 1.35rem);
  --step-2: clamp(1.35rem, 1.2rem + .7vw, 1.75rem);
  --step-3: clamp(1.7rem, 1.4rem + 1.4vw, 2.5rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.4vw, 3.6rem);

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(28, 35, 33, .06), 0 1px 1px rgba(28, 35, 33, .04);
  --shadow: 0 1px 2px rgba(28, 35, 33, .05), 0 8px 24px -8px rgba(28, 35, 33, .14);
  --shadow-lg: 0 2px 4px rgba(28, 35, 33, .05), 0 24px 48px -16px rgba(28, 35, 33, .22);

  --container: 1200px;
  --gutter: clamp(1rem, .6rem + 2vw, 2rem);
  --header-h: 72px;

  color-scheme: light;
}

/* --- Bas ----------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; color: var(--ink); font-optical-sizing: auto; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

.sr-only { 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: 1rem; top: -100px; z-index: 100; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm); }
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 820px; }
.container--wide { max-width: 1040px; }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon--sm { width: 1.05em; height: 1.05em; }
.icon--xs { width: .95em; height: .95em; display: inline-block; vertical-align: -.12em; }

.kicker {
  font: 600 .75rem/1.2 var(--font-sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-600);
  margin-bottom: .75rem;
}
.kicker--light { color: #e7c9a5; }
.lead { font-size: var(--step-1); line-height: 1.55; color: var(--ink-2); max-width: 60ch; }

.text-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; text-decoration: none; }
.text-link .icon { transition: transform .2s ease; }
.text-link:hover .icon { transform: translateX(3px); }

/* --- Knappar --------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.2rem;
  border: 1px solid transparent; border-radius: 999px;
  font: 600 .95rem/1.2 var(--font-sans);
  text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--lg { padding: .95rem 1.5rem; font-size: 1rem; }
.btn--sm { padding: .55rem .95rem; font-size: .875rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px rgba(31, 77, 69, .55); }
.btn--primary:hover { background: var(--brand-600); color: #fff; }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -6px rgba(181, 121, 63, .6); }
.btn--accent:hover { background: var(--accent-600); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--ink-2); }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 245, 239, .88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(28, 35, 33, .4); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: #fff; }
.brand-icon { width: 22px; height: 22px; }
.brand-text { font: 600 1.25rem/1 var(--font-serif); letter-spacing: -.01em; }
.brand-tld { color: var(--accent); }
.brand--light { color: #fff; }
.brand--light:hover { color: #fff; }
.brand--light .brand-mark { background: rgba(255, 255, 255, .1); }

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .15rem; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item > a {
  display: block; padding: .55rem .75rem; border-radius: 8px;
  font-size: .925rem; font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}
.nav-item > a:hover, .nav-item > a[aria-current] { color: var(--ink); background: var(--surface-2); }
.nav-item > a[aria-current] { color: var(--brand); }
.sub-toggle { display: grid; place-items: center; width: 26px; height: 32px; margin-left: -.55rem; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.sub-toggle .icon { width: 15px; height: 15px; transition: transform .2s ease; }
.sub-menu {
  list-style: none; margin: 0; padding: .5rem;
  position: absolute; top: calc(100% + .35rem); left: 0; min-width: 240px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.sub-menu::before { content: ""; position: absolute; inset: -.5rem 0 auto; height: .5rem; }
.sub-menu a { display: block; padding: .55rem .75rem; border-radius: 8px; font-size: .925rem; color: var(--ink-2); text-decoration: none; }
.sub-menu a:hover, .sub-menu a[aria-current] { background: var(--surface-2); color: var(--ink); }
.sub-menu li:first-child a { color: var(--muted); font-size: .825rem; }
.has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu, .has-sub.is-open .sub-menu { opacity: 1; visibility: visible; transform: none; }
.has-sub.is-open .sub-toggle .icon { transform: rotate(180deg); }

.nav-toggle { display: none; }

@media (max-width: 1060px) {
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); cursor: pointer;
  }
  .nav-toggle .icon { width: 22px; height: 22px; }
  .nav-toggle-close { display: none; }
  .nav-open .nav-toggle-open { display: none; }
  .nav-open .nav-toggle-close { display: block; }

  .site-nav {
    position: fixed; inset: var(--header-h) 0 0; z-index: 49;
    background: var(--bg); overflow-y: auto;
    padding: 1rem var(--gutter) 3rem;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
  /* backdrop-filter gör headern till containing block för position: fixed – stäng av när menyn är öppen */
  .nav-open .site-header { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-open { overflow: hidden; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .nav-item > a { flex: 1; padding: 1rem .25rem; font-size: 1.1rem; font-family: var(--font-serif); color: var(--ink); background: none !important; }
  .sub-toggle { width: 44px; height: 44px; margin: 0; }
  .sub-toggle .icon { width: 20px; height: 20px; }
  .sub-menu {
    position: static; display: none; width: 100%; min-width: 0;
    padding: 0 0 .75rem; border: 0; box-shadow: none; background: none;
    opacity: 1; visibility: visible; transform: none;
  }
  .has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu { display: none; }
  .has-sub.is-open .sub-menu { display: block; }
  .sub-menu a { padding: .6rem .75rem; font-size: 1rem; }
}

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

.hero { position: relative; overflow: hidden; padding: clamp(2.5rem, 1.5rem + 4vw, 5.5rem) 0 clamp(3rem, 2rem + 4vw, 6rem); }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto auto; width: 55%; height: 100%;
  background: radial-gradient(60% 60% at 70% 40%, rgba(31, 77, 69, .08), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; gap: clamp(2.5rem, 2rem + 3vw, 4.5rem); align-items: center; grid-template-columns: 1.05fr .95fr; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1.4rem;
  padding: .4rem .8rem .4rem .6rem; border-radius: 999px;
  background: var(--brand-tint); color: var(--brand); font-size: .85rem; font-weight: 600;
}
.hero-title { font-size: var(--step-4); line-height: 1.04; letter-spacing: -.025em; margin-bottom: 1.4rem; }
.hero-title em { font-style: italic; color: var(--brand); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-points { list-style: none; margin: 2.25rem 0 0; padding: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .925rem; font-weight: 500; }
.hero-points li { display: inline-flex; align-items: center; gap: .45rem; }
.hero-points .icon { color: var(--accent); }

.hero-visual { position: relative; padding: 0 0 2.5rem 2rem; }
.hero-photo { margin: 0; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 5 / 4.6; background: var(--surface-2); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.fact-card {
  position: absolute; left: 0; bottom: 0; width: min(270px, 70%);
  background: var(--surface); border-radius: var(--radius); padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.fact-label { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.fact-value { font: 600 2.4rem/1.1 var(--font-serif); color: var(--brand); margin: .25rem 0 .35rem; }
.fact-text { font-size: .875rem; line-height: 1.5; color: var(--ink-2); }
.fact-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: .7rem; font-size: .85rem; font-weight: 600; text-decoration: none; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; padding-left: 1.25rem; }
  .hero-photo { aspect-ratio: 4 / 3; }
}

/* --- Sektioner ------------------------------------------------------------- */

.section { padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0; }
.section--tint { background: var(--surface-2); }
.section--line { border-top: 1px solid var(--line); }
.section--flush-top { padding-top: 0; }
.section-head { margin-bottom: clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem); max-width: 640px; }
.section-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; max-width: none; flex-wrap: wrap; }
.section-title { font-size: var(--step-3); letter-spacing: -.02em; }
.section .section-title + .card-grid { margin-top: 2rem; }

/* Kategorier */
.cat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
.cat-card {
  display: flex; flex-direction: column; gap: .55rem;
  padding: 1.6rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.cat-card:hover { color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: .6rem; border-radius: 12px; background: var(--brand-tint); color: var(--brand); transition: background-color .2s ease, color .2s ease; }
.cat-icon .icon { width: 28px; height: 28px; }
.cat-card:hover .cat-icon { background: var(--brand); color: #fff; }
.cat-name { font: 600 var(--step-1)/1.25 var(--font-serif); }
.cat-text { color: var(--muted); font-size: .95rem; line-height: 1.55; }
.cat-more { display: inline-flex; align-items: center; gap: .4rem; margin-top: auto; padding-top: .6rem; font-size: .9rem; font-weight: 600; color: var(--brand); }
.cat-more .icon { transition: transform .2s ease; }
.cat-card:hover .cat-more .icon, .feature-card:hover .cat-more .icon { transform: translateX(3px); }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: 1fr; } .cat-card { padding: 1.25rem; } }

/* Steg */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); counter-reset: step; }
.step { position: relative; padding: 1.75rem; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.step p { color: var(--ink-2); font-size: .975rem; margin: .5rem 0 1rem; }
.step-num { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 1.1rem; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent-600); font: 600 1.05rem/1 var(--font-serif); }
.step-title { font-size: var(--step-1); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Split / feature */
.split { display: grid; gap: clamp(2rem, 1.5rem + 3vw, 4rem); grid-template-columns: 1.4fr 1fr; align-items: center; }
.feature-card {
  display: flex; flex-direction: column; gap: .5rem; padding: 2rem;
  border-radius: 18px; background: var(--brand); color: #fff; text-decoration: none;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.feature-card::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, .05); }
.feature-card:hover { color: #fff; }
.feature-card .kicker { color: #e7c9a5; margin: .5rem 0 0; }
.feature-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: rgba(255, 255, 255, .1); }
.feature-icon .icon { width: 28px; height: 28px; }
.feature-title { font: 600 var(--step-2)/1.2 var(--font-serif); }
.feature-text { color: rgba(255, 255, 255, .78); font-size: .975rem; }
.feature-card .cat-more { color: #fff; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Kort */
.card-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, 1fr); }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--line-2); }
.card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-media--placeholder {
  display: grid; place-items: center; color: var(--brand);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .55), transparent 55%),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(31, 77, 69, .045) 22px 23px),
    linear-gradient(135deg, var(--brand-tint), var(--accent-tint));
}
.card-placeholder-icon { width: 64px; height: 64px; opacity: .75; stroke-width: 1.2; transition: transform .3s ease; }
.card:hover .card-placeholder-icon { transform: scale(1.06); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.35rem 1.4rem 1.5rem; }
.card-body .kicker { margin-bottom: .5rem; }
.card-title { font-size: var(--step-1); line-height: 1.3; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card-title a:hover { color: var(--brand); }
.card-text { margin-top: .6rem; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.card-meta { margin-top: auto; padding-top: 1rem; color: var(--muted); font-size: .825rem; }
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }

/* Produkter från produktflöden */
.product-grid { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(4, 1fr); }
.product {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.product:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--line-2); }
.product-media { position: relative; display: grid; place-items: center; aspect-ratio: 1; background: #fff; color: var(--brand); border-bottom: 1px solid var(--line); }
.product-media img { width: 100%; height: 100%; object-fit: contain; padding: 8%; transition: transform .4s ease; }
.product:hover .product-media img { transform: scale(1.03); }
.product-badge { position: absolute; top: .75rem; left: .75rem; padding: .2rem .55rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.product-body { display: flex; flex-direction: column; flex: 1; gap: .35rem; padding: 1rem 1.1rem 1.15rem; }
.product-brand { color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.product-name {
  color: var(--ink); font-weight: 600; line-height: 1.35; text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-name::after { content: ""; position: absolute; inset: 0; }
.product-name:hover { color: var(--brand); }
.product-name:focus-visible { outline: none; }
.product:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }
.product-foot { margin-top: auto; padding-top: .6rem; display: flex; flex-direction: column; gap: .35rem; }
.product-price { font: 600 var(--step-1)/1.2 var(--font-serif); color: var(--ink); }
.product-price.is-sale { color: var(--accent-600); }
.product-price s { margin-left: .35rem; font: 400 .85rem var(--font-sans); color: var(--muted); }
.product-shop { display: inline-flex; align-items: center; gap: .3rem; color: var(--brand); font-size: .85rem; font-weight: 600; }
.products-note { margin-top: 1.25rem; color: var(--muted); font-size: .8rem; }
@media (max-width: 960px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .product-grid { gap: .75rem; } .product-body { padding: .8rem .85rem .95rem; } .product-name { font-size: .925rem; } }

/* CTA */
.cta-band { background: var(--brand-700); color: #fff; padding: clamp(2.5rem, 2rem + 2vw, 3.75rem) 0; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 255, 255, .025) 46px 47px); }
.cta-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; }
.cta-title { color: #fff; font-size: var(--step-2); max-width: 30ch; }
.cta-text { margin-top: .5rem; color: rgba(255, 255, 255, .75); }

/* --- Sidhuvud för innehållssidor ----------------------------------------- */

.page-head { padding: clamp(1.5rem, 1rem + 2vw, 2.5rem) 0 clamp(2rem, 1.5rem + 2.5vw, 3.5rem); border-bottom: 1px solid var(--line); }
.page-head--post { border-bottom: 0; padding-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.page-head-grid { display: grid; gap: 2.5rem; align-items: center; }
.page-head-grid.has-media { grid-template-columns: 1.3fr 1fr; }
.page-title { font-size: var(--step-4); line-height: 1.06; letter-spacing: -.025em; margin-bottom: 1rem; max-width: 20ch; }
.page-head--post .page-title { max-width: 24ch; }
.page-meta { margin-top: 1.25rem; color: var(--muted); font-size: .875rem; }
.page-head-media { margin: 0; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow); background: var(--surface-2); }
.page-head-media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .page-head-grid.has-media { grid-template-columns: 1fr; }
  .page-head-media { max-width: 560px; aspect-ratio: 16 / 9; }
}

.breadcrumbs { margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem); font-size: .85rem; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; color: var(--muted); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: .35rem; color: var(--line-2); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink-2); }

.post-hero { margin: 0 auto clamp(1rem, .5rem + 2vw, 2.5rem); }
.post-hero img { width: 100%; max-width: calc(100% - 300px - clamp(2rem, 1rem + 4vw, 5rem)); max-height: 560px; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow); }

/* Produktbilder på vit botten: visa hela produkten */
.is-product { background: #fff; }
.is-product img, .card-media.is-product img { object-fit: contain; padding: 6%; }
.card:hover .card-media.is-product img { transform: scale(1.02); }
@media (max-width: 960px) { .post-hero img { max-width: 100%; } }
.post-hero.is-product img { max-height: 440px; background: #fff; box-shadow: none; border: 1px solid var(--line); }

/* --- Layout med sidokolumn ---------------------------------------------- */

.layout { display: grid; gap: clamp(2rem, 1rem + 4vw, 5rem); grid-template-columns: minmax(0, 1fr) 300px; padding-block: clamp(2rem, 1.5rem + 2.5vw, 3.5rem) clamp(3rem, 2rem + 4vw, 5rem); }
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar > :last-child { position: sticky; top: calc(var(--header-h) + 1.5rem); }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } .sidebar > :last-child { position: static; } }

.side-nav { padding: 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.side-title { font: 600 .75rem/1.2 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav a { display: flex; align-items: center; gap: .5rem; padding: .5rem 0; color: var(--ink); text-decoration: none; font-weight: 500; border-top: 1px solid var(--line); }
.side-nav li:first-child a { border-top: 0; }
.side-nav a .icon { color: var(--accent); }
.side-nav a:hover { color: var(--brand); }

.retailer-box { padding: 1.5rem; border-radius: var(--radius); background: var(--accent-tint); border: 1px solid #ead6bd; }
.retailer-title { font-size: var(--step-1); margin-bottom: 1rem; }
.retailer { padding-top: 1rem; border-top: 1px solid #e3cbae; }
.retailer + .retailer { margin-top: 1rem; }
.retailer-name { font-weight: 600; }
.retailer-desc { font-size: .9rem; color: var(--ink-2); margin: .25rem 0 1rem; }
.retailer .btn { margin-top: .75rem; }
.retailer-note { margin-top: .75rem; font-size: .75rem; color: var(--muted); text-align: center; }

/* --- Brödtext (prose) ---------------------------------------------------- */

.prose { max-width: 70ch; font-size: 1.0625rem; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.2em; font-size: var(--step-2); color: var(--ink); }
.prose h3 { margin-top: 1.9em; font-size: var(--step-1); color: var(--ink); }
.prose h4 { margin-top: 1.6em; font-family: var(--font-sans); font-size: 1rem; color: var(--ink); }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .6em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { font-weight: 500; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose ul li::marker { color: var(--accent); }
.prose ol li::marker { color: var(--accent-600); font-weight: 600; }
.prose figure { margin: 2em 0; }
.prose figure img, .prose > p > img, .prose > img { border-radius: var(--radius); }
.prose img.is-small { max-width: 320px; }
.prose figcaption { margin-top: .7rem; font-size: .875rem; color: var(--muted); text-align: center; }
.prose blockquote { margin: 2em 0; padding: 1.2rem 1.5rem; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-family: var(--font-serif); font-size: var(--step-1); color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose--intro { max-width: 62ch; }
.prose--intro > .kicker, .prose--intro > .section-title { margin-top: 0; }
.prose--intro > .section-title { margin-bottom: 1.25rem; }

.table-wrap { overflow-x: auto; margin: 2em 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.prose th, .prose td { padding: .8rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--surface-2); color: var(--ink); font-weight: 600; font-size: .85rem; }
.prose tr:last-child td { border-bottom: 0; }

.embed { position: relative; aspect-ratio: 16 / 9; margin: 2em 0; border-radius: var(--radius); overflow: hidden; background: var(--ink); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.toc { margin: 0 0 2.25rem; padding: 1.25rem 1.5rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.toc-title { font: 600 .75rem/1.2 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 2rem; font-size: .95rem; }
.toc li { break-inside: avoid; margin: 0 0 .3rem; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }
@media (max-width: 600px) { .toc ol { columns: 1; } }

/* --- 404 ------------------------------------------------------------------ */

.notfound { text-align: center; padding-block: clamp(4rem, 3rem + 6vw, 8rem); }
.notfound .page-title, .notfound .lead { margin-inline: auto; }
.notfound .hero-actions { justify-content: center; }
.pill-list { list-style: none; margin: 2.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.pill { display: inline-block; padding: .45rem .9rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: .9rem; }
.pill:hover { border-color: var(--brand); color: var(--brand); }

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

.site-footer { background: var(--ink); color: rgba(255, 255, 255, .72); padding: clamp(3rem, 2rem + 3vw, 4.5rem) 0 0; font-size: .95rem; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; padding-bottom: 3rem; }
.footer-about p { margin-top: 1.1rem; max-width: 40ch; line-height: 1.65; }
.footer-title { font: 600 .75rem/1.2 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li + li { margin-top: .55rem; }
.footer-links a, .footer-links .link-button { color: rgba(255, 255, 255, .72); text-decoration: none; font-size: .95rem; }
.footer-links a:hover, .footer-links .link-button:hover { color: #fff; text-decoration: underline; }
.footer-note { margin-top: 1.25rem; font-size: .825rem; line-height: 1.55; color: rgba(255, 255, 255, .5); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.4rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; color: rgba(255, 255, 255, .5); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* --- Cookiebanner --------------------------------------------------------- */

.consent {
  position: fixed; z-index: 60; left: 1rem; right: 1rem; bottom: 1rem;
  max-width: 560px; margin-inline: auto;
  display: flex; align-items: center; gap: 1rem 1.25rem; flex-wrap: wrap;
  padding: 1.1rem 1.25rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  font-size: .9rem; color: var(--ink-2);
}
.consent[hidden] { display: none; }
.consent p { flex: 1 1 260px; }
.consent-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* --- AdSense: håll automatiska annonser luftiga --------------------------- */
.google-auto-placed { margin-block: 2rem; }
