/* Ausgelagert aus src/pages/massguertel.html (bisheriger großer <style>-Block, Konfigurator „Maßgürtel“).
   Eingebunden mit ?v=AUTO; scripts/prepare-site.mjs ersetzt AUTO beim Bauen durch die ersten 8 Zeichen
   des SHA-256 dieser Datei – bei Änderungen muss nichts von Hand angepasst werden. */
    .gb-back{display:inline-flex;align-items:center;gap:7px;font-size:.85rem;font-weight:700;color:rgba(243,246,251,.82);margin:0 0 14px;}.gb-back:hover{color:#d3b07a;}.gb-back[hidden]{display:none;}
    /* ── Bildband über die volle Breite (gleiche Werte wie die anderen Seiten) ── */
    .gu-heroband {
      position: relative;
      width: 100%;
      /* Ganzes Bild zeigen (Seitenverhältnis des Banners 2056 × 685), nicht hineinzoomen */
      aspect-ratio: 2056 / 685;
      max-height: 420px; /* flach halten: auf großen Bildschirmen nicht die ganze Seite füllen */
      overflow: hidden;
      background: #0a0e17;
    }
    .gu-heroband img {
      position: absolute; inset: 0;
      width: 100%; height: 100%;
      object-fit: cover;
      object-position: center 65%;
      display: block;
    }
    .gu-heroband::after {
      content: ''; position: absolute; inset: 0; pointer-events: none;
      background: linear-gradient(180deg,
        rgba(8,11,18,.18) 0%,
        rgba(8,11,18,0) 25%,
        rgba(8,11,18,0) 82%,
        rgba(8,11,18,.85) 100%);
    }


    /* ══════════════════════════════════════════════════════════════
       MASSGÜRTEL-KONFIGURATOR — Oberfläche
       Ruhiges, flaches Layout mit klarer Schrittführung und kräftigen
       aktiven Zuständen. Der Leder-Seitenhintergrund bleibt unberührt.
       ══════════════════════════════════════════════════════════════ */
    .konfig-grid {
      display: grid;
      grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr);
      gap: 20px;
      align-items: start;
    }
    @media (max-width: 1080px) { .konfig-grid { grid-template-columns: 1fr; } }

    /* ── Flächen ──────────────────────────────────────────────── */
    .belt-config-card {
      background: none;
      border: 0;
      border-radius: 0;
      box-shadow: none;
      backdrop-filter: none;
      padding: 0;
    }
    .konfig-panel,
    .belt-preview-card,
    .belt-summary-card,
    .belt-inquiry-card {
      background: linear-gradient(180deg, rgba(14,18,27,.86), rgba(9,12,19,.9));
      border: 1px solid rgba(255,255,255,.09);
      border-radius: 18px;
      box-shadow: 0 24px 60px rgba(0,0,0,.45);
      backdrop-filter: blur(16px);
      padding: 26px 26px 30px;
    }
    .belt-summary-card { margin-top: 20px; }

    /* ── Schrittführung ───────────────────────────────────────── */
    .konfig-panel { counter-reset: step; }
    .konfig-section {
      counter-increment: step;
      position: relative;
      padding: 22px 0 24px 46px;
      border-bottom: 1px solid rgba(255,255,255,.07);
      margin: 0;
    }
    .konfig-section:first-child { padding-top: 4px; }
    .konfig-section:last-child { border-bottom: 0; padding-bottom: 4px; }
    .konfig-section::before {
      content: counter(step, decimal-leading-zero);
      position: absolute;
      left: 0;
      top: 22px;
      width: 30px;
      text-align: center;
      font: 800 .74rem/1 'Manrope', sans-serif;
      letter-spacing: .02em;
      color: rgba(211,176,122,.82);
      padding: 6px 0;
      border: 1px solid rgba(211,176,122,.22);
      border-radius: 8px;
      background: rgba(211,176,122,.05);
    }
    .konfig-section:first-child::before { top: 4px; }
    .konfig-section h3 {
      font: 800 1rem/1.25 'Manrope', sans-serif;
      letter-spacing: -.01em;
      text-transform: none;
      color: #f3f6fb;
      margin: 0 0 3px;
    }
    .konfig-section h3 span {
      font-weight: 600 !important;
      color: rgba(211,176,122,.8) !important;
      font-size: .78rem !important;
    }
    .konfig-section .sub {
      font-size: .84rem;
      line-height: 1.5;
      color: rgba(243,246,251,.77);
      margin: 0 0 14px;
    }

    /* ── Optionen ─────────────────────────────────────────────── */
    .option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(126px,1fr)); gap: 8px; }
    .option-btn {
      position: relative;
      padding: 13px 14px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,.1);
      background: rgba(255,255,255,.025);
      color: rgba(243,246,251,.82);
      font: 800 .88rem/1.25 'Manrope', sans-serif;
      letter-spacing: -.01em;
      cursor: pointer;
      text-align: left;
      transition: border-color .18s, background .18s, color .18s, transform .18s;
    }
    .option-btn:hover { border-color: rgba(211,176,122,.45); background: rgba(211,176,122,.06); transform: translateY(-1px); }
    .option-btn .opt-price {
      display: block;
      font-size: .74rem;
      font-weight: 600;
      color: rgba(243,246,251,.77);
      margin-top: 4px;
    }
    .option-btn.selected {
      border-color: transparent;
      background: linear-gradient(135deg, #d9b884, #c08a57);
      color: #14100a;
      box-shadow: 0 8px 22px rgba(192,138,87,.28);
    }
    .option-btn.selected .opt-price { color: rgba(20,16,10,.72); }

    /* ── Lederfarben ──────────────────────────────────────────── */
    .farb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px,1fr)); gap: 10px; margin-top: 2px; }
    .farb-swatch {
      display: flex; flex-direction: column; align-items: center; gap: 7px;
      cursor: pointer;
      padding: 10px 6px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,.08);
      background: rgba(255,255,255,.02);
      transition: border-color .18s, background .18s, transform .18s;
    }
    /* Radio bleibt für Tastatur und Screenreader erreichbar (nur optisch versteckt) */
    .farb-swatch { position: relative; }
    .farb-swatch input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
    .farb-swatch:has(input:focus-visible) { outline: 2px solid #e6c391; outline-offset: 2px; }
    .farb-dot {
      position: relative;
      width: 34px; height: 34px;
      border-radius: 11px;
      border: 1px solid rgba(255,255,255,.14);
      box-shadow: inset 0 -6px 12px rgba(0,0,0,.35);
      transition: transform .18s;
    }
    .farb-swatch span:last-child {
      font-size: .7rem; line-height: 1.25;
      color: rgba(243,246,251,.78);
      font-weight: 700; text-align: center;
    }
    .farb-swatch:hover { border-color: rgba(211,176,122,.4); background: rgba(211,176,122,.05); transform: translateY(-1px); }
    .farb-swatch.active {
      border-color: rgba(211,176,122,.75);
      background: rgba(211,176,122,.1);
    }
    .farb-swatch.active .farb-dot { transform: scale(1.06); }
    .farb-swatch.active .farb-dot::after {
      content: '✓';
      position: absolute; right: -6px; bottom: -6px;
      width: 17px; height: 17px; border-radius: 50%;
      background: #d3b07a; color: #14100a;
      font: 800 .62rem/17px 'Manrope', sans-serif;
      text-align: center;
      box-shadow: 0 2px 6px rgba(0,0,0,.45);
    }
    .farb-swatch.active span:last-child { color: #e6c391; }

    /* ── Nahtfarben ───────────────────────────────────────────── */
    .naht-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(62px,1fr)); gap: 8px; margin-top: 2px; }
    .naht-swatch {
      display: flex; flex-direction: column; align-items: center; gap: 6px;
      cursor: pointer; padding: 9px 4px;
      border-radius: 11px;
      border: 1px solid rgba(255,255,255,.07);
      background: rgba(255,255,255,.02);
      transition: border-color .18s, background .18s;
    }
    /* Radio bleibt für Tastatur und Screenreader erreichbar (nur optisch versteckt) */
    .naht-swatch { position: relative; }
    .naht-swatch input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
    .naht-swatch:has(input:focus-visible) { outline: 2px solid #e6c391; outline-offset: 2px; }
    .naht-dot {
      width: 26px; height: 26px; border-radius: 50%;
      border: 1px solid rgba(255,255,255,.16);
      display: flex; align-items: center; justify-content: center;
      transition: transform .18s;
    }
    .naht-swatch span:last-child { font-size: .66rem; color: rgba(243,246,251,.77); font-weight: 700; text-align: center; line-height: 1.2; }
    .naht-swatch:hover { border-color: rgba(211,176,122,.4); background: rgba(211,176,122,.05); }
    .naht-swatch.active { border-color: rgba(211,176,122,.75); background: rgba(211,176,122,.1); }
    .naht-swatch.active .naht-dot { transform: scale(1.1); box-shadow: 0 0 0 2px rgba(211,176,122,.55); }
    .naht-swatch.active span:last-child { color: #e6c391; }

    /* ── Extras ───────────────────────────────────────────────── */
    .extras-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
    .extra-btn {
      padding: 13px 15px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,.1);
      background: rgba(255,255,255,.025);
      color: rgba(243,246,251,.82);
      font: 700 .88rem/1.3 'Manrope', sans-serif;
      cursor: pointer; text-align: left;
      display: flex; align-items: center; gap: 12px;
      transition: border-color .18s, background .18s, color .18s;
    }
    .extra-btn:hover { border-color: rgba(211,176,122,.45); background: rgba(211,176,122,.06); }
    .extra-btn .check {
      width: 20px; height: 20px; border-radius: 6px;
      border: 1.5px solid rgba(255,255,255,.22);
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0; font-size: .72rem; font-weight: 800;
      transition: background .18s, border-color .18s, color .18s;
    }
    .extra-btn.selected {
      border-color: rgba(211,176,122,.7);
      background: rgba(211,176,122,.12);
      color: #f0dcc0;
    }
    .extra-btn.selected .check { background: #d3b07a; border-color: #d3b07a; color: #14100a; }

    /* ── Eingaben ─────────────────────────────────────────────── */
    .text-input, .num-input {
      width: 100%;
      padding: 12px 15px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,.12);
      background: rgba(6,9,14,.75);
      color: #f3f6fb;
      font: 600 .92rem 'Manrope', sans-serif;
      transition: border-color .18s, box-shadow .18s;
    }
    .num-input { width: 150px; font-weight: 800; font-size: 1.05rem; -moz-appearance: textfield; }
    .num-input::-webkit-inner-spin-button { -webkit-appearance: none; }
    .text-input::placeholder, .num-input::placeholder { color: rgba(243,246,251,.71); }
    .text-input:focus, .num-input:focus {
      outline: none;
      border-color: rgba(211,176,122,.65);
      box-shadow: 0 0 0 3px rgba(211,176,122,.14);
    }

    /* ── Gravur-Umschalter ────────────────────────────────────── */
    .gravur-toggle { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
    .gravur-toggle button {
      flex: 1; min-width: 118px;
      padding: 11px 10px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,.1);
      background: rgba(255,255,255,.025);
      color: rgba(243,246,251,.84);
      font: 800 .82rem 'Manrope', sans-serif;
      cursor: pointer;
      transition: border-color .18s, background .18s, color .18s;
    }
    .gravur-toggle button:hover { border-color: rgba(211,176,122,.45); color: rgba(243,246,251,.85); }
    .gravur-toggle button.active {
      border-color: transparent;
      background: linear-gradient(135deg, #d9b884, #c08a57);
      color: #14100a;
      box-shadow: 0 8px 20px rgba(192,138,87,.26);
    }

    /* ── Rechte Spalte: Vorschau ──────────────────────────────── */
    .preview-sticky { position: sticky; top: 112px; align-self: start; }
    .belt-preview-card { padding: 20px !important; margin-bottom: 20px; }
    .belt-preview-card .eyebrow { letter-spacing: .14em; }
    #guertelImg, #halsbandImg {
      width: 100%; display: block;
      filter: drop-shadow(0 14px 30px rgba(0,0,0,.65));
      transition: opacity .2s ease;
      border-radius: 10px;
    }
    /* Weicher Lichtschein hinter der Vorschau. Bewusst auf der Karte und
       nicht auf dem Bild-Container: dessen Box-Maße bestimmen die
       Canvas-Geometrie und dürfen sich nicht verändern. */
    .belt-preview-card {
      background:
        radial-gradient(90% 40% at 50% 26%, rgba(211,176,122,.11), rgba(211,176,122,0) 72%),
        linear-gradient(180deg, rgba(14,18,27,.86), rgba(9,12,19,.9));
    }
    .meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
    .meta-box {
      background: rgba(255,255,255,.03);
      border: 1px solid rgba(255,255,255,.06);
      border-radius: 11px;
      padding: 10px 12px;
    }
    .meta-box strong {
      display: block;
      font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
      color: rgba(243,246,251,.74); font-weight: 800; margin-bottom: 3px;
    }
    .meta-box span { font-size: .9rem; font-weight: 800; color: #f3f6fb; }

    /* ── Zusammenfassung & Preis ──────────────────────────────── */
    .price-breakdown {
      margin: 0 0 18px;
      padding: 16px 18px;
      border-radius: 14px;
      background: rgba(255,255,255,.025);
      border: 1px solid rgba(255,255,255,.07);
    }
    .price-breakdown .pb-title {
      font-size: .68rem; text-transform: uppercase; letter-spacing: .12em;
      color: rgba(211,176,122,.8); font-weight: 800; margin: 0 0 12px;
    }
    .price-breakdown ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
    .price-breakdown li { display: flex; justify-content: space-between; gap: 12px; font-size: .86rem; color: rgba(243,246,251,.84); }
    .price-breakdown li:first-child {
      color: rgba(243,246,251,.88); font-weight: 700;
      padding-bottom: 9px; border-bottom: 1px solid rgba(255,255,255,.08);
    }
    .price-breakdown li strong { color: rgba(243,246,251,.9); font-weight: 700; }

    .summary-price {
      display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
      padding: 20px;
      border-radius: 16px;
      background: linear-gradient(135deg, rgba(211,176,122,.14), rgba(192,138,87,.05));
      border: 1px solid rgba(211,176,122,.3);
      margin-bottom: 16px;
    }
    .summary-price strong {
      display: block;
      font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
      color: rgba(243,246,251,.78); font-weight: 800; margin-bottom: 6px;
    }
    #priceTotal { color: #e6c391; letter-spacing: -.02em; }
    .summary-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
    .summary-list li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
    .summary-list li strong { color: rgba(243,246,251,.78); font-weight: 700; }
    .summary-list--minimal li { border-bottom: none; padding: 0; }
    .mini-note { font-size: .78rem; color: rgba(243,246,251,.75); margin-top: 4px; }
    /* Naturleder-Hinweis: Der stand vorher als graue Kleinschrift da und
       wurde überlesen. Farbe und Maserung sind bei gewachsenem Leder aber
       der häufigste Grund für Rückfragen nach der Lieferung – also gehört
       er lesbar hierhin, nicht ins Kleingedruckte. */
    .leder-hinweis {
      margin-top: 14px; padding: 14px 16px; border-radius: 16px;
      background: rgba(211,176,122,.08); border: 1px solid rgba(211,176,122,.3);
      font-size: .86rem; line-height: 1.65; color: rgba(243,246,251,.78);
      max-width: 620px;
    }
    .leder-hinweis strong { color: #d3b07a; display: block; margin-bottom: 3px; }

    /* ── Hauptaktion ──────────────────────────────────────────── */
    .primary-cta, .add-cart-btn {
      display: flex;
      width: 100%;
      margin-top: 16px;
    }
    .laenge-hinweis { font-size: .82rem; font-weight: 700; color: #e07070; margin: 8px 0 0; line-height: 1.5; }
    .laenge-hinweis a { color: #d3b07a; text-decoration: underline; }
    .cart-msg { text-align: center; font-size: .85rem; font-weight: 700; color: #e6c391; margin-top: 10px; min-height: 18px; }

    /* ── Anfrage-Bereich ──────────────────────────────────────── */
    .inquiry-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; margin-top: 24px; align-items: start; }
    @media (max-width: 1180px) { .inquiry-layout { grid-template-columns: 1fr; } }

    /* ── Mobil ────────────────────────────────────────────────── */
    @media (max-width: 768px) {
      html, body { overflow-x: clip !important; }
      .container { width: calc(100% - 24px) !important; padding: 0 12px !important; box-sizing: border-box !important; }
      * { max-width: 100% !important; box-sizing: border-box !important; }
      svg, .naht-dot, .farb-dot, input[type="radio"], input[type="checkbox"] { max-width: none !important; }
      img { max-width: 100% !important; }
      .konfig-grid, .inquiry-layout { display: block !important; }
      div[style*="grid-template-columns"] { display: block !important; }
      .option-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
      .farb-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
      .naht-grid { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
      .option-btn, .farb-btn, .naht-btn { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
      .konfig-panel, .belt-summary-card, .belt-help-card,
      .belt-preview-card, .belt-inquiry-card, .info-card {
        padding: 18px 16px !important; width: 100% !important; margin-bottom: 16px !important;
      }
      .konfig-section { padding-left: 40px; }
      div[style*="position:sticky"], div[style*="sticky"], .preview-sticky { position: static !important; top: auto !important; }
      div[style*="420px"] { width: 100% !important; min-width: 0 !important; }
      canvas { max-width: 100% !important; height: auto !important; }
      .primary-cta, .add-cart-btn { width: 100% !important; }
      .summary-price { flex-direction: column !important; align-items: flex-start !important; }
      .section-title { font-size: clamp(1.4rem, 5vw, 1.8rem) !important; }
    }
    /* Schriftarten-Liste: auf dem Handy volle Breite des Textfelds (Beispiel + voller Name),
       deckend und über den folgenden Abschnitten. Die generelle Regel "* { max-width:100% }"
       hatte sie sonst auf die Breite des kleinen Auswahlknopfs gestaucht. */
    @media (max-width: 768px) {
      #fontPickerList {
        left: 0 !important; right: 0 !important; width: auto !important; max-width: none !important;
        max-height: min(288px, 48vh) !important; background: #0b0f18 !important; opacity: 1 !important;
      }
      #fontPickerList .font-pick-btn { min-width: 0; }
    }
    /* Mobil: lange Wörter dürfen die Spalte nicht aufweiten,
       sonst rutscht die zweite Karte über den Rand. Verschluss-Auswahl bekommt
       auf schmalen Geräten die volle Breite (Bild oben, Auswahl darunter). */
    @media (max-width: 600px) {
      .verschluss-row { flex-direction: column !important; align-items: stretch !important; }
      .verschluss-row > div:first-child { align-self: flex-start; }
      .verschluss-row select { width: 100% !important; font-size: .74rem !important; padding-left: 10px !important; padding-right: 8px !important; }
    }
    /* Schmale Handys: Schrittnummer über die Überschrift statt links daneben,
       damit die Karten die volle Breite bekommen und nichts abgeschnitten wird. */
    @media (max-width: 480px) {
      .konfig-section, .konfig-section:first-child { padding-left: 0; }
      .konfig-section::before, .konfig-section:first-child::before {
        position: static; display: block; width: 30px; margin: 0 0 10px;
      }
    }


/* Sichtbarer Tastaturfokus (Paket 9.9) */
#verschlussSelect:focus-visible, #mengeMinus:focus-visible, #gdSize:focus-visible, #swSize:focus-visible, .sw-i:focus-visible, #anmerkung:focus-visible { outline: 2px solid #e6c391; outline-offset: 2px; }
/* iOS zoomt bei kleinerer Schrift in Eingabefeldern (Paket 9.9) */
#verschlussSelect { font-size: 16px !important; }

/* Berater-Reiter (rechter Rand) und WhatsApp-Knopf (rechts unten) sollen den Text der stehenden Vorschau nicht überdecken */
@media (min-width: 861px) and (max-width: 1400px) {
  .preview-sticky > .belt-preview-card:first-child { padding-right: 64px !important; }
}
