/* ==========================================================================
   fa-norm.css – Generische Produktseite (FADESING2026)
   Vorlage: fa_norm_info + fa_norm_atr
   Prefix: fn-
   ========================================================================== */

/* --- Gesamtlayout: Bild links, Info rechts --- */
.fn-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

/* --- Linke Spalte: Produktbild --- */
.fn-preview {
  flex: 0 0 42%;
  max-width: 42%;
  position: sticky;
  top: 80px;
}

.fn-preview__wrap {
  position: relative;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 16px;
  text-align: center;
}

.fn-preview__img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.fn-preview__zoom {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  color: #888;
  padding: 6px 0 0;
}

.fn-preview .morepics {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.fn-preview .morepics img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.fn-preview .morepics img:hover {
  border-color: #6b8e23;
}

/* --- Rechte Spalte: Info + Konfig + Kauf --- */
.fn-info {
  flex: 1 1 58%;
  min-width: 0;
}

.fn-info h1 {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.3;
  color: #1a1a1a;
}

/* --- Kurzbeschreibung --- */
.fn-short-desc {
  font-size: 0.8125rem;
  color: #4b5563;
  margin-bottom: 14px;
  line-height: 1.55;
}

.fn-short-desc ul,
.fn-short-desc ol {
  margin: 4px 0 4px 0;
  padding-left: 1.25rem;
}

.fn-short-desc li {
  margin-bottom: 2px;
  padding-left: 2px;
}

.fn-short-desc li::marker {
  color: #6b8e23;
}

.fn-short-desc p {
  margin: 0 0 4px;
}

.fn-short-desc p:last-child {
  margin-bottom: 0;
}

.fn-short-desc strong,
.fn-short-desc b {
  color: #1a1a1a;
  font-weight: 600;
}

.fn-short-desc a {
  color: #6b8e23;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.fn-short-desc a:hover {
  color: #5a7a1e;
}

/* --- Meta-Infos (Lieferzeit, Art.-Nr., EAN) --- */
.fn-meta {
  font-size: 0.8125rem;
  color: #666;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.fn-meta p {
  margin: 2px 0;
}

.fn-meta strong {
  color: #333;
}

/* --- Bewertungen --- */
.fn-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  margin-bottom: 10px;
}

.fn-rating img {
  vertical-align: middle;
}

/* --- Options-Wrapper (aus fa_norm_atr): Optionen nebeneinander --- */
.fn-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  align-items: center;
}

.fn-options .fn-opt {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.fn-options .fn-opt + .fn-opt {
  padding-top: 0;
  border-top: none;
}

.fn-options .textConfigBox {
  flex: 0 0 auto;
}

/* Text-Inputs und Textareas: volle Breite, eigene Zeile */
.fn-options .fn-opt:has(input.selectbutton),
.fn-options .fn-opt:has(textarea),
.fn-options .textConfigBox:has(input.selectbutton),
.fn-options .textConfigBox:has(textarea) {
  flex: 1 0 100%;
}

/* Innerhalb volle-Breite-Items: Content als Block statt Flex */
.fn-options .fn-opt:has(input.selectbutton) .textConfigBoxContent,
.fn-options .fn-opt:has(textarea) .textConfigBoxContent {
  display: block;
}

/* ==========================================================================
   KONFIGURATOR-BEREICH
   ========================================================================== */
.fn-config {
  background: #fafafa;
  border: 2px solid #6b8e23;
  border-radius: 8px;
  padding: 0;
  margin: 0 0 14px;
  overflow: hidden;
}

.fn-config__header {
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0;
  padding: 6px 14px;
  background: #6b8e23;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04rem;
}

.fn-config__header i {
  margin-right: 6px;
}

.fn-config__body {
  padding: 10px 14px 12px;
}

/* Innerhalb des Konfigurators: keine Trennlinien */
.fn-config__body .fn-opt {
  margin-bottom: 6px;
}

.fn-config__body .fn-opt:last-child {
  margin-bottom: 0;
}

.fn-config__body .fn-opt + .fn-opt {
  padding-top: 0;
  border-top: none;
}

/* Content-Text-Labels (z.B. "Folienfarbe:") inline neben Button */
.fn-config .textConfigBoxContent {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
}

/* --- Optionsgruppen innerhalb Konfigurator (fn-opt) --- */
.fn-opt {
  margin-bottom: 10px;
}

.fn-opt:last-child {
  margin-bottom: 0;
}

.fn-opt + .fn-opt {
  padding-top: 10px;
  border-top: 1px solid #e0e2e6;
}

.fn-opt__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  color: #999;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03rem;
}

