/* ==========================================================================
   Jack Music – custom.css (child of Hummingbird 2.x, PrestaShop 9.2)

   HOW THIS FILE WORKS
   - Hummingbird's own CSS lives inside CSS cascade layers (@layer).
     This file is UN-layered, so it wins over Hummingbird at equal
     specificity. You never need !important here.
   - Prefer changing CSS variables (section 2) over restyling classes.
     Hummingbird reads Bootstrap variables (--bs-*) almost everywhere.
   - Selectors below use Hummingbird's real BEM class names
     (verified against Hummingbird 2.x templates/SCSS).

   SECTIONS
   1  Fonts (self-hosted, no Google request – GDPR-friendly)
   2  Design tokens + Bootstrap variable mapping
   3  Base: typography, links, focus, forms
   4  Buttons
   5  Header (labelled icon buttons), search pill, main menu
   5b Contact block (info bar + mobile drawer), drawer + overlay
   5c Smart header (mobile)
   6  Breadcrumb
   7  Product list (miniature), flags
   8  Listing toolbar, pagination, left column
   9  Product page (mobile layout, condition, stock, quantity, accordions)
   9b Sticky buy bar (mobile + desktop)
   9c Sticky buy column (desktop, JM_CONFIG.stickyColumn)
   10 Footer
   11 Forside (hero, genveje, nyheder, USP, formater/genrer, Poul + om)
   12 UI-runde 11: kategoriside, "Alle kategorier", checkout-header, minikurv
   99 Project overrides (add new rules here)
   ========================================================================== */


/* 1. FONTS ================================================================ */
/* Variable fonts, latin subset (covers æ ø å). SIL Open Font License,
   see assets/fonts/LICENSE-*.txt */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* 2. DESIGN TOKENS ======================================================== */
:root {
  /* Brand palette (jm = Jack Music) */
  --jm-red: #e0001a;          /* close to the logo red (#ff0014) but 5:1 contrast with white */
  --jm-red-dark: #b30015;
  --jm-wine: #8a2b35;         /* "Tilbud" – calmer than red, balances gold "Nyheder" */
  --jm-charcoal: #2a2523;     /* "vinyl black" – header bar, footer, dark buttons */
  --jm-cream: #faf6ee;        /* page background */
  --jm-sand: #f1e9db;         /* alternating sections, toolbars */
  --jm-stage: #f3efe8;        /* neutral backdrop behind product photos */
  --jm-line: #e6dccb;         /* borders */
  --jm-ink: #2b2624;          /* body text */
  --jm-muted: #5f544e;        /* secondary text (6:1 on cream) */
  --jm-gold: #e3a72f;         /* "Nyhed" badge, highlights */
  --jm-cta: #2e7d4f;          /* add to cart / primary action */
  --jm-cta-hover: #256a41;
  --jm-cta-active: #1f5f3b;
  --jm-link: #1b6ca8;
  --jm-link-hover: #14507f;
  --jm-input-border: #7a6f68; /* 3:1+ against white (WCAG 1.4.11) */

  /* Typography */
  --jm-font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --jm-font-display: "Fraunces", Georgia, "Times New Roman", serif;

  /* Shape */
  --jm-radius: 0.75rem;
  --jm-radius-sm: 0.5rem;

  /* ---- Map tokens onto Bootstrap / Hummingbird variables ---- */
  --bs-body-font-family: var(--jm-font-body);
  --bs-body-font-size: 1.125rem;       /* 18px – audience is mainly older */
  --bs-body-line-height: 1.55;
  --bs-body-color: var(--jm-ink);
  --bs-body-color-rgb: 43, 38, 36;
  --bs-body-bg: var(--jm-cream);
  --bs-body-bg-rgb: 250, 246, 238;

  --bs-primary: var(--jm-cta);         /* "primary" = the action colour (green) */
  --bs-primary-rgb: 46, 125, 79;
  --bs-success: var(--jm-cta);
  --bs-danger: var(--jm-red);

  --bs-link-color: var(--jm-link);
  --bs-link-color-rgb: 27, 108, 168;
  --bs-link-hover-color: var(--jm-link-hover);
  --bs-link-hover-color-rgb: 20, 80, 127;

  --bs-border-color: var(--jm-line);
  --bs-secondary-color: var(--jm-muted);
  --bs-tertiary-color: var(--jm-muted);
  --bs-tertiary-bg: var(--jm-sand);
  --bs-dark: var(--jm-charcoal);
  --bs-dark-rgb: 42, 37, 35;

  --bs-border-radius: var(--jm-radius);
  --bs-border-radius-sm: var(--jm-radius-sm);

  /* Hummingbird-specific variables */
  --header-top-color: #ffffff;
  --header-top-color-hover: #ffffff;
}


/* 3. BASE ================================================================= */
body {
  font-family: var(--jm-font-body);
}

h1, h2, h3, h4,
.h1, .h2, .h3, .h4 {
  font-family: var(--jm-font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--jm-ink);
  text-wrap: balance;
}

/* Keep small print readable for older visitors */
small, .small {
  font-size: 0.9375rem;
}

a {
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 3px solid var(--jm-link);
  outline-offset: 2px;
}

/* Form fields: same look as the header search pill (.jm-search) –
   white, 1px --jm-input-border, fully rounded, same focus ring. */
.form-control,
.form-select {
  min-height: 3rem;
  padding-left: 1.125rem;
  font-size: 1.0625rem;
  color: var(--jm-ink);
  background-color: #fff;
  border: 1px solid var(--jm-input-border);
  border-radius: 999px;
}

.form-control {
  padding-right: 1.125rem;
}

/* Multi-line fields can't be pills: big soft corners instead */
textarea.form-control {
  border-radius: var(--jm-radius);
}

/* Inside input groups (password show/hide, quantity) Bootstrap squares
   the joined corners; keep the free corners modest, not pill-shaped */
.input-group > .form-control,
.input-group > .form-select {
  border-radius: var(--jm-radius-sm);
}

.form-control::placeholder {
  color: var(--jm-muted);
  opacity: 1;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--jm-link);
  box-shadow: 0 0 0 0.2rem rgba(27, 108, 168, 0.25);
}

/* File input (contact form attachment): Bootstrap gives the "Vælg fil"
   button negative margins equal to its own small padding, so with our
   min-height it floats mid-field instead of filling it. Size the field's
   padding so its height is exactly 3rem, and give the button the same
   padding + negative margin so it fills the field edge to edge (the pill
   shape clips it via overflow: hidden). */
.form-control[type="file"] {
  --jm-file-py: calc((3rem - 2px - 1.0625rem * 1.5) / 2);
  --jm-file-px: 1.125rem;
  padding: var(--jm-file-py) var(--jm-file-px);
  line-height: 1.5;
  overflow: hidden;
  cursor: pointer;
}

.form-control[type="file"]::file-selector-button {
  padding: var(--jm-file-py) var(--jm-file-px);
  margin: calc(-1 * var(--jm-file-py)) var(--jm-file-px) calc(-1 * var(--jm-file-py)) calc(-1 * var(--jm-file-px));
  font: inherit;
  font-weight: 600;
  color: var(--jm-ink);
  background-color: var(--jm-sand);
  border: 0;
  border-inline-end: 1px solid var(--jm-input-border);
  border-radius: 0;
  cursor: pointer;
}

.form-control[type="file"]:hover:not(:disabled)::file-selector-button {
  background-color: var(--jm-line);
}


/* 4. BUTTONS ============================================================== */
.btn {
  --bs-btn-padding-y: 0.75rem;
  --bs-btn-padding-x: 1.5rem;
  --bs-btn-font-weight: 700;
  --bs-btn-border-width: 2px;
  --bs-btn-border-radius: var(--jm-radius-sm);
  min-height: 3rem;              /* 48px touch target */
}

/* Primary = add to cart, checkout, confirm */
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--jm-cta);
  --bs-btn-border-color: var(--jm-cta);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--jm-cta-hover);
  --bs-btn-hover-border-color: var(--jm-cta-hover);
  --bs-btn-focus-shadow-rgb: 46, 125, 79;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--jm-cta-active);
  --bs-btn-active-border-color: var(--jm-cta-active);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--jm-cta);
  --bs-btn-disabled-border-color: var(--jm-cta);
}

/* Outline primary = "See details" / "Get notified" – dark outline, not green */
.btn-outline-primary {
  --bs-btn-color: var(--jm-charcoal);
  --bs-btn-border-color: var(--jm-charcoal);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--jm-charcoal);
  --bs-btn-hover-border-color: var(--jm-charcoal);
  --bs-btn-focus-shadow-rgb: 42, 37, 35;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #000;
  --bs-btn-active-border-color: #000;
  --bs-btn-disabled-color: var(--jm-muted);
  --bs-btn-disabled-border-color: var(--jm-muted);
}


/* 5. HEADER, SEARCH, CART, MENU =========================================== */
.header {
  background-color: var(--jm-cream);
}

/* Info bar (.header-top): charcoal strip, white text, centered message.
   Content comes from the module hooked on displayNav1 – e.g. a "Custom text"
   block with "Poul er på kræmmermarked i weekenden". Visible on all screens
   (see templates/_partials/header.tpl). */
.header-top {
  padding-block: 0.5rem;
  font-size: 1rem;
  line-height: 1.4;
  color: #fff;
  background-color: var(--jm-charcoal);
  border-bottom: 0;
}

.header-top__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  align-items: center;
  justify-content: center;
}

.header-top__left {
  flex: 1 1 auto;
  justify-content: center;
  text-align: center;
}

.header-top__right {
  flex: 0 0 auto;
}

/* Only the contact block is in the bar: on mobile its content is moved into
   the drawer by Hummingbird's JS, so hide the (then empty) bar. */
@media (max-width: 767.98px) {
  .header-top--contact-only {
    display: none;
  }
}

/* Make sure text inside whatever module sits here is white */
.header-top :is(p, span, div, li, strong, label, i) {
  color: inherit;
}

.header-top p {
  margin: 0;
}

.header-top a:not(.dropdown-item) {
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.header-top a:not(.dropdown-item):hover {
  color: #fff;
  text-decoration-thickness: 2px;
}

.header-bottom {
  padding-block: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--jm-line);
}

/* Logo: allow the full-width wordmark + owl (upload the logo in
   Design > Theme & Logo; keep the original file untouched) */
.header-bottom .navbar-brand {
  max-width: none;
}

.header-bottom .navbar-brand .logo {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 2.75rem;
}

/* Header layout – CSS grid, independent of Bootstrap's order-* classes.
   Explicit grid areas mean the layered !important utilities on the module
   markup (order-2, ms-auto ...) cannot affect placement.

   < 768px   row 1  Menu | logo | Log ind | Kurv
             row 2  search (full width, always visible)
   768-1199  Menu | logo | search | Log ind | Kurv   (one row)
   >= 1200   row 1  logo | search | Log ind | Kurv
             row 2  main menu on its own row
   Desktop and mobile login/cart wrappers share the same grid areas; only one
   of each is displayed at a time (d-none / d-md-none). */
.header-bottom__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas:
    "menu   logo   account cart"
    "search search search  search";
  align-items: center;
  column-gap: 0.25rem;
  row-gap: 0.625rem;
}

.header-bottom__row > * {
  width: auto;
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}

.header-bottom__logo { grid-area: logo; min-width: 0; padding-left: 0.375rem; }
.ps-mainmenu--desktop { grid-area: menu; }
.header-bottom__account,
#_mobile_ps_customersignin { grid-area: account; }
.header-bottom__cart,
#_mobile_ps_shoppingcart { grid-area: cart; }
#_desktop_ps_searchbar { grid-area: search; }

/* Phones: the search field fills row 2; suggestions open full width under it */
@media (max-width: 767.98px) {
  #_desktop_ps_searchbar,
  #_desktop_ps_searchbar .ps-searchbar {
    position: relative;
    width: 100%;
  }

  #_desktop_ps_searchbar .ps-searchbar__dropdown {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
  }
}

/* Live search suggestions: a white card that stands clearly off the cream page
   (strong shadow + darker edge), max 5 rows (4 on phones, trimmed in custom.js –
   initSearchSuggest) so there is never a scrollbar, and "Se alle resultater" at the bottom. */
