/* Mighty Mega Menu – butikken.
   Bruger themets farver (--color-*) og afrunding (--radius), så menuen passer ind i ethvert theme.
   Øverste niveau arver themets egne menu-stilarter (.main-nav > ul > li > a). */

.mmm {
  --mmm-surface: var(--color-surface, #fff);
  --mmm-text: var(--color-text, #1b1b1b);
  --mmm-muted: var(--color-muted, #6c6c6c);
  --mmm-line: var(--color-line, rgba(0, 0, 0, .1));
  --mmm-soft: var(--color-soft, rgba(0, 0, 0, .04));
  --mmm-accent: var(--color-accent, #b4532a);
  --mmm-primary: var(--color-primary, #1b1b1b);
  --mmm-image: var(--color-image, var(--mmm-soft));
  --mmm-radius: var(--radius, 8px);
  --mmm-ease: cubic-bezier(.2, .7, .2, 1);
  --mmm-gap: clamp(24px, 3vw, 44px);
}

/* ---------- Mærkater ---------- */
.mmm-badge { display: inline-block; margin-left: 7px; padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 600; line-height: 17px; letter-spacing: .03em; text-transform: none; color: #fff; background: var(--mmm-accent, #b4532a); vertical-align: 1px; white-space: nowrap; }
.mmm-badge--dark { background: var(--mmm-text, #1b1b1b); color: var(--mmm-surface, #fff); }
.mmm-badge--green { background: #2f7a55; }
.mmm-badge--red { background: #b8362b; }
.mmm-badge--blue { background: #2d5fa6; }
.mmm-badge--gold { background: #a87b12; }
.mmm-badges-square .mmm-badge { border-radius: 3px; }
.mmm-badges-dot .mmm-badge { background: none !important; color: var(--mmm-text); padding: 0 0 0 11px; position: relative; font-weight: 600; }
.mmm-badges-dot .mmm-badge::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--mmm-accent); }
.mmm-badges-dot .mmm-badge--dark::before { background: var(--mmm-text); } .mmm-badges-dot .mmm-badge--green::before { background: #2f7a55; } .mmm-badges-dot .mmm-badge--red::before { background: #b8362b; } .mmm-badges-dot .mmm-badge--blue::before { background: #2d5fa6; } .mmm-badges-dot .mmm-badge--gold::before { background: #a87b12; }
.mmm-footer-col .mmm-badge { margin-left: 5px; }

/* ---------- Fælles nulstilling inde i paneler (themets ".main-nav a/ul" må ikke slå igennem) ---------- */
.mmm .mmm-panel .mmm-list, .mmm .mmm-drop.mmm-list { list-style: none; margin: 0; padding: 0; display: block; gap: 0; }
.mmm .mmm-panel .mmm-list > li, .mmm .mmm-drop.mmm-list > li { position: static; border: 0; }
.mmm .mmm-panel .mmm-a { display: block; padding: 0; margin: 0; border: 0; border-radius: 0; background: none; font-size: inherit; font-weight: inherit; letter-spacing: normal; text-transform: none; color: inherit; text-decoration: none; }
.mmm .mmm-panel .mmm-a::before, .mmm .mmm-panel .mmm-a::after { content: none; }
.mmm .mmm-toggle { display: none; }

/* ======================================================================
   Desktop
   ====================================================================== */
.mmm:not(.is-mobile) .mmm-only-mobile, .mmm.is-mobile .mmm-only-desktop { display: none !important; }
.mmm-for-mobile:not(.is-mobile), .mmm-for-desktop.is-mobile { display: none !important; }

.mmm:not(.is-mobile) > li.mmm-has-mega:not(.mmm-w-auto) { position: static; }
.mmm:not(.is-mobile) .mmm-nolink { cursor: default; }

/* Panel (mega) */
.mmm:not(.is-mobile) .mmm-panel {
  position: absolute; z-index: 60; top: 100%; left: 0; right: 0;
  background: var(--mmm-surface); color: var(--mmm-text);
  border-top: 1px solid var(--mmm-line); border-bottom: 1px solid var(--mmm-line);
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .28);
  text-align: left; font-size: 14.5px; line-height: 1.45; letter-spacing: normal; text-transform: none; font-weight: 400;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s var(--mmm-ease), transform .22s var(--mmm-ease), visibility 0s linear .22s;
}
.mmm-anim-slide:not(.is-mobile) .mmm-panel, .mmm-anim-slide:not(.is-mobile) .mmm-drop { transform: translateY(8px); }
.mmm-anim-none:not(.is-mobile) .mmm-panel, .mmm-anim-none:not(.is-mobile) .mmm-drop { transition: none; }
.mmm:not(.is-mobile) .mmm-item.is-open > .mmm-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition-delay: 0s; }
/* Uden JavaScript: åbn ved hover/fokus */
.mmm:not(.mmm-js) > li.has-sub:hover > .mmm-panel, .mmm:not(.mmm-js) > li.has-sub:focus-within > .mmm-panel,
.mmm:not(.mmm-js) li.mmm-has-drop:hover > .mmm-drop, .mmm:not(.mmm-js) li.mmm-has-dropdown:hover > .mmm-drop { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }

.mmm:not(.is-mobile) .mmm-w-container > .mmm-panel {
  left: 50%; right: auto; width: min(var(--wrap, 1240px), calc(100vw - 32px)); margin-left: calc(min(var(--wrap, 1240px), calc(100vw - 32px)) / -2);
  border: 1px solid var(--mmm-line); border-radius: 0 0 calc(var(--mmm-radius) + 4px) calc(var(--mmm-radius) + 4px);
}
.mmm:not(.is-mobile) .mmm-w-container > .mmm-panel .mmm-panel-inner { padding-left: var(--mmm-gap); padding-right: var(--mmm-gap); }
.mmm:not(.is-mobile) > li.mmm-w-auto { position: relative; }
.mmm:not(.is-mobile) .mmm-w-auto > .mmm-panel {
  left: 50%; right: auto; width: max-content; min-width: 320px; max-width: min(880px, calc(100vw - 32px)); transform-origin: top center;
  margin-left: 0; translate: -50% 0; border: 1px solid var(--mmm-line); border-radius: calc(var(--mmm-radius) + 4px);
}
.mmm:not(.is-mobile) .mmm-w-auto > .mmm-panel .mmm-panel-inner { padding-left: 28px; padding-right: 28px; }
.mmm:not(.is-mobile) .mmm-w-auto .mmm-grid { grid-template-columns: repeat(var(--mmm-cols), minmax(170px, auto)); }

.mmm-grid { display: grid; grid-template-columns: repeat(var(--mmm-cols, 4), minmax(0, 1fr)); gap: 32px var(--mmm-gap); padding: 34px 0 38px; }
.mmm-col { grid-column: span var(--mmm-span, 1); min-width: 0; }
.mmm-col-banner { align-self: start; }
.mmm-panel-foot { border-top: 1px solid var(--mmm-line); padding: 14px 0 16px; }
.mmm .mmm-panel .mmm-all { display: inline-flex; gap: 6px; font-weight: 600; font-size: 14px; }
.mmm .mmm-panel .mmm-all:hover { color: var(--mmm-primary); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Blokke ---------- */
.mmm-block + .mmm-block { margin-top: 28px; }
.mmm .mmm-title { margin: 0 0 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--mmm-text); }
.mmm .mmm-panel .mmm-title .mmm-a { display: inline; text-transform: inherit; letter-spacing: inherit; font-weight: inherit; }
.mmm .mmm-panel .mmm-title .mmm-a:hover { text-decoration: underline; text-underline-offset: 4px; }

.mmm .mmm-links > li + li { margin-top: 2px; }
.mmm .mmm-panel .mmm-links .mmm-a { padding: 5px 0; color: var(--mmm-text); transition: color .15s, transform .2s var(--mmm-ease); }
.mmm .mmm-panel .mmm-links .mmm-a:hover { color: var(--mmm-primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.mmm .mmm-panel .mmm-links .mmm-more .mmm-a { color: var(--mmm-muted); font-size: 13.5px; margin-top: 4px; }
.mmm .mmm-panel .mmm-style-bold .mmm-links .mmm-a { font-size: 17px; font-weight: 500; letter-spacing: -.01em; padding: 6px 0; }
.mmm .mmm-panel .mmm-style-chips .mmm-links { display: flex; flex-wrap: wrap; gap: 8px; }
.mmm .mmm-panel .mmm-style-chips .mmm-links > li + li { margin: 0; }
.mmm .mmm-panel .mmm-style-chips .mmm-links .mmm-a { padding: 6px 13px; border: 1px solid var(--mmm-line); border-radius: 999px; font-size: 13.5px; }
.mmm .mmm-panel .mmm-style-chips .mmm-links .mmm-a:hover { border-color: var(--mmm-text); text-decoration: none; }
.mmm .mmm-panel .mmm-a.mmm-with-img { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.mmm .mmm-thumb { flex: none; width: 44px; height: 44px; border-radius: var(--mmm-radius); overflow: hidden; background: var(--mmm-image); }
.mmm .mmm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mmm .mmm-panel .mmm-sublinks { margin: 2px 0 8px; padding-left: 12px; border-left: 1px solid var(--mmm-line); }
.mmm .mmm-panel .mmm-sublinks .mmm-a { padding: 3px 0; font-size: 13.5px; color: var(--mmm-muted); }
.mmm .mmm-panel .mmm-sublinks .mmm-a:hover { color: var(--mmm-text); }

/* Produkter */
.mmm .mmm-panel .mmm-products--list > li + li { margin-top: 12px; }
.mmm .mmm-panel .mmm-product { display: flex; align-items: center; gap: 14px; }
.mmm .mmm-product-img { flex: none; width: 64px; aspect-ratio: 4 / 5; border-radius: var(--mmm-radius); overflow: hidden; background: var(--mmm-image); }
.mmm .mmm-product-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--mmm-ease); }
.mmm .mmm-product:hover .mmm-product-img img { transform: scale(1.04); }
.mmm .mmm-product-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mmm .mmm-product-name { font-weight: 500; line-height: 1.3; }
.mmm .mmm-product:hover .mmm-product-name { text-decoration: underline; text-underline-offset: 3px; }
.mmm .mmm-product-price { font-size: 13.5px; color: var(--mmm-muted); font-variant-numeric: tabular-nums; }
.mmm .mmm-product-price s { opacity: .7; margin-left: 4px; white-space: nowrap; }
.mmm .mmm-sale { white-space: nowrap; }
.mmm .mmm-sale { color: var(--mmm-accent); font-weight: 600; }
.mmm .mmm-panel .mmm-products--cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 18px 16px; }
.mmm .mmm-panel .mmm-products--cards .mmm-product { flex-direction: column; align-items: stretch; gap: 10px; }
.mmm .mmm-products--cards .mmm-product-img { width: 100%; }

/* Banner */
.mmm .mmm-panel .mmm-banner { display: block; position: relative; color: var(--mmm-text); }
.mmm .mmm-banner-img { display: block; overflow: hidden; border-radius: var(--mmm-radius); background: var(--mmm-image); aspect-ratio: 4 / 3; }
.mmm .mmm-ratio-wide .mmm-banner-img { aspect-ratio: 16 / 9; }
.mmm .mmm-ratio-square .mmm-banner-img { aspect-ratio: 1; }
.mmm .mmm-ratio-portrait .mmm-banner-img { aspect-ratio: 4 / 5; }
.mmm .mmm-banner-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s var(--mmm-ease); }
.mmm a.mmm-banner:hover .mmm-banner-img img { transform: scale(1.035); }
.mmm .mmm-banner-body { display: flex; flex-direction: column; gap: 3px; padding-top: 12px; }
.mmm .mmm-banner-title { font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.mmm .mmm-banner-text { color: var(--mmm-muted); font-size: 13.5px; }
.mmm .mmm-banner-btn { margin-top: 4px; font-size: 13.5px; font-weight: 600; }
.mmm a.mmm-banner:hover .mmm-banner-btn { text-decoration: underline; text-underline-offset: 4px; }
.mmm .mmm-banner--overlay .mmm-banner-body { position: absolute; inset: auto 0 0 0; padding: 22px 20px 18px; color: #fff; border-radius: 0 0 var(--mmm-radius) var(--mmm-radius);
  background: linear-gradient(to top, rgba(0, 0, 0, .58), rgba(0, 0, 0, 0)); }
.mmm .mmm-banner--overlay .mmm-banner-text { color: rgba(255, 255, 255, .85); }

.mmm .mmm-text { color: var(--mmm-muted); font-size: 14px; }
.mmm .mmm-text p { margin: 0 0 .7em; }
.mmm .mmm-text a { color: var(--mmm-text); text-decoration: underline; text-underline-offset: 3px; padding: 0; border: 0; display: inline; font-size: inherit; }

/* Dropdown */
.mmm:not(.is-mobile) > li.mmm-has-dropdown { position: relative; }
.mmm:not(.is-mobile) .mmm-drop {
  position: absolute; z-index: 60; top: 100%; left: 0; min-width: 230px; padding: 8px;
  background: var(--mmm-surface); border: 1px solid var(--mmm-line); border-radius: calc(var(--mmm-radius) + 2px);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .25); text-align: left;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .16s var(--mmm-ease), transform .2s var(--mmm-ease), visibility 0s linear .2s;
}
.mmm:not(.is-mobile) .mmm-drop .mmm-drop { top: -9px; left: 100%; margin-left: 4px; }
.mmm:not(.is-mobile) .mmm-drop > li { position: relative !important; }
.mmm:not(.is-mobile) .mmm-item.is-open > .mmm-drop { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition-delay: 0s; }
.mmm .mmm-drop .mmm-a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; margin: 0; border: 0; border-radius: var(--mmm-radius); font-size: 14px; font-weight: 400; color: var(--mmm-text); text-decoration: none; text-transform: none; letter-spacing: normal; white-space: nowrap; background: none; }
.mmm .mmm-drop .mmm-a::before, .mmm .mmm-drop .mmm-a::after { content: none; }
.mmm .mmm-drop .mmm-a:hover, .mmm .mmm-drop .is-open > .mmm-a { background: var(--mmm-soft); }
.mmm:not(.is-mobile) .mmm-drop .mmm-has-drop > .mmm-a::after { content: ""; display: block; width: 5px; height: 5px; border: solid currentColor; border-width: 1.3px 1.3px 0 0; transform: rotate(45deg); opacity: .5; }

/* Mørk baggrund bag mega-menu (indsættes af frontend.js) */
.mmm-overlay { position: fixed; left: 0; right: 0; bottom: 0; top: 0; z-index: 35; background: rgba(15, 15, 15, .22); opacity: 0; visibility: hidden; transition: opacity .25s var(--mmm-ease, ease), visibility 0s linear .25s; }
.mmm-overlay.is-on { opacity: 1; visibility: visible; transition-delay: 0s; }

/* Aktivt punkt */
.mmm .mmm-panel .mmm-a.is-current, .mmm .mmm-drop .mmm-a.is-current { font-weight: 600; }

/* ======================================================================
   Mobil (themets menuknap er synlig) – harmonika
   ====================================================================== */
.mmm.is-mobile > li { position: relative; }
.mmm.is-mobile .mmm-toggle {
  display: grid; place-items: center; position: absolute; top: 0; right: -8px; width: 48px; height: 100%; max-height: 58px;
  border: 0; padding: 0; background: none; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.mmm.is-mobile .mmm-toggle span { width: 8px; height: 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); transition: transform .25s var(--mmm-ease); opacity: .7; }
.mmm.is-mobile .is-open > .mmm-toggle span { transform: translateY(2px) rotate(-135deg); }
.mmm.is-mobile > li > .mmm-link { padding-right: 48px; }
.mmm.is-mobile > li.has-sub > .mmm-link::before { display: none; }
.mmm.is-mobile .mmm-panel, .mmm.is-mobile .mmm-drop { display: none; position: static; box-shadow: none; border: 0; background: none; padding: 0; min-width: 0; opacity: 1; visibility: visible; transform: none; }
.mmm.is-mobile .is-open > .mmm-panel, .mmm.is-mobile .is-open > .mmm-drop { display: block; animation: mmm-in .25s var(--mmm-ease); }
@keyframes mmm-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.mmm.is-mobile .mmm-panel-inner { max-width: none; padding: 0 !important; margin: 0; }
.mmm.is-mobile .mmm-grid { display: block; padding: 0 0 14px; }
.mmm.is-mobile .mmm-col + .mmm-col { margin-top: 18px; }
.mmm.is-mobile .mmm-block + .mmm-block { margin-top: 16px; }
.mmm.is-mobile .mmm-title { margin-bottom: 6px; }
.mmm.is-mobile .mmm-panel .mmm-links .mmm-a { padding: 7px 0; font-size: 15.5px; }
.mmm.is-mobile .mmm-title { color: var(--mmm-muted); margin-top: 4px; }
.mmm.is-mobile .mmm-panel .mmm-style-bold .mmm-links .mmm-a { font-size: 16px; }
.mmm.is-mobile .mmm-panel-foot { border: 0; padding: 0 0 16px; }
.mmm.is-mobile .mmm-hide-mobile { display: none !important; }
.mmm.is-mobile .mmm-col-banner { display: none; }
.mmm.is-mobile.mmm-m-images .mmm-col-banner { display: block; }
.mmm.is-mobile .mmm-drop { padding: 0 0 10px 14px; }
.mmm.is-mobile .mmm-drop > li { position: relative; }
.mmm.is-mobile .mmm-drop .mmm-a { padding: 9px 44px 9px 0; font-size: 15.5px; border-radius: 0; color: var(--mmm-muted); white-space: normal; }
.mmm.is-mobile .mmm-drop .mmm-toggle { height: 40px; }

/* Forhåndsvisning */
.mmm-preview-bar { position: fixed; z-index: 9999; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 10px 16px; border-radius: 999px; background: #1c211f; color: #fff; font: 13px/1.4 system-ui, sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,.25); white-space: nowrap; }
.mmm-preview-bar a { color: #9fd8c0; margin-left: 10px; }

@media (prefers-reduced-motion: reduce) {
  .mmm .mmm-panel, .mmm .mmm-drop, .mmm-overlay { transition: none !important; animation: none !important; }
}
