/* =========================================================
   Fonk Geschenkkorb-Konfigurator
   ========================================================= */

/* ── Navigation ─────────────────────────────────────────── */
.fonk-konfig-nav {
  display: inline-block;
}
/* Dunkle Schokolade auf der braunen Leiste, goldener Rand – passt zum Theme,
   hebt sich aber klar ab */
.fonk-konfig-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #3d2b1f;
  color: #f7efe3 !important;
  border: 1px solid #e3c08d;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(61, 43, 31, .35);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.fonk-konfig-nav-link:hover {
  background: #2a1d14;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(61, 43, 31, .45);
}
.fonk-konfig-nav-link i {
  color: #e3c08d;
}
.fonk-konfig-nav-link i {
  font-size: 20px;
}
/* In der braunen Menüleiste: rechts, direkt vor dem Suchfeld */
.header-bottom .fonk-konfig-nav {
  margin-left: auto;
  margin-right: 16px;
}
.header-bottom .fonk-konfig-nav-link {
  padding: 7px 14px;
  font-size: .9rem;
}
@media (max-width: 991px) {
  .header-bottom .fonk-konfig-nav-link span {
    display: none;
  }
}

/* ── Schrittanzeige ─────────────────────────────────────── */
.fonk-steps {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
  border-bottom: 2px solid #e5e5e5;
}
.fonk-steps li {
  flex: 1;
  padding: 12px 8px;
  text-align: center;
  color: #999;
  font-weight: 600;
  font-size: .9rem;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.fonk-steps li.done {
  color: #555;
  cursor: pointer;
}
.fonk-steps li.active {
  color: #7a2e2e;
  border-bottom-color: #7a2e2e;
}
.fonk-steps .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e5e5e5;
  margin-right: 6px;
  font-size: .8rem;
}
.fonk-steps li.active .num {
  background: #7a2e2e;
  color: #fff;
}
.fonk-steps li.done .num {
  background: #9c9c9c;
  color: #fff;
}

/* ── Verpackungs-Auswahl ────────────────────────────────── */
.fonk-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.fonk-package {
  border: 2px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
}
.fonk-package:hover:not(.disabled) {
  border-color: #7a2e2e;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.fonk-package.selected {
  border-color: #7a2e2e;
  box-shadow: 0 0 0 3px rgba(122,46,46,.15);
}
.fonk-package.disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(1);
}
.fonk-package-img {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f7;
}
.fonk-package-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.fonk-package-body {
  padding: 14px;
}
.fonk-package-body h3 {
  font-size: 1rem;
  margin: 0 0 8px;
}
.fonk-slots {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  font-size: .85rem;
  color: #666;
}
.fonk-slots li.alt {
  color: #999;
  font-style: italic;
}
.fonk-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #e8f4e8;
  color: #2d6b2d;
  border-radius: 3px;
  font-size: .75rem;
  font-weight: 600;
}
.fonk-price {
  margin-top: 8px;
  font-weight: 700;
  color: #7a2e2e;
}
.fonk-disabled-hint {
  margin-top: 8px;
  font-size: .8rem;
  color: #c00;
}
.fonk-noimg {
  width: 60px;
  height: 60px;
  background: #ddd;
  border-radius: 4px;
}