#_desktop_ps_searchbar .ps-searchbar__dropdown {
  top: calc(100% + 0.5rem);
  right: auto;
  left: 0;
  width: 100%;
  max-width: 40rem;
  overflow: hidden;
  background-color: #fff;
  border: 1px solid #cbbfad;
  border-radius: var(--jm-radius);
  box-shadow: 0 16px 40px rgba(42, 37, 35, 0.22), 0 2px 8px rgba(42, 37, 35, 0.12);
}

.ps-searchbar__results {
  gap: 0.125rem;
  max-height: none;
  padding: 0.5rem;
  overflow: visible;
}

.ps-searchbar__result-link {
  gap: 0.875rem;
  min-height: 4.5rem;
  padding: 0.5rem 0.75rem 0.5rem 0.5rem;
  font-size: 1rem;
  text-decoration: none;
  border-radius: var(--jm-radius-sm);
}

.ps-searchbar__result-link:hover,
.ps-searchbar__result-link:focus,
.ps-searchbar__result-link[aria-selected="true"] {
  background-color: var(--jm-sand);
}

.ps-searchbar__result-image {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  background-color: var(--jm-stage);
  border-radius: 0.375rem;
}

.ps-searchbar__result-name {
  display: -webkit-box;
  padding: 0;
  margin: 0;
  overflow: hidden;
  font-size: 1.0625rem;
  line-height: 1.35;
  color: var(--jm-ink);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Price / stock line under the name (added by custom.js – initSearchSuggest) */
.jm-sr__text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.jm-sr__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.625rem;
  align-items: baseline;
}

.jm-sr__price {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--jm-ink);
}

.jm-sr__old {
  font-size: 0.9375rem;
  color: var(--jm-muted);
}

.jm-sr__stock {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--jm-muted);
}

/* Fallback if custom.js has not run: never more than 5 (4 on phones) */
.ps-searchbar__result-link:nth-child(n+6) {
  display: none;
}

.jm-search-all {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  min-height: 3.25rem;
  padding: 0.75rem 1.25rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--jm-link);
  text-decoration: none;
  background-color: var(--jm-cream);
  border-top: 1px solid var(--jm-line);
}

.jm-search-all:hover,
.jm-search-all:focus-visible {
  color: var(--jm-link-hover);
  text-decoration: underline;
  background-color: var(--jm-sand);
}

.jm-search-all svg {
  flex: 0 0 auto;
}

@media (max-width: 767.98px) {
  #_desktop_ps_searchbar .ps-searchbar__dropdown {
    border-radius: var(--jm-radius);
  }

  .ps-searchbar__result-link:nth-child(n+5) {
    display: none;
  }
}

@media (min-width: 768px) {
  .header-bottom {
    padding-block: 1rem;
  }

  .header-bottom__row {
    grid-template-columns: auto auto minmax(0, 1fr) auto auto;
    grid-template-areas: "menu logo search account cart";
    column-gap: 0.5rem;
  }

  .header-bottom__logo {
    padding-left: 0.5rem;
  }

  #_desktop_ps_searchbar {
    width: 100%;
    padding-inline: 1.5rem;
  }

  #_desktop_ps_searchbar .ps-searchbar {
    width: 100%;
    min-width: 0;
    margin-block: 0;
  }

  .header-bottom .navbar-brand .logo {
    max-width: min(18rem, 40vw);
    max-height: 3.5rem;
  }
}

@media (min-width: 1200px) {
  .header-bottom {
    padding-bottom: 0;
  }

  .header-bottom__row {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas:
      "logo   search  account cart"
      "menu   menu    menu    menu";
    row-gap: 1rem;
  }

  .header-bottom__logo {
    padding-left: 0;
  }

  #_desktop_ps_searchbar {
    padding-inline: 2rem;
  }

  .ps-mainmenu--desktop {
    width: 100%;
    border-top: 1px solid var(--jm-line);
  }

  .ps-mainmenu__desktop {
    width: 100%;
  }

  .ps-mainmenu__tree {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;   /* main menu centred on desktop */
    gap: 0 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
}

/* Header buttons: icon + visible label (Menu, Log ind, Kurv, Luk).
   Used by ps_mainmenu / ps_customersignin / ps_shoppingcart overrides. */
.jm-hbtn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 0.125rem;
  align-items: center;
  justify-content: center;
  min-width: 3.5rem;
  min-height: 3.5rem;
  padding: 0.25rem 0.375rem;
  font-family: var(--jm-font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--jm-charcoal);
  text-decoration: none;
  cursor: pointer;
  background-color: transparent;
  border: 0;
  border-radius: 1rem;
}

.jm-hbtn:hover,
.jm-hbtn:focus-visible {
  color: var(--jm-charcoal);
  background-color: var(--jm-sand);
}

.jm-hbtn .jm-icon {
  flex: 0 0 auto;
}

.jm-hbtn.dropdown-toggle::after {
  display: none;               /* no caret under "Konto" */
}

/* The Menu button is the one that stands out (sand "pill") */
.jm-hbtn--menu {
  min-width: 4rem;
  font-weight: 700;
  background-color: var(--jm-sand);
}

.jm-hbtn--menu:hover,
.jm-hbtn--menu:focus-visible {
  background-color: var(--jm-line);
}

.jm-hbtn__badge {
  position: absolute;
  top: 0.125rem;
  right: 0.375rem;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
  color: #fff;
  background-color: var(--jm-red);
  border-radius: 0.625rem;
}

.blockcart.inactive .jm-hbtn__badge {
  display: none;               /* empty cart: no "0" bubble */
}

@media (min-width: 768px) {
  .jm-hbtn {
    min-width: 4.25rem;
    min-height: 3.75rem;
    font-size: 0.875rem;
  }
}

/* Hummingbird's own spacing around the header blocks */
.header-bottom .header-block {
  padding: 0;
}

/* Search: pill with the "Søg" button inside the field (desktop + mobile).
   Markup: modules/ps_searchbar/ps_searchbar.tpl and header.tpl (mobile form). */
.jm-search {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.25rem 0.25rem 0.25rem 1.125rem;
  background-color: #fff;
  border: 1px solid var(--jm-input-border);
  border-radius: 999px;
}

.jm-search:focus-within {
  border-color: var(--jm-link);
  box-shadow: 0 0 0 0.2rem rgba(27, 108, 168, 0.25);
}

.jm-search__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 2.75rem;
  min-height: 0;
  padding: 0;
  font-size: 1.0625rem;
  color: var(--jm-ink);
  background-color: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.jm-search__input::placeholder {
  color: var(--jm-muted);
  opacity: 1;
}

/* Focus ring is drawn on the pill (above) instead of the field */
.jm-search__input:focus,
.jm-search__input:focus-visible {
  outline: 0;
  box-shadow: none;
}

.jm-search__clear {
  position: static;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  color: var(--jm-muted);
  background-color: transparent;
  border: 0;
  border-radius: 50%;
  transform: none;
}

.jm-search__submit {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.375rem;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.125rem;
  font-family: var(--jm-font-body);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background-color: var(--jm-charcoal);
  border: 0;
  border-radius: 999px;
}

.jm-search__submit:hover {
  color: #fff;
  background-color: #000;
}

.jm-search__submit:focus-visible {
  outline: 3px solid var(--jm-link);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .jm-search {
    min-height: 3.5rem;
    padding-left: 1.375rem;
  }

  .jm-search__input {
    font-size: 1.125rem;
  }

  .jm-search__submit {
    min-height: 2.875rem;
    padding-inline: 1.375rem;
    font-size: 1.0625rem;
  }
}

/* Main menu (desktop, >= 1200px): neutral – every item in the same colour */
.ps-mainmenu__tree-link,
.ps-mainmenu__tree-item-wrapper > a {
  display: inline-flex;
  align-items: center;
  min-height: 3.375rem;
  padding-inline: 1rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--jm-ink);
}

.ps-mainmenu__tree-link:hover {
  color: var(--jm-ink);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}


/* 5b. CONTACT BLOCK + MOBILE DRAWER ======================================= */
/* Markup: modules/ps_contactinfo/nav.tpl. One block, two looks:
   .jm-help__inline in the info bar, .jm-help__card in the mobile drawer. */
.jm-help p {
  margin: 0;
}

.header-top .jm-help__card,
#mobileMenu .jm-help__inline {
  display: none;
}

/* Drawer: always 80% of the screen width */
#mobileMenu.offcanvas {
  --bs-offcanvas-width: 80vw;
  width: 80vw;
  max-width: 80vw;
}

/* Drawer footer: its own sand panel, clearly separated from the menu */
#mobileMenu .ps-mainmenu__additionnals {
  flex: 0 0 auto;             /* only as tall as its content, never squeezed */
  align-content: flex-start;
  padding: 0.875rem 1rem;
  background-color: var(--jm-sand);
  border-top: 2px solid var(--jm-line);
}

/* Language/currency slots are empty in a single-language shop: drop them so
   their (empty) flex line doesn't add a gap above the contact card */
#mobileMenu .ps-mainmenu__selects:not(:has(> :not(:empty))) {
  display: none;
}

#_mobile_ps_contactinfo {
  flex: 1 1 100%;
  min-width: 0;
}

.jm-help__card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.jm-help__title {
  font-family: var(--jm-font-display);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--jm-ink);
}

.jm-help .jm-help__lead {
  margin-bottom: 0.25rem;
  font-size: 1rem;
  color: var(--jm-muted);
}

.jm-help__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--jm-ink);
  text-decoration: none;
  background-color: #fff;
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-radius-sm);
}

.jm-help__item:hover,
.jm-help__item:focus-visible {
  color: var(--jm-ink);
  border-color: var(--jm-charcoal);
}

.jm-help__icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.375rem;
  color: #fff;
  background-color: var(--jm-charcoal);
  border-radius: var(--jm-radius-sm);
}

.jm-help__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.jm-help__value {
  overflow-wrap: anywhere;   /* long e-mail addresses on narrow phones */
  font-size: 1.0625rem;
  font-weight: 700;
}

.jm-help__sub {
  font-size: 0.9375rem;
  color: var(--jm-muted);
}


/* Drawer header: title "Menu" + labelled "Luk" button (ps_mainmenu override) */
#mobileMenu .offcanvas-header {
  gap: 0.75rem;
  padding: 0.75rem 0.75rem 0.75rem 1.25rem;
  border-bottom: 1px solid var(--jm-line);
}

#mobileMenu .ps-mainmenu__back-button {
  display: flex;
  align-items: center;
  min-width: 0;
}

.jm-drawer__title {
  margin: 0;
  font-family: var(--jm-font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--jm-ink);
}

/* In a submenu the back button takes the title's place */
#mobileMenu .js-back-button:not(.d-none) + .jm-drawer__title {
  display: none;
}

#mobileMenu .js-back-button {
  min-height: 3rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--jm-ink);
}

/* Menu links: larger, dark text, 48px rows */
#mobileMenu .menu a {
  display: flex;
  align-items: center;
  min-height: 3rem;
  font-size: 1.125rem;
  color: var(--jm-ink);
}

/* Dark overlay behind the drawer (the drawer is moved to <body> by custom.js
   so it sits above Bootstrap's backdrop; tap on the overlay closes it) */
.offcanvas-backdrop {
  --bs-backdrop-bg: var(--jm-charcoal);
  --bs-backdrop-opacity: 0.6;
}


/* 5c. SMART HEADER (MOBILE) =============================================== */
/* JS (assets/js/custom.js, JM_CONFIG.smartHeader) sets .jm-smart-header on
   <html> on mobile and toggles .jm-header-hidden while scrolling.
   Hummingbird's header is position: sticky; a negative top slides it away
   without transform (kept that way although the drawer now lives in <body>). */
@media (max-width: 767.98px) {
  html.jm-smart-header #header {
    transition: top 0.25s ease;
  }

  html.jm-smart-header.jm-header-hidden #header {
    top: calc(-1 * var(--jm-header-h, 100vh));
  }
}

@media (prefers-reduced-motion: reduce) {
  html.jm-smart-header #header {
    transition: none;
  }
}


/* 6. BREADCRUMB =========================================================== */
.breadcrumb {
  font-size: 1rem;
}

/* Mobile product page: only the parent level, shown as "‹ Tilbage til …".
   Saves a line above the photo, and a clear back link is easier than a
   trail of small links. The text is Danish only (CSS content). */
