/* =====================================================================
   FunnelKit Side Cart – Gratisversand, Gratisgeschenk, Versand-Countdown
   Markup: includes/free-shipping-bar.php ([free_shipping_progress])

   Der Block steht im Side Cart und auf der Kasse (unter dem Logo).
   :is(#fkcart-modal, body) gilt überall, wiegt aber wie eine ID,
   damit Theme- und FunnelKit-Regeln nicht dazwischenfunken.
   ===================================================================== */

:is(#fkcart-modal, body) .gsc {
  --gsc-green: #4b9c18;
  --gsc-green-text: #2e7d32;
  --gsc-green-deep: #1b5e20;
  --gsc-green-bg: #eef7e8;
  --gsc-green-line: #d3eac4;
  --gsc-red: #cb021a;
  --gsc-red-bg: #fdf0f1;
  --gsc-red-line: #f7d2d7;
  --gsc-track: #e6e9ee;
  --gsc-text: #111827;
  --gsc-muted: #6b7280;

  /* Kasse & sonstige Seiten: eigene Karte */
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 20px;
  padding: 12px 16px 14px;
  border: 1px solid #eaeaec;
  border-radius: 12px;
  background: #fff;
  color: var(--gsc-text);
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}

/* Side Cart: flach über die volle Breite */
#fkcart-modal .gsc {
  width: auto;
  margin: 0;
  padding: 6px 16px 12px;
  border: 0;
  border-bottom: 1px solid var(--fkcart-border-color, #eaeaec);
  border-radius: 0;
  background: none;
}

/* Kasse (FunnelKit Checkout): bündig mit den Formularfeldern */
:is(#fkcart-modal, body) .wfacp-template-container .gsc {
  margin-bottom: 8px;
}
@media (max-width: 767px) {
  :is(#fkcart-modal, body) .wfacp-template-container .gsc {
    width: auto;
    margin: 0 16px 8px;
  }
}

/* Kopfzeile: Titel links, Anzahl grau */
#fkcart-modal .fkcart-preview-ui .fkcart-slider-heading .fkcart-title {
  text-align: left;
  font-size: 18px;
  font-weight: 700;
}
#fkcart-modal .fkcart-preview-ui .fkcart-slider-heading .fkcart-title .gsc-count {
  margin-left: 6px;
  color: var(--gsc-muted, #6b7280);
  font-weight: 600;
}

/* Eigene Anzeige ersetzt die FunnelKit-Reward-Leiste (Geschenk-Logik läuft weiter) */
#fkcart-modal .fkcart-reward-product-wrap > .fkcart-reward-panel {
  display: none !important;
}

/* ---------- Balken mit Meilensteinen ---------- */
:is(#fkcart-modal, body) .gsc-track {
  position: relative;
  height: 28px;
  margin-right: 14px; /* Platz für den Kreis am Ende */
  display: flex;
  align-items: center;
}
:is(#fkcart-modal, body) .gsc-bar {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--gsc-track);
  overflow: hidden;
}
:is(#fkcart-modal, body) .gsc-bar__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--gsc-green);
  transition: width .4s ease;
}
:is(#fkcart-modal, body) .gsc-node {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: #9ca3af;
  box-shadow: 0 0 0 3px #fff, inset 0 0 0 1px #dfe3e8;
  transition: background .25s ease, color .25s ease;
}
:is(#fkcart-modal, body) .gsc-node svg {
  width: 15px;
  height: 15px;
}
:is(#fkcart-modal, body) .gsc-node.is-achieved {
  background: var(--gsc-green);
  color: #fff;
  box-shadow: 0 0 0 3px #fff;
}

:is(#fkcart-modal, body) .gsc-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--gsc-muted);
}
:is(#fkcart-modal, body) .gsc-legend span:last-child {
  margin-left: auto;
  text-align: right;
}
:is(#fkcart-modal, body) .gsc-legend .woocommerce-Price-amount {
  font-weight: inherit;
  color: inherit;
}

