:root{
  --bg:#0b0f14;
  --panel:#111823;
  --panel2:#0f1520;
  --text:#e8eef7;
  --muted:#9fb0c7;
  --accent:#26c281;
  --danger:#ff5c5c;
  --border:rgba(255,255,255,.08);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius:16px;
  --gap:14px;
  --tap:64px;
  --maxw: 1280px;
  --imgH: 170px;
  font-synthesis-weight:none;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 20% 0%, #152033 0%, var(--bg) 60%);
  color:var(--text);
}

a{ color:inherit; text-decoration:none; }

.wrap{
  max-width: var(--maxw);
  margin:0 auto;
  padding:18px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  background:rgba(17,24,35,.85);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position:sticky;
  top:12px;
  z-index:10;
  backdrop-filter: blur(10px);
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand .'logo'{
  width:44px; height:44px;
  border-radius:12px;
  background:linear-gradient(135deg, var(--accent), #58a6ff);
  box-shadow: 0 8px 24px rgba(38,194,129,.25);
}
.brand .title{
  display:flex; flex-direction:column;
  line-height:1.1;
}
.brand .title b{ font-size:18px; }
.brand .title span{ font-size:13px; color:var(--muted); }

.actions{
  display:flex; gap:10px; align-items:center;
}
.pill{
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color:var(--muted);
  font-size:13px;
}
.btn{
  min-height: var(--tap);
  padding: 0 18px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size:18px;
  font-weight:650;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active{ transform: scale(.99); }
.btn.primary{
  background: linear-gradient(135deg, var(--accent), #2ea1ff);
  border-color: rgba(255,255,255,.12);
}
.btn.danger{
  background: rgba(255,92,92,.12);
  border-color: rgba(255,92,92,.25);
  color:#ffd0d0;
}

.layout{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap: var(--gap);
  margin-top: var(--gap);
}

@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
}

.panel{
  background: rgba(17,24,35,.82);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.panel .hd{
  padding:14px 16px;
  border-bottom: 1px solid var(--border);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.panel .hd h2{
  margin:0;
  font-size:18px;
}
.panel .hd .sub{
  color: var(--muted);
  font-size:13px;
}

.panel .bd{ padding:16px; }

.searchRow{
  display:flex;
  gap:10px;
  margin-bottom:12px;
}
.search{
  flex:1;
  min-height: var(--tap);
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.22);
  color: var(--text);
  padding: 0 14px;
  font-size:18px;
}

.catGrid{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:14px;
}
.chip{
  min-height: 54px;
  padding: 0 14px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size:16px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  user-select:none;
}
.chip.active{
  background: rgba(38,194,129,.18);
  border-color: rgba(38,194,129,.35);
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 1180px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  border:1px solid var(--border);
  background: rgba(0,0,0,.18);
  border-radius: 16px;
  overflow:hidden;
  cursor:pointer;
  user-select:none;
  transition: transform .05s ease, border-color .15s ease, background .15s ease;
}
.card:active{ transform: scale(.995); }
.card:hover{ border-color: rgba(255,255,255,.16); background: rgba(0,0,0,.22); }

.card .img{
  height: var(--imgH);
  background: rgba(255,255,255,.03);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.card .img img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.card .body{
  padding:12px 12px 14px 12px;
}
.card .name{
  font-size:18px;
  font-weight:750;
  margin:0 0 6px 0;
}
.card .desc{
  color: var(--muted);
  font-size:13px;
  margin:0 0 10px 0;
  min-height: 16px;
}
.card .row{
  display:flex; justify-content:space-between; align-items:center;
}
.price{
  font-size:18px;
  font-weight:800;
}
.badge{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  color: var(--muted);
}

.cart{
  position:sticky;
  top: 98px;
}
@media (max-width: 980px){
  .cart{ position:relative; top:0; }
}
.cartList{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height: 56vh;
  overflow:auto;
  padding-right:4px;
}
.line{
  border:1px solid var(--border);
  border-radius:14px;
  background: rgba(0,0,0,.2);
  padding:10px;
}
.line .top{
  display:flex; justify-content:space-between; gap:10px; align-items:flex-start;
}
.line b{ font-size:15px; }
.line .meta{
  color:var(--muted);
  font-size:12px;
  margin-top:4px;
}
.qtyRow{
  display:flex; gap:8px; margin-top:10px; align-items:center;
}
.qtyBtn{
  width:54px; height:54px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color:var(--text);
  font-size:22px;
  font-weight:800;
  cursor:pointer;
}
.qtyVal{
  min-width:46px;
  text-align:center;
  font-size:18px;
  font-weight:800;
}
.sumRow{
  border-top:1px solid var(--border);
  margin-top:14px;
  padding-top:14px;
}
.sumRow .r{
  display:flex; justify-content:space-between;
  font-size:16px;
  color:var(--muted);
  margin:8px 0;
}
.sumRow .r.total{
  color: var(--text);
  font-size:20px;
  font-weight:900;
}
.cartActions{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:12px;
}

.modalBack {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  position: relative;
  width: min(1100px, 96vw);   /* ← VIGTIG */
  max-height: 90vh;

  border-radius: 16px;

  display: flex;
  flex-direction: column;
  overflow: hidden;

  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  background: rgba(0,0,0,0.5);
}

.modal .mhd {
  flex: 0 0 auto;
  background: linear-gradient(#1b2330, #0f1620);
  color: #fff;
  padding: 16px 20px;
}

.modal .mhd h3{ margin:0; font-size:18px; }

.modal .mbd {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  padding-bottom: 120px; /* plads til footer */
}

.modalFooter {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;

  background: #ffffff;
  padding: 16px 20px;
  border-top: 1px solid #ddd;

  z-index: 20;
}

.modalFooter .btn {
  width: 100%;
  font-size: 1.2em;
  padding: 14px;
}

.optGrid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:10px;
}
@media (max-width: 700px){
  .optGrid{ grid-template-columns: 1fr; }
}
.opt{
  border:1px solid var(--border);
  border-radius:14px;
  background: rgba(0,0,0,.22);
  padding:12px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  cursor:pointer;
  user-select:none;
}
.opt.active{
  border-color: rgba(38,194,129,.35);
  background: rgba(38,194,129,.14);
}
.opt b{ font-size:15px; }
.opt span{ color:var(--muted); font-size:13px; }

.toast{
  position:fixed;
  left:50%;
  transform: translateX(-50%);
  bottom:18px;
  background: rgba(17,24,35,.95);
  border:1px solid var(--border);
  border-radius:999px;
  padding:12px 16px;
  box-shadow: var(--shadow);
  display:none;
  font-weight:700;
}
/* Tilvalg – tablet UX */
/* =========================================================
   TILVALG / MODAL – TABLET UX (RENSKRIVET)
   ========================================================= */

/* Gruppe container */
.optGroup {
  border: 1px solid #d0d0d0;
  border-radius: 14px;
  margin-bottom: 14px;
  background: #ffffff;
  overflow: hidden;
}

/* Gruppe header */
.optGroupHeader {
  padding: 14px 16px;
  background: #f2f2f2;
}

.optGroupHeader b {
  font-size: 1.15em;
  color: #111;
}

.optHint {
  font-size: 0.95em;
  color: #555;
}

/* Gruppe body – basis */
.optGroupBody {
  padding: 12px;
}

/* =========================
   LISTE (choose / select / fra)
   ========================= */
.optGroupBody.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px;
}

/* Liste-element */
.optItem.row {
  padding: 14px 16px;
  border-radius: 10px;
  border: 2px solid #d0d0d0;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05em;
  cursor: pointer;
}

.optItem.row .label {
  color: #111;
  font-weight: 500;
}

.optItem.row .price {
  color: #0a7cff;
  font-weight: 600;
}

/* Liste – valgt */
.optItem.row.active {
  background: #e6f0ff;
  border-color: #0a7cff;
}

/* Liste – fravalg */
.optGroup[data-type="fra"] .optItem.row.active {
  background: #ffecec;
  border-color: #d93025;
}

/* =========================
   TILES (tilvalg / PLUS)
   ========================= */
.optGroupBody.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

/* Tile-element */
.optItem.tile {
  padding: 18px;
  min-height: 90px;
  border-radius: 14px;
  border: 2px solid #d0d0d0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  font-size: 1.1em;
}

.optItem.tile .label {
  color: #111;
  font-weight: 600;
}

.optItem.tile .price {
  color: #0a7cff;
  font-weight: 700;
}

/* Tile – valgt */
.optItem.tile.active {
  background: #e6f0ff;
  border-color: #0a7cff;
}

/* =========================
   SCROLLBAR (tablet venlig)
   ========================= */
.optGroupBody.list::-webkit-scrollbar {
  width: 6px;
}
.optGroupBody.list::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}

/* Topbar logo */
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar .brand .logo {
  width: 180px;
  height: 80px;
  background-image: url('/internt/selv/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
}

.info-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 16px;
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  color: #000;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
}