@media (max-width: 767.98px) {
  #product .breadcrumb {
    flex-wrap: nowrap;
  }

  #product .breadcrumb-item {
    display: none;
  }

  #product .breadcrumb-item:nth-last-child(2) {
    display: block;
    min-width: 0;
    padding-left: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  #product .breadcrumb-item:nth-last-child(2)::before {
    content: none;
  }

  #product .breadcrumb-item:nth-last-child(2) .breadcrumb-link {
    font-weight: 600;
  }

  #product .breadcrumb-item:nth-last-child(2) .breadcrumb-link::before {
    content: "‹ Tilbage til ";
    content: "‹ Tilbage til " / "Tilbage til ";
  }
}


/* 7. PRODUCT LIST (miniature) + FLAGS ===================================== */
/* Card */
.product-miniature__inner {
  gap: 0.75rem;
  padding: 1rem;
  background-color: #fff;
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-radius);
}

/* Neutral stage behind the cover. "multiply" lets product photos with a
   white background blend into the stage instead of showing a white box. */
.product-miniature__top {
  background-color: var(--jm-stage);
  border-radius: var(--jm-radius-sm);
}

.product-miniature__image {
  mix-blend-mode: multiply;
}

.product-miniature__bottom {
  padding: 0.25rem 0 0;
}

/* Prices on one line across a row: the info area fills the card and the price block is
   pushed to its bottom, so titles of 1–4 lines no longer move the price up and down. */
.product-miniature__infos {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.5rem;
}

.product-miniature__prices {
  margin-top: auto;
}

.product-miniature__title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--jm-ink);
}

.product-miniature__title:hover {
  color: var(--jm-ink);
  text-decoration: underline;
}

.product-miniature__price {
  font-family: var(--jm-font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

/* Format badge (CD / DVD / Vinyl) in the corner of the cover – only rendered when the product has a
   "Format" feature (module jmproductcard, templates/catalog/_partials/miniatures/product.tpl). */
.product-miniature__top {
  position: relative;
}

.jm-format-badge {
  position: absolute;
  inset-block-end: 0.5rem;
  inset-inline-start: 0.5rem;
  z-index: 1;
  padding: 0.125rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
  background-color: var(--jm-charcoal);
  border-radius: 999px;
}

/* Always show a full-width button WITH text (Hummingbird shows an
   icon-only button when the card is wide). */
.product-miniature__form {
  flex-direction: column;
  align-items: stretch;
}

.product-miniature__add,
.product-miniature__details {
  width: 100%;
  height: auto;
  min-height: 3.25rem;
}

.product-miniature__add-text {
  display: inline;
}

/* Optional: hide the quantity field in lists (it stays 1).
   Remove this rule to keep it. */
.product-miniature .quantity-button {
  display: none;
}

/* Flags: <li class="badge new|on-sale|discount|out_of_stock|pack|online-only"> */
.product-flags .badge {
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-flags .badge:not(.discount) {
  color: var(--jm-charcoal);
  background-color: var(--jm-gold);
  border-color: var(--jm-gold);
}

.product-flags .badge.discount {
  color: #fff;
  background-color: var(--jm-red);
  border-color: var(--jm-red);
}

.product-flags .badge.out_of_stock {
  color: var(--jm-charcoal);
  background-color: #fff;
  border: 2px solid var(--jm-charcoal);
}

.product-miniature__regular-price {
  color: var(--jm-muted);
}


/* Condition tag under the card title (Ny / Brugt / Istandsat), from the product's
   "Stand" field – templates/catalog/_partials/miniatures/product.tpl */
.jm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0.375rem 0 0;
}

.jm-tag {
  padding: 0.0625rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--jm-ink);
  border: 1px solid var(--jm-line);
  border-radius: 0.375rem;
}

.jm-tag--used,
.jm-tag--refurbished {
  background-color: var(--jm-sand);
  border-color: var(--jm-sand);
}

.jm-tag--new {
  color: #1f5f3b;
  background-color: #e3f0e7;
  border-color: #e3f0e7;
}

/* Phones: two cards side by side – tighter card, smaller type */
@media (max-width: 575.98px) {
  .product-miniature__inner {
    gap: 0.5rem;
    padding: 0.625rem;
  }

  .product-miniature__title {
    font-size: 1rem;
  }

  .product-miniature__price {
    font-size: 1.375rem;
  }

  .product-miniature__add {
    padding-inline: 0.5rem;
    font-size: 1rem;
  }
}


/* 8. LISTING TOOLBAR, PAGINATION, LEFT COLUMN ============================= */
.products__selection {
  padding: 0.875rem 1rem;
  background-color: var(--jm-sand);
  border-radius: var(--jm-radius-sm);
}

.pagination {
  --bs-pagination-padding-x: 1rem;
  --bs-pagination-padding-y: 0.625rem;
  --bs-pagination-font-size: 1.0625rem;
  --bs-pagination-color: var(--jm-charcoal);
  --bs-pagination-bg: #fff;
  --bs-pagination-border-color: var(--jm-charcoal);
  --bs-pagination-hover-color: #fff;
  --bs-pagination-hover-bg: var(--jm-charcoal);
  --bs-pagination-hover-border-color: var(--jm-charcoal);
  --bs-pagination-active-color: #fff;
  --bs-pagination-active-bg: var(--jm-charcoal);
  --bs-pagination-active-border-color: var(--jm-charcoal);
  --bs-pagination-border-radius: var(--jm-radius-sm);
}

.pagination .page-link {
  min-width: 3rem;
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border-width: 2px;
}

/* Category tree in the left column */
.category-tree__item-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 1.0625rem;
}

.category-tree__item.active > .category-tree__item-header .category-tree__item-link {
  font-weight: 700;
  color: var(--jm-red);
}


/* 8b. SØGNING, INGEN RESULTATER, KATEGORISIDE (UI-runde 9) ================= */
/* templates/catalog/listing/search.tpl, catalog/_partials/category-header.tpl */
.jm-listing-head,
.jm-cathead {
  margin-bottom: 1rem;
}

.jm-listing-head .page-title-section,
.jm-cathead .page-title-section {
  margin-bottom: 0.25rem;
  font-family: var(--jm-font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
}

.jm-listing-head__count,
.jm-cathead__count {
  margin: 0;
  color: var(--jm-muted);
}

/* Toolbar: sort + filter as big pills, side by side on phones */
.products__selection {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.products__sort {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0.625rem;
  align-items: center;
  justify-content: flex-end;
}

.products__sort-dropdown-button,
.products__filter-button {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.125rem;
  font-weight: 700;
  color: var(--jm-ink);
  background-color: #fff;
  border: 1px solid var(--jm-charcoal);
  border-radius: 999px;
}

.products__sort-dropdown .dropdown-item {
  min-height: 3rem;
  display: flex;
  align-items: center;
  font-size: 1.0625rem;
}

@media (max-width: 767.98px) {
  .products__count { width: 100%; }
  .products__sort { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .products__sort-label { display: none; }
  .products__sort-dropdown,
  .products__sort-dropdown-button,
  .products__filter-button { width: 100%; }
  /* Filter first (left), sort right – as in the mockup */
  .products__filter-button { order: -1; }
}

/* Active filters as dark chips with a round × */
#js-active-search-filters.active_filters ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

#js-active-search-filters .filter-block {
  display: inline-flex;
  gap: 0.375rem;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.375rem 0 0.875rem;
  font-weight: 600;
  color: #fff;
  background-color: var(--jm-charcoal);
  border-radius: 999px;
}

#js-active-search-filters .filter-block a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

/* No results (search.tpl) – centred, same look as the 404 (not-found.tpl). No icon: it read as a button. */
.jm-noresults #js-product-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 40rem;
  margin-inline: auto;
  padding: 1rem 0 2rem;
  text-align: center;
}

.jm-noresults__title {
  margin: 0;
  font-family: var(--jm-font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
}

.jm-noresults__lead {
  margin: 0;
  color: var(--jm-muted);
}

.jm-noresults__tips {
  padding: 1rem;
  text-align: left;
  background-color: #fff;
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-radius);
}

.jm-noresults__h2 {
  margin: 0 0 0.5rem;
  font-family: var(--jm-font-body);
  font-size: 1.25rem;
  font-weight: 700;
}

.jm-noresults__tips ul {
  margin: 0;
  padding-left: 1.375rem;
  list-style: disc;
}

/* The genre block (toftecblocks) brings its own section padding/container */
.jm-noresults .tb-cats { padding: 0; background: none; }
.jm-noresults .tb-cats > .container { padding: 0; max-width: none; }

/* Centred pages (no results + 404): genre title on its own line, buttons centred. Not the empty cart. */
.jm-noresults #js-product-list .tb-cats__inner,
.jm-notfound .tb-cats__inner {
  flex-direction: column;
  align-items: center;
}

.jm-noresults #js-product-list .tb-cats__title--small,
.jm-notfound .tb-cats__title--small {
  margin-right: 0;
}

.jm-noresults #js-product-list .tb-cats__chips,
.jm-notfound .tb-cats__chips {
  justify-content: center;
}

.jm-noresults__new {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-height: 3.25rem;
}

/* 404 / not-found page (templates/errors/not-found.tpl) – reuses the "no results" look */
.jm-notfound__inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1rem 0 2rem;
}

/* Text, genres and help stay narrow; .jm-notfound__new (displayHome) uses full width */
.jm-notfound__intro {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}

.jm-notfound__intro .jm-noresults__new {
  align-self: center;
}

.jm-notfound__new {
  min-width: 0;
}

.jm-notfound .tb-cats { padding: 0; background: none; }
.jm-notfound .tb-cats > .container { padding: 0; max-width: none; }

.jm-notfound__help {
  margin: 0;
  font-weight: 600;
}

/* Keep the phone number on the same line as the text (not a separate flex item) */
.jm-notfound__help a {
  white-space: nowrap;
}

/* Empty cart (checkout/_partials/cart-detailed.tpl) */
.jm-emptycart {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 0 1.5rem;
}

.jm-emptycart__title {
  margin: 0;
  font-family: var(--jm-font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
}

.jm-emptycart p {
  margin: 0;
  color: var(--jm-muted);
}

.jm-emptycart__cta {
  min-height: 3.25rem;
  display: inline-flex;
  align-items: center;
}

.jm-emptycart .jm-noresults {
  width: 100%;
}

.jm-emptycart .tb-cats { padding: 0; background: none; }
.jm-emptycart .tb-cats > .container { padding: 0; max-width: none; }

/* Category top: sand band */
.jm-cathead {
  padding: 1rem 1rem 1.25rem;
  background-color: var(--jm-sand);
  border-radius: var(--jm-radius);
}

.jm-cathead__more > summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 700;
  color: var(--jm-link);
  cursor: pointer;
}

.jm-cathead .category__description {
  margin-top: 0.5rem;
  font-size: 1rem;
}

/* Subcategories as buttons (horizontal scroll on phones) */
.jm-cathead .subcategory {
  margin-top: 0.75rem;
}

.jm-cathead .subcategory__list:not(.subcategory__list--with-images) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.jm-cathead .subcategory__list:not(.subcategory__list--with-images) .subcategory__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  font-weight: 600;
  color: var(--jm-ink);
  text-decoration: none;
  white-space: nowrap;
  background-color: #fff;
  border: 1px solid var(--jm-line);
  border-radius: 999px;
}

.jm-cathead .subcategory__list:not(.subcategory__list--with-images) .subcategory__link:hover {
  border-color: var(--jm-input-border);
}

@media (max-width: 767.98px) {
  .jm-cathead .subcategory__list:not(.subcategory__list--with-images) {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }
}


/* 9. PRODUCT PAGE ========================================================= */
/* Templates: templates/catalog/product.tpl (.jm-pdp wrapper, condition chip,
   USPs under the buy form) and catalog/_partials/product-add-to-cart.tpl
   (stock text, .jm-qty-single marker). */
.product__price {
  font-family: var(--jm-font-display);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
}

/* "Inkl. moms" on the same line as the price (wraps under it if needed) */
.product__prices-block {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.625rem;
}

.product__prices-block > .product__discount-price,
.product__prices-block > .product__pack-price {
  flex-basis: 100%;
}

/* Condition chip (Ny / Brugt / Istandsat) under the title */
.jm-condition {
  display: inline-flex;
  gap: 0.375rem;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0.25rem 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1f5f3b;
  background-color: #e6f1ea;
  border: 1px solid #b9d8c4;
  border-radius: 999px;
}