/* --- Selects --- */
.fn-opt select {
  width: 100%;
  font-size: 0.8125rem;
  padding: 7px 10px;
  border: 1.5px solid #d1d5db;
  border-radius: 5px;
  box-sizing: border-box;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: auto;
  color: #1a1a1a;
}

.fn-opt select:focus {
  border-color: #6b8e23;
  box-shadow: 0 0 0 2px rgba(107, 142, 35, 0.12);
  outline: none;
}

/* --- Inputs + Textarea --- */
.fn-opt input[type="text"],
.fn-opt input[type="number"],
.fn-opt textarea {
  width: 100%;
  font-size: 0.8125rem;
  padding: 7px 10px;
  border: 1.5px solid #d1d5db;
  border-radius: 5px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: #1a1a1a;
}

.fn-opt input:focus,
.fn-opt textarea:focus {
  border-color: #6b8e23;
  box-shadow: 0 0 0 2px rgba(107, 142, 35, 0.12);
  outline: none;
}

.fn-opt input.selectbutton {
  width: 100%;
  font-size: 0.8125rem;
  padding: 7px 10px;
  border: 1.5px solid #d1d5db;
  border-radius: 5px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: #1a1a1a;
  background: #fff;
}

.fn-opt input.selectbutton:focus {
  border-color: #6b8e23;
  box-shadow: 0 0 0 2px rgba(107, 142, 35, 0.12);
  outline: none;
}

.fn-opt textarea {
  min-height: 60px;
  resize: vertical;
}

/* Hilfetext unter Inputs */
.fn-opt p {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 4px 0 0;
  line-height: 1.4;
}

.fn-opt p strong {
  color: #4b5563;
  font-weight: 600;
}

/* ==========================================================================
   textConfigBox innerhalb Konfigurator
   ========================================================================== */
.fn-config .textConfigBox {
  margin-bottom: 0;
}

/* Head als dezentes Label – !important nötig wegen klebebuchstabena.css globals */
.fn-config .textConfigBox .textConfigBoxHead {
  display: flex !important;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  min-height: 0 !important;
  line-height: 1 !important;
}

.fn-config .textConfigBox .textConfigBoxNumber {
  display: none !important;
}

.fn-config .textConfigBox .textConfigBoxTitle {
  font-size: 0.6875rem !important;
  font-weight: 400 !important;
  color: #999 !important;
  text-transform: uppercase;
  letter-spacing: 0.03rem;
  line-height: 1 !important;
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.fn-config .textConfigBox .textConfigBoxHelpWr {
  margin-left: auto;
  background: none !important;
  padding: 0 !important;
}

.fn-config .textConfigBox .textConfigBoxHelpWr a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ddd;
  color: #999;
  font-size: 0.5rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

.fn-config .textConfigBox .textConfigBoxHelpWr a:hover {
  background: #6b8e23;
  color: #fff;
}

.fn-config .textConfigBoxContent select {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  padding: 7px 10px;
  border: 1.5px solid #d1d5db;
  border-radius: 5px;
  box-sizing: border-box;
  background: #fff;
  color: #1a1a1a;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.fn-config .textConfigBoxContent select:focus {
  border-color: #6b8e23;
  box-shadow: 0 0 0 2px rgba(107, 142, 35, 0.12);
  outline: none;
}

.fn-config .textConfigBoxContent input.selectbutton {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  padding: 10px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 5px;
  box-sizing: border-box;
  background: #fff;
  color: #1a1a1a;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.fn-config .textConfigBoxContent input.selectbutton:focus {
  border-color: #6b8e23;
  box-shadow: 0 0 0 2px rgba(107, 142, 35, 0.12);
  outline: none;
}

/* Info-Bereiche unter Selects (z.B. schildmat_info) */
.fn-config .textConfigBoxContent:empty {
  display: none;
}

.fn-config .infoDatenCheck {
  font-size: 0.75rem;
  color: #6b8e23;
  font-weight: 600;
  margin-top: 4px;
}

/* ==========================================================================
   Flächen-Modul im Konfigurator
   ========================================================================== */
.fn-config .flaeche_options {
  margin-bottom: 0;
}

.fn-config .flaeche_options label,
.fn-config .flaeche_options .flaeche-text-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.02rem;
}