/* ---------- Hinweiszeilen ---------- */
:is(#fkcart-modal, body) .gsc-notes {
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
:is(#fkcart-modal, body) .gsc-note {
  border-radius: 8px;
  border: 1px solid transparent;
  margin: 0;
  padding: 0;
}
:is(#fkcart-modal, body) .gsc-note,
:is(#fkcart-modal, body) .gsc-note > summary {
  display: flex;
  align-items: center;
  gap: 8px;
}
:is(#fkcart-modal, body) div.gsc-note,
:is(#fkcart-modal, body) .gsc-note > summary {
  padding: 8px 10px;
}
:is(#fkcart-modal, body) details.gsc-note {
  display: block;
}
:is(#fkcart-modal, body) .gsc-note__icon {
  flex: 0 0 auto;
  display: flex;
}
:is(#fkcart-modal, body) .gsc-note__text {
  flex: 1 1 auto;
  min-width: 0;
}
:is(#fkcart-modal, body) .gsc-note strong,
:is(#fkcart-modal, body) .gsc-note .woocommerce-Price-amount {
  font-weight: 700;
}
:is(#fkcart-modal, body) .gsc-note .woocommerce-Price-amount {
  color: inherit;
}

:is(#fkcart-modal, body) .gsc-note--done {
  background: var(--gsc-green-bg);
  border-color: var(--gsc-green-line);
  color: var(--gsc-green-deep);
}
:is(#fkcart-modal, body) .gsc-note--done .gsc-note__icon {
  color: var(--gsc-green-text);
}

:is(#fkcart-modal, body) .gsc-note--open {
  background: var(--gsc-red-bg);
  border-color: var(--gsc-red-line);
  color: var(--gsc-text);
}
:is(#fkcart-modal, body) .gsc-note--open .gsc-note__icon,
:is(#fkcart-modal, body) .gsc-note--open .gsc-hl {
  color: var(--gsc-red);
}
:is(#fkcart-modal, body) .gsc-note__sub {
  color: var(--gsc-muted);
}
:is(#fkcart-modal, body) .gsc-nowrap {
  white-space: nowrap;
}

/* Geschenk aufklappen */
/* style.css setzt summary global grau/fett mit Pfeil-Bild */
:is(#fkcart-modal, body) .gsc-note--toggle > summary {
  cursor: pointer;
  list-style: none;
  list-style-image: none;
  background: transparent;
  font-weight: inherit;
  user-select: none;
}
:is(#fkcart-modal, body) .gsc-note--toggle > summary::-webkit-details-marker {
  display: none;
}
:is(#fkcart-modal, body) .gsc-note--toggle > summary::marker {
  content: "";
}
:is(#fkcart-modal, body) .gsc-note__chevron {
  flex: 0 0 auto;
  display: flex;
  color: var(--gsc-red);
  transition: transform .2s ease;
}
:is(#fkcart-modal, body) .gsc-note--toggle[open] .gsc-note__chevron {
  transform: rotate(90deg);
}
:is(#fkcart-modal, body) .gsc-note--toggle > summary:focus-visible {
  outline: 2px solid var(--gsc-red);
  outline-offset: 2px;
  border-radius: 8px;
}
:is(#fkcart-modal, body) .gsc-gift {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 11px 9px;
  padding: 8px;
  border-radius: 6px;
  background: #fff;
}
:is(#fkcart-modal, body) .gsc-gift__img {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  margin: 0;
}
:is(#fkcart-modal, body) .gsc-gift__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  line-height: 1.35;
}
:is(#fkcart-modal, body) .gsc-gift__text span {
  color: var(--gsc-muted);
}

/* ---------- Versand-Countdown ---------- */
:is(#fkcart-modal, body) .gsc-ship {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 10px;
  min-height: 18px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--gsc-muted);
}
:is(#fkcart-modal, body) .gsc-ship strong {
  color: var(--gsc-text);
  font-weight: 700;
}
:is(#fkcart-modal, body) .gsc-ship__date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--gsc-green-text);
  font-weight: 700;
  white-space: nowrap;
}
:is(#fkcart-modal, body) .gsc-ship__date:empty {
  display: none;
}
:is(#fkcart-modal, body) .gsc-ship__date svg {
  flex: 0 0 auto;
}
:is(#fkcart-modal, body) .gsc-ship--special .gsc-ship__lead {
  color: var(--gsc-text);
}

/* Schmale Side Carts (Handy: 85 % Breite) */
@media (max-width: 480px) {
  :is(#fkcart-modal, body) .gsc {
    font-size: 12px;
  }
  :is(#fkcart-modal, body) div.gsc-note,
  :is(#fkcart-modal, body) .gsc-note > summary {
    padding: 7px 9px;
    gap: 7px;
  }
  :is(#fkcart-modal, body) .gsc-legend {
    font-size: 11px;
  }
  :is(#fkcart-modal, body) .gsc-ship {
    font-size: 11.5px;
    gap: 2px 8px;
  }
}

/* =====================================================================
   Upsell „Häufig zusammen gekauft“ (FunnelKit Upsell Style 1, Karussell)
   Nur CSS, Markup + Karussell-Logik bleiben von FunnelKit.
   ===================================================================== */
body #fkcart-modal .fkcart-preview-ui .fkcart-carousel-wrap.fkcart-upsell-style1 {
  --gsc-cream: #fbf9f4;
  --gsc-cream-line: #ece5d6;
  position: relative;
  background: var(--gsc-cream);
  border-top: 1px solid var(--gsc-cream-line);
  border-bottom: 1px solid var(--gsc-cream-line);
  padding-bottom: 2px;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item-heading.fkcart-upsell-heading {
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
  padding: 16px 96px 10px 16px; /* rechts Platz für die Pfeile */
}

/* Pfeile oben rechts neben der Überschrift */
#fkcart-modal .fkcart-upsell-style1 .fkcart-carousel {
  position: static;
  padding: 0 16px;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart-nav-btn {
  top: 11px;
  transform: none;
  width: 30px;
  height: 30px;
  display: flex;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e2d9c6;
  color: #111827;
  transition: box-shadow .15s ease, color .15s ease;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart-nav-btn svg {
  width: 12px;
  height: 12px;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart-nav-btn--prev {
  left: auto;
  right: 52px;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart-nav-btn--next {
  right: 16px;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart-nav-btn:hover {
  box-shadow: inset 0 0 0 1px var(--fkcart-primary-bg-color, #4b9c18);
  color: var(--fkcart-primary-bg-color, #4b9c18);
}
#fkcart-modal .fkcart-upsell-style1 .fkcart-nav-btn[disabled] {
  opacity: .35;
  cursor: default;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart-carousel__viewport[data-count="1"] ~ .fkcart-nav-btn {
  display: none;
}

/* Produkt als weiße Karte (Karte per ::before, damit die Karussell-Maße bleiben) */
#fkcart-modal .fkcart-upsell-style1 .fkcart-carousel__container {
  margin-left: -12px;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart-carousel .fkcart--item.fkcart-carousel__slide {
  position: relative;
  isolation: isolate;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 12px 12px 24px;
  border: 0;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart-carousel .fkcart--item.fkcart-carousel__slide::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 12px;
  z-index: -1;
  background: #fff;
  border: 1px solid var(--gsc-cream-line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(60, 45, 20, .05);
}
#fkcart-modal .fkcart-item-wrap.fkcart-upsell-style1 .fkcart--item .fkcart-image-wrapper {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  align-self: center;
}
#fkcart-modal .fkcart-item-wrap.fkcart-upsell-style1 .fkcart--item .fkcart-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #efeae0;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .fkcart-item-info {
  flex: 1 1 auto;
  min-width: 0;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .fkcart-item-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #111827;
  text-decoration: none;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .fkcart-item-title:hover {
  color: var(--fkcart-primary-bg-color, #4b9c18);
}

/* „+ Hinzufügen“ */
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .fkcart-add-product-button.fkcart-button {
  margin-top: 8px;
  padding: 6px 12px 6px 10px;
  gap: 4px;
  flex-wrap: nowrap;
  border-radius: 999px;
  background: var(--fkcart-primary-bg-color, #4b9c18);
  color: #fff;
  box-shadow: none;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  transition: background .15s ease;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .fkcart-add-product-button.fkcart-button::before {
  content: "+";
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  margin-top: -1px;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .fkcart-add-product-button.fkcart-button:hover {
  background: #3f8614;
  opacity: 1;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .fkcart-add-product-button.fkcart-button:focus {
  box-shadow: none;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .fkcart-add-product-button.fkcart-button:focus-visible {
  outline: 2px solid var(--fkcart-primary-bg-color, #4b9c18);
  outline-offset: 2px;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .fkcart-button.fkcart-loading:after {
  border-color: transparent transparent #fff #fff;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .fkcart-button.fkcart-loaded:after {
  border-color: #fff;
}

/* Preis rechts */
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .fkcart-item-misc {
  flex: 0 0 auto;
  max-width: 40%;
  align-self: center;
  text-align: right;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .fkcart-item-price {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .fkcart-item-price .woocommerce-Price-amount {
  white-space: nowrap;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .fkcart-item-price del {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: #9ca3af;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .fkcart-item-price ins {
  text-decoration: none;
  color: var(--gollys-red, #e2001a);
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .fkcart-item-price .woocommerce-price-suffix {
  font-size: 11px;
  font-weight: 400;
  color: #6b7280;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .gollys-ground-price {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.3;
  color: #6b7280;
  white-space: nowrap;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart--item .gollys-ground-price .woocommerce-Price-amount {
  font-weight: 400;
  color: inherit;
}

/* Punkte unter der Karte */
#fkcart-modal .fkcart-upsell-style1 .fkcart-carousel-dots {
  min-height: 22px;
  padding-top: 6px;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart-carousel-dot {
  width: auto;
  height: 14px;
  margin: 0 3px;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart-carousel-dot:after {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background-color: #d9d0bc;
  opacity: 1;
  transition: width .2s ease, background-color .2s ease;
}
#fkcart-modal .fkcart-upsell-style1 .fkcart-carousel-dot.is-selected:after {
  width: 16px;
  background-color: var(--fkcart-primary-bg-color, #4b9c18);
}
