/* Roxxlyn Veneer Konfigurator — Storefront Styles */

/* ── Preview Box ── */
.rxk-preview-box {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: none;
}
.rxk-preview-box.rxk--active { display: block; }

.rxk-preview-box .rxk-veneer-layer,
.rxk-preview-box .rxk-overlay-layer,
.rxk-preview-box .rxk-logo-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.rxk-preview-box .rxk-veneer-layer  { z-index: 1; }
.rxk-preview-box .rxk-addon-overlays { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.rxk-preview-box .rxk-addon-overlay-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.rxk-preview-box .rxk-overlay-layer { z-index: 3; display: none; }

.rxk-preview-placeholder {
  position: absolute;
  bottom: 16px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Konfigurator-Container ── */
.roxxlyn-konfigurator {
  margin: 16px 0;
  font-family: inherit;
  padding: 14px 0;
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
}

.rxk-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Sections ── */
.rxk-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rxk-section + .rxk-section {
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

/* ── Info ── */
.rxk-info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}
.rxk-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a1a1a;
}
.rxk-selected-name,
.rxk-selected-logo-name {
  font-size: 13px;
  color: #555;
}

/* ── Swatches ── */
.rxk-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rxk-swatch {
  position: relative;
  width: 56px;
  height: 56px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: #f5f5f5;
  transition: border-color 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}
.rxk-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rxk-swatch:hover:not([disabled]) {
  border-color: #1a1a1a;
  transform: scale(1.06);
}
.rxk-swatch--active,
.rxk-logo-swatch--active {
  border-color: #1a1a1a !important;
  box-shadow: 0 0 0 1px #1a1a1a;
}
.rxk-swatch[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Preis-Badge auf Swatch ── */
.rxk-price-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  background: rgba(0,0,0,0.72);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 3px;
  pointer-events: none;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

/* ── Sold-out, Low-Stock & bereits im Warenkorb ── */
.rxk-sold-out,
.rxk-reserved,
.rxk-in-cart,
.rxk-low-stock {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
}
.rxk-sold-out {
  inset: 0;
  background: rgba(0,0,0,0.55);
}
/* Fremd reserviert: heller Schleier statt dunklem wie bei "ausverkauft" —
   die Platte ist nicht weg, nur gerade vergeben. Das Bild bleibt erkennbar. */
.rxk-reserved {
  inset: 0;
  background: rgba(255,255,255,0.55);
  color: #111;
  font-size: 7px;
  line-height: 1.2;
  padding: 2px;
}
.rxk-swatch:has(.rxk-reserved) img {
  filter: grayscale(0.6);
}
.rxk-in-cart {
  inset: 0;
  background: rgba(10,10,10,0.72);
  font-size: 7px;
  line-height: 1.2;
  padding: 2px;
}
.rxk-low-stock {
  inset: auto 0 0 0;
  height: 40%;
  background: rgba(180,30,30,0.8);
  padding-bottom: 2px;
  font-size: 7px;
}

/* ── Keins-Button ── */
.rxk-none-label {
  font-size: 16px;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* ── Reservierungs-Countdown ── */
.rxk-reservation-banner {
  background: #F6F6F6;
  padding: 9px 12px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rxk-reservation-banner b {
  font-weight: 600;
}
.rxk-resv-clock {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── Fehler ── */
.rxk-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin: 0;
}

/* ── Add-ons ── */
.rxk-addons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rxk-addon-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.rxk-addon-item:hover {
  border-color: #1a1a1a;
  background: #fafafa;
}
.rxk-addon-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1a1a1a;
  cursor: pointer;
  flex-shrink: 0;
}
.rxk-addon-label {
  font-size: 14px;
  color: #1a1a1a;
  flex: 1;
}
.rxk-addon-desc {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  color: #8C8C8C;
  margin-top: 2px;
}
.rxk-addon-price {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
}

/* ── Auftragsschein ── */
.rxk-sheet {
  --rxk-k: #0A0A0A;
  --rxk-line: #E4E4E4;
  --rxk-grey: #8C8C8C;
  border: 1px solid var(--rxk-k);
  padding: 18px;
  margin-top: 4px;
}
.rxk-sheet-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--rxk-line);
}
.rxk-sheet-title {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.rxk-sheet-ref {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--rxk-grey);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}
.rxk-sheet-line,
.rxk-sheet-total {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  font-variant-numeric: tabular-nums;
  /* Gleicher Mono-Stack wie der Theme-Auftragsschein (.ln), damit die Box optisch identisch ist. */
  font-family: var(--font-mono, 'JetBrains Mono'), ui-monospace, 'SF Mono', monospace;
}
.rxk-sheet-line {
  padding: 7px 0;
  font-size: 12px;
  border-bottom: 1px dotted var(--rxk-line);
  animation: rxk-slot 460ms cubic-bezier(.16,1,.3,1) both;
}
.rxk-sheet-line .rxk-sheet-l {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rxk-sheet-line .rxk-sheet-r { white-space: nowrap; }
.rxk-sheet-line--wait {
  border-bottom: none;
  font-style: italic;
}
.rxk-sheet-line--wait .rxk-sheet-l { color: var(--rxk-grey); }
@keyframes rxk-slot {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: none; }
}
.rxk-sheet-total {
  padding-top: 13px;
  margin-top: 6px;
  border-top: 1px solid var(--rxk-k);
  font-size: 15px;
  font-weight: 500;
}
.rxk-sheet-total .rxk-sheet-r { text-align: right; }
.rxk-sheet-total strong { font-weight: 500; }
.rxk-sheet-total small {
  display: block;
  font-family: inherit;
  font-size: 10px;
  font-weight: 300;
  color: var(--rxk-grey);
  margin-top: 3px;
  letter-spacing: 0;
}
.rxk-sheet .rxk-reservation-banner { margin: 12px 0 0; }
@media (prefers-reduced-motion: reduce) {
  .rxk-sheet-line { animation: none; }
}

/* ── Responsive ── */
.rxk-pool-feedback { min-height: 24px; padding-top: 6px; font-size: 12px; line-height: 1.5; }
.rxk-pool-retry { margin-left: 8px; padding: 2px 0; border: 0; border-bottom: 1px solid currentColor; background: none; color: inherit; font: inherit; cursor: pointer; }
.rxk-pool-retry[hidden] { display: none; }
.rxk-pool-empty { padding: 16px; font-size: 13px; line-height: 1.5; }
@media (max-width: 480px) {
  .rxk-swatch { width: 48px; height: 48px; }
  .rxk-sheet { padding: 12px 13px; }
}
