/* ===================================================
   Creative Gnomes – Box-Konfigurator (box.html)
   Nutzt die Farben/Variablen aus style.css
   =================================================== */
@font-face {
  font-family: 'Pacifico';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/pacifico.woff2') format('woff2');
}

.bx-wrap { padding-top: 40px; }

/* ---- Schritt-Anzeige ---- */
.bx-steps { display: flex; justify-content: center; max-width: 560px; margin: 0 auto 36px; list-style: none; }
.bx-steps li { flex: 1; position: relative; display: flex; justify-content: center; }
.bx-steps li:not(:last-child)::after {
  content: ''; position: absolute; top: 17px; left: calc(50% + 22px); right: calc(-50% + 22px);
  height: 2px; background: var(--border); transition: background var(--transition);
}
.bx-steps li:has(.is-done):not(:last-child)::after,
.bx-steps li:has(.is-active):not(:last-child)::after { background: var(--amber); }
.bx-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 64px; padding: 0; background: none; border: 0; cursor: pointer; }
.bx-step-num {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 0.8rem; font-weight: 700;
  background: var(--bg-card); border: 2px solid var(--border-warm); color: var(--text-dim); transition: var(--transition);
}
.bx-step-label { font-size: 0.75rem; font-weight: 600; color: var(--text-dim); }
.bx-step.is-active .bx-step-num { background: var(--amber); border-color: var(--amber); color: var(--on-green); box-shadow: 0 0 18px var(--amber-glow); }
.bx-step.is-active .bx-step-label { color: var(--amber-light); }
.bx-step.is-done .bx-step-num { background: var(--green); border-color: var(--green); color: var(--on-green); }
.bx-step.is-done .bx-step-label { color: var(--green-light); }

/* ---- Layout ---- */
.bx-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.bx-card {
  background: rgba(36, 24, 8, 0.88); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; backdrop-filter: blur(10px);
}
.bx-preview { flex: 999 1 540px; min-width: 0; position: sticky; top: 96px; }
.bx-settings { flex: 1 1 360px; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 900px) {
  /* Handy/Tablet: Vorschau bleibt oben stehen, damit man jede Änderung sieht */
  .bx-preview { position: sticky; top: 64px; z-index: 5; padding: 10px; }
  .bx-preview-head { margin-bottom: 6px; }
  .bx-preview .bx-view, .bx-preview .bx-tip, .bx-preview .bx-info, .bx-preview .bx-note { display: none; }
  .bx-stage svg { max-height: 34vh; }
}
@media (max-width: 600px) { .bx-card, .bx-settings { padding: 16px; } }

.bx-preview-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.bx-preview-title { font-family: var(--font-head); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.04em; color: var(--white); }

.bx-stage {
  position: relative; container-type: inline-size; overflow: hidden; touch-action: none; cursor: grab; user-select: none;
  border-radius: 14px; border: 1px solid rgba(230, 200, 120, 0.10);
  background: radial-gradient(ellipse at 50% 40%, rgba(200, 152, 30, 0.10), transparent 65%), var(--bg-section);
}
.bx-stage.is-dragging { cursor: grabbing; }
.bx-stage svg { display: block; width: 100%; height: auto; }
.bx-overlay { position: absolute; inset: 0; pointer-events: none; }
.bx-overlay-text { position: absolute; transform-origin: 0 0; font-weight: 700; line-height: 1; white-space: nowrap; }
.bx-label { position: absolute; font-weight: 600; font-size: max(12px, 2.33cqw); color: var(--text-muted); white-space: nowrap; }
.bx-snap {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 8px 14px; border-radius: 999px; background: var(--green); color: var(--on-green); font-size: 0.85rem; font-weight: 700;
}
.bx-snap.is-anim { animation: bxSnap 1.4s ease-out forwards; }
@keyframes bxSnap { 0% { opacity: 0; transform: translateX(-50%) scale(0.85); } 20% { opacity: 1; transform: translateX(-50%) scale(1.05); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) scale(1); } }

.bx-view { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 12px; }
.bx-view .bx-field { flex: 1 1 160px; }
.bx-tip { margin: 6px 0 0; font-size: 0.75rem; color: var(--text-dim); }