.jm-condition::before {
  content: "✓";
  content: "✓" / "";
}

/* "Kun 1 stk. på lager": green like "in stock", not a warning */
.jm-availability--few {
  color: var(--jm-cta);
}

/* One photo: no thumbnail row (Hummingbird shows it from 1 image) */
.product__thumbnails:has(.product__thumbnails-item:only-child) {
  display: none;
}

/* Exactly 1 in stock (normal for used CDs): no quantity selector.
   The input stays in the form, so quantity 1 is still sent. */
.product__add-to-cart-container:has(> .jm-qty-single) .product__quantity {
  display: none;
}

/* USPs (toftecblocks, displayReassurance) now sit under the buy form */
.product__actions .tb-usp-pdp {
  margin-block: 1.5rem 0;
}

/* Accordions (U1/U2, variant A – mockup docs/mockups/akkordeon-produktside.html):
   each item is a sand "button" with a dark round chevron, so it reads as tappable
   and stands out from the cream page; the open content sits on white with padding.
   Variant B (dark bar + gold plus) is parked in docs/decisions.md. */
.product__accordion {
  --bs-accordion-color: var(--jm-ink);
  --bs-accordion-active-color: var(--jm-ink);
  --bs-accordion-active-bg: var(--jm-sand);
  --bs-accordion-btn-padding-x: 1rem;
  --bs-accordion-btn-padding-y: 0.625rem;
  --bs-accordion-btn-icon-width: 2.25rem;
  --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23faf6ee' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M3.5 6l4.5 4.5L12.5 6'/%3e%3c/svg%3e");
  --bs-accordion-btn-active-icon: var(--bs-accordion-btn-icon);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.2rem rgba(27, 108, 168, 0.35);
  --jm-acc-edge: #e7dcc8;            /* a shade darker than --jm-sand */
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.product__accordion.accordion-flush > .accordion-item {
  overflow: hidden;
  background-color: var(--jm-sand);
  border: 1px solid var(--jm-acc-edge);
  border-radius: var(--jm-radius);
}

.product__accordion .accordion-button,
.product__accordion .accordion-button:not(.collapsed) {
  min-height: 3.75rem;               /* 60px touch target */
  gap: 0.75rem;
  font-family: var(--jm-font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--jm-ink);
  background-color: var(--jm-sand);
  box-shadow: none;
}

.product__accordion .accordion-button:hover {
  background-color: var(--jm-acc-edge);
}

.product__accordion .accordion-button:focus-visible {
  box-shadow: inset var(--bs-accordion-btn-focus-box-shadow);
}

/* Dark round icon with a light chevron (rotates when open – Bootstrap) */
.product__accordion .accordion-button::after {
  height: var(--bs-accordion-btn-icon-width);
  background-color: var(--jm-charcoal);
  background-position: center;
  background-size: 1rem;
  border-radius: 50%;
}

.product__accordion .accordion-body {
  padding: 0.875rem 1rem 1.125rem;   /* U1: content no longer touches the edge */
  background-color: #fff;
  border-top: 1px solid var(--jm-acc-edge);
}

@media (prefers-reduced-motion: reduce) {
  .product__accordion .accordion-button::after {
    transition: none;
  }
}

/* Description: track lists are often one <p> per track – less air */
.product__description p {
  margin-block-end: 0.5rem;
}

.product__description p:empty {
  display: none;
}

@media (min-width: 992px) {
  .product__description :is(ol, ul):has(> li:nth-child(8)) {
    columns: 2;
    column-gap: 2rem;
  }

  .product__description li {
    break-inside: avoid;
  }
}

/* Mobile: price and "Læg i kurv" in the first screen (≈664px visible on a
   390px iPhone in Safari). Photo capped at 30% of the small viewport height,
   no thumbnail row (swipe + "1 / 3" counter from custom.js instead). */
@media (max-width: 767.98px) {
  .jm-pdp .product__images {
    margin-block-end: 1rem;
  }

  .jm-pdp .product__carousel {
    position: relative;
    background-color: var(--jm-stage);
  }

  .jm-pdp .product__carousel .carousel-item img {
    height: 30vh;
    height: 30svh;
    object-fit: contain;
    mix-blend-mode: multiply;
  }

  .jm-pdp .product__thumbnails {
    display: none;
  }

  .jm-pdp .product__name {
    font-size: 1.375rem;
    line-height: 1.2;
  }

  .jm-pdp .product__price {
    font-size: 2.25rem;
  }

  .jm-pdp .product__name,
  .jm-pdp .product__manufacturer,
  .jm-pdp .product__prices,
  .jm-pdp .product__availability,
  .jm-pdp .jm-condition {
    margin-block-end: 0.75rem;
  }
}

.jm-img-counter {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  padding: 0.125rem 0.625rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  background-color: rgba(42, 37, 35, 0.8);
  border-radius: 999px;
  pointer-events: none;
}

@media (min-width: 768px) {
  .jm-img-counter {
    display: none;
  }
}

.product__add-to-cart-button {
  min-height: 3.75rem;
  font-size: 1.25rem;
}

.product__availability-status {
  font-size: 1.0625rem;
  font-weight: 600;
}

.product__delivery-infos {
  font-size: 1rem;           /* was 0.875rem */
  color: var(--jm-muted);
}


/* QUANTITY STEPPER (product page, cart, quick view) ----------------------
   Same look as the search pill and form fields: one white pill with a 1px
   --jm-input-border; the − / + buttons sit inside it. */
.quantity-button__group {
  display: inline-flex;
  flex-wrap: nowrap;
  width: auto;
  background-color: #fff;
  border: 1px solid var(--jm-input-border);
  border-radius: 999px;
}

.quantity-button__group:focus-within {
  border-color: var(--jm-link);
  box-shadow: 0 0 0 0.2rem rgba(27, 108, 168, 0.25);
}

.quantity-button__group > .btn {
  width: 3rem;
  min-height: 3rem;
  color: var(--jm-ink);
  background-color: transparent;
  border: 0;
  border-radius: 0;
}

.quantity-button__group > .btn:first-child {
  border-radius: 999px 0 0 999px;
}

.quantity-button__group > .btn:last-child {
  border-radius: 0 999px 999px 0;
}

.quantity-button__group > .btn:hover {
  background-color: var(--jm-sand);
  opacity: 1;
}

.quantity-button__group > .btn:focus-visible {
  outline-offset: -3px;
}

.quantity-button__group > .form-control {
  min-height: 3rem;
  max-width: 3.5rem;
  padding-inline: 0.25rem;
  font-weight: 700;
  text-align: center;
  background-color: transparent;
  border: 0;
  border-radius: 0;
}

.quantity-button__group > .form-control:focus {
  box-shadow: none;
}


/* 9b. STICKY BUY BAR (MOBILE + DESKTOP) =================================== */
/* Markup: templates/catalog/_partials/jm-buybar.tpl.
   JS (JM_CONFIG.stickyBuybar) toggles .is-visible once the real button is
   scrolled past. Sits below the drawer/modal (Bootstrap z-index 1040+). */
.jm-buybar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1020;
  padding: 0.5rem 1rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
  visibility: hidden;
  background-color: #fff;
  border-top: 1px solid var(--jm-line);
  box-shadow: 0 -0.25rem 1rem rgba(42, 37, 35, 0.12);
  transform: translateY(110%);
  transition: transform 0.2s ease, visibility 0s linear 0.2s;
}

.jm-buybar.is-visible {
  visibility: visible;
  transform: none;
  transition: transform 0.2s ease;
}

.jm-buybar__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.jm-buybar__image {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  background-color: var(--jm-stage);
  border-radius: var(--jm-radius-sm);
}

.jm-buybar__info {
  flex: 1 1 auto;
  min-width: 0;
}

.jm-buybar__name,
.jm-buybar__price {
  margin: 0;
}

.jm-buybar__name {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.jm-buybar__price {
  font-family: var(--jm-font-display);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.1;
}

.jm-buybar__button {
  flex: 0 0 auto;
  min-height: 3rem;
  padding-inline: 1rem;
  font-size: 1.0625rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Room at the bottom so the bar never covers the footer */
@media (max-width: 767.98px) {
  html.jm-has-buybar body {
    padding-bottom: var(--jm-buybar-h, 5rem);
  }
}

/* Tablet/desktop: only with JM_CONFIG.stickyBuybarDesktop (html.jm-buybar-desktop) */
@media (min-width: 768px) {
  html:not(.jm-buybar-desktop) .jm-buybar {
    display: none;
  }

  html.jm-has-buybar.jm-buybar-desktop body {
    padding-bottom: var(--jm-buybar-h, 5rem);
  }

  .jm-buybar {
    padding-top: 0.75rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .jm-buybar__inner {
    max-width: 1296px;
    margin-inline: auto;
    gap: 1rem;
  }

  .jm-buybar__image {
    width: 3.5rem;
    height: 3.5rem;
  }

  .jm-buybar__info {
    display: flex;
    gap: 1.5rem;
    align-items: center;
  }

  .jm-buybar__name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.0625rem;
  }

  .jm-buybar__price {
    flex: 0 0 auto;
    font-size: 1.625rem;
  }

  .jm-buybar__button {
    min-width: 14rem;
    min-height: 3.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jm-buybar,
  .jm-buybar.is-visible {
    transition: none;
  }
}


/* 9c. STICKY BUY COLUMN (DESKTOP) ========================================= */
/* Off by default. JS (JM_CONFIG.stickyColumn or ?jm_sticky_col=1) sets
   html.jm-sticky-col. Hummingbird has two separate grids (photo | buy box,
   then description | USPs), so the buy box could never follow the
   description. Here both rows become one grid on .jm-pdp
   (templates/catalog/product.tpl): photo + description on the left, the buy
   column spanning both rows on the right. html.jm-sticky-col-fits (JS) is
   only set when the column fits below the header; otherwise it scrolls
   normally so nothing is cut off. When the column ends, the real button
   scrolls away and the sticky buy bar (9b) takes over. */
@media (min-width: 992px) {
  html.jm-sticky-col .jm-pdp {
    display: grid;
    grid-template-columns: 48% minmax(0, 1fr);
    column-gap: 1.5rem;
    align-items: start;
  }

  html.jm-sticky-col .jm-pdp > * {
    grid-column: 1 / -1;
  }

  html.jm-sticky-col .jm-pdp .product__container,
  html.jm-sticky-col .jm-pdp .product__bottom {
    display: contents;
  }

  html.jm-sticky-col .jm-pdp .product__left {
    grid-row: 1;
    grid-column: 1;
  }

  html.jm-sticky-col .jm-pdp .product__bottom-left {
    grid-row: 2;
    grid-column: 1;
    margin-block-start: 1.5rem;
  }

  html.jm-sticky-col .jm-pdp .product__right {
    grid-row: 1 / span 2;
    grid-column: 2;
  }

  html.jm-sticky-col .jm-pdp .product__bottom-right {
    display: none; /* empty: the USPs moved into the buy column */
  }

  html.jm-sticky-col.jm-sticky-col-fits .jm-pdp .product__right {
    position: sticky;
    top: var(--jm-sticky-top, 1rem);
  }
}

@media (min-width: 1200px) {
  html.jm-sticky-col .jm-pdp {
    grid-template-columns: 55% minmax(0, 1fr);
    column-gap: 2rem;
  }
}


/* 9d. CHECKOUT – FRAGTVALG + ORDREKOMMENTAR ================================ */
/* ps_onepagecheckout: modules/ps_onepagecheckout/.../one-page-checkout/carriers.tpl (override).
   Each carrier is a card: radio · (logo) · name with delivery time under it · price on the
   right. Same row on phones and desktop – the module's 40/40/20 % columns are not used.
   Chosen card green. The Homerunner pick-up point selector (.hr-picker, styled by the
   module) sits in .delivery-option__extra under the chosen card. */
.delivery-options__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.delivery-options__list > .delivery-option__item,
.delivery-options__list > .delivery-option__item:first-child,
.delivery-options__list > .delivery-option__item:last-child {
  background-color: #fff;
  border: 2px solid var(--jm-line);
  border-radius: var(--jm-radius);
  transition: border-color 0.15s ease;
}

.delivery-options__list > .delivery-option__item:hover {
  border-color: var(--jm-input-border);
}

.delivery-options__list > .delivery-option__item:has(.delivery-option__check input:checked) {
  background-color: #f1f8f3;
  border-color: var(--jm-cta);
}

.delivery-options__list > .delivery-option__item:has(input:focus-visible) {
  outline: 3px solid var(--jm-link);
  outline-offset: 2px;
}

.jm-carrier.delivery-option__label {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.875rem;
  align-items: center;
  min-height: 4rem;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
}

.jm-carrier .delivery-option__check {
  flex: none;
  min-height: 0;
  padding: 0;
  margin: 0;
}

.jm-carrier .delivery-option__check .form-check-input {
  float: none;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  cursor: pointer;
  border: 1px solid var(--jm-input-border);   /* 3:1 against white (WCAG 1.4.11) */
}

.jm-carrier .delivery-option__check .form-check-input:checked {
  background-color: var(--jm-cta);
  border-color: var(--jm-cta);
}

/* Logo slot: same width on every card, so the names line up (empty when a carrier has none) */
.jm-carrier__logo {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
}

.jm-carrier__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;   /* white logo backgrounds disappear on the green chosen card */
}

.jm-carrier__text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.jm-carrier .delivery-option__carrier-name {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.jm-carrier .delivery-option__content {
  flex: none;                 /* Hummingbird: flex-basis 100 % / 40 % */
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--jm-muted);
}

.jm-carrier .delivery-option__price {
  flex: none;
  margin-left: auto;
  font-size: 1.0625rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.delivery-option__extra-content {
  padding-inline: 1.25rem;
}

@media (max-width: 575.98px) {
  .jm-carrier.delivery-option__label {
    gap: 0.75rem;
    padding: 0.875rem 1rem;
  }

  .jm-carrier__logo {
    width: 2.25rem;
    height: 2.25rem;
  }

  .delivery-option__extra-content {
    padding-inline: 1rem;
  }
}

/* Payment options: same cards as the carriers above (CSS only – module markup from
   ps_onepagecheckout payment-methods.tpl: .payment-option > .payment-option__form-check
   (radio + label) + .payment-option__additional-information + .js-payment-option-form).
   The whole top row is clickable (label::after); the module's additional information
   (e.g. bank details) shows inside the chosen card. */
#opc-payment-methods {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.opc-payment-methods-wrapper {
  min-height: 4rem;           /* module: 6rem – left a big gap under a single option */
}

#opc-payment-methods .payment-option {
  background-color: #fff;
  border: 2px solid var(--jm-line);
  border-radius: var(--jm-radius);
  transition: border-color 0.15s ease;
}

#opc-payment-methods .payment-option:hover {
  border-color: var(--jm-input-border);
}

