/* =====================================================================
   style.css - mobile-first
   Designsprog: nordisk møbelhåndværk. Linned-hvid flade, dyb granfarve
   og en egetræs-accent. Fraunces til overskrifter, Inter til brødtekst.
   Signatur: karrusellen står på en "hylde" - en tynd egetræslinje.
   ===================================================================== */

:root {
  --linned:   #FAF8F4;
  --blaek:    #23231F;
  --gran:     #31463A;
  --eg:       #B98B4E;
  --eg-lys:   #E9DCC8;
  --graa:     #6E6A62;
  --hvid:     #FFFFFF;
  --radius:   10px;
  --skygge:   0 2px 12px rgba(35, 35, 31, .08);
  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--blaek);
  background: var(--linned);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gran); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 4vw, 1.8rem); }

.wrap { width: min(100% - 2rem, 1080px); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header { background: var(--hvid); border-bottom: 1px solid var(--eg-lys); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; }
.logo { display: inline-flex; align-items: center; }
.logo img { height: 38px; width: auto; display: block; }
@media (min-width: 640px) { .logo img { height: 44px; } }

.nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: .5rem; cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--blaek); }

.hovednav { display: none; }
.hovednav.aaben { display: flex; flex-direction: column; width: 100%; padding-bottom: .5rem; }
.hovednav a { padding: .6rem 0; text-decoration: none; font-weight: 500; }

/* ---------- Søgning ---------- */
.soegning { position: relative; padding-bottom: 1rem; }
.soegning form { display: flex; gap: .5rem; }
.soegning input {
  flex: 1; padding: .7rem 1rem; font-size: 1rem;
  border: 1px solid var(--eg-lys); border-radius: var(--radius);
  background: var(--linned);
}
.soegning input:focus { outline: 2px solid var(--eg); outline-offset: 1px; }
.soegning button {
  padding: .7rem 1.2rem; font-weight: 600; border: 0; cursor: pointer;
  background: var(--gran); color: var(--hvid); border-radius: var(--radius);
}

.soeg-resultater {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 50;
  background: var(--hvid); border: 1px solid var(--eg-lys);
  border-radius: var(--radius); box-shadow: var(--skygge);
  max-height: 70vh; overflow-y: auto;
}
.soeg-hit {
  display: flex; align-items: center; gap: .8rem;
  padding: .6rem .9rem; text-decoration: none; color: var(--blaek);
}
.soeg-hit:hover, .soeg-hit:focus { background: var(--linned); }
.soeg-hit img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; }
.soeg-hit .hit-navn { font-weight: 500; font-size: .95rem; }
.soeg-hit .hit-kategori { font-size: .8rem; color: var(--graa); }
.soeg-hit .hit-pris { margin-left: auto; font-weight: 600; color: var(--gran); white-space: nowrap; }
.soeg-tom { padding: .9rem; color: var(--graa); font-size: .9rem; }

/* ---------- Hero ---------- */
.hero { padding: 2.5rem 0 2rem; }
/* Roterende headlines: blødt crossfade på de tre tekstelementer */
.hero [data-hero] { transition: opacity .4s ease, transform .4s ease; }
.hero.hero-skifter [data-hero] { opacity: 0; transform: translateY(6px); }
@media (prefers-reduced-motion: reduce) {
  .hero [data-hero] { transition: none; }
}
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .75rem;
  font-weight: 600; color: var(--eg); margin: 0 0 .6rem;
}
.hero-tekst { color: var(--graa); max-width: 46ch; }

.kategori-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.2rem 0 0; }
.kategori-chips a {
  display: inline-block; padding: .4rem .9rem; font-size: .85rem; font-weight: 500;
  background: var(--hvid); border: 1px solid var(--eg-lys); border-radius: 999px;
  text-decoration: none; color: var(--blaek);
}
.kategori-chips a:hover { border-color: var(--eg); }

/* ---------- Karrusel (signatur: hylden) ---------- */
.karrusel-sektion { padding: 1.5rem 0 2rem; }
.karrusel-sektion + .karrusel-sektion { padding-top: .5rem; }
.karrusel-top { display: flex; align-items: baseline; justify-content: space-between; }
.karrusel-knapper button {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--eg-lys);
  background: var(--hvid); cursor: pointer; font-size: 1rem;
}
.karrusel-knapper button:hover { border-color: var(--eg); }

.karrusel-vindue { overflow: hidden; }
.karrusel {
  list-style: none; display: flex; gap: 1rem; padding: 1rem;
  margin: 0; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* hylden */
  border-bottom: 3px solid var(--eg);
  padding-bottom: 1.2rem;
  width: min(100% - 2rem, 1080px); margin-inline: auto;
}
.karrusel::-webkit-scrollbar { display: none; }

