/* shopfab theme — lyst, produktfokuseret shop-design.
   Branding pr. site via CSS-variabler (sættes inline på <html> fra site.json colors). */

/* ---------- Fonts (selvhostede) ---------- */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 600; font-display: swap; src: url("/fonts/schibsted-600.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-display: swap; src: url("/fonts/schibsted-700.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --accent: #b26e79;
  --accent-dark: #96525e;
  --accent-soft: #f7ecee;
  --bg: #fdfcfa;
  --surface: #ffffff;
  --ink: #2b2226;
  --muted: #82757a;
  --line: #ece2e0;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -18px rgba(43, 34, 38, .25);
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-head: "Schibsted Grotesk", "Inter", system-ui, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 15.5px; line-height: 1.65; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--accent-dark); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); }
h3 { font-size: 1.05rem; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ---------- Knapper ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 14px/1 var(--font-body); padding: 11px 18px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-lg { padding: 14px 24px; font-size: 15px; }

/* ---------- Topbar ---------- */
.topbar { background: var(--accent-soft); font-size: 12.5px; color: var(--accent-dark); }
.topbar-inner { display: flex; gap: 26px; justify-content: center; padding: 7px 20px; flex-wrap: wrap; }
.topbar .ti { opacity: .7; margin-right: 4px; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 22px; min-height: 66px; }
.logo { text-decoration: none; flex-shrink: 0; }
.logo-text { font: 700 1.35rem/1 var(--font-head); color: var(--ink); letter-spacing: -.02em; }
.logo-text::after { content: "."; color: var(--accent); }
.header-search { flex: 1; max-width: 380px; position: relative; display: flex; }
.header-search input { width: 100%; padding: 10px 42px 10px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font: 400 13.5px var(--font-body); color: var(--ink); }
.header-search input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.header-search button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); padding: 8px; cursor: pointer; }
.header-nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; }
.nav > li { position: relative; }
.nav a { display: block; padding: 10px 13px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 14.5px; border-radius: 8px; }
.nav > li > a:hover { background: var(--accent-soft); color: var(--accent-dark); }
.drop { position: absolute; top: 100%; left: 0; min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); list-style: none; margin: 4px 0 0; padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s; z-index: 60; }
.has-drop:hover .drop, .has-drop:focus-within .drop { opacity: 1; visibility: visible; transform: none; }
.drop a { padding: 8px 12px; font-weight: 400; font-size: 14px; }
.drop a:hover { background: var(--accent-soft); color: var(--accent-dark); }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 10px; cursor: pointer; margin-left: auto; }
.hamburger span { width: 22px; height: 2px; background: var(--ink); transition: .2s; }
body.nav-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .hamburger span:nth-child(2) { opacity: 0; }
body.nav-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Mobilmenu ---------- */
.mobile-menu { display: none; position: fixed; inset: 0; top: 0; padding-top: 66px; background: var(--surface); z-index: 40; overflow-y: auto; }
body.nav-open .mobile-menu { display: block; }
body.nav-open { overflow: hidden; }
.mm-inner { padding: 20px; }
.mm-search { display: flex; gap: 8px; margin-bottom: 18px; }
.mm-search input { flex: 1; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: 400 14px var(--font-body); }
.mm-group { border-bottom: 1px solid var(--line); padding: 10px 0; }
.mm-head, .mm-solo a { font: 600 16px var(--font-head); color: var(--ink); text-decoration: none; }
.mm-group ul { list-style: none; margin: 6px 0 0; padding: 0; }
.mm-group ul a { display: block; padding: 7px 0 7px 14px; color: var(--muted); text-decoration: none; font-size: 14.5px; }