#opc-payment-methods .payment-option:has(.payment-option__input:checked) {
  background-color: #f1f8f3;
  border-color: var(--jm-cta);
}

#opc-payment-methods .payment-option:has(.payment-option__input:focus-visible) {
  outline: 3px solid var(--jm-link);
  outline-offset: 2px;
}

#opc-payment-methods .payment-option__form-check {
  position: relative;
  display: flex;
  gap: 0.875rem;
  align-items: center;
  min-height: 4rem;
  padding: 0.875rem 1.25rem;
  margin: 0;
}

#opc-payment-methods .payment-option__input {
  flex: none;
  float: none;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  cursor: pointer;
  border: 1px solid var(--jm-input-border);   /* 3:1 against white (WCAG 1.4.11) */
}

#opc-payment-methods .payment-option__input:checked {
  background-color: var(--jm-cta);
  border-color: var(--jm-cta);
}

#opc-payment-methods .payment-option__label {
  display: flex;
  flex: 1 1 auto;
  gap: 0.875rem;
  align-items: center;
  min-width: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}

#opc-payment-methods .payment-option__label::after {
  position: absolute;
  inset: 0;
  content: "";
}

#opc-payment-methods .payment-option__label img {
  flex: none;
  max-width: 4rem;
  max-height: 2.25rem;
  object-fit: contain;
  mix-blend-mode: multiply;
}

#opc-payment-methods .payment-option__additional-information {
  padding: 0 1.25rem 1rem 3.625rem;   /* lines up with the label text (radio 1.5rem + gap) */
  font-size: 0.9375rem;
  color: var(--jm-muted);
}

#opc-payment-methods .payment-option__additional-information > :last-child {
  margin-bottom: 0;
}

@media (max-width: 575.98px) {
  #opc-payment-methods .payment-option__form-check {
    gap: 0.75rem;
    padding: 0.875rem 1rem;
  }

  #opc-payment-methods .payment-option__additional-information {
    padding: 0 1rem 1rem;
  }
}

/* Loaders (opc-loader.tpl) for delivery and payment. Module: a solid white box over the
   options with a large spinner and the text under it. Here: the options stay visible but
   dimmed (cream veil), a white pill with a small spinner + text, faded in after 150 ms so quick
   reloads do not flash. Bootstrap utilities on the markup (flex-column, py-3) use
   !important, hence the overrides. */
.opc-payment-methods-loader {
  background-color: rgba(250, 246, 238, 0.72) !important;   /* --jm-cream, module: bg-white */
  border-radius: var(--jm-radius);
  animation: jm-opc-loader-in 0.2s ease 0.15s both;
}

.js-opc-delivery-section .spinner-border,
.js-opc-payment-section .spinner-border {
  width: 1.25rem;
  height: 1.25rem;
  border-width: 0.15em;
  color: var(--jm-cta) !important;
}

/* Centre a small pill in the veil (d-none on the loader still wins: it is !important) */
.opc-payment-methods-loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

.js-opc-delivery-section .one-page-checkout__placeholder > .d-flex:has(> .spinner-border),
.opc-payment-methods-loader > .d-flex {
  flex-direction: row !important;
  gap: 0.625rem !important;
  width: fit-content;
  height: auto !important;
  min-height: 2.75rem;
  padding: 0.5rem 1.125rem !important;
  margin: 0.75rem auto;
  background-color: #fff;
  border: 1px solid var(--jm-line);
  border-radius: 999px;
  box-shadow: 0 0.25rem 1rem rgba(42, 37, 35, 0.08);
  animation: jm-opc-loader-in 0.2s ease 0.15s both;
}

.js-opc-delivery-section .one-page-checkout__placeholder > .d-flex:has(> .spinner-border) .small,
.opc-payment-methods-loader .small {
  font-size: 0.9375rem !important;
  color: var(--jm-muted) !important;
}

/* Delivery: the module REPLACES the carrier list with the loader (no veil over the cards),
   so the page jumped: hint/cards -> small loader -> cards. Reserve room for about two cards
   while loading (opc-carrier-list.js sets data-opc-carriers-state="loading") and centre
   the pill in it. Same on first load (address hint -> loader -> cards). */
#opc-delivery-methods[data-opc-carriers-state="loading"] {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 9.5rem;
  background-color: rgba(255, 255, 255, 0.45);
  border: 2px dashed var(--jm-line);
  border-radius: var(--jm-radius);
}

@keyframes jm-opc-loader-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .opc-payment-methods-loader,
  .js-opc-delivery-section .one-page-checkout__placeholder > .d-flex:has(> .spinner-border),
  .opc-payment-methods-loader > .d-flex {
    animation: none;
  }
}

/* Order comment: quiet text link above the terms card (steps/one-page-checkout.tpl override).
   <details> opens a text field; the field submits with #opc-form via form="opc-form". */
.jm-order-comment {
  margin-top: 1.5rem;
}

.jm-order-comment__toggle {
  display: inline-flex;
  gap: 0.375rem;
  align-items: center;
  min-height: 2.75rem;          /* touch target */
  font-size: 1rem;
  color: var(--jm-link);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
  list-style: none;
}

.jm-order-comment__toggle::-webkit-details-marker {
  display: none;
}

.jm-order-comment__toggle::before {
  font-weight: 700;
  text-decoration: none;
  content: "+";
}

.jm-order-comment[open] .jm-order-comment__toggle::before {
  content: "\2212";            /* minus */
}

.jm-order-comment__toggle:hover {
  color: var(--jm-link-hover);
}

.jm-order-comment__toggle:focus-visible {
  outline: 3px solid var(--jm-link);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.jm-order-comment__field {
  margin-top: 0.5rem;
}

/* The terms card brings its own top margin (§12k); less when the comment link sits above it */
.jm-order-comment + .js-conditions-to-approve .form-check:first-child {
  margin-top: 0.75rem;
}


/* 9e. "LAGT I KURVEN"-VINDUET (UI-runde 9) ================================ */
/* modules/ps_shoppingcart/modal.tpl. Phones: bottom sheet; larger screens: centered, 32rem. */
.jm-cartmodal .modal-dialog {
  max-width: 32rem;
}

.jm-cartmodal .modal-content {
  background-color: #fff;
  border: 0;
  border-radius: 1.25rem;
}

.jm-cartmodal__header {
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem 0.5rem 1.25rem;
  border-bottom: 0;
}

.jm-cartmodal__title {
  display: flex;
  gap: 0.625rem;
  align-items: center;
  margin: 0;
  font-family: var(--jm-font-display);
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.15;
}

.jm-cartmodal__ok {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: #fff;
  background-color: var(--jm-cta);
  border-radius: 50%;
}

.jm-cartmodal__close {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 3.5rem;
  min-height: 3.5rem;
  margin-left: auto;
  padding: 0;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--jm-ink);
  background: transparent;
  border: 0;
  border-radius: var(--jm-radius-sm);
}

.jm-cartmodal__close:hover {
  background-color: var(--jm-sand);
}

.jm-cartmodal__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem 1.25rem 1rem;
}

.jm-cartmodal__product {
  display: flex;
  gap: 0.875rem;
  align-items: center;
  padding: 0.75rem;
  background-color: var(--jm-cream);
  border-radius: var(--jm-radius);
}

.jm-cartmodal__image {
  flex: none;
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
  background-color: var(--jm-stage);
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-radius-sm);
}

.jm-cartmodal__info {
  min-width: 0;
}

.jm-cartmodal__info p {
  margin: 0;
}

.jm-cartmodal__name {
  font-weight: 700;
  line-height: 1.3;
}

.jm-cartmodal__qty,
.jm-cartmodal__property {
  font-size: 1rem;
  color: var(--jm-muted);
}

.jm-cartmodal__summary {
  margin: 0;
  font-size: 1rem;
}

.jm-cartmodal__footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  padding: 0 1.25rem 1.5rem;
  border-top: 0;
}

.jm-cartmodal__footer > * {
  margin: 0;
}

.jm-cartmodal__go {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.jm-cartmodal__more {
  min-height: 3.25rem;
}

@media (max-width: 575.98px) {
  /* Bottom sheet */
  .jm-cartmodal .modal-dialog {
    align-items: flex-end;
    min-height: 100%;
    max-width: none;
    margin: 0;
  }

  .jm-cartmodal .modal-content {
    padding-bottom: env(safe-area-inset-bottom);
    border-radius: 1.25rem 1.25rem 0 0;
  }

  .jm-cartmodal.fade .modal-dialog {
    transform: translateY(100%);
  }

  .jm-cartmodal.show .modal-dialog {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jm-cartmodal.fade .modal-dialog { transform: none; }
}


/* 9f. KURVSIDE (UI-runde 9) ================================================ */
/* templates/checkout/_partials/cart-detailed.tpl (+ fri fragt-måler) and
   cart-detailed-product-line.tpl (condition tag, "Fjern" with icon). Products as cards,
   summary as a card, "Fortsæt med at handle" as a plain link. */
.cart-overview > hr {
  display: none;
}

.cart-overview .tfs {
  margin-bottom: 1rem;
}

.cart__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cart__item {
  padding: 0.875rem;
  background-color: #fff;
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-radius);
}

.cart__item .product-line {
  gap: 0.875rem;
}

.cart__item .product-line__img {
  width: 5rem;
  background-color: var(--jm-stage);
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-radius-sm);
}

