/* ===========================================================
   foodie | Core Styles – Pflichtzeilen & Basisstruktur
   Version: 1.0.1
   =========================================================== */

/* === Pflichtzeilen (Grid + Single) ======================== */
body.foodie-styler-on .product .wc-gzd-additional-info.tax-info,
body.foodie-styler-on .product .wc-gzd-additional-info.shipping-costs-info,
body.foodie-styler-on .product .wc-gzd-additional-info.product-units-wrapper,
body.foodie-styler-on .product .wc-gzd-additional-info.product-units,
body.foodie-styler-on .product .foodie-baseprice-wrap {
  font-size: 14px;
  color: #555;
  line-height: 1.35;
  margin-top: 4px;
  opacity: .9;
}

/* Grundpreis: optisch dezenter */
body.foodie-styler-on .product .foodie-baseprice-wrap {
  font-weight: 400;
  color: #444;
}

/* MwSt.- und Versandinfo */
body.foodie-styler-on .product .wc-gzd-additional-info.tax-info,
body.foodie-styler-on .product .wc-gzd-additional-info.shipping-costs-info {
  font-size: 13px;
  color: #6b6b6b;
}

/* === Mobile Optimierung =================================== */
@media (max-width: 480px) {
  body.foodie-styler-on .product .wc-gzd-additional-info.tax-info,
  body.foodie-styler-on .product .wc-gzd-additional-info.shipping-costs-info,
  body.foodie-styler-on .product .wc-gzd-additional-info.product-units-wrapper,
  body.foodie-styler-on .product .wc-gzd-additional-info.product-units,
  body.foodie-styler-on .product .foodie-baseprice-wrap {
    font-size: 12px;
  }
}

/* === Utilitys ============================================= */

/* Fett-Preis */
strong.foodie-price-strong {
  font-weight: 700;
}

/* MwSt.-Zeile dynamisch aus data-Attribut */
p.price[class*="wooco-price"]::after,
.wd-single-price .price::after,
.elementor-widget-wd_single_product_price .price::after,
.woosb-wrap .woosb-price::after {
  content: attr(data-vat-text);
  display: block;
  margin-top: .4rem;
  font-size: .92rem;
  line-height: 1.3;
  font-weight: 400;
  color: #555;
  opacity: .85;
}

/* Composite-Gesamtsumme ausblenden */
.wooco-summary .wooco-total,
.wooco-summary .wooco_total,
.wooco-summary .total {
  display: none !important;
}

/* Highlight-Zeilen für DELIKAS etc. */
strong.delikas-highlight {
  display: block;
  margin-top: 15px;
  margin-bottom: 10px;
}

/* === generische Helper ==================================== */

/* Badge-Container */
.fh-badges,
.diet-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: center;
  margin-top: .8rem;
}

.fh-badges img,
.diet-badges img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  background: #f9f7f3;
  padding: 6px;
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(0,0,0,0.06);
  transition: transform .2s ease;
}

.fh-badges img:hover,
.diet-badges img:hover {
  transform: scale(1.05);
}

/* Benefit-Liste (grüne Haken) */
.fh-benefits,
.foodie-benefits {
  list-style: none;
  margin: .8rem 0;
  padding: 0;
}

.fh-benefits li,
.foodie-benefits li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: .6rem;
}

.fh-benefits li::before,
.foodie-benefits li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0.1rem;
  background-color: #27ae60;
  color: #fff;
  border-radius: 4px;
  font-size: .8rem;
  width: 1.2rem;
  height: 1.2rem;
  line-height: 1.2rem;
  text-align: center;
}

/* === (4) Nährwertbox (Wolt-Style) – update-sicher, auch in Woodmart-Tabs === */

/* Basiscontainer (greift auch in .wd-accordion-content, .elementor etc.) */
.wd-accordion-content .wolt-nutrition,
.elementor .wolt-nutrition,
.wolt-nutrition {
  background: #121212;
  color: #eee;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 8px 0 14px;
}

