/* Klickhome PDP · kompakte Kaufbox und ruhige Farbhierarchie.
 * Blau bleibt der primaere Kaufhandlung vorbehalten, Gruen signalisiert nur
 * Verfuegbarkeit/Gratisversand, Flaechen und Nebeninfos bleiben neutral. */

body #product-offer .dh-pdp-buybox__head {
  margin-bottom: 10px !important;
}

/* Desktop behaelt die vorhandene, kompakte Produktbewertung. Die zusaetzliche
 * Google-Shopbewertung wird nur mobil als sauber getrennte zweite Quelle gezeigt. */
body #product-offer .kh-pdp-rating-cluster {
  display: contents;
}

body #product-offer .kh-pdp-google-rating {
  display: none;
}

/* Identische, anteilig gefuellte Sterne fuer Produkt- und Shopbewertung.
 * Die Zahl bleibt der exakte Wert; die Fuellung bildet ihn ebenfalls ab. */
body[data-page="1"] .kh-exact-stars {
  position: relative;
  display: inline-block;
  flex: 0 0 74px;
  width: 74px;
  height: 14px;
  overflow: hidden;
  vertical-align: middle;
  white-space: nowrap;
}

body[data-page="1"] .kh-exact-stars__base,
body[data-page="1"] .kh-exact-stars__fill {
  display: inline-flex;
  gap: 1px;
  align-items: center;
}

body[data-page="1"] .kh-exact-stars__base {
  color: var(--color-line);
}

body[data-page="1"] .kh-exact-stars__fill {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--kh-rating-fill);
  overflow: hidden;
  color: var(--brand-accent);
}

body[data-page="1"] .kh-exact-stars i {
  flex: 0 0 14px;
  width: 14px;
  font-size: 14px !important;
  line-height: 14px !important;
}

/* Preis-Hierarchie: Der aktuelle Preis ist die einzige starke Preisfarbe.
 * Alter Preis und Ersparnis bleiben lesbar, aber konkurrieren nicht als
 * weitere Vollflaechen mit dem Warenkorbknopf und dem Set-Angebot. */
body #product-offer .dh-pdp-buybox__price-under-title .dh-pdp-price-line--2row {
  gap: 7px !important;
}

body #product-offer .dh-pdp-buybox__price-under-title .dh-pdp-price-row--top {
  gap: 7px !important;
}

body #product-offer .dh-pdp-buybox__price-under-title .dh-pdp-price-row--top .dh-pdp-old-price,
body #product-offer .dh-pdp-buybox__price-under-title .dh-pdp-price-row--top .dh-pdp-old-price--label,
body #product-offer .dh-pdp-buybox__price-under-title .dh-pdp-price-row--top .dh-pdp-old-price--label .dh-pdp-old-price__lbl {
  color: var(--color-text-soft) !important;
  font-size: 13.5px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
}

body #product-offer .dh-pdp-buybox__price-under-title .dh-pdp-price-row--top .dh-pdp-save-pill {
  min-height: 25px !important;
  padding: 0 9px !important;
  border: 1px solid rgba(var(--brand-sale-rgb), .18) !important;
  border-radius: 7px !important;
  background: var(--color-surface-soft) !important;
  color: var(--brand-sale) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

body #product-offer .dh-pdp-buybox__price-under-title .dh-pdp-price-row--bottom .dh-pdp-taxline {
  color: var(--color-text-soft) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

body #product-offer .kh-pdp-shipping-note {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  margin: 8px 0 9px;
  padding: 6px 10px 6px 7px;
  border: 1px solid var(--color-line);
  border-radius: 10px;
  background: var(--color-surface-soft);
  color: var(--color-text-muted);
}

body #product-offer .kh-pdp-shipping-note--free {
  color: var(--brand-success);
}

body #product-offer .kh-pdp-shipping-note__icon {
  display: grid;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--color-surface);
  color: currentColor;
}

body #product-offer .kh-pdp-shipping-note__icon svg {
  width: 16px;
  height: 16px;
}

body #product-offer .kh-pdp-shipping-note__copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 5px;
  line-height: 1.2;
}

body #product-offer .kh-pdp-shipping-note__copy strong {
  color: currentColor;
  font-size: 13px;
  font-weight: 800;
}

body #product-offer .kh-pdp-shipping-note__copy small {
  color: var(--color-text-soft);
  font-size: 12px;
  font-weight: 600;
}