.cart__item .product-line__title {
  color: var(--jm-ink);
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.cart__item .jm-tags {
  margin: 0.125rem 0 0;
}

.cart__item .product-line__item-availability-message {
  font-size: 0.9375rem;
  font-weight: 600;
}

.cart__item .product-line__item-availability-message.text-success {
  color: var(--jm-cta) !important;
}

.cart__item .product-line__item--small-info {
  font-size: 0.9375rem;
  color: var(--jm-muted);
}

.cart__item .product-line__content-right {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-block-end: 0.75rem;
}

.cart__item .product-line__price {
  font-size: 1.25rem;
  font-weight: 800;
}

/* "Fjern": pill with bin icon + text (48 px) */
.jm-remove {
  display: inline-flex;
  gap: 0.375rem;
  align-items: center;
  min-height: 3rem;
  padding: 0 0.875rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--jm-ink);
  text-decoration: none;
  background-color: #fff;
  border: 1px solid var(--jm-line);
  border-radius: 999px;
}

.jm-remove:hover {
  color: var(--jm-ink);
  border-color: var(--jm-input-border);
}

/* Hummingbird's cart JS reads data-link-action from event.target – the click must land on the <a> */
.jm-remove > * {
  pointer-events: none;
}

.cart__continue-shopping {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
  min-height: 3rem;
  margin-top: 1rem;
  padding: 0;
  font-weight: 600;
  color: var(--jm-link);
  background: transparent;
  border: 0;
}

.cart__continue-shopping:hover {
  color: var(--jm-link-hover);
  text-decoration: underline;
  background: transparent;
}

.cart-grid__aside-wrapper {
  padding: 1rem;
  background-color: #fff;
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-radius);
}

.cart-grid__aside-wrapper > h2 {
  font-family: var(--jm-font-display);
  font-size: 1.5rem;
}

.cart-summary__actions .btn-primary {
  min-height: 3.5rem;
  font-size: 1.25rem;
  font-weight: 800;
}


/* 10. FOOTER ============================================================== */
.footer__main {
  font-size: 1.0625rem;
  color: #e8dfd2;
  background-color: var(--jm-charcoal);
}

.footer-block__title {
  font-family: var(--jm-font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.footer-block a {
  color: #e8dfd2;
}

.footer-block a:hover {
  color: #fff;
}

/* Payment logos strip (templates/_partials/copyright.tpl, file: assets/img/betalingskort.svg).
   No plate: the SVG has its own white card behind each logo. */
.jm-payment {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: center;
  padding-block: 1.25rem 0.5rem;
  border-top: 1px solid rgba(232, 223, 210, 0.25);
  margin-top: 1rem;
}

.jm-payment__title {
  margin: 0;
  font-weight: 600;
}

.jm-payment__img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 3.25rem;
}


/* 11. FORSIDE (templates/index.tpl) ======================================= */
/* Design: docs/forside-designbrief.md (variant B).
   The layout's .container is removed on the home page (container_class in
   index.tpl); every section brings its own .container. */
.columns-container--home > .row {
  margin-inline: 0;
}

.columns-container--home #center-column {
  width: 100%;
  padding-inline: 0;
}

/* Home page always full width, also if a stale combined CSS (CCC) still holds an
   older left-column width rule – body#index.layout-left-column, UI-runde 11 */
body#index #center-column {
  flex: 0 0 auto;
  width: 100%;
}

.columns-container--home .page-content--home {
  margin: 0;
  padding: 0;
}

/* Shared: section title, section head with "Se alle" link, dark button */
.jm-section-title {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.15;
}

.jm-section-head {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0.875rem;
}

.jm-section-head__lead {
  margin: 0.125rem 0 0;
  font-size: 0.9375rem;
  color: var(--jm-muted);
}

.jm-section-head__actions {
  display: flex;
  flex: none;
  gap: 1rem;
  align-items: center;
}

.jm-section-head__link {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.375rem;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 700;
  color: var(--jm-link);
}

.jm-btn {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.625rem 1.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border-radius: var(--jm-radius-sm);
}

.jm-btn--dark {
  color: #fff;
  background-color: var(--jm-charcoal);
}

.jm-btn--dark:hover {
  color: #fff;
  background-color: #000;
}

@media (min-width: 768px) {
  .jm-section-title {
    font-size: 2.5rem;
    line-height: 1.1;
  }

  .jm-section-head {
    margin-bottom: 1.375rem;
  }

  .jm-section-head__lead {
    font-size: 1.125rem;
  }
}

/* Hero: sand band, typographic, decorative record drawn in CSS (no images) */
.jm-hero {
  overflow: hidden;
  background-color: var(--jm-sand);
  border-bottom: 1px solid var(--jm-line);
}

.jm-hero__inner {
  position: relative;
  display: flex;
  gap: 3rem;
  align-items: center;
  padding-block: 1.75rem 1.625rem;
}

.jm-hero__text {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
}

.jm-hero__eyebrow {
  max-width: 14rem;
  margin: 0 0 0.375rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--jm-muted);
}

.jm-hero__title {
  max-width: 17.5rem;
  margin: 0 0 0.625rem;
  font-size: 1.9375rem;
  line-height: 1.12;
}

.jm-hero__lead {
  max-width: 34rem;
  margin: 0 0 1.125rem;
  font-size: 1.0625rem;
}

/* Phones/tablets: the record peeks in at the top right, behind the text */
.jm-hero__art {
  position: absolute;
  top: -3rem;
  right: -4rem;
  width: 10rem;
  height: 10rem;
  pointer-events: none;
}

.jm-hero__vinyl {
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle, var(--jm-charcoal) 0 3px, #3a3431 3px 6px);
  border-radius: 50%;
}

.jm-hero__label {
  position: absolute;
  inset: 35%;
  background-color: var(--jm-red);
  border-radius: 50%;
}

.jm-hero__cd {
  display: none;
}

@media (min-width: 768px) {
  .jm-hero__inner {
    padding-block: 3.5rem;
  }

  .jm-hero__eyebrow {
    max-width: none;
    font-size: 0.9375rem;
    letter-spacing: 0.06em;
  }

  .jm-hero__title {
    max-width: 40rem;
    margin-bottom: 0.875rem;
    font-size: clamp(2.5rem, 4vw, 3.25rem);
    line-height: 1.08;
  }

  .jm-hero__lead {
    margin-bottom: 1.625rem;
    font-size: 1.25rem;
  }

  .jm-hero__art {
    top: -2rem;
    right: -3rem;
    width: 15rem;
    height: 15rem;
  }
}

/* Desktop: record + CD beside the text */
@media (min-width: 992px) {
  .jm-hero__art {
    position: relative;
    top: auto;
    right: auto;
    flex: 0 0 auto;
    width: 21rem;
    height: 18.75rem;
  }

  .jm-hero__vinyl {
    inset: 0 0 auto auto;
    width: 18.75rem;
    height: 18.75rem;
  }

  .jm-hero__cd {
    position: absolute;
    bottom: 0;
    left: 0;
    display: block;
    width: 9.375rem;
    height: 9.375rem;
    background: radial-gradient(circle, var(--jm-sand) 0 16px, #d8cfc6 16px 20px, #fff 20px 100%);
    border-radius: 50%;
    box-shadow: 0 0.5rem 1.5rem rgba(42, 37, 35, 0.25);
  }
}

/* Shortcuts: Nyheder (gold) + Tilbud (wine) */
.jm-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  padding-top: 1rem;
}

.jm-shortcuts--single {
  grid-template-columns: minmax(0, 1fr);
}

.jm-shortcut {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
  min-height: 7rem;
  padding: 0.875rem;
  color: #fff;
  text-decoration: none;
  border-radius: 0.875rem;
}

.jm-shortcut--wine {
  background-color: var(--jm-wine);
}

.jm-shortcut--wine:hover {
  color: #fff;
  background-color: #732330;
}

.jm-shortcut--gold {
  color: var(--jm-ink);
  background-color: var(--jm-gold);
}

.jm-shortcut--gold:hover {
  color: var(--jm-ink);
  background-color: #d69a22;
}

.jm-shortcut__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.jm-shortcut__title {
  font-family: var(--jm-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
}

.jm-shortcut__sub {
  font-size: 0.9375rem;
  line-height: 1.3;
}

.jm-shortcut__arrow {
  display: none;
}

@media (min-width: 768px) {
  .jm-shortcuts {
    gap: 1.5rem;
    padding-top: 2.25rem;
  }

  .jm-shortcut {
    flex-direction: row;
    gap: 1.125rem;
    align-items: center;
    min-height: 7.5rem;
    padding: 1.5rem;
    border-radius: 1rem;
  }

  .jm-shortcut__icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .jm-shortcut__text {
    flex: 1 1 auto;
  }

  .jm-shortcut__title {
    font-size: 1.6875rem;
  }

  .jm-shortcut__sub {
    font-size: 1.0625rem;
  }

  .jm-shortcut__arrow {
    display: block;
    flex: 0 0 auto;
  }
}

/* Nyt på hylden (ps_newproducts, 16 products). The row itself is a .jm-rail slider (section 99) */
.jm-home__products {
  padding-top: 1.25rem;
}

.jm-newproducts .module-products__buttons {
  margin-top: 1rem;
}

.jm-newproducts__all {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  width: 100%;
}

@media (min-width: 768px) {
  .jm-home__products {
    padding-top: 2.75rem;
  }

  .jm-newproducts .module-products__buttons {
    margin-top: 1.75rem;
  }

  .jm-newproducts__all {
    width: auto;
  }
}

/* USP band: comes from toftecblocks (views/css/front.css, .tb-usp / .tb-usp-pdp) – none in the theme */

/* Find din musik + Populære genrer: come from toftecblocks (category blocks, .tb-cats) – none in the theme */

/* toftecblocks output (zone "Nederst") – the blocks bring their own spacing */
.jm-home__blocks {
  display: flow-root;
}

/* Poul card + Om Jack Music */
.jm-about {
  display: grid;
  gap: 2rem;
  padding-block: 2rem 2.25rem;
}

.jm-poul {
  padding: 1.375rem 1.125rem;
  color: #fff;
  background-color: var(--jm-charcoal);
  border-radius: 1rem;
}

.jm-poul__title {
  margin: 0 0 0.375rem;
  font-size: 1.625rem;
  color: #fff;
}

.jm-poul__lead {
  margin: 0 0 1rem;
  color: var(--jm-sand);
}

.jm-poul__items {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.jm-poul__item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-height: 3.75rem;
  padding: 0.5rem 0.75rem;
  color: var(--jm-ink);
  text-decoration: none;
  background-color: #fff;
  border-radius: 0.625rem;
}

.jm-poul__item:hover {
  color: var(--jm-ink);
  background-color: var(--jm-cream);
}

.jm-poul__icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: #fff;
  background-color: var(--jm-charcoal);
  border-radius: var(--jm-radius-sm);
}

.jm-poul__item-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.jm-poul__value {
  overflow-wrap: anywhere;   /* long e-mail addresses on narrow phones */
  font-size: 1.1875rem;
  font-weight: 800;
}

.jm-poul__sub {
  font-size: 0.9375rem;
  color: var(--jm-muted);
}

.jm-intro .jm-section-title {
  margin-bottom: 0.625rem;
  font-size: 1.625rem;
}

.jm-intro p {
  max-width: 40rem;
  margin: 0 0 0.75rem;
}

@media (min-width: 992px) {
  .jm-about {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 3rem;
    align-items: start;
    padding-block: 4rem 4.5rem;
  }

  .jm-poul {
    padding: 1.875rem 1.75rem;
    border-radius: 1.125rem;
  }

  .jm-poul__title {
    font-size: 2rem;
  }

  .jm-intro {
    padding-top: 0.375rem;
  }

  .jm-intro .jm-section-title {
    margin-bottom: 0.875rem;
    font-size: 2rem;
  }
}


/* 12. UI-RUNDE 11 (kategoriside, menu, checkout) ========================== */
/* Mockups: docs/mockups/runde-11-kategoriside.html, runde-11-checkout.html */

/* 12a. Kategoriside: venstre kolonne smallere, 4 produkter pr. række (>= 1200px).
   Only when the left column really holds something (category tree, filters, …):
   the home page uses the same layout with an EMPTY left column and must keep its
   full-width centre (section 11). Not tied to page ids on purpose. */