/* Überschrift */
.wolt-nutrition h4 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

/* Tabelle */
.wolt-nutrition-table {
  width: 100%;
  border-collapse: collapse;
}

.wolt-nutrition-table tr {
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.wolt-nutrition-table tr:last-child {
  border-bottom: none;
}

.wolt-nutrition,
.wolt-nutrition * {
  color: #eee;
}

/* Spaltenausrichtung */
.wolt-nutrition-table th {
  text-align: left;
  opacity: .9;
  font-weight: 400;
}

.wolt-nutrition-table td {
  text-align: right;
  font-weight: 600;
  color: #fff;
}

/* Unterzeilen (z. B. „davon Zucker“) */
.wolt-nutrition-table tr.nv-subrow th {
  padding-left: 18px;
  font-weight: 400;
  opacity: .9;
  text-transform: none;
}

/* Light-Theme Override (Frontend-Standard) */
body:not(.dark-mode) .wolt-nutrition,
body:not(.dark-mode) .wd-accordion-content .wolt-nutrition,
body:not(.dark-mode) .elementor .wolt-nutrition {
  background: #f6f6f6;
  color: #222;
}

body:not(.dark-mode) .wolt-nutrition-table tr {
  border-bottom: 1px solid rgba(0,0,0,.08);
}

body:not(.dark-mode) .wolt-nutrition,
body:not(.dark-mode) .wolt-nutrition * {
  color: #222;
}

/* === (4a) Responsive Optimierungen für Wolt-Nährwertbox === */

@media (max-width: 768px) {

  /* Box: weniger Padding */
  .wolt-nutrition {
    padding: 12px 14px;
    margin: 6px 0 12px;
  }

  /* Überschrift kompakter */
  .wolt-nutrition h4 {
    font-size: 15px;
    margin-bottom: 8px;
  }

  /* Tabelle: schmalere Zeilenhöhe */
  .wolt-nutrition-table th,
  .wolt-nutrition-table td {
    font-size: 14px;
    padding: 4px 0;
  }

  /* Unterzeilen (davon Zucker etc.) leicht eingerückt */
  .wolt-nutrition-table tr.nv-subrow th {
    padding-left: 12px;
  }
}

@media (max-width: 480px) {

  /* noch enger auf sehr kleinen Screens */
  .wolt-nutrition {
    padding: 10px 12px;
  }

  .wolt-nutrition h4 {
    font-size: 14px;
  }

  .wolt-nutrition-table th,
  .wolt-nutrition-table td {
    font-size: 13px;
    line-height: 1.3;
  }

  /* Bodytext etwas dunkler für Kontrast im Light-Mode */
  body:not(.dark-mode) .wolt-nutrition,
  body:not(.dark-mode) .wolt-nutrition * {
    color: #111;
  }
}

/* ===== (4b) Food-Law / Meta-Informationen (gleiche Box-Optik) ===== */
.food-law,
.wd-accordion-content .food-law,
.elementor .food-law {
  background: #f6f6f6;
  color: #222;
  border-radius: 12px;
  padding: 16px 18px;
}

.food-law.meta-table dt {
  font-weight: 600;
  margin: 0;
  padding: 8px 0 2px;
  border-top: 1px solid rgba(0,0,0,.06);
}

.food-law.meta-table dt:first-of-type {
  border-top: none;
  padding-top: 0;
}

.food-law.meta-table dd {
  margin: 0 0 8px;
}
/* === (4c) Responsive Optimierungen für Food-Law / Zusatzstoffboxen === */

@media (max-width: 768px) {

  /* Box: kompakter, gleichmäßig mit Nährwertbox */
  .food-law {
    padding: 12px 14px;
    margin: 6px 0 12px;
    border-radius: 10px;
  }

  .food-law.meta-table dt {
    font-size: 14px;
    padding: 6px 0 2px;
  }

  .food-law.meta-table dd {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 6px;
  }
}

@media (max-width: 480px) {

  /* Noch schmalere Screens */
  .food-law {
    padding: 10px 12px;
    border-radius: 8px;
  }

  .food-law.meta-table dt {
    font-size: 13px;
  }

  .food-law.meta-table dd {
    font-size: 12.5px;
    line-height: 1.3;
  }

  /* etwas dunklerer Textkontrast im Light Mode */
  body:not(.dark-mode) .food-law,
  body:not(.dark-mode) .food-law * {
    color: #111;
  }
}

/* 5) Badges & Nutri-Score */
.woocommerce .diet-row{ display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.woocommerce .diet-badges{ display: flex; flex-wrap: wrap; gap: 8px; }
.woocommerce .diet-badge{
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1;
  display: inline-block;
}
/* Badge Tiefgekühlt */
.woocommerce .diet-badge.badge--tiefgekuehlt {
  border-color: #00aaff;
  color: #00aaff;
}

.woocommerce .nutriscore-badge{
  margin-left: auto;
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.woocommerce .nutriscore-badge strong{ font-size: 15px; }

.nutriscore-badge.ns-A{ background: #2ecc71; }
.nutriscore-badge.ns-B{ background: #8bc34a; }
.nutriscore-badge.ns-C{ background: #ffc107; color: #222; }
.nutriscore-badge.ns-D{ background: #ff9800; }
.nutriscore-badge.ns-E{ background: #f44336; }

.woocommerce .nutriscore-badge {
  box-shadow: 0 2px 4px rgba(0,0,0,.12);
  text-transform: uppercase;
  min-width: 2.2rem;
  justify-content: center;
}

/* ===========================================================
   Core Layout für Brand-Boxen (fp-brandbox, fp-brandbox-inner)
   =========================================================== */
.fp-brandbox {
  background: #f9f9f3;
  border: 1px solid rgba(0,0,0,.05);
  padding: 18px 20px;
  border-radius: 8px;
  margin: 32px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.03);

  /* sanftes Erscheinen beim Scrollen */
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.fp-brandbox.visible {
  opacity: 1;
  transform: translateY(0);
}

.fp-brandbox h3 {
  font-size: 18px;
  margin-bottom: 14px;
  color: var(--accent, #4f936c);
  font-weight: 600;
}

/* Logo über Text, Blocksatz als Standard */
.fp-brandbox-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  text-align: justify;
}
.fp-brandbox-inner img {
  max-width: 140px;
  height: auto;
  flex-shrink: 0;
  margin-bottom: 8px;
}
.fp-brandbox-inner p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text, #333);
}

/* Mobile Anpassung */
@media (max-width:640px){
  .fp-brandbox-inner {
    align-items: center;
    text-align: center;
  }
  .fp-brandbox-inner p {
    text-align: justify;
  }
}

/* Pflancy Fix – Logo + Text Blockdarstellung */
.fp-brandbox-inner {
  display: block;
  text-align: justify;
  align-items: flex-start;
}

.fp-brandbox-inner img {
  display: block;
  margin: 0 auto 10px;
  max-width: 140px;
  height: auto;
}

.fp-brandbox-inner p {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* --- Fix: Brandboxen sichtbar machen (alle Marken) --- */
.fp-brandbox,
.fp-brandbox-inner {
  opacity: 1 !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
}

/* Inneres Layout: Logo oben, Text darunter */
.fp-brandbox-inner {
  display: block;
  text-align: justify;
  align-items: flex-start;
  gap: 10px;
}

.fp-brandbox-inner img {
  display: block;
  margin: 0 auto 10px;
  max-width: 140px;
  height: auto;
}

.fp-brandbox-inner p,
.fp-brandbox-inner strong,
.fp-brandbox-inner a {
  display: inline;
  color: inherit;
  line-height: 1.5;
}

/* --- Badges nebeneinander ausrichten --- */
.fs-badges,
.fh-badges,
.foodie-badges {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}

.fs-badges img,
.fh-badges img,
.foodie-badges img {
  max-width: 80px;
  height: auto;
  display: inline-block;
}

/* Badges nebeneinander, wenn sie jeweils alleine in einem <p> stehen */
.woocommerce .woocommerce-product-details__short-description p:has(> img:only-child) {
  display: inline-block;
  margin: 0 10px 8px 0;
  vertical-align: middle;
}

.woocommerce .woocommerce-product-details__short-description p:has(> img:only-child) img {
  display: block;
  max-width: 86px; /* gern anpassen */
  height: auto;
}

/* Optional: falls du irgendwo schon Container-Klassen nutzt */
.fs-badges, .fh-badges, .foodie-badges, .fp-badges {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.fs-badges img, .fh-badges img, .foodie-badges img, .fp-badges img {
  max-width: 86px;
  height: auto;
}

/* Dynamisches Logo-Layout nach Höhe / Seitenverhältnis */
.fp-brandbox-inner {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.fp-brandbox-inner img {
  height: auto;
  max-width: 140px;
  flex-shrink: 0;
}

/* Wenn das Logo klein oder hochkant ist → auf Blocklayout umschalten */
@container (max-width: 500px), (aspect-ratio < 1) {
  .fp-brandbox-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .fp-brandbox-inner img {
    margin-bottom: 10px;
  }
}

/* =======================================================
   🧩 AUTO BRAND BOX LAYOUT (global für alle Marken)
   ======================================================= */

.fp-brandbox {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 0 0 22px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  transition: box-shadow .2s ease-in-out, transform .2s ease-in-out;
}

.fp-brandbox:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transform: translateY(-1px);
}

/* Innerer Container */
.fp-brandbox-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
  line-height: 1.5;
  text-align: left;
}

/* Logo */
.fp-brandbox-inner img {
  display: block;
  width: auto;
  max-width: 140px;
  height: auto;
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: contain;
}

/* Text */
.fp-brandbox-inner p {
  flex: 1 1 260px;
  margin: 0;
  color: #222;
  font-size: 15px;
}

/* Headline innerhalb der Box */
.fp-brandbox h3 {
  font-family: "Sora", sans-serif;
  font-size: 17px;
  margin: 0 0 8px;
  font-weight: 600;
  color: var(--wd-primary-color, #1d4d4f);
}

/* ============================================
   🌈 BRAND COLOR OVERRIDES (per data-brand)
   ============================================ */

/* Pflancy */
.fp-brandbox[data-brand="pflancy"] {
  border-color: #1d4d4f;
  background: #f8faf9;
}
.fp-brandbox[data-brand="pflancy"] h3 {
  color: #1d4d4f;
}

/* Huegli */
.fp-brandbox[data-brand="huegli"] {
  border-color: #a7453b;
  background: #fdf7f6;
}
.fp-brandbox[data-brand="huegli"] h3 {
  color: #a7453b;
}

/* Smuwi */
.fp-brandbox[data-brand="smuwi"] {
  border-color: #b2329c;
  background: #fcf6fb;
}
.fp-brandbox[data-brand="smuwi"] h3 {
  color: #b2329c;
}

/* Hafa */
.fp-brandbox[data-brand="hafa"] {
  border-color: #bd392a;
  background: #fff8f7;
}
.fp-brandbox[data-brand="hafa"] h3 {
  color: #bd392a;
}

/* It UP */
.fp-brandbox[data-brand="it-up"] {
  border-color: #e8c23b;
  background: #fffcee;
}
.fp-brandbox[data-brand="it-up"] h3 {
  color: #a6881a;
}

/* Default */
.fp-brandbox[data-brand="foodie"],
.fp-brandbox[data-brand="default"] {
  border-color: #c2c2c2;
  background: #fafafa;
}

/* ============================================
   📱 RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .fp-brandbox-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .fp-brandbox-inner img {
    max-width: 120px;
  }
  .fp-brandbox-inner p {
    flex: 1 1 100%;
  }
}