.produkt-kort {
  flex: 0 0 70%; scroll-snap-align: start;
  background: var(--hvid); border-radius: var(--radius);
  box-shadow: var(--skygge); overflow: hidden; position: relative;
}
.produkt-kort a { text-decoration: none; color: var(--blaek); display: block; }
.produkt-kort img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.produkt-kort .kort-info { padding: .8rem .9rem 1rem; }
.produkt-kort .kort-kategori { font-size: .75rem; color: var(--graa); text-transform: uppercase; letter-spacing: .06em; }
.produkt-kort h3 { font-family: var(--font-body); font-size: .95rem; font-weight: 600; margin: .2rem 0 .4rem; }
.produkt-kort .kort-pris { font-weight: 600; color: var(--gran); }
.produkt-kort .kort-pris del { color: var(--graa); font-weight: 400; margin-left: .4rem; }

.rabat-badge {
  position: absolute; top: .6rem; left: .6rem;
  background: var(--gran); color: var(--hvid);
  font-size: .75rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px;
}
.karrusel-loader { color: var(--graa); padding: 2rem 0; }

/* ---------- Magasin ---------- */
.magasin { padding: 1rem 0 3rem; }
.magasin-grid { display: grid; gap: 1.2rem; }
.kort a { text-decoration: none; color: var(--blaek); display: block; }
.kort img { border-radius: var(--radius); aspect-ratio: 3/2; object-fit: cover; }
.kort-tekst { padding: .7rem 0 0; }
.kort-tekst h3 { font-size: 1.1rem; }
.kort-tekst p { color: var(--graa); font-size: .92rem; margin: .3rem 0; }
.kort-tekst time { font-size: .8rem; color: var(--eg); font-weight: 600; }
.tom-tilstand { color: var(--graa); }

/* ---------- Produktside ---------- */
.brodkrummer { padding: 1rem 0 0; font-size: .85rem; }
.brodkrummer ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.brodkrummer li + li::before { content: "/"; margin-right: .4rem; color: var(--graa); }

.produktside { display: grid; gap: 1.5rem; padding: 1.2rem 0 3rem; }
.produkt-billede { position: relative; }
.produkt-billede img { border-radius: var(--radius); background: var(--hvid); }
.produkt-pris .nypris { font-size: 1.6rem; font-weight: 700; color: var(--gran); }
.produkt-pris .glpris { color: var(--graa); margin-left: .6rem; }
.produkt-fakta { list-style: none; padding: 0; font-size: .95rem; }
.produkt-fakta li { padding: .35rem 0; border-bottom: 1px dashed var(--eg-lys); }

.cta {
  display: block; text-align: center; margin: 1.2rem 0;
  background: var(--gran); color: var(--hvid); text-decoration: none;
  font-weight: 600; padding: .95rem 1.4rem; border-radius: var(--radius);
}
.cta:hover { background: #263a2f; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blaek); color: var(--linned); padding: 2rem 0; margin-top: 2rem; }
.site-footer a { color: var(--eg-lys); margin-right: 1rem; }
.disclaimer { font-size: .85rem; color: #BDB9B0; max-width: 60ch; }
.copy { font-size: .8rem; color: #8C8880; }

/* ---------- Fokus-synlighed ---------- */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--eg); outline-offset: 2px;
}

/* =====================================================================
   Tablet (min 640px)
   ===================================================================== */
@media (min-width: 640px) {
  .produkt-kort { flex-basis: 38%; }
  .magasin-grid { grid-template-columns: 1fr 1fr; }
  .kort-stor { grid-column: span 2; }
  .kort-stor img { aspect-ratio: 21/9; }
}

/* =====================================================================
   Desktop (min 960px)
   ===================================================================== */
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .hovednav { display: flex; gap: 1.6rem; }
  .header-inner { padding: 1.1rem 0; }
  .soegning form { max-width: 560px; }
  .produkt-kort { flex-basis: 23%; }
  .magasin-grid { grid-template-columns: repeat(3, 1fr); }
  .kort-stor { grid-column: span 3; display: grid; }
  .kort-stor a { display: grid; grid-template-columns: 3fr 2fr; gap: 1.4rem; align-items: center; }
  .produktside { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* ---------- Kategori-oversigt (/kategorier) ---------- */
.kat-gruppe { margin-top: 2rem; }
.kat-gruppe-titel {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600;
  margin: 0 0 .8rem; padding-bottom: .4rem;
  border-bottom: 2px solid var(--eg);
  display: inline-block;
}
.kat-gruppe .kategori-chips { margin-top: 0; }
.kat-gruppe .kategori-chips a {
  display: inline-flex; align-items: center; gap: .5rem;
}
.chip-antal {
  font-size: .72rem; font-weight: 600; color: var(--graa);
  background: var(--eg-lys); border-radius: 999px; padding: .05rem .45rem;
}
.kat-gruppe .kategori-chips a:hover .chip-antal { color: var(--blaek); }