.fn-config .flaeche_options select,
.fn-config .flaeche_options input[type="text"],
.fn-config .flaeche_options input[type="number"] {
  width: 100%;
  font-size: 0.8125rem;
  padding: 7px 10px;
  border: 1.5px solid #d1d5db;
  border-radius: 5px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: #1a1a1a;
}

.fn-config .flaeche_options select:focus,
.fn-config .flaeche_options input:focus {
  border-color: #6b8e23;
  box-shadow: 0 0 0 2px rgba(107, 142, 35, 0.12);
  outline: none;
}

.fn-config .flaeche-head,
.fn-config .flaeche-result-row,
.fn-config .flaeche-hidden-meta {
  display: none;
}

/* ==========================================================================
   ColorButton – Auffälliger Aktions-Button
   ========================================================================== */
.fn-opt .ColorButton,
.fn-config .ColorButton {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background-color: #6b8e23;
  color: #fff;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01rem;
  transition: box-shadow 0.2s, transform 0.1s, border-color 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  min-width: 140px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.fn-opt .ColorButton:hover,
.fn-config .ColorButton:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  border-color: rgba(0, 0, 0, 0.2);
}

.fn-opt .ColorButton:active,
.fn-config .ColorButton:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Label-Text neben ColorButton */
.fn-config .textConfigBoxContent > br {
  display: none;
}

/* ==========================================================================
   Staffelpreise
   ========================================================================== */
.fn-staffel-wrap {
  margin-bottom: 12px;
}

.fn-staffel-toggle {
  width: 100%;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6b8e23;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.fn-staffel-toggle:hover {
  background: #f8faf0;
  border-color: #6b8e23;
}

.fn-staffel-wrap.is-empty {
  display: none;
}

/* ==========================================================================
   Hersteller
   ========================================================================== */
.fn-manufacturer {
  font-size: 0.8125rem;
  margin-top: 10px;
}

.fn-manufacturer a {
  color: #6b8e23;
  text-decoration: none;
}

.fn-manufacturer a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Gespiegelt (Radio mit Bildern)
   ========================================================================== */
.fn-opt--mirror .fn-opt__radios {
  display: flex;
  gap: 12px;
}

.fn-opt__radio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 5px 10px;
  border: 1.5px solid #e0e0e0;
  border-radius: 5px;
  transition: border-color 0.2s, background 0.2s;
}

.fn-opt__radio:hover {
  border-color: #6b8e23;
  background: #fafdf5;
}

.fn-opt__radio:has(input:checked) {
  border-color: #6b8e23;
  background: #f0f5e0;
}

.fn-opt__radio img {
  width: 40px;
  height: auto;
  border-radius: 3px;
}

.fn-opt__radio input[type="radio"] {
  accent-color: #6b8e23;
}

/* ==========================================================================
   Format-Auswahl (Radio-Liste mit Bildern)
   ========================================================================== */
.fn-opt__format-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fn-opt__format-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.fn-opt__format-item:hover,
.fn-opt__format-item:has(input:checked) {
  border-color: #6b8e23;
  background: #f8faf0;
}

.fn-opt__format-item img {
  width: 48px;
  height: auto;
}