/* Die sichtbare Logistik steht bereits direkt unter dem Preis. Die alte grosse
 * Detailkarte waere dieselbe Aussage ein zweites Mal und verlaengert den Weg zum
 * Kaufknopf. Sie bleibt im DOM als Datenquelle fuer Varianten-Updates. */
body #product-offer .dh-pdp-buybox__section--availability {
  display: none !important;
}

body #product-offer .dh-pdp-price-logistics {
  margin-top: 8px !important;
}

body #product-offer .dh-pdp-inline-logistics {
  display: grid !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid var(--color-line) !important;
  border-radius: 12px !important;
  background: var(--color-surface-soft) !important;
  color: var(--color-text-muted) !important;
}

body #product-offer .dh-pdp-inline-logistics__item {
  gap: 7px !important;
  min-height: 20px;
  font-size: 13px !important;
  line-height: 1.3 !important;
}

body #product-offer .dh-pdp-inline-logistics__item--stock .dh-pdp-stockdot {
  color: var(--brand-success) !important;
}

body #product-offer .dh-pdp-delivery-time {
  color: var(--color-text) !important;
  font-weight: 800 !important;
}

body #product-offer .dh-pdp-inline-logistics__item--dispatch {
  color: var(--color-text-muted) !important;
}

body #product-offer .dh-pdp-inline-logistics__item--delivery i,
body #product-offer .dh-pdp-inline-logistics__item--dispatch i {
  color: var(--color-text-soft) !important;
}

body #product-offer .dh-pdp-inline-logistics__item--dispatch[hidden] {
  display: none !important;
}

body #product-offer .dh-pdp-dispatch-countdown,
body #product-offer .dh-pdp-dispatch-day {
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

body #product-offer .dh-pdp-buybox__section--purchase {
  margin-top: 10px !important;
}

/* Der primaere CTA kommt vor den Kaufgruenden; erst danach folgen Express-Kauf
 * und Zahlarten. #add-to-cart ist bereits eine Flex-Spalte. */
body #product-offer #add-to-cart > .basket-form-inline {
  order: 0 !important;
}

body #product-offer #add-to-cart > .kh-pdp-reasons {
  order: 1 !important;
}

body #product-offer #add-to-cart > .alert.purchase-info {
  order: 1 !important;
}

body #product-offer #add-to-cart > .kh-pdp-express__head {
  order: 2 !important;
  margin-top: 0 !important;
}

body #product-offer #ppc-productDetails-horizontal-container {
  gap: 8px !important;
}

body #product-offer #ppc-productDetails-horizontal-container > .ppc-standalone-buttons {
  height: 52px !important;
}

body #product-offer .rt-pdp-payment-strip {
  margin-top: 12px !important;
  padding-top: 12px !important;
}

/* Ruhiger, produktbezogener Versandvorteil im ersten Galeriebild.
   Pointer-events bleiben aus, damit Bildzoom und Wischgeste weiter am Bild
   ankommen. Das helle Blau ist nur die bestehende Klickhome-Farbrolle. */
body #product-offer .kh-gallery-shipping-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 28px);
  padding: 7px 10px;
  border: 1px solid rgba(var(--brand-primary-rgb, 1, 126, 199), 0.18);
  border-radius: 7px;
  background: rgba(239, 247, 255, 0.96);
  color: var(--brand-primary-hover, #0166a3);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  pointer-events: none;
}

body #product-offer .kh-gallery-shipping-badge svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

@media (min-width: 992px) {
  body #product-offer .product-info-inner.dh-pdp-buybox {
    padding-top: 23px !important;
    padding-bottom: 20px !important;
  }
}