@media (min-width: 1200px) {
  .layout-left-column .row:has(> #left-column :is(.left-block, #search_filters_wrapper)) > #left-column {
    flex: 0 0 auto;
    width: 20%;
  }

  .layout-left-column .row:has(> #left-column :is(.left-block, #search_filters_wrapper)) > #center-column {
    flex: 0 0 auto;
    width: 80%;
  }

  .layout-left-column .products {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}

/* 12b. Kategoritræ (modules/ps_categorytree): roligere på desktop, foldet på mobil */
.jm-cattree .left-block__title {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.jm-cattree .category-tree__list {
  row-gap: 0.125rem;
}

.jm-cattree .category-tree__item-link {
  min-height: 2.25rem;
  font-size: 1rem;
}

.jm-cattree__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3rem;
  padding: 0 1rem;
  font-weight: 700;
  color: var(--jm-ink);
  background-color: #fff;
  border: 1px solid var(--jm-input-border);
  border-radius: var(--jm-radius-sm);
}

.jm-cattree__chevron,
.jm-minicart__chevron {
  flex: 0 0 auto;
  width: 0.5625rem;
  height: 0.5625rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-0.125rem);
  transition: transform 0.2s ease;
}

.jm-cattree__toggle:not(.collapsed) .jm-cattree__chevron,
.jm-minicart.is-open .jm-minicart__chevron {
  transform: rotate(-135deg) translateY(-0.125rem);
}

@media (max-width: 767.98px) {
  .jm-cattree {
    margin-bottom: 1rem;
  }

  .jm-cattree__body {
    padding: 0.5rem 1rem;
    margin-top: 0.25rem;
    background-color: #fff;
    border: 1px solid var(--jm-line);
    border-radius: var(--jm-radius-sm);
  }

  .jm-cattree .category-tree__item-link {
    min-height: 2.75rem;   /* touch target */
  }
}

/* 12c. Sortering: naturlig bredde til højre (>= 768px); kanter som søgefeltet */
.products__sort-dropdown-button,
.products__filter-button {
  border-color: var(--jm-input-border);
}

@media (min-width: 768px) {
  .products__sort {
    flex: 0 1 auto;
  }

  .products__sort-dropdown {
    flex-grow: 0;
  }

  .products__sort-dropdown-button {
    width: auto;
    min-height: 3rem;
    gap: 0.75rem;
    justify-content: center;
  }
}

/* 12c2. Antal varer kun ét sted: når kategori-/søgetoppen viser "573 varer",
   skjules "Der er 573 varer." i sorteringsbjælken. Side 2+ (ingen top): vises stadig. */
body:has(.jm-cathead__count, .jm-listing-head__count) .products__count {
  display: none;
}

/* Sort alone in the bar: keep it on the right */
.products__sort {
  margin-left: auto;
}

/* 12d. "Se detaljer" og sidetal: 1 px kant i søgefeltets farve */
.product-miniature__details {
  --bs-btn-border-width: 1px;
  --bs-btn-border-color: var(--jm-input-border);
}

.pagination {
  --bs-pagination-border-color: var(--jm-input-border);
}

.pagination .page-link {
  border-width: 1px;
}

/* 12e. Hovedmenu: "Alle kategorier" er en knap (modules/ps_mainmenu) */
button.ps-mainmenu__tree-link {
  font-family: inherit;
  line-height: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

#mobileMenu .jm-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3rem;
  padding: 0.5rem 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--jm-ink);
  text-align: left;
  background: none;
  border: 0;
}

/* Drawer: the menu list scrolls on its own (long "Alle kategorier" list);
   the contact card at the bottom stays put */
#mobileMenu .ps-mainmenu__mobile {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Desktop panel: while no category has subcategories, show them in 4 columns
   across the full width instead of one long list with an empty right side.
   As soon as one item has subcategories, Hummingbird's tabbed layout is back. */
@media (min-width: 1200px) {
  .submenu__row:not(:has([data-ps-has-child="true"])) .submenu__left {
    display: block;
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    columns: 4;
    column-gap: 1.75rem;
    border-right: 0;
  }

  .submenu__row:not(:has([data-ps-has-child="true"])) .submenu__left-item {
    break-inside: avoid;
  }

  .submenu__row:not(:has([data-ps-has-child="true"])) .submenu__right {
    display: none;
  }
}

/* 12f. Checkout-header (templates/_partials/header.tpl, page_name "checkout"):
   logo + telefon; på < 992px hænger minikurven under headeren (.jm-cohead__slot) */
.jm-cohead {
  background-color: #fff;
  border-bottom: 1px solid var(--jm-line);
}

.jm-cohead__row {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  align-items: center;
  padding-block: 0.625rem;
}

.jm-cohead p {
  margin: 0;
}

.jm-cohead .jm-icon {
  flex: 0 0 auto;
  width: 1.125rem;
  height: 1.125rem;
}

.jm-cohead__logo .logo {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 2.25rem;
}

.jm-cohead__help {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9375rem;
}

.jm-cohead__help a {
  font-weight: 700;
  color: var(--jm-ink);
}

.jm-cohead__slot:empty {
  display: none;
}

@media (min-width: 768px) {
  .jm-cohead__row {
    flex-direction: row;
    justify-content: space-between;
    padding-block: 1rem;
  }

  .jm-cohead__logo .logo {
    max-height: 2.75rem;
  }
}

/* The mini-cart hangs under the header: no line between them */
html.jm-minicart-in-header .jm-cohead {
  border-bottom: 0;
}

/* 12g. Checkout: minikurv (< 992px) – modules/ps_onepagecheckout/.../checkout.tpl */
.jm-minicart__bar,
.jm-minicart__heading {
  display: none;
}

/* Shared: items straight away (no "Ordre resumé" / "Vis detaljer"), link to the cart */
.jm-minicart .cart-summary__products-accordion > .accordion-header {
  display: none;
}

.jm-minicart #cart-summary-product-list {
  display: block;
}

.jm-minicart__edit {
  display: block;
  margin-top: 0.75rem;
  font-weight: 700;
  text-align: center;
}

/* Desktop (>= 992px): the summary as a white card in the sticky right column */
@media (min-width: 992px) {
  .jm-minicart__body {
    padding: 1.25rem 1.25rem 1rem;
    background-color: #fff;
    border: 1px solid var(--jm-line);
    border-radius: var(--jm-radius);
    box-shadow: 0 0.25rem 1rem rgba(42, 37, 35, 0.06);
  }

  .jm-minicart__heading {
    display: block;
    margin: 0 0 0.125rem;
    font-family: var(--jm-font-display);
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .jm-minicart .cart-summary__products-number {
    font-size: 0.9375rem;
    color: var(--jm-muted);
  }

  .jm-minicart .cart-summary__line--bold .cart-summary__value {
    font-family: var(--jm-font-display);
    font-size: 1.25rem;
  }

  /* Hummingbird's collapse toggle is hidden on desktop – keep the summary open */
  .jm-minicart #js-checkout-summary {
    display: block;
  }
}

@media (max-width: 991.98px) {
  .jm-minicart {
    position: relative;
    margin-bottom: 0.5rem;
  }

  /* In the header (JS): a tab hanging from the header – flat top, round bottom */
  .jm-cohead__slot .jm-minicart {
    margin-bottom: 0.25rem;
  }

  .jm-cohead__slot .jm-minicart__bar {
    border-radius: 0 0 var(--jm-radius) var(--jm-radius);
    box-shadow: 0 0.375rem 0.75rem rgba(42, 37, 35, 0.12);
  }

  .jm-cohead__slot .jm-minicart.is-open .jm-minicart__bar {
    border-radius: 0;
  }

  .jm-minicart__bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    min-height: 3.75rem;
    padding: 0.625rem 0.875rem;
    color: var(--jm-ink);
    text-align: left;
    background-color: var(--jm-sand);
    border: 0;
    border-bottom: 2px solid var(--jm-charcoal);
    border-radius: var(--jm-radius-sm);   /* without JS: a separate box above the form */
  }

  .jm-minicart.is-open .jm-minicart__bar {
    border-radius: var(--jm-radius-sm) var(--jm-radius-sm) 0 0;
  }

  .jm-minicart__thumbs {
    display: flex;
    flex: 0 0 auto;
  }

  .jm-minicart__thumbs:empty {
    display: none;
  }

  .jm-minicart__thumb {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: cover;
    border: 2px solid var(--jm-sand);
    border-radius: 0.25rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }

  .jm-minicart__thumb + .jm-minicart__thumb {
    margin-left: -0.875rem;
  }

  .jm-minicart__text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
  }

  .jm-minicart__total {
    flex: 0 0 auto;
    font-family: var(--jm-font-display);
    font-size: 1.25rem;
    font-weight: 700;
    white-space: nowrap;
  }

  /* The summary: hidden until the bar is tapped, then a panel OVER the form */
  .jm-minicart__body {
    display: none;
  }

  .jm-minicart.is-open .jm-minicart__body {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 1010;               /* under the sticky header (1021) */
    display: block;
    max-height: 70vh;
    padding: 0.75rem 1rem 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;   /* scrolling the panel never scrolls the page behind it */
    background-color: #fff;
    border: 1px solid var(--jm-line);
    border-top: 0;
    border-radius: 0 0 var(--jm-radius-sm) var(--jm-radius-sm);
    box-shadow: 0 1rem 2rem rgba(42, 37, 35, 0.2);
  }

  /* Inside the panel: no "Ordre resumé" / "1 vare" (the bar says it) */
  .jm-minicart__body > .accordion-header,
  .jm-minicart .cart-summary__products-number {
    display: none;
  }

  .jm-minicart.is-open #js-checkout-summary {
    display: block;
  }
}


/* 12h. Checkout: "Har du handlet her før? Log ind" under e-mailfeltet
   (modules/ps_onepagecheckout/.../contact-section.tpl) */
.jm-opc-login {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  color: var(--jm-muted);
}

.jm-opc-login a {
  font-weight: 700;
}

/* 12i. Checkout: same width for all sections. ps_onepagecheckout gives the form
   (#opc-form: contact, address, delivery) padding-right: 2em on >= 992px, but
   payment, terms and the pay button sit outside it and were wider. The grid's
   gutter already separates the form from the right column. */
@media (min-width: 992px) {
  #opc-form.one-page-checkout {
    padding-right: 0;
  }
}

/* 12k. Checkout: "Jeg accepterer handelsbetingelserne" as a card right above the pay
   button, so it is not missed (core markup: form#conditions-to-approve > .form-check,
   same in ps_onepagecheckout). Same look as the desktop mini-cart card (§12g): white,
   1px line border, soft shadow, large radius. Larger checkbox; the whole card is
   clickable (label::after covers it, the terms link sits above that). Checked = green
   checkbox only – the card itself stays calm. */
.js-conditions-to-approve .form-check {
  position: relative;
  display: flex;
  gap: 0.875rem;
  align-items: center;
  min-height: 3.5rem;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 1rem;
  background-color: #fff;
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-radius);
  box-shadow: 0 0.25rem 1rem rgba(42, 37, 35, 0.06);
  transition: box-shadow 0.15s ease;
}

.js-conditions-to-approve .form-check:hover {
  box-shadow: 0 0.25rem 1.25rem rgba(42, 37, 35, 0.12);
}

.js-conditions-to-approve .form-check-input {
  flex: none;
  float: none;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  cursor: pointer;
  border: 1px solid var(--jm-input-border);   /* 3:1 against white (WCAG 1.4.11) */
  border-radius: 0.375rem;
}

.js-conditions-to-approve .form-check-input:checked {
  background-color: var(--jm-cta);
  border-color: var(--jm-cta);
}

.js-conditions-to-approve .form-check-label {
  font-size: 1.0625rem;
  line-height: 1.4;
  cursor: pointer;
}

.js-conditions-to-approve .form-check-label::after {
  position: absolute;
  inset: 0;
  content: "";
}

.js-conditions-to-approve .form-check-label a {
  position: relative;
  z-index: 1;
  font-weight: 700;
}

.js-conditions-to-approve .form-check:has(.form-check-input:focus-visible) {
  outline: 3px solid var(--jm-link);
  outline-offset: 2px;
}

/* 12l. Checkout (logget ind): "Dine oplysninger" + leveringsadresse som de øvrige kort.
   Markup fra ps_onepagecheckout (ikke overstyret): .step__account og
   #opc-delivery-address .opc-address-item (Bootstrap-utilities border/rounded/p-2/text-muted
   bruger !important, derfor overrides her). Adresserne er kort som fragt/betaling (§9d):
   hvidt kort, 2 px ramme, radio 1,5 rem, valgt = grøn. Chip "Brug en anden…" er et eget kort. */
.step__account p {
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
}