/* ── Kapazitätsanzeige ──────────────────────────────────── */
.fonk-capacity {
  background: #f9f9f9;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
  position: sticky;
  top: 10px;
  z-index: 10;
}
.fonk-capacity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.fonk-capacity-row:last-of-type {
  margin-bottom: 0;
}
.fonk-capacity-label {
  min-width: 70px;
  font-weight: 600;
  font-size: .9rem;
}
.fonk-bar {
  flex: 1;
  height: 12px;
  background: #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}
.fonk-bar-fill {
  height: 100%;
  width: 0;
  background: #5a9e5a;
  transition: width .25s ease, background .25s;
}
.fonk-bar-fill.full {
  background: #d08b2c;
}
.fonk-capacity-text {
  min-width: 60px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: .9rem;
  color: #555;
}
.fonk-full-hint {
  margin: 12px 0 0;
  padding: 8px 12px;
  background: #fff4e0;
  border-left: 3px solid #d08b2c;
  font-size: .9rem;
}

.fonk-current-package {
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #f2f2f2;
  border-radius: 4px;
  font-size: .9rem;
}
.fonk-current-package .btn-link {
  padding: 0 4px;
  font-size: .85rem;
}

/* ── Artikel-Auswahl ────────────────────────────────────── */
.fonk-group-title {
  font-size: 1.05rem;
  margin: 24px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e5e5;
}
.fonk-item-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.fonk-item {
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  background: #fff;
  transition: border-color .15s;
}
.fonk-item.has-qty {
  border-color: #7a2e2e;
  background: #fdf8f8;
}
.fonk-item-img {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.fonk-item-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.fonk-item-name {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 4px;
  min-height: 2.4em;
}
.fonk-item-price {
  font-size: .85rem;
  color: #7a2e2e;
  margin-bottom: 10px;
}
.fonk-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.fonk-qty button {
  width: 32px;
  height: 32px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background .12s;
}
.fonk-qty button:hover:not(:disabled) {
  background: #f0f0f0;
}
.fonk-qty button:disabled {
  opacity: .3;
  cursor: not-allowed;
}
.fonk-qty-val {
  min-width: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── Logo-Upload ────────────────────────────────────────── */
.fonk-logo-box {
  border: 2px dashed #ccc;
  border-radius: 6px;
  padding: 24px;
  text-align: center;
  background: #fafafa;
}
.fonk-logo-current {
  margin-top: 14px;
  padding: 10px;
  background: #e8f4e8;
  border-radius: 4px;
  display: inline-block;
}

/* ── Aufdruck-Auswahl ───────────────────────────────────── */
.fonk-print-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.fonk-print-option {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 2px solid #e5e5e5;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  margin: 0;
}
.fonk-print-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fonk-print-option.selected {
  border-color: #7a2e2e;
  background: #fbf6f6;
}
.fonk-print-title {
  font-weight: 700;
}
.fonk-print-desc {
  font-size: .85rem;
  color: #777;
}
.fonk-design-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.fonk-design {
  border: 2px solid #e5e5e5;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  text-align: center;
}
.fonk-design.selected {
  border-color: #7a2e2e;
  box-shadow: 0 0 0 2px rgba(122, 46, 46, .15);
}
.fonk-design-img {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.fonk-design-img img {
  max-width: 100%;
  max-height: 100%;
}
.fonk-design-label {
  padding: 8px;
  border-top: 1px solid #eee;
  font-weight: 600;
  font-size: .9rem;
}

/* ── Zusammenfassung ────────────────────────────────────── */
.fonk-summary-box {
  background: #f9f9f9;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 18px;
  margin-bottom: 24px;
}
.fonk-summary-box h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}
.fonk-summary-logo {
  font-size: .85rem;
  color: #666;
  margin-bottom: 10px;
}
.fonk-summary-items {
  list-style: none;
  padding: 0;
  margin: 0;
}
.fonk-summary-items li {
  padding: 4px 0;
  border-bottom: 1px solid #eee;
  font-size: .92rem;
}
.fonk-summary-items li:last-child {
  border-bottom: none;
}
.fonk-summary-items .qty {
  display: inline-block;
  min-width: 32px;
  font-weight: 700;
  color: #7a2e2e;
}

/* ── Navigation ─────────────────────────────────────────── */
.fonk-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e5e5e5;
}

/* =========================================================
   Warenkorb-Darstellung
   ========================================================= */

.fonk-cart-configs {
  margin: 30px 0;
}
.fonk-cart-configs-title {
  font-size: 1.2rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #7a2e2e;
}
.fonk-cart-config {
  border: 1px solid #ddd;
  border-left: 4px solid #7a2e2e;
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 16px;
  background: #fff;
}
.fonk-cart-config-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.fonk-cart-config-title strong {
  font-size: 1.05rem;
}
.fonk-cart-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: #e8f4e8;
  color: #2d6b2d;
  border-radius: 3px;
  font-size: .75rem;
  font-weight: 600;
}
.fonk-cart-badge-muted {
  background: #eee;
  color: #777;
}
.fonk-cart-config-meta {
  font-size: .9rem;
  color: #555;
}
.fonk-cart-config-items {
  list-style: none;
  padding: 0 0 0 4px;
  margin: 0 0 14px;
  border-left: 2px solid #eee;
}
.fonk-cart-config-items li {
  padding: 5px 0 5px 12px;
  font-size: .9rem;
}
.fonk-cart-item-qty {
  display: inline-block;
  min-width: 30px;
  font-weight: 700;
  color: #7a2e2e;
}
.fonk-cart-item-total {
  color: #999;
  font-size: .82rem;
}
.fonk-cart-config-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}
.fonk-cart-config-qty label {
  display: block;
  font-size: .82rem;
  color: #666;
  margin-bottom: 4px;
}
.fonk-cart-qty-control {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fonk-cart-qty-control button {
  width: 32px;
  height: 32px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.fonk-cart-qty-control button:hover {
  background: #f0f0f0;
}
.fonk-cart-qty-input {
  width: 64px;
  height: 32px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.fonk-cart-config-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fonk-cart-config-remove {
  color: #c00 !important;
}

/* Ausgeblendete Standard-Warenkorbzeilen */
.fonk-hidden-cart-row {
  display: none !important;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 767px) {
  .fonk-steps li span:not(.num) {
    display: none;
  }
  .fonk-capacity {
    position: static;
  }
  .fonk-cart-config-foot {
    flex-direction: column;
    align-items: stretch;
  }
  .fonk-cart-config-actions {
    justify-content: space-between;
  }
}

/* ── Bestellung ohne Kundenkonto ────────────────────────── */
.fonk-cart-guest-checkout {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #fbf6f6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.fonk-cart-guest-checkout p {
  margin: 0;
}
.fonk-checkout-config {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
.fonk-checkout-config:last-of-type {
  border-bottom: none;
}
.fonk-checkout-form h3 {
  margin: 24px 0 12px;
  font-size: 1.1rem;
}
.fonk-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: normal;
  cursor: pointer;
}
.fonk-check input {
  margin-top: 4px;
}
.fonk-delivery-box {
  padding: 4px 16px 8px;
  border-left: 3px solid #c7a17a;
  margin-bottom: 16px;
}
.fonk-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Themenboxen ─────────────────────────────────────────── */
.fonk-own-title {
  margin-top: 36px;
}
.fonk-theme-contents {
  list-style: none;
  padding: 0;
  margin: 6px 0 8px;
  font-size: .82rem;
  color: #666;
}
.fonk-theme-contents li::before {
  content: "· ";
  color: #c7a17a;
  font-weight: 700;
}

/* Flaschenplatz durch Tüten belegt: gestreift statt voll */
.fonk-bar-fill.by-bags {
  background: repeating-linear-gradient(45deg, #c7a17a, #c7a17a 6px, #dcc3a6 6px, #dcc3a6 12px);
}

/* Druckkosten-Hinweis an Aufdruck-Optionen, Kostenzeilen im Warenkorb */
.fonk-print-cost {
  font-size: .8rem;
  font-weight: 600;
  color: #7a2e2e;
}
.fonk-cart-cost {
  color: #777;
  font-size: .9em;
}

.fonk-price-hint {
  font-size: .78rem;
  color: #777;
}

/* Artikel, der nicht in die gewählte Verpackung passt: sichtbar, aber gesperrt */
.fonk-item.is-excluded {
  position: relative;
  background: #f4f1ed;
}
.fonk-item.is-excluded .fonk-item-img,
.fonk-item.is-excluded .fonk-item-name,
.fonk-item.is-excluded .fonk-item-price,
.fonk-item.is-excluded .fonk-qty {
  opacity: .45;
}
.fonk-item.is-excluded .fonk-item-img img {
  filter: grayscale(1);
}
.fonk-excluded-note {
  font-size: .75rem;
  font-weight: 600;
  color: #7a2e2e;
  margin: 4px 0;
}
.fonk-excluded-tip {
  display: none;
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 8px 10px;
  background: #3d2b1f;
  color: #f7efe3;
  border-radius: 6px;
  font-weight: 500;
  font-size: .78rem;
  line-height: 1.3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
  z-index: 2;
}
.fonk-item.is-excluded:hover .fonk-excluded-tip {
  display: block;
}

/* Summen: Schritt 4 und Warenkorb/Angebotsseite */
.fonk-summary-total {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 2px solid #e5e5e5;
}
.fonk-total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  font-size: .92rem;
}
.fonk-total-sum {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid #e5e5e5;
  font-size: 1.05rem;
}
.fonk-total-sum strong,
.fonk-cart-total strong {
  color: #7a2e2e;
}
.fonk-cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 16px;
  padding: 12px 18px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #fff;
  font-size: 1.1rem;
}
