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

:root {
  --bg:           #f5f4f0;
  --surface:      #ffffff;
  --border:       #e2dfd6;
  --text:         #1c1c1a;
  --muted:        #6b6960;
  --accent:       #2d6a4f;
  --accent-light: #e8f4ee;
  --price:        #1b4332;
  --radius:       8px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

/* ── Header ── */
header {
  background: var(--accent);
  padding: 1.1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  text-decoration: none;
  letter-spacing: -.02em;
}

.site-title::before {
  content: '🏷 ';
  font-style: normal;
}

/* ── Layout ── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

/* ── Kategori-navigation ── */
.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.5rem;
}

.cat-nav a {
  padding: .3rem .85rem;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: background .15s, border-color .15s, color .15s;
}

.cat-nav a:hover,
.cat-nav a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}

/* ── Varegiiter ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.card-img {
  aspect-ratio: 4/3;
  background-color: var(--border);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.no-img-icon {
  font-size: 2rem;
  color: var(--muted);
}

.card-body {
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.category {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: .7rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .05em;
  width: fit-content;
}

.card-title {
  font-size: .9rem;
  font-weight: 500;
}

.card-price {
  font-size: .95rem;
  font-weight: 700;
  color: var(--price);
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 4rem 1rem;
  font-size: 1rem;
}

/* ── Enkelt vare ── */
.detail-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--accent);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 1rem;
  opacity: .85;
}
.back:hover { opacity: 1; text-decoration: underline; }

/* Produktkort */
.product-card {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.06);
  overflow: hidden;
}

/* Hero: billede + info side om side */
.product-hero {
  display: grid;
  grid-template-columns: minmax(300px, 520px) 1fr;
  min-height: 400px;
}

.hero-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5%;
  background: #f0efeb;
  cursor: zoom-in;
  position: relative;
}

.hero-img-inner {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.12);
  position: relative;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.hero-img-wrap:hover .hero-img { transform: scale(1.04); }

.zoom-hint {
  position: absolute;
  bottom: calc(5% + .5rem);
  right: calc(5% + .5rem);
  background: rgba(0,0,0,.45);
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  opacity: 0;
  transition: opacity .2s;
}
.hero-img-wrap:hover .zoom-hint { opacity: 1; }

.no-photo-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: var(--border);
  color: var(--muted);
}

/* Produktinfo */
.product-info {
  padding: 2.25rem 2rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  background: #fafaf8;
  border-left: 1px solid var(--border);
}

/* Top-række: kategori + status */
.product-info-top {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1rem;
}

.pi-category {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  background: var(--accent-light);
  padding: .2rem .6rem;
  border-radius: 99px;
}

.pi-status {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #15803d;
  background: #dcfce7;
  padding: .2rem .6rem;
  border-radius: 99px;
}

/* Titel */
.pi-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.025em;
  color: var(--text);
  margin-bottom: 1.25rem;
}

/* Pris-blok */
.pi-price-block {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1.1rem;
}

.pi-price-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.pi-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--price);
  letter-spacing: -.03em;
  line-height: 1;
}

.pi-currency {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
}

/* Divider */
.pi-divider {
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}

/* Beskrivelse */
.pi-desc-block {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  flex: 1;
}

.pi-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.pi-description {
  font-size: .925rem;
  line-height: 1.75;
  color: #3a3a36;
  white-space: pre-wrap;
}

/* Ressource-link */
.pi-resource-wrap {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: .5rem;
}

.pi-resource {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  padding: .65rem 1rem;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  transition: background .15s, color .15s;
  width: fit-content;
}
.pi-resource:hover {
  background: var(--accent);
  color: #fff;
}

.pi-resource-url {
  font-size: .75rem;
  color: var(--muted);
  font-family: monospace;
  padding-left: .2rem;
  word-break: break-all;
}

/* Galleri-sektion */
.product-gallery-wrap {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem 2rem;
}

.gallery-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.product-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
}

.gallery-thumb {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: zoom-in;
  background: var(--border);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.gallery-thumb:hover img { transform: scale(1.06); }

/* ── Lightbox (CSS :target) ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.lightbox:target { display: flex; }

.lightbox-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lightbox-frame {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox-frame img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 48px rgba(0,0,0,.6);
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 38px;
  height: 38px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
  z-index: 2;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  transition: background .15s, transform .15s;
  z-index: 2;
  user-select: none;
}
.lightbox-nav:hover {
  background: rgba(255,255,255,.28);
  transform: translateY(-50%) scale(1.08);
}
.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }

.lightbox-counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  letter-spacing: .05em;
  z-index: 2;
  pointer-events: none;
}

/* ── Responsiv ── */
@media (max-width: 600px) {
  .product-hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-img-wrap { min-height: 260px; }
  .product-info { padding: 1.25rem; border-left: none; border-top: 1px solid var(--border); }
  .pi-title { font-size: 1.15rem; margin-bottom: .9rem; }
  .pi-price { font-size: 1.5rem; }
  .product-gallery-wrap { padding: 1rem 1.25rem 1.5rem; }
  .zoom-hint { opacity: 1; }
}

@media (max-width: 500px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
}