/* ---------- Hero ---------- */
.page-hero { background: linear-gradient(180deg, var(--accent-soft), var(--bg)); padding: 34px 0 26px; }
.page-hero .page-intro { max-width: 680px; color: var(--muted); font-size: 16px; margin: 0; }
.hero-cta { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.hero-image { position: relative; background: var(--ink); padding: 72px 0 64px; }
.hero-image::before { content: ""; position: absolute; inset: 0; background: var(--hero-img) center/cover no-repeat; opacity: .92; }
.hero-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 12, 15, .72), rgba(20, 12, 15, .18)); }
.hero-image .wrap { position: relative; z-index: 2; }
.hero-image h1, .hero-image .page-intro { color: #fff; }
.hero-image .page-intro { opacity: .92; }
.hero-split { padding: 40px 0 32px; }
.hero-split-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero-split .hero-copy { min-width: 0; }
.hero-split .hero-media { min-width: 0; }
.hero-split .hero-media img { width: 100%; aspect-ratio: 3 / 2; max-height: 440px; object-fit: cover; border-radius: 16px; display: block; box-shadow: 0 12px 32px rgba(20, 12, 15, .16); }
@media (max-width: 760px) {
  .hero-split-grid { grid-template-columns: 1fr; gap: 22px; }
  .hero-split .hero-media img { aspect-ratio: 16 / 10; max-height: 280px; }
}
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-dark); }
.crumbs .sep { margin: 0 7px; opacity: .6; }

/* ---------- Sektioner ---------- */
.section { padding: 26px 0 48px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 26px 0 4px; }
.sec-head h2 { margin: 0; }
.sec-note { font-size: 12.5px; color: var(--muted); }
.ad-note { font-size: 11.5px; color: var(--muted); margin: 2px 0 14px; letter-spacing: .01em; }

