/* Modul C – handel: gavekort, klippekort, nettbutikk, kasse, Premium og bedrift. */

.js .mg-nojs { display: none !important; }

/* ---------- faner ---------- */
.mg-cm-tabs { display: flex; flex-wrap: wrap; gap: .4rem; border-bottom: 1px solid var(--mg-line); padding-bottom: .8rem; }
.mg-cm-tabs a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--mg-line); color: var(--mg-ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.mg-cm-tabs a:hover { background: var(--mg-sand); }
.mg-cm-tabs a.active { background: var(--mg-jade); border-color: var(--mg-jade); color: #fff; }

/* ---------- steg ---------- */
.mg-cm-step { border: 1px solid var(--mg-line); border-radius: 1rem; padding: 1.2rem; margin-bottom: 1rem; background: #fff; min-width: 0; }
.mg-cm-step > legend { float: none; width: auto; font: 700 1.2rem var(--mg-serif); margin-bottom: .9rem; display: flex; align-items: center; gap: .55rem; padding: 0; }
.mg-cm-n { width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--mg-jade); color: #fff; font: 700 .95rem var(--mg-sans); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mg-cm-choice { display: flex; flex-wrap: wrap; gap: .45rem; }
.mg-cm-choice .btn { border-radius: .7rem; }
.mg-cm-opt { display: flex; gap: .7rem; align-items: flex-start; border: 2px solid var(--mg-line); border-radius: .9rem; padding: .8rem .9rem; cursor: pointer; height: 100%; background: #fff; }
.mg-cm-opt > .bi { font-size: 1.3rem; color: var(--mg-jade); margin-top: .1rem; }
.mg-cm-opt b { display: block; }
.mg-cm-opt small { display: block; color: var(--mg-muted); line-height: 1.35; margin-top: .15rem; }
.mg-cm-opt:hover { border-color: #b6d3c5; }
.btn-check:checked + .mg-cm-opt { border-color: var(--mg-jade); background: var(--mg-jade-l); }
.btn-check:focus-visible + .mg-cm-opt, .btn-check:focus-visible + .mg-gshop-t { outline: 3px solid var(--mg-jade); outline-offset: 2px; }
.btn-check:disabled + .mg-cm-opt { opacity: .55; cursor: not-allowed; }
@media (min-width: 992px) { .mg-cm-sticky { position: sticky; top: 90px; } }
.mg-cm-checks { list-style: none; padding: 0; margin: 0 0 .8rem; }
.mg-cm-checks li { display: flex; gap: .5rem; align-items: flex-start; margin-bottom: .4rem; font-size: .95rem; }
.mg-cm-checks .bi { color: var(--mg-ok); margin-top: .15rem; }
.mg-sum { background: var(--mg-sand); border: 1px solid var(--mg-line); border-radius: 1rem; padding: 1.2rem; }
.mg-sum dl { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 0; }
.mg-sum dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.mg-sum .mg-tot { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--mg-line); margin-top: .8rem; padding-top: .8rem; font-weight: 700; }
.mg-sum .mg-tot b { font: 700 1.6rem var(--mg-serif); }

/* ---------- gavekort ---------- */
.mg-gc { aspect-ratio: 1.6; max-width: 480px; width: 100%; border-radius: 18px; padding: 1.5rem; color: #fff; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
  box-shadow: var(--mg-shadow); background: linear-gradient(135deg, #3C271A, #2B1B12); }
.mg-gc::before { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .25); pointer-events: none; }
.mg-gc::after { content: ""; position: absolute; right: -20px; top: -20px; width: 160px; height: 160px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .18); pointer-events: none; }
.mg-gc > * { position: relative; z-index: 1; }
.mg-gc-top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.mg-gc-occ { font-size: .95rem; color: rgba(255, 255, 255, .92); font-weight: 600; }
.mg-gc-ico { font-size: 1.9rem; line-height: 1; }
.mg-gc-amt { font: 700 clamp(1.7rem, 6vw, 2.6rem)/1.05 var(--mg-serif); }
.mg-gc-msg { font-style: italic; color: rgba(255, 255, 255, .95); max-width: 32ch; margin: .45rem 0 0; font-size: .98rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mg-gc-ft { display: flex; justify-content: space-between; align-items: end; font-size: .82rem; color: rgba(255, 255, 255, .88); gap: 10px; }
.mg-gc-code { font-weight: 700; letter-spacing: .06em; font-size: .9rem; color: #fff; }
.mg-gc.t-kjaereste { background: linear-gradient(135deg, #C2185B, #6A0F33); }
.mg-gc.t-mor { background: linear-gradient(135deg, #B5617E, #7A3550); }
.mg-gc.t-far { background: linear-gradient(135deg, #2F5D7C, #17324A); }
.mg-gc.t-ansatt { background: linear-gradient(135deg, #1F6F5C, #0F3A30); }
.mg-gc.t-kollega { background: linear-gradient(135deg, #5F6C32, #36401C); }
.mg-gc.t-bursdag { background: linear-gradient(135deg, #A8733F, #5E3C1C); }
.mg-gc.t-jul { background: linear-gradient(135deg, #1F5A44, #123527); }
.mg-gc.t-valentin { background: linear-gradient(135deg, #8E2F3C, #4C1720); }
.mg-gc.t-morsdag { background: linear-gradient(135deg, #A84F70, #6A2642); }
.mg-gc.t-farsdag { background: linear-gradient(135deg, #3E5C76, #1D2D3C); }
.mg-gc.t-jubileum { background: linear-gradient(135deg, #5B4A6E, #2F2540); }
.mg-gc.mini { aspect-ratio: 1.6; border-radius: 10px; padding: .55rem .65rem; box-shadow: none; }
.mg-gc.mini::before, .mg-gc.mini::after { display: none; }
.mg-gc.mini .mg-gsi { font-size: 1.35rem; }
.mg-gc.mini .mg-gsa { font-weight: 800; font-size: .92rem; }

.mg-gshop { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: .65rem; }
.mg-gshop-t { border: 2px solid var(--mg-line); border-radius: 14px; background: #fff; padding: .45rem; cursor: pointer; display: flex; flex-direction: column; gap: .35rem; height: 100%; margin: 0; }
.mg-gshop-t b { font-size: .9rem; padding: 0 .15rem .1rem; }
.mg-gshop-t:hover { border-color: #b6d3c5; }
.btn-check:checked + .mg-gshop-t { border-color: var(--mg-jade); box-shadow: 0 0 0 2px var(--mg-jade) inset; background: var(--mg-jade-l); }
@media (max-width: 400px) { .mg-gshop { grid-template-columns: repeat(2, 1fr); } }

/* ---------- klippekort ---------- */
.mg-kk { background: linear-gradient(135deg, #1F5A44, #2B1B12); color: #F3E7D9; border-radius: 18px; padding: 1.3rem 1.4rem; box-shadow: var(--mg-shadow); max-width: 520px; }
.mg-kk-top { font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.mg-kk-n { font: 700 2rem var(--mg-serif); color: #fff; margin: .3rem 0 .1rem; }
.mg-kk-holes { display: flex; flex-wrap: wrap; gap: 7px; margin-top: .9rem; }
.mg-kk-holes span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--mg-gold); }
.mg-kk-holes span.used { background: var(--mg-gold); }
.mg-kk-code { margin-top: .9rem; font-size: .9rem; }

/* ---------- nettbutikk ---------- */
.mg-prod { height: 100%; overflow: hidden; display: flex; flex-direction: column; }
.mg-prod-tile { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: #fff; text-decoration: none; background: var(--mg-jade) center/cover no-repeat; }
.mg-prod-tile.cat-hud { background-color: #8A5C2F; background-image: linear-gradient(135deg, #B88A5A, #6E4521); }
.mg-prod-tile.cat-har { background-image: linear-gradient(135deg, #3E6E8A, #1E3A4C); }
.mg-prod-tile.cat-aroma { background-image: linear-gradient(135deg, #8A4E7A, #4A2340); }
.mg-prod-tile.cat-ritualer { background-image: linear-gradient(135deg, #2F7A5E, #123F2E); }
.mg-prod-tile.cat-gaver { background-image: linear-gradient(135deg, #B5462F, #6E2414); }
.mg-prod-tile.has-img { font-size: 0; }
.mg-prod .card-title { font: 700 1.02rem var(--mg-sans); margin: .15rem 0 .25rem; }
.mg-prod .card-title a { color: var(--mg-ink); text-decoration: none; }
.mg-prod .card-title a:hover { text-decoration: underline; }
.mg-prod-meta { font-size: .8rem; color: var(--mg-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.mg-prod-price { font-weight: 800; font-size: 1.1rem; }
.mg-prod-big { aspect-ratio: 1; border-radius: 1.2rem; font-size: 6rem; }
.mg-cm-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.mg-cm-pills a { padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--mg-line); color: var(--mg-ink); text-decoration: none; font-weight: 600; font-size: .92rem; background: #fff; }
.mg-cm-pills a:hover { background: var(--mg-sand); }
.mg-cm-pills a.active { background: var(--mg-teak); color: #fff; border-color: var(--mg-teak); }

/* ---------- handlekurv ---------- */
.mg-cart-row { display: grid; grid-template-columns: 64px 1fr auto; gap: .6rem 1rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--mg-line); }
.mg-cart-row .mg-prod-tile { width: 64px; height: 64px; aspect-ratio: auto; border-radius: .7rem; font-size: 1.6rem; }
.mg-cart-qty { display: flex; gap: .35rem; align-items: center; }
.mg-cart-qty input { width: 4.2rem; text-align: center; }
.mg-cart-sum { font-weight: 700; text-align: right; min-width: 5.5rem; font-variant-numeric: tabular-nums; }
@media (max-width: 575.98px) {
  .mg-cart-row { grid-template-columns: 56px 1fr; }
  .mg-cart-row .mg-prod-tile { width: 56px; height: 56px; }
  .mg-cart-row .mg-cart-act { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
}
.mg-ship-bar { height: .5rem; border-radius: 999px; background: var(--mg-line); overflow: hidden; }
.mg-ship-bar > span { display: block; height: 100%; background: var(--mg-jade); border-radius: 999px; }

/* ---------- Premium ---------- */
.mg-prem-card { border: 1px solid var(--mg-line); border-radius: 1rem; padding: 1.2rem; height: 100%; background: #fff; }
.mg-prem-card .bi { font-size: 1.5rem; color: var(--mg-bronze-d); }
.mg-prem-card h2 { font: 700 1.08rem var(--mg-sans); margin: .5rem 0 .3rem; }
.mg-prem-card p { margin: 0; color: var(--mg-muted); font-size: .94rem; }
.mg-prem-price { font: 700 3rem/1 var(--mg-serif); }

/* ---------- bedrift ---------- */
.mg-bm-res { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-top: 1rem; }
.mg-bm-res > div { background: #fff; border: 1px solid var(--mg-line); border-radius: .8rem; padding: .7rem .9rem; }
.mg-bm-res small { display: block; color: var(--mg-muted); font-size: .82rem; }
.mg-bm-res b { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.mg-bm-list { columns: 2 16rem; padding-left: 1.1rem; }
.mg-bm-list li { margin-bottom: .3rem; break-inside: avoid; }
.mg-anchor-nav { display: flex; flex-wrap: wrap; gap: .5rem; }

@media print {
  .mg-pagehead, .mg-cm-tabs { display: none !important; }
  .mg-gc, .mg-kk { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
