/* ==========================================================================
   qrcode.css – QR-Code Aufkleber Produktseite (FADESING2026)
   Produkt 1506 · product_info_qrcode + product_options/qr_code
   v=20260330c — Shop-konformes Farbschema
   ========================================================================== */

/* === HERO === */
.qrp-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px;
  background: #545454;
  border-left: 5px solid #7EA000;
  border-radius: 4px;
  margin-bottom: 16px;
}
fieldset .qrp-hero h1.qrp-hero__title,
.qrp-hero h1.qrp-hero__title,
h1.qrp-hero__title {
  margin: 0 0 8px;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  background-color: transparent;
}
.qrp-hero .qrp-hero__text {
  color: rgba(255,255,255,.82);
}
/* Kurzbeschreibung aus DB kann beliebiges HTML enthalten – alles neutralisieren */
.qrp-hero .qrp-hero__desc,
.qrp-hero .qrp-hero__desc h2,
.qrp-hero .qrp-hero__desc h3,
.qrp-hero .qrp-hero__desc p,
.qrp-hero .qrp-hero__desc span,
.qrp-hero .qrp-hero__desc strong {
  font-size: 0.875rem !important;
  font-family: inherit !important;
  font-weight: normal !important;
  line-height: 1.55;
  color: rgba(255,255,255,.82) !important;
  margin: 0;
  padding: 0;
}
.qrp-hero__meta {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.qrp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #7EA000;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
}

/* === ANLEITUNG 3 SCHRITTE === */
.qrp-guide {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  counter-reset: none;
  background: #f2f2f2;
  border-radius: 4px;
  overflow: hidden;
}
.qrp-guide li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 0.8125rem;
  color: #555;
  position: relative;
}
.qrp-guide li + li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: #ddd;
}
.qrp-guide__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #7EA000;
  color: #fff;
  font-weight: 700;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

/* === ZWEISPALTIGES LAYOUT === */
.qrp-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 28px;
}

/* --- Linke Spalte: Vorschau --- */
.qrp-preview {
  flex: 0 0 42%;
  max-width: 42%;
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qrp-preview__stage {
  position: relative;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 20px;
  text-align: center;
}
.qrp-preview__img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}
.qrp-preview__zoom {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  color: #999;
  padding: 8px 0 0;
}

.qrp-preview__thumbs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.qrp-preview__thumbs img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.qrp-preview__thumbs img:hover {
  border-color: #7EA000;
}

/* Mini-QR-Vorschau */
.qrp-preview__qr {
  background: #fff;
  border: 2px dashed #ccc;
  border-radius: 6px;
  padding: 20px;
  text-align: center;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, background 0.3s;
}
.qrp-preview__qr--filled {
  border-style: solid;
  border-color: #7EA000;
  background: #fbfdf6;
}
.qrp-preview__qr img {
  max-width: 180px;
  height: auto;
}
.qrp-preview__qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #bbb;
  font-size: 0.8125rem;
}

/* --- Rechte Spalte: Konfigurator --- */
.qrp-config {
  flex: 1;
  min-width: 0;
}

/* === KONFIGURATOR (aus qr_code.html) === */
.qr-config {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.qr-config__section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid #e5e5e5;
}
.qr-config__section:first-child {
  padding-top: 0;
}
.qr-config__section:last-child {
  border-bottom: none;
}

.qr-config__label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.qr-config__label::before {
  content: counter(qr-step);
  counter-increment: qr-step;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #7EA000;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
}

#optionstemplate {
  counter-reset: qr-step;
}

.qr-config__hint {
  font-size: 0.8125rem;
  color: #888;
  margin: 0;
  line-height: 1.4;
  padding-left: 30px;
}

/* --- Dateneingabe --- */
input.qr-input,
input.qr-input[type="text"] {
  width: 100%;
  padding: 14px 14px;
  height: auto;
  font-size: 1rem;
  border: 2px solid #d8d8d8;
  border-radius: 4px;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  background: #fff;
  color: #333;
  margin-bottom: 0;
}
.qr-input:focus {
  outline: none;
  border-color: #7EA000;
  box-shadow: 0 0 0 3px rgba(126,160,0,.12);
}
.qr-input::placeholder {
  color: #aaa;
}