.bx-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.bx-info div { background: var(--bg-card2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.bx-info span { display: block; font-size: 0.75rem; color: var(--text-muted); }
.bx-info strong { display: block; font-size: 0.92rem; color: var(--white); }
@media (max-width: 520px) { .bx-info { grid-template-columns: 1fr; } }
.bx-note {
  display: flex; gap: 10px; margin-top: 12px; padding: 12px 14px; font-size: 0.88rem; line-height: 1.5;
  background: rgba(140, 184, 78, 0.08); border: 1px solid rgba(140, 184, 78, 0.22); border-radius: var(--radius);
}
.bx-note svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--green-light); }

/* ---- Bedienfelder ---- */
.bx-panel h2 { margin: 0 0 4px; font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: var(--white); }
.bx-panel > p { margin: 0 0 18px; font-size: 0.88rem; color: var(--text-muted); }
.bx-group { margin-bottom: 20px; }
.bx-group-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.bx-group-title span { font-weight: 400; color: var(--text-muted); }
.bx-field { margin-bottom: 12px; }
.bx-field-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.92rem; }
.bx-field-head label { font-weight: 500; }
.bx-field-head span { color: var(--text-muted); font-size: 0.85rem; }
.bx-num { display: flex; align-items: center; gap: 6px; }
.bx-num input {
  width: 80px; height: 38px; padding: 0 10px; text-align: right; font-size: 1rem; font-family: inherit;
  background: var(--bg-card2); color: var(--text); border: 1px solid var(--border-warm); border-radius: 8px;
}
.bx-num input:focus, .bx-text input:focus { outline: none; border-color: var(--amber); }
.bx-num input[aria-invalid="true"] { border-color: #e07070; }
.bx-hint { font-size: 0.75rem; color: var(--text-dim); margin-top: -2px; }
.bx-hint--bad { color: #e8a0a0; }
.bx-settings input[type=range], .bx-view input[type=range] { width: 100%; height: 28px; accent-color: var(--green); cursor: pointer; background: transparent; }
.bx-total { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 12px; }
.bx-total strong { color: var(--white); }

.bx-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.bx-pills--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bx-pill {
  min-height: 44px; padding: 8px 14px; border-radius: var(--radius); text-align: center; font-size: 0.88rem; font-family: inherit;
  background: var(--bg-card2); color: var(--text); border: 2px solid rgba(230, 200, 120, 0.22); cursor: pointer; transition: var(--transition);
}
.bx-pill strong { display: block; font-weight: 600; }
.bx-pill small { display: block; font-size: 0.75rem; opacity: 0.85; margin-top: 2px; }
.bx-pill:hover { border-color: var(--amber); }
.bx-pill.is-active { border-color: var(--amber); background: rgba(200, 152, 30, 0.14); color: var(--amber-light); }
.bx-tpl { border-radius: 999px; font-weight: 500; }

.bx-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.bx-swatch { width: 44px; height: 44px; border-radius: 50%; padding: 0; border: 1px solid rgba(253, 246, 227, 0.35); cursor: pointer; transition: var(--transition); }
.bx-swatch.is-active { box-shadow: 0 0 0 3px var(--bg-card), 0 0 0 5px var(--amber-light); }

.bx-counters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bx-counter { background: var(--bg-card2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.bx-counter-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.bx-counter-row strong { font-family: var(--font-head); font-size: 1.2rem; color: var(--white); }
.bx-round {
  width: 44px; height: 44px; border-radius: 10px; font-size: 1.3rem; line-height: 1; cursor: pointer;
  background: transparent; color: var(--text); border: 1.5px solid rgba(230, 200, 120, 0.22); transition: var(--transition);
}
.bx-round:hover:not(:disabled) { border-color: var(--amber); color: var(--amber-light); }
.bx-round:disabled { opacity: 0.35; cursor: not-allowed; }

.bx-fine { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-top: 14px; }
.bx-fine-toggle {
  width: 100%; min-height: 48px; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px;
  background: var(--bg-card2); border: 0; color: var(--text); font-size: 0.92rem; font-weight: 600; cursor: pointer; font-family: inherit;
}
.bx-fine-toggle svg { width: 18px; height: 18px; transition: transform var(--transition); }
.bx-fine-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.bx-fine-body { padding: 14px; }

.bx-text input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: var(--radius); font-size: 1rem; font-family: inherit;
  background: var(--bg-card2); color: var(--text); border: 1px solid var(--border-warm);
}
.bx-text small { display: block; font-size: 0.75rem; color: var(--text-dim); margin-top: 4px; }

.bx-summary { margin: 0 0 18px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.bx-summary div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--bg-card2); border-bottom: 1px solid rgba(230, 200, 120, 0.08); }
.bx-summary div:last-child { border-bottom: 0; }
.bx-summary dt { color: var(--text-muted); font-size: 0.88rem; }
.bx-summary dd { margin: 0; font-weight: 600; color: var(--white); font-size: 0.88rem; text-align: right; }
.bx-price { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.bx-price strong { font-family: var(--font-head); font-weight: 900; font-size: 1.4rem; color: var(--amber-light); white-space: nowrap; }
.bx-small { font-size: 0.78rem; color: var(--text-dim); margin: 4px 0 16px; }
.bx-small a { color: var(--green-light); text-decoration: underline; }
.bx-added { margin-top: 10px; text-align: center; color: var(--green-light); font-weight: 600; font-size: 0.9rem; }
.bx-error { color: #e8a0a0; font-weight: 600; }

.bx-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--border); padding-top: 18px; }
.bx-nav .btn { white-space: nowrap; }
.bx-from { font-size: 0.88rem; color: var(--text-muted); }
.bx-from strong { color: var(--amber-light); }
.btn--amber { background: var(--amber); color: var(--on-green); }
.btn--amber:hover { background: var(--amber-light); box-shadow: 0 0 28px var(--amber-glow); transform: translateY(-2px); }

.bx-settings button:focus-visible, .bx-preview button:focus-visible, .bx-settings input:focus-visible, .bx-preview input:focus-visible { outline: 3px solid var(--amber-light); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ===== Hinweis-Kachel "Box selbst gestalten" (Start- und Produktseite) ===== */
.box-teaser {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 32px;
  background: linear-gradient(135deg, rgba(140, 184, 78, 0.10), rgba(200, 152, 30, 0.10)), rgba(36, 24, 8, 0.85);
  border: 1px solid var(--border-warm); border-radius: var(--radius-lg); padding: 32px; position: relative; overflow: hidden;
}
.box-teaser-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; margin-bottom: 14px;
  background: var(--amber); color: var(--on-green); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.box-teaser h2 { font-family: var(--font-head); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 900; line-height: 1.2; color: var(--white); margin-bottom: 12px; }
.box-teaser p { color: var(--text-muted); margin-bottom: 18px; }
.box-teaser ul { list-style: none; display: grid; gap: 8px; margin-bottom: 22px; }
.box-teaser li { display: flex; gap: 10px; align-items: center; color: var(--text); font-size: 0.95rem; }
.box-teaser li svg { width: 18px; height: 18px; flex: none; color: var(--green-light); }
.box-teaser img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
@media (max-width: 820px) { .box-teaser { grid-template-columns: 1fr; padding: 22px; } .box-teaser-img { order: -1; } }

/* ===== Schmaler Banner über den Produkten (produkte.html) ===== */
.box-banner-wrap { padding: 8px 0 24px; }
.box-banner {
  display: flex; align-items: center; gap: 20px; padding: 14px 20px 14px 14px; text-decoration: none; color: inherit;
  background: linear-gradient(135deg, rgba(140, 184, 78, 0.12), rgba(200, 152, 30, 0.12)), rgba(36, 24, 8, 0.85);
  border: 1px solid var(--border-warm); border-radius: var(--radius-lg); transition: transform 0.2s, box-shadow 0.2s;
}
.box-banner:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35); }
.box-banner:focus-visible { outline: 3px solid var(--amber-light); outline-offset: 3px; }
.box-banner-img { width: 140px; height: 74px; flex: none; object-fit: cover; border-radius: var(--radius); display: block; }
.box-banner-body { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.box-banner-body .box-teaser-badge { margin-bottom: 0; }
.box-banner-title { font-family: var(--font-head); font-size: clamp(1.05rem, 2.4vw, 1.4rem); font-weight: 900; line-height: 1.2; color: var(--white); margin: 0; }
.box-banner-text { flex-basis: 100%; color: var(--text-muted); font-size: 0.92rem; }
.box-banner-btn { flex: none; }
@media (max-width: 720px) {
  .box-banner { flex-wrap: wrap; padding: 14px; gap: 12px; }
  .box-banner-img { width: 100%; height: 110px; }
  .box-banner-body { flex-basis: 100%; }
  .box-banner-btn { width: 100%; justify-content: center; }
}
