/* ===== MOA Shop — Konfigurator-Layout ===== */

.shop-page main { padding-bottom: 4rem; }
.nav-active { color: var(--spark) !important; }

.shop-hero {
  padding: clamp(2.6rem, 6vw, 4.4rem) 0 clamp(1.6rem, 3vw, 2.4rem);
  background: linear-gradient(180deg, var(--bg-2), transparent);
  border-bottom: 1px solid var(--line);
}
.shop-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: .8rem 0 .8rem; }
.shop-hero .lead { font-size: 1.05rem; color: var(--muted); max-width: 720px; }
.shop-meta { margin-top: 1.2rem; color: var(--muted); font-size: .85rem; }

.shop-content { padding: clamp(1.6rem, 4vw, 2.6rem) 0; }
.shop-loading { color: var(--muted); padding: 2rem 0; }

/* Cart pill in nav */
.cart-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .5em 1em; font-size: .9rem; }
.cart-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--spark); color: var(--on-spark);
  font-weight: 800; font-size: .8rem;
}
.cart-btn[data-empty="true"] .cart-count { background: var(--line); color: var(--muted); }

/* ===== Planner (Multi-Section Komplettsystem) ===== */
.planner-area { margin-bottom: 2.6rem; }
.planner-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
}
.planner-head {
  padding: 1.6rem 1.7rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.planner-head h2 { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; margin-bottom: .4rem; letter-spacing: -.01em; }
.planner-sub { color: var(--muted); font-size: .98rem; max-width: 760px; }
.planner-body { padding: 1.4rem 1.7rem 1.6rem; }
.planner-sections { display: grid; gap: 1.1rem; }
.planner-add-section { margin: 1rem 0 1.6rem; }

.planner-block-h {
  font-family: var(--font-head); font-size: 1.15rem; font-weight: 700;
  margin: 1.4rem 0 .8rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line);
}

