/* Warenkorb: Schrittleiste und Empfehlungen, siehe js/korb-dazu.js und
   snippets/cs_korb_dazu.tpl. Geladen aus basket/index.tpl. */

/* Dieselbe Leiste wie in der Kasse (.cs-k-steps in css/checkout.css). Die Kasse
   laedt hier nicht, deshalb eigene Klassen. */
.cs-kd-schritte { display: flex; align-items: center; max-width: 760px; margin: 4px 0 16px; color: #6a7b59; font-weight: 600; }
.cs-kd-schritte span { display: flex; align-items: center; gap: 9px; flex: none; min-height: 44px; white-space: nowrap; }
.cs-kd-schritte span.an { color: #2f3e46; }
.cs-kd-schritte i { width: 30px; height: 30px; border-radius: 50%; background: #eef3e3; color: #46591f; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 700; font-size: .9rem; }
.cs-kd-schritte .an i { background: #7a9a4e; color: #fff; }
.cs-kd-schritte u { flex: 1; min-width: 16px; height: 2px; margin: 0 12px; background: #e7ebe0; text-decoration: none; }

.cs-kd { margin: 22px 0 8px; }
.cs-kd-titel.cs-kd-titel { font-size: 1.15rem; font-weight: 700; color: #2f3e46; margin: 0 0 12px; text-transform: none; letter-spacing: 0; text-align: left; }
.cs-kd-titel::after { content: none; }
.cs-kd-gitter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cs-kd:not(.cs-kd--alle) .cs-kd-k:nth-child(n+4) { display: none; }
.cs-kd-k { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: #fff; border: 1px solid #e7ebe0; border-radius: 16px; }
.cs-kd-b { position: relative; flex: none; height: 128px; display: flex; align-items: center; justify-content: center; background: #fff; border-bottom: 1px solid #eef3e3; color: #7a9a4e; }
.cs-kd-b--leer { background: #f3f6ec; }
.cs-kd-b img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cs-kd-c { position: absolute; left: 8px; top: 8px; max-width: calc(100% - 16px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 3px 9px; border-radius: 999px; background: #cbd8a6; color: #34451a; font-size: .75rem; font-weight: 700; }
.cs-kd-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.cs-kd-m { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6a7b59; }
.cs-kd-n { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; font-size: .95rem; line-height: 1.28; color: #2f3e46; text-decoration: none; }
a.cs-kd-n:hover { text-decoration: underline; color: #2f3e46; }
.cs-kd-g { font-size: .87rem; line-height: 1.32; color: #6a7b59; }
.cs-kd-w { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.cs-kd-wk { display: inline-flex; margin: 0; cursor: pointer; }
.cs-kd-wk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cs-kd-wk span { display: inline-flex; align-items: center; min-height: 32px; padding: 3px 11px; border: 1.5px solid #cfd6c6; border-radius: 999px; background: #fff; font-size: .85rem; color: #2f3e46; }
.cs-kd-wk input:checked + span { border-color: #7a9a4e; background: #eef3e3; font-weight: 600; }
.cs-kd-wk input:focus-visible + span { box-shadow: 0 0 0 3px #dbe6bf; }
.cs-kd-sel { width: 100%; min-height: 38px; padding: 4px 8px; border: 1.5px solid #cfd6c6; border-radius: 10px; background: #fff; font: inherit; font-size: .87rem; color: #2f3e46; }
.cs-kd-fehlt .cs-kd-sel, .cs-kd-fehlt .cs-kd-wk span { border-color: #b4532a; }
.cs-kd-u { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.cs-kd-p { font-weight: 800; white-space: nowrap; color: #2f3e46; }
.cs-kd-dazu { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 15px; border: 1.5px solid #7a9a4e; border-radius: 999px; background: #fff; color: #46591f; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.cs-kd-dazu:hover { background: #eef3e3; color: #46591f; }
.cs-kd-dazu[disabled] { opacity: .65; cursor: default; }
.cs-kd-alle { display: block; width: 100%; min-height: 46px; margin-top: 10px; border: 1.5px solid #dbe6bf; border-radius: 12px; background: #fff; color: #46591f; font: inherit; font-weight: 600; cursor: pointer; }
.cs-kd-alle:hover { background: #eef3e3; }

.row.basket .cart-items-body.cs-kd-neu { box-shadow: 0 0 0 2px #7a9a4e; transition: box-shadow 1s ease 3s; }
.cs-kd-toast { position: fixed; left: 50%; bottom: 24px; z-index: 1040; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 12px; background: #2f3e46; color: #fff; font-size: .95rem; font-weight: 600; box-shadow: 0 6px 20px rgba(47, 62, 70, .25); transition: opacity .4s; }
.cs-kd-toast.weg { opacity: 0; }

/* Dieselbe Kauf-Box wie in der Kasse (css/checkout.css). Die Konfiguration ist wie
   dort zugeklappt, das haelt die Empfehlungen in Sichtweite. */
.row.basket .cswc-cfg:not(.is-open) .cswc-cfg-body { display: none !important; }
.row.basket .cswc-cfg .cswc-chev { display: inline-block; }
.row.basket .cswc-cfg-head { cursor: pointer; }
.row.basket .cart-summary > .basket-heading { display: none; }
/* global.css setzt .card-body mit !important auf Grau */
.row.basket .basket-summary { background: #eef3e3; border: 1px solid #dbe6bf; border-radius: 18px; }
.row.basket .basket-summary .card-body { padding: 16px 20px 14px; background-color: #eef3e3 !important; border-radius: 17px; }
.row.basket .basket-summary .row.basket-summary-total { border-top: 0; margin-top: 0; padding-top: 0; }
.row.basket .basket-summary .cs-sum-coupon, .row.basket .basket-summary .cs-sum-coupon .card-header, .row.basket .basket-summary .cs-sum-coupon .card-body { background-color: transparent !important; }
.row.basket .basket-summary .card-body > a.btn-primary { min-height: 56px; border-radius: 999px; text-transform: none; letter-spacing: 0; font-size: 1.03rem; }
.row.basket .basket-summary .card-body > a.btn-primary::after { content: none; }

.row.basket .basket-summary .card-body > .cs-dazu-frei {
  order: 3; background: #fff; border: 1px solid #dbe6bf; border-radius: 10px; padding: 8px 12px; margin-bottom: 10px;
  font-size: .95rem; font-weight: 600; color: #46591f;
}

@media (max-width: 1199.98px) and (min-width: 992px) {
  .cs-kd-gitter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-kd:not(.cs-kd--alle) .cs-kd-k:nth-child(n+3) { display: none; }
}
/* Die feste Leiste steht am Telefon wie in der Kasse immer da, nicht erst wenn die
   Box aus dem Bild rollt (#csw-kassenbar aus js/warenkorb.js). */
@media (max-width: 991.98px) {
  #csw-kassenbar { transform: none; }
  .cs-kd-toast { bottom: 84px; }
  .cs-kd-schritte { display: block; max-width: none; margin-bottom: 12px; }
  .cs-kd-schritte span, .cs-kd-schritte u { display: none; }
  .cs-kd-schritte::before { content: attr(data-stand); display: block; font-size: .87rem; }
  .cs-kd-schritte::after { content: ''; display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: linear-gradient(90deg, #7a9a4e 25%, #eef3e3 0); }
}
@media (max-width: 767.98px) {
  .cs-kd-gitter { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cs-kd:not(.cs-kd--alle) .cs-kd-k:nth-child(n+4) { display: flex; }
  .cs-kd:not(.cs-kd--alle) .cs-kd-k:nth-child(n+5) { display: none; }
  .cs-kd-k { flex-direction: row; align-items: stretch; border-radius: 14px; }
  .cs-kd-b { width: 88px; height: auto; min-height: 104px; border-bottom: 0; border-right: 1px solid #eef3e3; }
  .cs-kd-b img { position: absolute; left: 0; top: 0; }
  .cs-kd-c, .cs-kd-m { display: none; }
  .cs-kd-t { padding: 9px 11px; }
}