.step__account .text-danger {
  color: var(--jm-link) !important;
  font-weight: 700;
}

.step__account .text-danger:hover {
  color: var(--jm-link-hover) !important;
}

.step__account small {
  font-size: 0.9375rem;
  color: var(--jm-muted) !important;
}

#opc-delivery-address-content-list > .d-flex {
  gap: 0.75rem;
}

#opc-delivery-address .opc-address-item {
  align-items: center;
  gap: 0.875rem;
  min-height: 4rem;
  padding: 0.875rem 1.25rem !important;
  margin-top: 0 !important;             /* module: inline margin-top -1px */
  cursor: pointer;
  background-color: #fff;
  border: 2px solid var(--jm-line) !important;
  border-radius: var(--jm-radius) !important;
  transition: border-color 0.15s ease;
}

#opc-delivery-address .opc-address-item:hover {
  border-color: var(--jm-input-border) !important;
}

#opc-delivery-address .opc-address-item:has(.js-opc-address-radio:checked),
#opc-delivery-address .opc-address-item.selected {
  background-color: #f1f8f3;
  border-color: var(--jm-cta) !important;
}

#opc-delivery-address .opc-address-item:has(.js-opc-address-radio:focus-visible) {
  outline: 3px solid var(--jm-link);
  outline-offset: 2px;
}

#opc-delivery-address .opc-address-item .form-check {
  flex: none;
  min-height: 0;
  padding: 0;
  margin: 0 !important;
}

#opc-delivery-address .js-opc-address-radio {
  float: none;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  cursor: pointer;
  border: 1px solid var(--jm-input-border);   /* 3:1 against white (WCAG 1.4.11) */
}

#opc-delivery-address .js-opc-address-radio:checked {
  background-color: var(--jm-cta);
  border-color: var(--jm-cta);
}

#opc-delivery-address .opc-address-item .form-check-label {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}

#opc-delivery-address .opc-address-item p {
  margin: 0.25rem 0 0 !important;
  font-size: 0.9375rem !important;
  line-height: 1.45;
  color: var(--jm-muted) !important;
}

/* "⋮": 44 px trykflade */
#opc-delivery-address .opc-address-card__actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: -0.5rem -0.75rem -0.5rem 0;
  border-radius: 50%;
}

#opc-delivery-address .opc-address-card__actions .btn:hover {
  background-color: var(--jm-sand);
}

/* "Brug også adressen til faktura": grøn, stor checkbox som handelsbetingelserne (§12k) */
#opc-delivery-address #opc-use-same-address {
  float: none;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  cursor: pointer;
  border: 1px solid var(--jm-input-border);
  border-radius: 0.375rem;
}

#opc-delivery-address #opc-use-same-address:checked {
  background-color: var(--jm-cta);
  border-color: var(--jm-cta);
}

#opc-delivery-address .form-check:has(#opc-use-same-address) {
  display: flex;
  gap: 0.875rem;
  align-items: center;
  min-height: 2.75rem;
  padding: 0;
}

#opc-delivery-address .form-check:has(#opc-use-same-address) .form-check-label {
  font-size: 1.0625rem;
  cursor: pointer;
}

@media (max-width: 575.98px) {
  #opc-delivery-address .opc-address-item {
    gap: 0.75rem;
    padding: 0.875rem 1rem !important;
  }
}

/* 12j. Kurv: lavere varekort (cart-detailed-product-line.tpl).
   >= 576px: "Fjern" under the name in the left column; quantity + line total stay
   on the right across both rows – so no extra row for the button.
   < 576px: "Fjern" under the name too (compact text button), quantity + total below. */
.cart__item .jm-per-unit {
  font-weight: 400;
  color: var(--jm-muted);
}

.cart__item .product-line__item--prices:not(:has(*)) {
  display: none;
}

/* < 576px: "Fjern" right under the name (beside the cover), quantity + total below */
@media (max-width: 575.98px) {
  .cart__item .product-line__content {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .cart__item .product-line__content-left {
    margin-block-end: 0;
  }

  .cart__item .product-line__actions {
    order: 1;
    margin-block-end: 0.5rem;
  }

  .cart__item .product-line__content-right {
    order: 2;
    margin-block-end: 0;
  }
}

.cart__item .jm-remove {
  min-height: 2.75rem;
  padding: 0 0.5rem 0 0;
  border-color: transparent;
  background: transparent;
}

.cart__item .jm-remove:hover span {
  text-decoration: underline;
}

@media (min-width: 576px) {
  .cart__item .product-line__content {
    grid-template-rows: auto 1fr;
    row-gap: 0.25rem;
  }

  .cart__item .product-line__content-left {
    grid-column: 1;
    grid-row: 1;
  }

  .cart__item .product-line__content-right {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-block-end: 0;
  }

  .cart__item .product-line__actions {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
  }
}

/* 99. PROJECT OVERRIDES =================================================== */
/* Add new rules below this line. */

/* Accessibility (audit 2026-11-23, docs/tilgaengelighed-gennemgang.md) --------------------- */
/* WCAG 2.4.11 Focus Not Obscured: keep focused elements clear of the sticky header and the
   sticky buy bar when the browser scrolls them into view (keyboard Tab). */
html {
  scroll-padding-top: calc(var(--jm-header-h, 5rem) + 1rem);
}

html:has(.jm-buybar.is-visible) {
  scroll-padding-bottom: 6rem;
}

/* WCAG 1.4.11 / 2.4.7: the blue focus ring is only 2.7:1 on the charcoal surfaces – use white there. */
.footer :focus-visible,
.header-top :focus-visible {
  outline-color: #fff;
}

/* Product rails (.jm-rail) as a horizontal slider: "X andre varer i samme kategori"
   (ps_categoryproducts, product page) and "Nyt på hylden" (ps_newproducts, front page).
   Templates: modules/ps_categoryproducts|ps_newproducts/.../*.tpl, buttons + bar: custom.js initRails.
   One row with scroll-snap, no native scrollbar (own bar: .jm-rail__bar); the next card peeks in at the edge so it is clear
   there is more. Overrides the parent grid (.layout-full-width .products, _products.scss). */
.jm-rail__head {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
}

.jm-rail__head .section-title {
  margin-bottom: 0;
}

.jm-rail__nav {
  display: none;
  flex: none;
  gap: 0.5rem;
}

.jm-rail__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: #fff;
  cursor: pointer;
  background-color: var(--jm-charcoal);
  border: 0;
  border-radius: 50%;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.jm-rail__btn:hover:not(:disabled) {
  background-color: #000;
}

.jm-rail__btn:focus-visible {
  outline: 3px solid var(--jm-link);
  outline-offset: 2px;
}

.jm-rail__btn:disabled {
  cursor: default;
  opacity: 0.25;
}

.jm-rail .module-products__list .products {
  --jm-cp-gap: 0.75rem;
  --jm-cp-cols: 2.2;
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--jm-cp-cols) - 1) * var(--jm-cp-gap)) / var(--jm-cp-cols));
  gap: var(--jm-cp-gap);
  /* room for card borders and focus rings, which overflow would otherwise clip */
  padding: 0.25rem;
  margin: -0.25rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 0.25rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;            /* Firefox, Chrome 121+ */
}

.jm-rail .module-products__list .products::-webkit-scrollbar {
  display: none;                    /* Safari, older Chrome */
}

.jm-rail .product-miniature {
  scroll-snap-align: start;
}

/* While the thumb is dragged, snapping would fight the pointer – switch it off */
.jm-rail.is-dragging .module-products__list .products {
  scroll-snap-type: none;
}

/* Own scrollbar: thin rounded track, dark thumb. The bar itself is 1.25rem tall so the
   thumb is easy to grab; only the 4px line is visible (6px on hover/drag). */
.jm-rail__bar {
  position: relative;
  height: 1.25rem;
  margin-top: 0.75rem;
  cursor: pointer;
  touch-action: none;
}

.jm-rail__bar[hidden] {
  display: none;
}

.jm-rail__bar::before,
.jm-rail__thumb {
  position: absolute;
  top: 50%;
  height: 4px;
  border-radius: 999px;
  transition: height 0.15s ease;
  translate: 0 -50%;
}

.jm-rail__bar::before {
  inset-inline: 0;
  content: "";
  background-color: var(--jm-line);
}

.jm-rail__thumb {
  left: 0;
  cursor: grab;
  background-color: var(--jm-charcoal);
}

.jm-rail__thumb::after {
  /* larger invisible grab area around the thin thumb */
  position: absolute;
  inset: -0.5rem 0;
  content: "";
}

.jm-rail__bar:hover::before,
.jm-rail__bar:hover .jm-rail__thumb,
.jm-rail.is-dragging .jm-rail__bar::before,
.jm-rail.is-dragging .jm-rail__thumb {
  height: 6px;
}

.jm-rail.is-dragging .jm-rail__thumb {
  cursor: grabbing;
}

.jm-rail .product-miniature,
.jm-rail .product-miniature__inner {
  height: 100%;
}

@media (min-width: 768px) {
  .jm-rail__head {
    margin-bottom: 1.375rem;
  }

  .jm-rail__nav:not([hidden]) {
    display: flex;
  }

  .jm-rail .module-products__list .products {
    --jm-cp-cols: 3.3;
    --jm-cp-gap: 1.5rem;
  }
}

@media (min-width: 992px) {
  .jm-rail .module-products__list .products {
    --jm-cp-cols: 4.3;
  }
}

/* Password field (login, registration, "Mine oplysninger", checkout – Hummingbird's
   _partials/form-fields.tpl, .input-group.password-field): one pill like every other field,
   with the show/hide eye INSIDE it as a quiet round icon button – no green block.
   CSS only, so every form that uses the partial follows. The radius needs !important:
   Bootstrap squares the joined corner with a 0,6,0-specificity :not() chain. */
.input-group.password-field {
  position: relative;
  flex-wrap: nowrap;
}

.input-group.password-field > .form-control {
  padding-right: 3.5rem;
  border-radius: 999px !important;
}

.input-group.password-field > [data-ps-action="toggle-password"] {
  position: absolute;
  top: 50%;
  right: 0.25rem;
  z-index: 6;                       /* above the focused field (Bootstrap: z-index 5) */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  min-height: 0;
  padding: 0;
  margin: 0;
  color: var(--jm-muted);
  background-color: transparent;
  border: 0;
  border-radius: 50%;
  transform: translateY(-50%);
}

.input-group.password-field > [data-ps-action="toggle-password"]:hover,
.input-group.password-field > [data-ps-action="toggle-password"]:active {
  color: var(--jm-ink);
  background-color: var(--jm-sand);
}

.input-group.password-field > [data-ps-action="toggle-password"]:focus-visible {
  color: var(--jm-ink);
  outline: 3px solid var(--jm-link);
  outline-offset: 0;
  box-shadow: none;
}

.input-group.password-field > [data-ps-action="toggle-password"] .material-icons {
  font-size: 1.375rem;
}

/* Login page (customer/_partials/login-form.tpl): "Log ind" full width on top, "Glemt din
   adgangskode?" as a plain link under it – instead of a small button pushed right and a
   padded link left of it. */
#login-form .buttons-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  margin-top: 1.5rem;
}

#login-form .buttons-wrapper #submit-login {
  order: -1;
  width: 100%;
}

#login-form .buttons-wrapper .btn-basic {
  align-self: center;
  width: auto;
  min-height: 2.75rem;
  padding: 0.5rem 0.25rem;
  font-weight: 600;
  color: var(--jm-link);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  background: none;
  border: 0;
}

#login-form .buttons-wrapper .btn-basic:hover {
  color: var(--jm-link-hover);
}

/* Name fields: PrestaShop's "Kun bogstaver og punktum (.) …" hint under Fornavn/Efternavn is
   hidden until it is relevant – custom.js (initNameHints) adds .is-shown while the value has
   characters PrestaShop rejects; after a server-side error (.has-error) it shows anyway. */
:is(input[name="firstname"], input[name="lastname"]) + .form-text {
  display: none;
}

:is(input[name="firstname"], input[name="lastname"]) + .form-text.is-shown,
.has-error :is(input[name="firstname"], input[name="lastname"]) + .form-text {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--jm-red-dark);
}

:is(input[name="firstname"], input[name="lastname"])[aria-invalid="true"] {
  border-color: var(--jm-red-dark);
}
