/* =========================================================
   K360 — enkelt-produkt: standard
   (alle produkter uden kategori-specifik skabelon)
   Version: 2.1.0

   Forudsætter designtokens fra child theme'ets style.css:
   --c-ink, --c-paper, --c-surface, --c-border, --c-danger,
   --stripe-gradient, --font-display, --font-body, --space-*,
   --radius-*, --container, --shadow-*, --ease-out.
   Alle tokens har fallback-værdier, så skabelonen også
   fungerer før tokens er porteret til temaet.

   Mobile first. Moderne udtryk: bløde hjørner, hairline-kanter
   (tegnet med inset box-shadow), pill-knapper — ingen dekorative
   skygger (kun den sticky køb-bar på mobil har skygge).
   ========================================================= */

/* Full-bleed breakout: skabelonen lægger sig i fuld viewport-bredde
   uanset hvor smal temaets content-wrapper er, og indholdet centreres
   i samme --container-bredde som forsiden. 100vw inkluderer scrollbaren,
   så vandret scroll klippes væk på både html og body. */
html:has(body.single-product) { overflow-x: clip; }
body.single-product { overflow-x: clip; }

/* Skabelonen forudsætter border-box — sæt den selv, hvis temaet
   ikke har en global reset. */
.k360-produkt,
.k360-produkt *,
.k360-produkt *::before,
.k360-produkt *::after {
  box-sizing: border-box;
}

.k360-produkt {
  position: relative;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding-block: 0 var(--space-5, 4rem);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--fs-body, 1.05rem);
  line-height: 1.65;
  color: var(--c-text, #1c1b1a);
}
/* Temaer sætter ofte egne fonte med høj specificitet på p/li/input m.m.
   — alt brødtekst-agtigt i skabelonen skal arve brødtekst-fonten. */
.k360-produkt :is(p, a, li, dl, dt, dd, span, strong, em, input, button, del, ins) {
  font-family: inherit;
}