/* ---------- Kategori-kacheler ---------- */
.catgrid-sec { margin-bottom: 10px; }
.catgrid { list-style: none; margin: 14px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.catcard { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); transition: box-shadow .15s, transform .15s, border-color .15s; }
.catcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--accent); }
.catcard-media { display: grid; place-items: center; background: #fff; padding: 14px; border-bottom: 1px solid var(--line); }
.catcard-media img { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: contain; }
.catcard-media:not(:has(img)) { aspect-ratio: 4/3; }
.catcard-fallback { font: 700 2rem var(--font-head); color: var(--accent); background: var(--accent-soft); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; }
.catcard-label { display: block; padding: 11px 14px 12px; font-weight: 600; font-size: 14.5px; }
.catcard-count { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Toolbar (filtre) ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin: 6px 0 18px; font-size: 13.5px; }
.toolbar select, .toolbar input[type="number"] { font: 400 13.5px var(--font-body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.toolbar select:focus, .toolbar input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.tb-sort, .tb-price, .tb-stock { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.tb-price input { width: 74px; }
.tb-dash { opacity: .6; }
.tb-stock { cursor: pointer; user-select: none; }
.tb-stock input { accent-color: var(--accent); width: 16px; height: 16px; }
.tb-facet { position: relative; }
.tb-facet summary { list-style: none; cursor: pointer; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); user-select: none; }
.tb-facet summary::-webkit-details-marker { display: none; }
.tb-facet summary::after { content: " ▾"; font-size: 10px; color: var(--muted); }
.tb-facet[open] summary { border-color: var(--accent); }
.tb-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 10px 12px; min-width: 210px; max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.tb-pop label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.tb-pop input { accent-color: var(--accent); }
.tb-count { margin-left: auto; color: var(--muted); font-size: 12.5px; }

/* ---------- Produktgrid ---------- */
.pgrid { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { position: relative; display: block; background: #fff; padding: 16px; }
.card-media img { display: block; width: 100%; height: auto; aspect-ratio: 1/1; object-fit: contain; }
.is-out .card-media img { opacity: .45; filter: grayscale(.4); }
.badge { position: absolute; top: 10px; left: 10px; font: 600 12px/1 var(--font-body); padding: 5px 9px; border-radius: 999px; z-index: 2; }
.badge-sale { background: var(--accent); color: #fff; }
.badge-out { background: #f0edee; color: var(--muted); left: auto; right: 10px; }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; border-top: 1px solid var(--line); flex: 1; }
.card-kicker { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card-title { font: 500 14px/1.4 var(--font-body); margin: 0; letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent-dark); }
.card-price { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 8px; }
.price { font: 600 16px var(--font-body); }
.price-old { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.btn-card { margin-top: auto; background: var(--accent); color: #fff; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13.5px; }
.btn-card:hover { background: var(--accent-dark); }
.btn-arrow { transition: transform .15s; display: inline-block; }
.btn-card:hover .btn-arrow { transform: translateX(3px); }
.grid-more { text-align: center; margin: 22px 0 4px; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 34px 0 0; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 10px; padding: 0 16px; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 14.5px; padding: 13px 0; list-style: none; position: relative; padding-right: 30px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--accent); }
.faq-item[open] summary::after { content: "−"; }
.faq-a { padding: 0 0 14px; color: var(--ink); font-size: 14.5px; }
.faq-a p { margin: 0 0 .7em; }

/* ---------- Prose (SEO-tekster) ---------- */
.prose { max-width: 780px; margin-top: 30px; }
.prose-narrow { max-width: 680px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose p, .prose li { color: #4a3f44; font-size: 15px; }
.prose a { color: var(--accent-dark); }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 1em 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 11px; text-align: left; }
.prose th { background: var(--accent-soft); font-weight: 600; }

/* ---------- Diverse ---------- */
.related { margin: 30px 0 0; }
.related h2 { font-size: 1rem; color: var(--muted); font-family: var(--font-body); font-weight: 600; }
.related ul, .brandstrip ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; }
.chip { display: inline-block; padding: 7px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 13.5px; }
.chip:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.brandstrip { margin: 34px 0 0; }
.brandlist { list-style: none; margin: 20px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.brandlist a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; text-decoration: none; color: var(--ink); }
.brandlist a:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.brandlist span { font-size: 12.5px; color: var(--muted); }
.author-block { display: flex; gap: 12px; align-items: center; margin: 34px 0 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); max-width: 780px; font-size: 13px; color: var(--muted); }
.author-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; font: 700 16px var(--font-head); flex-shrink: 0; }
.author-meta strong { color: var(--ink); }
.searchpage-form { display: flex; gap: 10px; max-width: 560px; margin-bottom: 8px; }
.searchpage-form input { flex: 1; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: 400 15px var(--font-body); }

/* ---------- Footer ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 30px; }
/* Brand-kolonne som FAST bredde (ikke fr) — en flexibel track uden for auto-fit gør hele
   grid-template ugyldig, så footeren faldt tilbage til én kolonne. */
.footer-grid { display: grid; grid-template-columns: minmax(200px, 300px) repeat(auto-fit, minmax(150px, 1fr)); gap: 34px; padding: 40px 20px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 440px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { font: 700 1.2rem var(--font-head); }
.footer-logo::after { content: "."; color: var(--accent); }
.footer-brand p { color: var(--muted); font-size: 13.5px; max-width: 34ch; }
.footer-col h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-family: var(--font-body); }
.footer-col a { display: block; color: var(--ink); text-decoration: none; font-size: 14px; padding: 4px 0; }
.footer-col a:hover { color: var(--accent-dark); }
.footer-bottom { border-top: 1px solid var(--line); padding: 18px 0 26px; }
.footer-bottom p { margin: 4px 0; font-size: 12px; color: var(--muted); }
.footer-bottom a { color: var(--muted); }
.footer-disclaimer { max-width: 900px; }

/* ---------- Responsivt ---------- */
@media (max-width: 980px) {
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .header-search { max-width: none; }
}
@media (max-width: 640px) {
  .header-search { display: none; }
  .topbar-inner { gap: 12px; }
  .topbar-inner > span:not(:first-child) { display: none; }
  .pgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .catgrid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .card-body { padding: 10px 11px 12px; }
  .toolbar { font-size: 13px; gap: 8px; }
  .tb-count { flex-basis: 100%; margin-left: 0; }
  .section { padding-top: 18px; }
}

/* ---------- Blog ---------- */
.postlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.post-card a { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; transition: box-shadow .15s, transform .15s; }
.post-card a:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card a > img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-card-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 22px 20px; }
.post-card h2 { font: 700 19px/1.3 var(--font-head); margin: 0; }
.post-card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.post-date { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.post-more { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 600; color: var(--accent); }
.post-meta { font-size: 13px; color: var(--muted); margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