.fn-opt__format-item input[type="radio"] {
  accent-color: #6b8e23;
}

/* ==========================================================================
   Radio-Liste (ohne Bilder)
   ========================================================================== */
.fn-opt__radio-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fn-opt__radio-list label {
  font-size: 0.8125rem;
  padding: 4px 0;
  cursor: pointer;
}

.fn-opt__radio-list input[type="radio"] {
  accent-color: #6b8e23;
  margin-right: 4px;
}

/* ==========================================================================
   Dropzone innerhalb fn-opt
   ========================================================================== */
.fn-opt .dropzone {
  min-height: 100px;
  border: 2px dashed #d1d5db;
  border-radius: 6px;
  background: #fff;
  padding: 16px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.8125rem;
  color: #6b7280;
}

.fn-opt .dropzone:hover,
.fn-opt .dropzone.dz-drag-hover {
  border-color: #6b8e23;
  background: #f8faf0;
}

/* ==========================================================================
   Schriftvorschau (fontSample-Bild)
   ========================================================================== */
.fn-opt img#fontSample {
  max-width: 100%;
  height: auto;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  background: #fff;
  padding: 8px;
}

/* ==========================================================================
   QR-Code Generator
   ========================================================================== */
.fn-opt .qrcodegen {
  margin-top: 8px;
  text-align: center;
}

.fn-opt img#gencode {
  display: inline-block;
  margin-top: 6px;
  cursor: pointer;
  border-radius: 4px;
  transition: opacity 0.2s;
}

.fn-opt img#gencode:hover {
  opacity: 0.85;
}

/* ==========================================================================
   Warenkorb-Bereich Anpassungen (innerhalb fn-info)
   ========================================================================== */
.fn-info .fa-addtobasket {
  margin-top: 2px;
  padding: 12px;
  border-radius: 6px;
}

.fn-info .taxandshippinginfo {
  font-size: 0.6875rem;
  color: #888;
  margin-top: 6px;
}

/* ==========================================================================
   Shares
   ========================================================================== */
.fa-shares {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
  font-size: 0.875rem;
}

.fa-shares a {
  color: #6b7280;
  transition: color 0.2s;
}

.fa-shares a:hover {
  color: #6b8e23;
}

/* --- Validierung: Pulse-Animation für fehlende Pflichtfelder --- */
@keyframes fn-pulse-anim {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}

.fn-pulse {
  animation: fn-pulse-anim 0.6s ease 3;
  border-color: #dc2626 !important;
}

/* ==========================================================================
   RESPONSIVE: Mobile
   ========================================================================== */
@media (max-width: 768px) {
  .fn-layout {
    flex-direction: column;
    gap: 14px;
  }

  .fn-preview {
    flex: 0 0 auto;
    max-width: 100%;
    position: static;
  }

  .fn-preview__wrap {
    max-width: 300px;
    margin: 0 auto;
  }

  .fn-info {
    flex: 0 0 auto;
  }

  .fn-info h1 {
    font-size: 1.2rem;
  }

  .fn-config__body {
    padding: 10px 12px;
  }

  .fn-opt--mirror .fn-opt__radios {
    gap: 8px;
  }

  .fn-opt__format-list {
    gap: 6px;
  }

  .fn-opt__format-item {
    padding: 5px 8px;
  }

  .fn-opt__format-item img {
    width: 40px;
  }

  /* Warenkorb-Leiste sticky am unteren Rand */
  .fn-info .fa-addtobasket {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
    border-top: 2px solid #6b8e23;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
    padding: 8px 12px;
    margin: 0;
    border-radius: 0;
  }

  .fn-info .fa-addtobasket__row {
    gap: 8px;
  }

  .fn-info .fa-addtobasket .taxandshippinginfo {
    font-size: 0.625rem;
    margin: 2px 0 0;
  }

  /* Extra-Buttons (PayPal etc.) im sticky ausblenden */
  .fn-info .fa-addtobasket__extra {
    display: none;
  }
}