/* --- Farb-Auswahl --- */
.qr-color-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 2px solid #d8d8d8;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.qr-color-trigger:hover {
  border-color: #7EA000;
}

.qr-color-trigger__swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,.08);
  background:
    linear-gradient(135deg, #e5e5e5 25%, transparent 25%) -4px 0,
    linear-gradient(225deg, #e5e5e5 25%, transparent 25%) -4px 0,
    linear-gradient(315deg, #e5e5e5 25%, transparent 25%),
    linear-gradient(45deg, #e5e5e5 25%, transparent 25%);
  background-size: 8px 8px;
  background-color: #d0d0d0;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}
.qr-color-trigger__swatch::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--qr-selected-color, transparent);
  transition: background 0.2s;
}

.qr-color-trigger__text {
  flex: 1;
  font-size: 0.9375rem;
  color: #333;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qr-color-trigger__text--empty {
  color: #aaa;
}

.qr-color-trigger__arrow {
  width: 18px;
  height: 18px;
  color: #aaa;
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
}
.qr-color-trigger:hover .qr-color-trigger__arrow {
  color: #7EA000;
  transform: translateY(2px);
}

/* --- QR-Code Erzeugen --- */
.qr-action-row {
  display: flex;
  gap: 0;
  padding-left: 30px;
}

.qr-generate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  background: #7EA000;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  white-space: nowrap;
}
.qr-generate:hover {
  background: #6b8a00;
  box-shadow: 0 3px 10px rgba(126,160,0,.3);
}
.qr-generate:active {
  transform: scale(0.97);
}
.qr-generate__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Vorschau im Konfigurator (versteckt bei eigenem Template) */
.qr-preview {
  display: none;
}

/* --- Größenauswahl --- */
.qr-sizes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.qr-size {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 14px 4px 12px;
  border: 2px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  text-align: center;
}
.qr-size:hover {
  border-color: #7EA000;
}
.qr-size--active {
  border-color: #7EA000;
  background: #f6f9ee;
  box-shadow: 0 2px 8px rgba(126,160,0,.15);
}
.qr-size--active::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: -8px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #7EA000;
  color: #fff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-size input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.qr-size__name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #333;
  line-height: 1;
}
.qr-size--active .qr-size__name {
  color: #7EA000;
}

.qr-size__dim {
  font-size: 0.6875rem;
  color: #888;
  line-height: 1.3;
}

.qr-size__price {
  font-size: 0.75rem;
  font-weight: 600;
  color: #7EA000;
  margin-top: 2px;
}
.qr-size--active .qr-size__price {
  color: #5a7300;
}

/* === WARENKORB-BEREICH === */
.qrp-cart {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 2px solid #7EA000;
}

/* === PRODUKTBESCHREIBUNG (volle Breite) === */
.qrp-description {
  margin-top: 8px;
  padding: 28px 0;
  border-top: 1px solid #e5e5e5;
}
.qrp-description__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: #333;
}
.qrp-description__body {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #555;
}
.qrp-description__body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* === BEWERTUNGEN === */
.qrp-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  padding: 8px 0;
}

/* === SPINNER === */
@keyframes qr-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.qr-spin {
  animation: qr-spin 0.8s linear infinite;
}
.qr-generate:disabled {
  background: #999;
  cursor: wait;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .qrp-layout {
    flex-direction: column;
    gap: 20px;
  }
  .qrp-preview {
    flex: none;
    max-width: 100%;
    position: static;
  }
  .qrp-preview__stage {
    max-width: 400px;
    margin: 0 auto;
  }
  .qr-sizes {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .qrp-hero {
    flex-direction: column;
    padding: 16px 18px;
  }
  .qrp-hero__meta {
    justify-content: flex-start;
  }
  .qrp-guide {
    flex-direction: column;
    gap: 0;
  }
  .qrp-guide li + li::before {
    width: 60%;
    height: 1px;
    top: 0;
    left: 20%;
  }
  .qr-action-row {
    padding-left: 0;
  }
  .qr-generate {
    width: 100%;
  }
  .qr-config__hint {
    padding-left: 0;
  }
}

@media (max-width: 479px) {
  .qr-sizes {
    grid-template-columns: repeat(2, 1fr);
  }
  .qrp-hero .qrp-hero__title {
    font-size: 1.2rem;
  }
}