@media (max-width: 767.98px) {
  body #product-offer .dh-pdp-buybox__meta-row {
    margin-bottom: 8px !important;
  }

  body #product-offer .dh-pdp-buybox__sku {
    order: 3 !important;
    margin: 3px 0 8px !important;
  }

  body #product-offer .kh-pdp-rating-cluster {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
  }

  body #product-offer .kh-pdp-rating-cluster .dh-pdp-buybox__rating {
    display: flex !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body #product-offer .kh-pdp-rating-cluster .dh-pdp-buybox__rating > a {
    width: auto;
    flex-wrap: nowrap;
    gap: 5px !important;
    white-space: nowrap;
  }

  body #product-offer .kh-pdp-rating-cluster .dh-pdp-buybox__rating-text {
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
  }

  body #product-offer .kh-pdp-rating-cluster .dh-pdp-buybox__rating-text strong {
    color: var(--color-text);
    font-weight: 850;
  }

  body #product-offer .kh-pdp-google-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    color: var(--color-text-muted);
    text-decoration: none;
    white-space: nowrap;
  }

  body #product-offer .dh-pdp-buybox__meta-row .dh-social-proof--static {
    display: none !important;
  }

  /* Auf der mobilen PDP steht die Bewertung bereits direkt am Artikel. Die
   * Topbar zeigt deshalb dauerhaft den anderen Vertrauenshinweis statt dieselbe
   * Google-Bewertung ein zweites Mal zu rotieren. */
  body[data-page="1"] #header-top-bar .dh-topbar-msg--a,
  body[data-page="1"] #header-top-bar .dh-topbar-msg--c {
    display: none !important;
  }

  body[data-page="1"] #header-top-bar .dh-topbar-msg--b {
    position: static !important;
    left: auto !important;
    top: auto !important;
    display: inline-flex !important;
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }

  body #product-offer .kh-pdp-shipping-note {
    margin-top: 7px;
    margin-bottom: 8px;
  }

  body #product-offer .kh-pdp-shipping-note__copy {
    flex-wrap: wrap;
    row-gap: 1px;
  }

  body #product-offer .dh-pdp-inline-logistics__item {
    font-size: 12.5px !important;
  }

  body #product-offer .dh-pdp-buybox__section--purchase {
    margin-top: 8px !important;
  }

  body #product-offer .kh-gallery-shipping-badge {
    top: 11px;
    left: 11px;
    max-width: calc(100% - 22px);
    padding: 6px 9px;
    font-size: 11.5px;
  }

  body .rt-pdp-mobile-cta__inner {
    display: grid !important;
    grid-template-columns: minmax(96px, auto) minmax(178px, 1fr) !important;
    gap: 12px !important;
    align-items: center !important;
  }

  body .rt-pdp-mobile-cta__price {
    min-width: 0;
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px !important;
    white-space: nowrap;
  }

  body .rt-pdp-mobile-cta__price-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 16px;
    color: #475467;
    font-size: 10.5px;
    line-height: 1;
  }

  body .rt-pdp-mobile-cta__uvp-label {
    color: #667085;
    font-weight: 600;
  }

  body .rt-pdp-mobile-cta__uvp {
    color: #667085;
    font-size: 11px;
    font-weight: 600;
  }

  body .rt-pdp-mobile-cta__now {
    color: #101828;
    font-size: 22px !important;
    font-weight: 800;
    line-height: 1;
  }

  body .rt-pdp-mobile-cta__now--sale {
    color: #c81e1e;
  }

  body .rt-pdp-mobile-cta__badge {
    padding: 3px 6px;
    border-radius: 999px;
    background: #c81e1e;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
  }

  body .rt-pdp-mobile-cta__tax {
    color: #667085;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.1;
  }

  body .rt-pdp-mobile-cta__button {
    width: 100% !important;
    min-width: 0 !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 14px !important;
    gap: 9px;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    white-space: nowrap;
  }

  body .rt-pdp-mobile-cta__cart {
    flex: 0 0 24px;
    width: 24px !important;
    height: 24px !important;
  }

  body .rt-pdp-mobile-cta__button-text {
    display: inline;
  }

}

@media (max-width: 359.98px) {
  body .rt-pdp-mobile-cta__inner {
    grid-template-columns: minmax(88px, auto) minmax(160px, 1fr) !important;
    gap: 9px !important;
  }

  body .rt-pdp-mobile-cta__now {
    font-size: 20px !important;
  }

  body .rt-pdp-mobile-cta__button {
    padding-right: 10px !important;
    padding-left: 10px !important;
    font-size: 14px !important;
  }
}

@media (min-width: 768px) {
  body .rt-pdp-mobile-cta__inner {
    display: grid !important;
    grid-template-columns: minmax(180px, 1fr) minmax(280px, 360px) !important;
  }

  body .rt-pdp-mobile-cta__price {
    display: flex !important;
    align-items: center;
    gap: 10px;
  }

  body .rt-pdp-mobile-cta__price-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  body .rt-pdp-mobile-cta__uvp-label,
  body .rt-pdp-mobile-cta__tax {
    color: #667085;
    font-size: 12px;
    font-weight: 600;
  }

  body .rt-pdp-mobile-cta__button {
    width: 100% !important;
    gap: 10px;
  }

  body .rt-pdp-mobile-cta__button-text {
    display: inline;
  }
}