/* Section card */
.section-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; grid-template-columns: 260px 1fr; overflow: hidden;
}
.section-img { background: #0c0e12; display: flex; align-items: center; justify-content: flex-start; min-height: 200px; border-right: 1px solid var(--line); overflow: hidden; }
.section-img img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.section-fields { padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .9rem; }
.section-headline { display: flex; align-items: center; gap: .6rem; }
.section-name {
  flex: 1; padding: .5em .8em;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  color: var(--text); font: inherit; font-weight: 600; font-size: 1.02rem;
}
.section-name:focus { outline: none; border-color: var(--spark); }
.section-rm {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  width: 30px; height: 30px; border-radius: 6px; cursor: pointer; font-size: 1.4rem; line-height: 1; padding: 0;
}
.section-rm:hover { color: #ff5d5d; border-color: #ff5d5d; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .7rem; }
.grid-2 label, .grid-3 label, .block-label, .tor-section-pick label {
  display: block;
  font-family: var(--font-head); font-weight: 700; font-size: .72rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  margin-bottom: .3rem;
}
.grid-2 input, .grid-2 select, .grid-3 select, .tor-section-pick select {
  width: 100%; padding: .5em .65em; background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; color: var(--text); font: inherit; font-size: .94rem;
}
.tor-section-pick select { margin-top: .3rem; }
.pfahl-cards { grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
.pfahl-cards .opt-card { padding: .55em .65em; }
.pfahl-cards .opt-card strong { font-size: .82rem; }
.pfahl-cards .opt-card small { font-size: .7rem; line-height: 1.25; }

/* Tor list */
.planner-tore { margin-top: .8rem; }
.tor-list { display: grid; gap: .8rem; }
.tor-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.tor-head { display: flex; gap: .5rem; align-items: center; margin-bottom: .8rem; }
.tor-head select { flex: 1; padding: .5em .65em; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--text); font: inherit; }
.tor-rm { background: transparent; border: 1px solid var(--line); color: var(--muted); width: 30px; height: 30px; border-radius: 6px; cursor: pointer; font-size: 1.3rem; line-height: 1; padding: 0; }
.tor-rm:hover { color: #ff5d5d; border-color: #ff5d5d; }
.planner-tore-buttons { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0 1.6rem; }

/* Summary */
.planner-summary { padding: 1.2rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 1.2rem; }
.summary-lines { display: grid; gap: .4rem; }
.summary-line { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.summary-line:last-child { border-bottom: 0; }
.summary-line.is-reduction { color: var(--muted); font-style: italic; }
.sl-name { font-weight: 600; font-size: .94rem; }
.sl-detail { color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.sl-price { font-family: var(--font-head); text-align: right; font-size: .85rem; line-height: 1.3; white-space: nowrap; }
.sl-price strong { font-size: 1rem; }
.summary-totals { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); display: grid; gap: .35rem; font-size: .96rem; }
.st-row { display: flex; justify-content: space-between; color: var(--muted); }
.st-row.brutto { color: var(--text); font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.planner-submit { margin-top: 1.4rem; }
.planner-submit.added { background: var(--spark-2); }

/* ===== Configurator grid (smaller, secondary) ===== */
.configurator-grid { display: grid; gap: 1.6rem; }

.config-card {
  display: grid; grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
}
.config-img {
  background: linear-gradient(180deg, #11141a, #0c0e12);
  display: flex; align-items: center; justify-content: center;
  min-height: 280px;
  border-right: 1px solid var(--line);
}
.config-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.config-body { padding: 1.6rem 1.7rem 1.5rem; display: flex; flex-direction: column; }
.config-body h2 {
  font-family: var(--font-head); font-size: 1.45rem; font-weight: 800;
  letter-spacing: -.01em; margin-bottom: .4rem;
}
.config-sub { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }
.config-bullets {
  list-style: none; display: grid; gap: .25rem;
  font-size: .88rem; color: var(--muted); margin-bottom: 1.2rem;
}
.config-bullets li { padding-left: 1rem; position: relative; }
.config-bullets li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 5px; height: 5px; background: var(--spark); border-radius: 50%;
}

.config-options { display: grid; gap: 1rem; margin-bottom: 1.2rem; }
.config-opt > label {
  display: block; font-family: var(--font-head); font-weight: 700; font-size: .76rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  margin-bottom: .5rem;
}

.config-select {
  width: 100%; padding: .65em .9em;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); font: inherit; font-size: .96rem;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.config-select:focus { outline: none; border-color: var(--spark); box-shadow: 0 0 0 3px rgba(255,122,24,.16); }

.swatch-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.swatch {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  font: inherit; font-size: .85rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45em .8em .45em .55em; border-radius: 999px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.swatch:hover { border-color: var(--spark); }
.swatch.active { border-color: var(--spark); background: rgba(255,122,24,.1); color: var(--text); }
.swatch-dot {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.3);
}

.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.opt-card {
  text-align: left; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; padding: .7em .9em; cursor: pointer;
  color: var(--text); font: inherit; transition: border-color .15s, background .15s;
}
.opt-card:hover { border-color: var(--spark); }
.opt-card.active { border-color: var(--spark); background: rgba(255,122,24,.08); }
.opt-card strong { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .15rem; }
.opt-card small { color: var(--muted); font-size: .8rem; line-height: 1.35; display: block; }

.config-qty {
  display: flex; align-items: center; gap: .7rem;
  margin-bottom: 1rem;
}
.config-qty label {
  font-family: var(--font-head); font-weight: 700; font-size: .76rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.qty-input {
  width: 72px; padding: .45em .55em;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px;
  color: var(--text); font: inherit; text-align: center;
}
.qty-input:focus { outline: none; border-color: var(--spark); }

.config-result {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem 1.1rem; margin-bottom: 1.1rem; min-height: 64px;
}
.config-hint { color: var(--muted); font-size: .9rem; }
.config-hint.err { color: #ff8a8a; }
.config-row-note {
  color: var(--muted); font-size: .85rem; padding: .4rem 0; border-top: 1px dashed var(--line);
}
.config-line {
  display: grid; grid-template-columns: 1fr auto;
  gap: 1rem; align-items: start;
  padding: .55rem 0; border-top: 1px solid var(--line);
}
.config-line:first-of-type { border-top: 0; padding-top: 0; }
.cl-name { font-weight: 600; font-size: .94rem; }
.cl-detail { color: var(--muted); font-size: .82rem; margin-top: .15rem; }
.cl-price { font-family: var(--font-head); font-size: .85rem; text-align: right; line-height: 1.3; }
.cl-price strong { font-size: 1rem; }

.config-totals {
  margin-top: .8rem; padding-top: .7rem;
  border-top: 1px solid var(--line);
  font-size: .9rem;
}
.config-totals > div {
  display: flex; justify-content: space-between; margin-top: .3rem; color: var(--muted);
}
.config-totals > div.brutto {
  color: var(--text); font-family: var(--font-head); font-weight: 800; font-size: 1.04rem;
  margin-top: .5rem; padding-top: .4rem; border-top: 1px solid var(--line);
}

.config-add {
  align-self: flex-start;
}
.config-add:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.config-add.added { background: var(--spark-2); }

/* Tail / accessories */
.shop-tail { margin-top: 3rem; }
.section-title { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; margin-bottom: .35rem; }
.section-sub { color: var(--muted); margin-bottom: 1.4rem; }
.accessory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.acc-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
}
.acc-img { background: #0c0e12; aspect-ratio: 4/3; }
.acc-img img { width: 100%; height: 100%; object-fit: cover; }
.acc-name { padding: 1rem 1rem 0; font-weight: 700; font-size: 1rem; }
.acc-detail { padding: 0 1rem; color: var(--muted); font-size: .85rem; }
.acc-foot {
  padding: .9rem 1rem 1rem; margin-top: auto;
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.acc-price { font-family: var(--font-head); font-weight: 700; flex: 1; min-width: 0; }
.acc-price small { color: var(--muted); font-weight: 400; font-size: .75rem; }
.acc-qty { width: 56px; padding: .35em .4em; font-size: .85rem; }
.acc-add { padding: .45em .8em; font-size: .82rem; }
.acc-add.added { background: var(--spark); color: var(--on-spark); border-color: var(--spark); }

/* Cart drawer (unchanged from prior) */
.cart-drawer { position: fixed; inset: 0; z-index: 200; }
.cart-drawer[hidden] { display: none; }
.cart-backdrop { position: absolute; inset: 0; background: rgba(5,6,9,.7); backdrop-filter: blur(3px); }
.cart-drawer-inner {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(460px, 100vw); background: var(--bg-2);
  border-left: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  animation: slide .3s ease-out;
  overflow: hidden;
}
@keyframes slide { from { transform: translateX(100%); } to { transform: none; } }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.cart-head h2 { font-family: var(--font-head); font-size: 1.15rem; }
.cart-close { background: transparent; border: 0; color: var(--text); font-size: 1.8rem; line-height: 1; padding: 0 .4rem; cursor: pointer; }
.cart-close:hover { color: var(--spark); }

/* Scrollbarer Bereich: Artikel + Summe + Formular alles zusammen */
.cart-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.cart-items { padding: .5rem 1.3rem 1rem; }
.cart-empty { color: var(--muted); padding: 2rem 0; text-align: center; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: .4rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.cart-item-title { font-weight: 600; font-size: .92rem; }
.cart-item-meta { color: var(--muted); font-size: .82rem; margin-top: .15rem; }
.cart-item-price { font-family: var(--font-head); font-weight: 700; font-size: .92rem; text-align: right; }
.cart-item-actions { display: flex; align-items: center; gap: .4rem; margin-top: .4rem; }
.cart-item-actions .qty-input { width: 52px; padding: .25em .4em; font-size: .85rem; }
.qty-btn {
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .15s, border-color .15s;
}
.qty-btn:hover { background: var(--surface); border-color: var(--spark); color: var(--spark); }
.cart-item-rm {
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid transparent;
  background: transparent; color: var(--muted); cursor: pointer; font-size: .85rem;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: color .15s, border-color .15s;
}
.cart-item-rm:hover { color: #ff5d5d; border-color: #ff5d5d; }

.cart-summary { padding: 1rem 1.3rem; border-top: 1px solid var(--line); background: var(--surface); font-size: .94rem; }
.cart-summary .sum-line { display: flex; justify-content: space-between; margin-bottom: .35rem; color: var(--muted); }
.cart-summary .sum-line.total { color: var(--text); font-weight: 800; font-size: 1.05rem; margin-top: .4rem; padding-top: .5rem; border-top: 1px solid var(--line); }

.cart-form { padding: 1rem 1.3rem 1.4rem; border-top: 1px solid var(--line); }
.cart-form h3 { font-family: var(--font-head); font-size: 1rem; margin-bottom: .7rem; }
.cart-field { margin-bottom: .7rem; }
.cart-field label { display: block; font-size: .78rem; font-weight: 600; margin-bottom: .25rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cart-field input, .cart-field textarea { width: 100%; padding: .55em .7em; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font: inherit; font-size: .92rem; }
.cart-field input:focus, .cart-field textarea:focus { outline: none; border-color: var(--spark); }
.hp { position: absolute; left: -9999px; }
.cart-note { margin-top: .8rem; font-size: .88rem; min-height: 1.2em; }
.cart-note.ok  { color: var(--spark-2); }
.cart-note.err { color: #ff5d5d; }

/* Cart-Button immer sichtbar — außerhalb der Nav-Links */
.cart-btn { order: 3; }

/* Mobile */
@media (max-width: 820px) {
  /* Cart neben Hamburger, vor dem Toggle */
  .cart-btn { display: inline-flex !important; }

  .config-card { grid-template-columns: 1fr; }
  .config-img { min-height: 200px; border-right: 0; border-bottom: 1px solid var(--line); }
  .card-row { grid-template-columns: 1fr; }
  .section-card { grid-template-columns: 1fr; }
  .section-img { min-height: 180px; border-right: 0; border-bottom: 1px solid var(--line); }
  .pfahl-cards { grid-template-columns: 1fr 1fr; }
  .planner-body { padding: 1rem 1.1rem 1.2rem; }
  .planner-head { padding: 1.2rem 1.1rem .9rem; }
  .summary-line { grid-template-columns: 1fr; }
  .sl-price { text-align: left; }
}
@media (max-width: 500px) {
  .pfahl-cards, .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .cart-drawer-inner { width: 100vw; }
}