.k360-produkt__inner {
  max-width: var(--container, 1400px);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

/* =========================================================
   Topbanner — mørkt bånd med tynd accent-stribe i bunden
   ========================================================= */
.k360-banner {
  position: relative;
  background: var(--c-primary-dark, #000000);
  color: var(--c-text-light, #ffffff);
  margin-bottom: var(--space-4, 2.5rem);
}
.k360-banner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--stripe-gradient, linear-gradient(90deg, #1c1b1a 0 100%));
}
.k360-banner__inner {
  max-width: var(--container, 1400px);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
  padding-block: clamp(1.25rem, 3vw, 2rem) calc(clamp(1.25rem, 3vw, 2rem) + 3px);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2, 1rem);
  flex-wrap: wrap;
}
/* Breadcrumb — bor i banneret; tema-kopier udenfor skjules */
body.single-product .woocommerce-breadcrumb:not(.k360-banner__breadcrumb) { display: none; }
.k360-banner__breadcrumb {
  display: block;
  font-size: var(--fs-small, 0.85rem);
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 0.6em;
}
/* !important fordi temaers globale linkfarver ellers slår igennem */
.k360-banner__breadcrumb a {
  color: var(--c-text-light, #ffffff) !important;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.25s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
@media (hover: hover) and (pointer: fine) {
  .k360-banner__breadcrumb a:hover { text-decoration-color: rgba(255, 255, 255, 0.7); }
}
.k360-banner__breadcrumb-sep {
  display: inline-block;
  margin-inline: 0.45em;
  color: rgba(255, 255, 255, 0.4);
}

.k360-banner__title {
  font-family: var(--font-display, system-ui, sans-serif);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}
.k360-banner__sub {
  font-size: var(--fs-small, 0.85rem);
  color: rgba(255, 255, 255, 0.75);
  margin: 0.2em 0 0;
}
.k360-banner__link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--c-text-light, #ffffff);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.25s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
@media (hover: hover) and (pointer: fine) {
  .k360-banner__link:hover { text-decoration-color: var(--c-text-light, #ffffff); }
}

/* ---------- Topsektion: galleri + købskolonne ---------- */
.k360-produkt__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4, 2.5rem);
  align-items: start;
}
/* Mobil: venstre-wrapperen opløses — galleri før købskolonnen */
.k360-produkt__left { display: contents; }
.k360-produkt__left .k360-gallery { order: 1; }
.k360-buy { order: 2; }
@media (min-width: 900px) {
  .k360-produkt__top {
    grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
    gap: clamp(2.5rem, 4vw, 4.5rem);
  }
  /* Desktop: galleriet i venstre kolonne — sticky, så billederne
     følger med mens den (typisk længere) højre kolonne scrolles. */
  .k360-produkt__left {
    display: block;
    min-width: 0;
    position: sticky;
    top: clamp(5rem, 10vh, 7rem);
  }
}

/* =========================================================
   Galleri
   Mobil:   hovedbillede som swipe-carousel, thumbs vandret under.
   Desktop: smal lodret thumb-kolonne til venstre for hovedbilledet.
   ========================================================= */
.k360-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2, 1rem);
}
/* Mobil: hovedbillede øverst, thumbs i vandret række under */
.k360-gallery__viewport { order: 1; }
.k360-gallery__thumbs { order: 2; }
@media (min-width: 900px) {
  /* Kun to kolonner når der er en thumbnail-kolonne — med ét billede
     (k360-gallery--single) fylder hovedbilledet hele bredden */
  .k360-gallery:not(.k360-gallery--single) {
    grid-template-columns: 86px minmax(0, 1fr);
  }
  /* Desktop: thumb-kolonnen står til venstre for hovedbilledet */
  .k360-gallery__thumbs { order: 0; }
}

.k360-gallery__viewport {
  min-width: 0;
  border-radius: var(--radius-lg, 16px);
  background: var(--c-paper, #ffffff);
  box-shadow: inset 0 0 0 1px var(--c-border, #e8e7e4);
  overflow: hidden;
}
.k360-gallery__viewport:focus-visible {
  outline: 2px solid var(--c-ink, #1c1b1a);
  outline-offset: 2px;
}

.k360-gallery__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.k360-gallery__track::-webkit-scrollbar { display: none; }

.k360-gallery__slide {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  background: var(--c-paper, #ffffff);
  display: grid;
  place-items: center;
}
.k360-gallery__zoom {
  display: block;
  width: 100%;
  cursor: zoom-in;
}
/* Billederne har hvid baggrund og må ikke beskæres */
.k360-gallery__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(78vh, 760px);
  object-fit: contain;
  aspect-ratio: 1 / 1;
}

/* ---------- Thumbnails ---------- */
.k360-gallery__thumbs {
  display: flex;
  flex-direction: row;
  gap: var(--space-2, 1rem);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}
.k360-gallery__thumbs::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
  .k360-gallery__thumbs {
    flex-direction: column;
    overflow-x: visible;
    overflow-y: auto;
    max-height: min(78vh, 760px);
    padding: 2px;
  }
}

.k360-gallery__thumb {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm, 8px);
  background: var(--c-paper, #ffffff);
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--c-border, #e8e7e4);
  transition: box-shadow 0.25s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
              opacity 0.25s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
@media (min-width: 900px) {
  .k360-gallery__thumb { width: 100%; }
}
.k360-gallery__thumb-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: var(--radius-sm, 8px);
}
.k360-gallery__thumb:focus-visible {
  outline: 2px solid var(--c-ink, #1c1b1a);
  outline-offset: 2px;
}

/* Aktiv thumbnail markeres med mørk ring — hover antyder den samme */
.k360-gallery__thumb.is-active {
  box-shadow: inset 0 0 0 2px var(--c-ink, #1c1b1a);
}
@media (hover: hover) and (pointer: fine) {
  .k360-gallery__thumb:hover { box-shadow: inset 0 0 0 2px var(--c-border-strong, #d6d4d0); }
  .k360-gallery__thumb.is-active:hover { box-shadow: inset 0 0 0 2px var(--c-ink, #1c1b1a); }
}

/* =========================================================
   Købskolonne
   ========================================================= */
.k360-buy {
  min-width: 0;
}
@media (min-width: 900px) {
  .k360-buy {
    position: sticky;
    top: clamp(5rem, 10vh, 7rem);
  }
}

.k360-buy__box {
  background: var(--c-paper, #ffffff);
  border: 1px solid var(--c-border, #e8e7e4);
  border-radius: var(--radius-lg, 16px);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  position: relative;
  overflow: hidden;
}
.k360-buy__title {
  font-family: var(--font-display, system-ui, sans-serif);
  font-weight: 700;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--c-ink, #1c1b1a);
  margin: 0 0 0.4em;
}

.k360-buy__intro {
  color: var(--c-text, #1c1b1a);
  margin: 0 0 var(--space-2, 1rem);
}
.k360-buy__intro p { margin: 0 0 0.6em; }
.k360-buy__intro p:last-child { margin-bottom: 0; }

/* Lagerstatus fra Woo — halvfed og i brødtekst-fonten, farvet efter
   tilstand: på lager = --c-success, lavt lager/restordre = --c-warning,
   udsolgt = --c-sold-out. !important fordi temaets/Woo's egne
   grønne/røde lagerfarver ellers vinder. */
.woocommerce div.product .k360-produkt p.stock,
.k360-produkt .stock {
  font-family: var(--font-body, system-ui, sans-serif) !important;
  font-weight: 600;
  color: var(--c-success, #1f7a4d) !important;
}
.woocommerce div.product .k360-produkt p.stock.low-stock,
.woocommerce div.product .k360-produkt p.stock.available-on-backorder,
.k360-produkt .stock.low-stock,
.k360-produkt .stock.available-on-backorder {
  color: var(--c-warning, #8a5a00) !important;
}
.woocommerce div.product .k360-produkt p.stock.out-of-stock,
.k360-produkt .stock.out-of-stock {
  color: var(--c-sold-out, #6b6b6b) !important;
}

/* Pris — Woo's egen markup (p.price, del/ins) styles her.
   Selectorerne matcher temaets typiske ".woocommerce div.product p.price"
   i specificitet, så temaets standardstil ikke vinder. */
.woocommerce div.product .k360-buy__price p.price,
.k360-buy__price .price {
  display: block;
  font-family: var(--font-display, system-ui, sans-serif);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--c-ink, #1c1b1a);
  margin: 0 0 var(--space-2, 1rem);
}
.woocommerce div.product .k360-buy__price p.price .woocommerce-Price-amount,
.k360-buy__price .price .woocommerce-Price-amount {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.woocommerce div.product .k360-buy__price p.price del,
.k360-buy__price .price del {
  font-size: 0.6em;
  font-weight: 400;
  color: var(--c-text-muted, #6b6b6b);
  opacity: 1;
  margin-right: 0.4em;
  text-decoration-color: var(--c-danger, #b02a37);
  text-decoration-thickness: 1.5px;
}
.woocommerce div.product .k360-buy__price p.price ins,
.k360-buy__price .price ins {
  text-decoration: none;
  color: var(--c-danger, #b02a37);
}

/* Add-to-cart: Woo's form, egen styling af felter og knap */
.k360-buy__cart form.cart {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 1rem);
  align-items: stretch;
  margin: 0;
}
.k360-buy__cart .quantity {
  display: inline-flex;
}
.k360-buy__cart .quantity .qty {
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 1rem;
  width: 4.2em;
  padding: 0.8em 0.4em;
  text-align: center;
  border: none;
  border-radius: var(--radius-md, 12px);
  background: var(--c-paper, #ffffff);
  box-shadow: inset 0 0 0 1px var(--c-border-strong, #d6d4d0);
  transition: box-shadow 0.2s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
.k360-buy__cart .quantity .qty:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--c-ink, #1c1b1a);
}

/* Primær CTA — solid mørk pill-knap; hover gør kun fladen mørkere */
.k360-buy__cart .single_add_to_cart_button {
  position: relative;
  flex: 1 1 auto;
  font-family: var(--font-body, system-ui, sans-serif);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  padding: 0.95em 1.8em;
  border: none;
  border-radius: var(--radius-pill, 999px);
  background: var(--c-primary, #222222);
  color: var(--c-on-primary, #ffffff);
  cursor: pointer;
  transition: background 0.15s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
@media (hover: hover) and (pointer: fine) {
  .k360-buy__cart .single_add_to_cart_button:hover {
    background: var(--c-primary-dark, #000000);
  }
}
.k360-buy__cart .single_add_to_cart_button:focus-visible {
  outline: 2px solid var(--c-ink, #1c1b1a);
  outline-offset: 3px;
}
/* Deaktiveret (ingen variant valgt / udsolgt variant): massiv dæmpet
   flade i stedet for gennemsigtighed, så teksten holder ≥ 4.5:1
   (hvid på --c-sold-out #6b6b6b ≈ 5.3:1). */
.k360-buy__cart .single_add_to_cart_button.disabled,
.k360-buy__cart .single_add_to_cart_button:disabled {
  opacity: 1;
  cursor: not-allowed;
}
/* Hærdning mod temaets globale knapfarver (fx lilla .button-stil):
   temaets "div.product form.cart .button"-selectorer er mere specifikke
   end skabelonens, så farverne låses fast her. */
body.single-product .k360-buy__cart .single_add_to_cart_button,
body.single-product .k360-buy__cart button.single_add_to_cart_button.button,
body.single-product .k360-buy__cart button.single_add_to_cart_button.alt {
  background: var(--c-primary, #222222) !important;
  color: var(--c-on-primary, #ffffff) !important;
  border: none !important;
  border-radius: var(--radius-pill, 999px) !important;
  text-transform: none !important;
}
@media (hover: hover) and (pointer: fine) {
  body.single-product .k360-buy__cart .single_add_to_cart_button:hover,
  body.single-product .k360-buy__cart button.single_add_to_cart_button.button:hover,
  body.single-product .k360-buy__cart button.single_add_to_cart_button.alt:hover {
    background: var(--c-primary-dark, #000000) !important;
  }
}
body.single-product .k360-buy__cart .single_add_to_cart_button.disabled,
body.single-product .k360-buy__cart .single_add_to_cart_button:disabled,
body.single-product .k360-buy__cart button.single_add_to_cart_button.alt.disabled,
body.single-product .k360-buy__cart button.single_add_to_cart_button.alt:disabled {
  background: var(--c-sold-out, #6b6b6b) !important;
  color: var(--c-on-primary, #ffffff) !important;
  opacity: 1 !important;
}

.k360-buy__note {
  font-size: var(--fs-small, 0.85rem);
  color: var(--c-text-muted, #6b6b6b);
  margin: 0.8em 0 var(--space-3, 1.5rem);
}

/* Sekundær knap — outlined pill der fyldes ved hover.
   Renderes som <button> af forespørgsels-modulet (eller <a> som fallback). */
.k360-buy__inquiry {
  display: block;
  width: 100%;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  font-family: var(--font-body, system-ui, sans-serif);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.9em 1.8em;
  border: none;
  border-radius: var(--radius-pill, 999px);
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--c-ink, #1c1b1a);
  color: var(--c-ink, #1c1b1a);
  transition: color 0.25s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
              background 0.25s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
@media (hover: hover) and (pointer: fine) {
  .k360-buy__inquiry:hover {
    background: var(--c-ink, #1c1b1a);
    color: var(--c-text-light, #ffffff);
  }
}
.k360-buy__inquiry:focus-visible {
  outline: 2px solid var(--c-ink, #1c1b1a);
  outline-offset: 3px;
}
/* Udsolgt / ikke købbar: forespørgslen er den primære handling —
   samme solide pill-knap som "Læg i kurv". */
.k360-buy__inquiry--primary {
  font-size: 1rem;
  padding: 0.95em 1.8em;
  background: var(--c-primary, #222222);
  color: var(--c-on-primary, #ffffff);
  box-shadow: none;
  transition: background 0.15s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
@media (hover: hover) and (pointer: fine) {
  .k360-buy__inquiry--primary:hover {
    background: var(--c-primary-dark, #000000);
    color: var(--c-on-primary, #ffffff);
  }
}

/* Købbar vare: forespørgslen er en diskret tekstlinje under køb-knappen
   ("Har du spørgsmål? Send forespørgsel") — ikke en konkurrerende knap. */
.k360-buy__inquiry-line {
  margin: var(--space-2, 1rem) 0 0;
  font-size: var(--fs-small, 0.85rem);
  color: var(--c-text-muted, #6b6b6b);
  text-align: center;
}
.k360-buy .k360-buy__inquiry--link {
  display: inline;
  width: auto;
  padding: 0;
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--c-text-muted, #6b6b6b);
  text-decoration: underline;
  text-decoration-color: var(--c-border-strong, #d6d4d0);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
              text-decoration-color 0.15s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
@media (hover: hover) and (pointer: fine) {
  .k360-buy .k360-buy__inquiry--link:hover {
    background: transparent;
    color: var(--c-ink, #1c1b1a);
    text-decoration-color: var(--c-ink, #1c1b1a);
  }
}
@media (pointer: coarse) {
  .k360-buy .k360-buy__inquiry--link {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap-min, 44px);
  }
}

/* Tryghedslinjer (filteret k360_product_assurances) — samme diskrete
   typografi som .k360-buy__note. Tom som standard. */
.k360-buy__assurances {
  list-style: none;
  margin: var(--space-2, 1rem) 0 0;
  padding: 0;
  font-size: var(--fs-small, 0.85rem);
  color: var(--c-text-muted, #6b6b6b);
}
.k360-buy__assurances li { margin: 0 0 0.3em; }
.k360-buy__assurances li:last-child { margin-bottom: 0; }
.k360-buy__assurances strong {
  font-weight: 600;
  color: var(--c-text, #1c1b1a);
}
.k360-buy__assurances a {
  color: var(--c-text-muted, #6b6b6b);
  text-decoration: underline;
  text-decoration-color: var(--c-border-strong, #d6d4d0);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.25s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
              text-decoration-color 0.25s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
@media (hover: hover) and (pointer: fine) {
  .k360-buy__assurances a:hover {
    color: var(--c-ink, #1c1b1a);
    text-decoration-color: var(--c-ink, #1c1b1a);
  }
}

/* =========================================================
   Variantvælger (variable produkter)
   Woo's variations-form: én attribut pr. række. JS'en bygger
   billed-swatches oven på selects'ene (k360-has-swatches);
   uden JS/jQuery vises selects'ene, pænt stylet.
   ========================================================= */
.k360-buy__cart .variations {
  flex: 1 1 100%;
  display: block;
  width: 100%;
  margin: 0 0 0.25rem;
  border: none;
  border-collapse: collapse;
}
.k360-buy__cart .variations tbody,
.k360-buy__cart .variations tr,
.k360-buy__cart .variations th,
.k360-buy__cart .variations td {
  display: block;
  padding: 0;
  border: none;
  text-align: left;
}
.k360-buy__cart .variations tr + tr { margin-top: var(--space-2, 1rem); }
.k360-buy__cart .variations th.label {
  margin: 0 0 0.5em;
}
.k360-buy__cart .variations th.label label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--c-text-muted, #6b6b6b);
}
/* Fallback-select (skjules når swatches er bygget) */
.k360-buy__cart .variations select {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--c-ink, #1c1b1a);
  width: 100%;
  max-width: 100%;
  padding: 0.65em 1.1em;
  border: none;
  border-radius: var(--radius-md, 12px);
  background: var(--c-paper, #ffffff);
  box-shadow: inset 0 0 0 1px var(--c-border-strong, #d6d4d0);
  cursor: pointer;
}
.k360-buy__cart .variations select:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--c-ink, #1c1b1a);
}
.k360-buy__cart .variations select.k360-swatch-hidden {
  display: none;
}

/* Swatches */
.k360-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.k360-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-ink, #1c1b1a);
  padding: 0.3rem 1.05rem 0.3rem 0.3rem;
  border: none;
  border-radius: var(--radius-pill, 999px);
  background: var(--c-paper, #ffffff);
  box-shadow: inset 0 0 0 1px var(--c-border-strong, #d6d4d0);
  cursor: pointer;
  transition: box-shadow 0.15s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
              background 0.15s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
              transform 0.15s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
              opacity 0.15s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
.k360-swatch--text { padding: 0.55em 1.2em; }
.k360-swatch__img {
  display: block;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-pill, 999px);
  object-fit: cover;
  background: var(--c-surface, #f5f5f5);
}
@media (hover: hover) and (pointer: fine) {
  .k360-swatch:hover:not(.is-disabled):not(.is-selected) {
    box-shadow: inset 0 0 0 1.5px var(--c-ink, #1c1b1a);
  }
}
.k360-swatch:active:not(.is-disabled) { transform: scale(0.97); }
.k360-swatch:focus-visible {
  outline: 2px solid var(--c-ink, #1c1b1a);
  outline-offset: 2px;
}
/* Valgt: mørk ring */
.k360-swatch.is-selected {
  box-shadow: inset 0 0 0 2px var(--c-ink, #1c1b1a);
  background: var(--c-surface, #f5f5f5);
}
/* Utilgængelig kombination (Woo deaktiverer optionen) */
.k360-swatch.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.k360-swatch.is-disabled .k360-swatch__label {
  text-decoration: line-through;
}
/* Udsolgt variant (kan stadig vælges): dæmpet og overstreget —
   teksten holder fuld opacitet (--c-text-muted ≈ 5.3:1). */
.k360-swatch.is-soldout:not(.is-selected) {
  color: var(--c-text-muted, #6b6b6b);
  background: var(--c-surface, #f5f5f5);
  box-shadow: inset 0 0 0 1px var(--c-border, #e8e7e4);
}
.k360-swatch.is-soldout .k360-swatch__label {
  text-decoration: line-through;
}
.k360-swatch.is-soldout .k360-swatch__img {
  opacity: 0.5;
}

/* "Ryd valg"-linket fra Woo */
.k360-buy__cart .reset_variations {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: var(--fs-small, 0.85rem);
  font-weight: 600;
  color: var(--c-text-muted, #6b6b6b);
  text-decoration: underline;
  text-decoration-color: var(--c-border-strong, #d6d4d0);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
              text-decoration-color 0.2s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
@media (hover: hover) and (pointer: fine) {
  .k360-buy__cart .reset_variations:hover {
    color: var(--c-ink, #1c1b1a);
    text-decoration-color: var(--c-ink, #1c1b1a);
  }
}

/* Valgt variants pris/lager (Woo indsætter dem over knappen) */
.k360-buy__cart .single_variation_wrap { flex: 1 1 100%; }
.k360-buy__cart .woocommerce-variation.single_variation {
  margin: 0 0 var(--space-2, 1rem);
}
.woocommerce div.product .k360-buy__cart .woocommerce-variation-price .price,
.k360-buy__cart .woocommerce-variation-price .price {
  display: block;
  font-family: var(--font-display, system-ui, sans-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-ink, #1c1b1a);
  margin: 0;
}
.k360-buy__cart .woocommerce-variation-availability {
  font-size: var(--fs-small, 0.85rem);
  color: var(--c-text-muted, #6b6b6b);
}
.k360-buy__cart .woocommerce-variation-description {
  font-size: var(--fs-small, 0.85rem);
  color: var(--c-text, #1c1b1a);
}
/* Mængde + køb-knap på egen række under varianterne */
.k360-buy__cart .woocommerce-variation-add-to-cart {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 1rem);
  align-items: stretch;
}

/* Diskret hjælpelinje under knapperne */
.k360-buy__help {
  font-size: var(--fs-small, 0.85rem);
  text-align: center;
  margin: var(--space-2, 1rem) 0 0;
}
.k360-buy__help a {
  color: var(--c-text-muted, #6b6b6b);
  text-decoration: underline;
  text-decoration-color: var(--c-border-strong, #d6d4d0);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.25s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
              text-decoration-color 0.25s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
@media (hover: hover) and (pointer: fine) {
  .k360-buy__help a:hover {
    color: var(--c-ink, #1c1b1a);
    text-decoration-color: var(--c-ink, #1c1b1a);
  }
}

/* =========================================================
   Sticky køb-bar (mobil < 900px) — samme hvide flade og hairline
   som købsboksen, og samme pill-knap som "Læg i kurv". Eneste
   element med skygge, så baren skilles fra indholdet under den.
   ========================================================= */
.k360-stickybuy {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--c-paper, #ffffff);
  box-shadow: inset 0 1px 0 var(--c-border, #e8e7e4),
              var(--shadow-soft, 0 12px 32px rgba(28, 27, 26, 0.10));
  padding: 0.75rem clamp(1.25rem, 4vw, 3rem) calc(0.75rem + env(safe-area-inset-bottom, 0px));
  font-family: var(--font-body, system-ui, sans-serif);
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.3s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
              visibility 0s linear 0.3s;
}
.k360-stickybuy.is-visible {
  transform: none;
  visibility: visible;
  transition: transform 0.3s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
              visibility 0s;
}
@media (min-width: 900px) {
  .k360-stickybuy { display: none; }
}
.k360-stickybuy__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2, 1rem);
}
.k360-stickybuy__price {
  min-width: 0;
  font-family: var(--font-display, system-ui, sans-serif);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--c-ink, #1c1b1a);
}
.k360-stickybuy__price .woocommerce-Price-amount { font: inherit; color: inherit; }
.k360-stickybuy__price del {
  font-size: 0.7em;
  font-weight: 400;
  color: var(--c-text-muted, #6b6b6b);
  margin-right: 0.3em;
  text-decoration-color: var(--c-danger, #b02a37);
}
.k360-stickybuy__price ins { text-decoration: none; color: var(--c-danger, #b02a37); }
.k360-stickybuy__btn {
  flex: 0 0 auto;
  min-height: var(--tap-min, 44px);
  font-family: var(--font-body, system-ui, sans-serif);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75em 1.6em;
  border: none;
  border-radius: var(--radius-pill, 999px);
  background: var(--c-primary, #222222);
  color: var(--c-on-primary, #ffffff);
  cursor: pointer;
  transition: background 0.25s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
.k360-stickybuy__btn:focus-visible {
  outline: 2px solid var(--c-focus, #1c1b1a);
  outline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
  .k360-stickybuy__btn:hover { background: var(--c-primary-dark, #000000); }
}
/* Plads til baren i bunden, så sidens sidste indhold ikke dækkes */
@media (max-width: 899.98px) {
  body.k360-stickybuy-active { padding-bottom: 5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .k360-stickybuy,
  .k360-stickybuy.is-visible { transition: none; }
}

/* =========================================================
   Specifikationer — redaktionel label/værdi-liste
   ========================================================= */
.k360-specs {
  margin-top: var(--space-4, 2.5rem);
}
.k360-specs__title {
  font-family: var(--font-display, system-ui, sans-serif);
  font-weight: 700;
  font-size: var(--fs-h3, 1.2rem);
  letter-spacing: -0.01em;
  color: var(--c-ink, #1c1b1a);
  margin: 0 0 var(--space-2, 1rem);
}
.k360-specs__list {
  margin: 0;
}
.k360-specs__row {
  display: grid;
  grid-template-columns: minmax(9em, 38%) 1fr;
  gap: var(--space-2, 1rem);
  padding-block: 0.7em;
  /* Subtil hairline mellem rækkerne — tegnet med inset-skygge */
  box-shadow: inset 0 -1px 0 rgba(28, 27, 26, 0.08);
}
.k360-specs__row:last-child { box-shadow: none; }
.k360-specs__row dt {
  font-weight: 600;
  color: var(--c-text-muted, #6b6b6b);
}
.k360-specs__row dd {
  margin: 0;
  color: var(--c-ink, #1c1b1a);
}

/* =========================================================
   Fuld beskrivelse — ligger i højre kolonne under specs
   ========================================================= */
.k360-desc {
  margin-top: var(--space-4, 2.5rem);
  max-width: 70ch;
}
.k360-desc__title {
  font-family: var(--font-display, system-ui, sans-serif);
  font-weight: 700;
  font-size: var(--fs-h3, 1.2rem);
  letter-spacing: -0.01em;
  color: var(--c-ink, #1c1b1a);
  margin: 0 0 var(--space-2, 1rem);
}
.k360-desc__content {
  color: var(--c-text, #1c1b1a);
}
.k360-desc__content p { margin: 0 0 1em; }
.k360-desc__content h2,
.k360-desc__content h3 {
  font-family: var(--font-display, system-ui, sans-serif);
  color: var(--c-ink, #1c1b1a);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 1.4em 0 0.5em;
}
.k360-desc__content ul,
.k360-desc__content ol { padding-left: 1.4em; margin: 0 0 1em; }
.k360-desc__content img { max-width: 100%; height: auto; border-radius: var(--radius-md, 12px); }
.k360-desc__content a {
  color: var(--c-ink, #1c1b1a);
  text-decoration: underline;
  text-decoration-color: var(--c-border-strong, #d6d4d0);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.25s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
@media (hover: hover) and (pointer: fine) {
  .k360-desc__content a:hover { text-decoration-color: var(--c-ink, #1c1b1a); }
}

/* =========================================================
   Relaterede produkter — kortene styres centralt fra
   /produkt-kort/ (k360_product_card + produkt-kort.css).
   Her ligger kun sektionens layout.
   ========================================================= */
.k360-related {
  margin-top: var(--space-5, 4rem);
}
.k360-related__title {
  font-family: var(--font-display, system-ui, sans-serif);
  font-weight: 700;
  font-size: var(--fs-h2, 2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--c-ink, #1c1b1a);
  margin: 0 0 var(--space-3, 1.5rem);
}
.k360-related__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2, 1rem);
}
@media (min-width: 700px) {
  .k360-related__grid { gap: var(--space-3, 1.5rem); }
}
@media (min-width: 1100px) {
  .k360-related__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* =========================================================
   Reduceret bevægelse
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .k360-produkt *,
  .k360-produkt *::before,
  .k360-produkt *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .k360-gallery__track { scroll-behavior: auto; }
}

/* =========================================================
   "Se kurv"-linket efter tilføjelse til kurv (a.added_to_cart)
   — WooCommerce indsætter det ved siden af køb-knappen.
   Vises som rund kurv-ikon-knap med tooltip; linkteksten skjules
   kun visuelt (font-size: 0), så skærmlæsere stadig får den oplæst.
   ========================================================= */
body.single-product form.cart a.added_to_cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 2.95rem;
  height: 2.95rem;
  font-size: 0;
  line-height: 0;
  text-decoration: none !important;
  border: none !important;
  border-radius: var(--radius-pill, 999px);
  background: var(--c-paper, #ffffff) !important;
  color: var(--c-ink, #1c1b1a) !important;
  box-shadow: inset 0 0 0 1px var(--c-border-strong, #d6d4d0);
  cursor: pointer;
  transition: background 0.25s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
              box-shadow 0.25s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
/* Kurv-ikonet — maskeret SVG, farves via background-color */
body.single-product form.cart a.added_to_cart::before {
  content: "";
  width: 1.35rem;
  height: 1.35rem;
  background-color: var(--c-ink, #1c1b1a);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45C4.52 15.37 5.48 17 7 17h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12L8.1 13h7.45c.75 0 1.41-.41 1.75-1.03L21.7 5.5c.16-.28.24-.61.24-.95 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45C4.52 15.37 5.48 17 7 17h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12L8.1 13h7.45c.75 0 1.41-.41 1.75-1.03L21.7 5.5c.16-.28.24-.61.24-.95 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"/></svg>') center / contain no-repeat;
  transition: background-color 0.25s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
@media (hover: hover) and (pointer: fine) {
  body.single-product form.cart a.added_to_cart:hover {
    background: var(--c-ink, #1c1b1a) !important;
    box-shadow: inset 0 0 0 1px var(--c-ink, #1c1b1a);
  }
  body.single-product form.cart a.added_to_cart:hover::before {
    background-color: var(--c-paper, #ffffff);
  }
}
body.single-product form.cart a.added_to_cart:focus-visible {
  outline: 2px solid var(--c-ink, #1c1b1a);
  outline-offset: 2px;
}
/* Tooltip "Se kurv" — vises over ikonet ved hover/tastaturfokus */
body.single-product form.cart a.added_to_cart::after {
  content: "Se kurv";
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 6px);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  padding: 0.55em 0.9em;
  border-radius: var(--radius-sm, 8px);
  background: var(--c-ink, #1c1b1a);
  color: var(--c-paper, #ffffff);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.2s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
              transform 0.2s var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
body.single-product form.cart a.added_to_cart:hover::after,
body.single-product form.cart a.added_to_cart:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (prefers-reduced-motion: reduce) {
  body.single-product form.cart a.added_to_cart,
  body.single-product form.cart a.added_to_cart::before,
  body.single-product form.cart a.added_to_cart::after {
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   Lightbox — temaets egen (bruges når PhotoSwipe ikke er aktiv).
   Hvid flade, så fritlagte produkter står rent.
   ========================================================= */
html.k360-lightbox-open { overflow: hidden; }
.k360-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--c-paper, #ffffff);
  color: var(--c-ink, #1c1b1a);
}
.k360-lightbox::backdrop { background: var(--c-paper, #ffffff); }
.k360-lightbox[open] { animation: k360LightboxIn 0.18s ease-out; }
@keyframes k360LightboxIn { from { opacity: 0; } to { opacity: 1; } }
.k360-lightbox__stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: clamp(3.5rem, 7vw, 5rem) clamp(1rem, 7vw, 6rem);
  box-sizing: border-box;
  cursor: zoom-out;
}
.k360-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 2 * clamp(3.5rem, 7vw, 5rem));
  max-height: calc(100dvh - 2 * clamp(3.5rem, 7vw, 5rem));
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: default;
}
.k360-lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: var(--tap-min, 44px);
  height: var(--tap-min, 44px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill, 999px);
  background: var(--c-surface, #f5f5f5);
  color: var(--c-ink, #1c1b1a);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.k360-lightbox__btn[hidden],
.k360-lightbox__count[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) {
  .k360-lightbox__btn:hover { background: var(--c-surface-tint, #efefef); }
}
.k360-lightbox__close { top: 1rem; right: 1rem; }
.k360-lightbox__prev,
.k360-lightbox__next { top: 50%; margin-top: calc(var(--tap-min, 44px) / -2); }
.k360-lightbox__prev { left: 1rem; }
.k360-lightbox__next { right: 1rem; }
.k360-lightbox__count {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  margin: 0;
  font-size: var(--fs-small, 0.85rem);
  color: var(--c-text-muted, #6b6b6b);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 599.98px) {
  /* På telefon skiftes der mest med swipe — pilene flyttes ned ved tælleren */
  .k360-lightbox__prev,
  .k360-lightbox__next { top: auto; bottom: 0.75rem; margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .k360-lightbox[open] { animation: none; }
}
