/* =============================================================================
   ALTAY — cart (basket/index.tpl, basket/cart_items.tpl). docs/03 · Warenkorb;
   values from the rendered design Altay A Cart (+ Altay A Mobile M5).
   Prefix al-cart-. JTL hooks keep their own classes (#cart-form, .rz-citem,
   .form-counter, .cart-items-delete-button, #basket-coupon-form …).
   ========================================================================== */

.al-cart-page { padding-top: 22px; }

/* ---- mini stepper: 1 Warenkorb — 2 Kasse — 3 Bestätigung ------------------- */
.al-cart-steps { display: flex; align-items: center; gap: 0; margin-bottom: 28px; font-size: 13px; font-weight: 600; color: var(--muted); }
.al-cart-steps__step.is-current { color: var(--ink); }
.al-cart-steps__line { flex: 0 0 40px; height: 1px; background: var(--line2); margin: 0 12px; }

/* ---- H1 + count ------------------------------------------------------------ */
.al-cart-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 28px; }
.al-cart-head__title {
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -.025em;
  font-size: clamp(48px, 6vw, 84px); line-height: .95;
}
.al-cart-head__n { font-size: 18px; color: var(--muted); }
.al-cart-note:empty, .rz-cart-note:empty { display: none; }

/* ---- two columns: table | side cards ------------------------------------- */
.al-cart-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.al-cart-main { min-width: 0; }
.al-cart-form { margin: 0; }

/* free-shipping card (snippets/al_freeship.tpl, rzClass al-cart-ship) */
.al-cart-ship {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 16px 20px; margin-bottom: 20px;
}
.al-cart-ship .al-ship__txt { font-size: 14px; color: var(--ink); }
.al-cart-ship .al-ship__track { border-radius: 6px; }
.al-cart-ship .al-ship__fill { transition: width .6s var(--ease-out); }

/* table head + rows: item | Menge 130 | Summe 110 */
.al-cart-thead, .al-cart-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px 110px; gap: 24px; }
.al-cart-thead {
  padding: 0 0 10px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; color: var(--muted);
}
.al-cart-thead__sum { text-align: right; }
.al-cart-row {
  padding: 22px 0; border-bottom: 1px solid var(--line); align-items: center;
  transition: opacity .35s, transform .4s;
}
.al-cart-row.is-leaving { opacity: 0; transform: translateX(-30px); }
.al-cart-row__item { display: flex; gap: 18px; min-width: 0; }
:where(.jtlw) .al-cart-row__img, .al-cart-row__img {
  width: 100px; aspect-ratio: 4 / 5; border-radius: 14px; background: var(--hover); flex-shrink: 0; overflow: hidden; display: block; align-self: flex-start;
}
.al-cart-row__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.al-cart-row__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.al-cart-row__brand { font-size: 13px; color: var(--muted); }
:where(.jtlw) .al-cart-row__name, .al-cart-row__name {
  font-family: var(--font-display); font-weight: var(--display-weight); font-size: 22px; line-height: 1.1; color: var(--ink);
}
.al-cart-row__name:hover { color: var(--accent-ink); }
/* every attribute line JTL sends: one run of „a · b · c" that wraps; long texts on their own line */
.al-cart-row__meta { font-size: 14px; color: var(--ink2); }
.al-cart-row__meta li { display: inline; }
.al-cart-row__meta li + li::before { content: ' · '; }
.al-cart-row__meta li.shortdescription, .al-cart-row__meta li.notice { display: block; }
.al-cart-row__meta li.shortdescription::before, .al-cart-row__meta li.notice::before { content: none; }
.al-cart-row__meta strong { font-weight: inherit; }
.al-cart-row__meta--m { display: none; }
.al-cart-row__meta.config-items, .al-cart-row__meta.partlist-items { font-size: 13px; }
.al-cart-row__meta.config-items li, .al-cart-row__meta.partlist-items li { display: block; }
.al-cart-row__meta.config-items li::before, .al-cart-row__meta.partlist-items li::before { content: none; }
.al-cart-row__stock { font-size: 13px; color: var(--success); }
.al-cart-row__stock::before { content: '● '; }
.al-cart-row__acts { display: flex; gap: 16px; margin-top: 6px; }
.al-cart-row__act {
  border: none; background: transparent; padding: 0; font: 500 13px var(--font-body);
  text-decoration: underline; cursor: pointer; color: var(--ink);
}
.al-cart-row__act--rm { color: var(--muted); }
.al-cart-row__act:hover { color: var(--accent-ink); }
.al-cart-row__on { display: none; }
.al-cart-row__act--wish.on-list .al-cart-row__on { display: inline; }
.al-cart-row__act--wish.on-list .al-cart-row__off { display: none; }
.al-cart-row__note { font-size: 13px; color: var(--muted); }

/* quantity pill: − n + (the number is JTL's input anzahl[i]) */
.al-cart-qty {
  display: flex; align-items: center; border: 1px solid var(--line2); border-radius: 999px; height: 42px; width: fit-content;
}
.al-cart-qty__btn {
  width: 40px; border: none; background: transparent; cursor: pointer; font-size: 16px; color: var(--ink); padding: 1px 6px;
}
.al-cart-qty__input {
  width: 22px; min-width: 22px; padding: 0; border: 0; background: transparent; text-align: center;
  font: 400 16px var(--font-body); color: var(--ink); outline: none; -moz-appearance: textfield; appearance: textfield;
}
.al-cart-qty__input::-webkit-inner-spin-button, .al-cart-qty__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.al-cart-qty__fixed { font-size: 14px; color: var(--muted); }

.al-cart-row__sum { text-align: right; }
.al-cart-row__total { font-size: 18px; font-weight: 600; }
.al-cart-row__each { font-size: 12px; color: var(--muted); }

/* rows that are not an article: coupon, surcharge, packaging, shipping … */
.al-cart-row--extra { padding: 14px 0; }
.al-cart-row--extra .al-cart-row__name { font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: normal; }
.al-cart-row--extra .al-cart-row__total { font-size: 15px; }

.al-cart-after { display: flex; justify-content: space-between; margin-top: 20px; }
:where(.jtlw) .al-cart-after__back, .al-cart-after__back { font-weight: 600; color: var(--ink); }
.al-cart-after__clear {
  border: none; background: transparent; font: 500 14px var(--font-body); text-decoration: underline; cursor: pointer; color: var(--muted); padding: 1px 6px;
}
.al-cart-after__clear:hover { color: var(--accent-ink); }

/* ---- side column: three cards, sticky ------------------------------------ */
.al-cart-side { position: sticky; top: 150px; display: flex; flex-direction: column; gap: 14px; }
.al-cart-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px;
  display: flex; flex-direction: column; gap: 12px; margin: 0;
}
.al-cart-card__h { font-size: 15px; font-weight: 700; }

/* shipping estimate */
.al-cart-est .shipping-calculator-main { display: flex; flex-direction: column; gap: 12px; }
.al-cart-est__fields { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.al-cart-est__select, .al-cart-est__zip {
  height: 46px; border-radius: 12px; border: 1px solid var(--line2); background: var(--paper); padding: 0 12px;
  font: 400 14px var(--font-body); color: var(--ink); min-width: 0; width: 100%; outline: none;
}
.al-cart-est__zip::placeholder, .al-cart-coupon__input::placeholder { color: var(--muted); opacity: 1; }
.al-cart-est__select:focus, .al-cart-est__zip:focus, .al-cart-coupon__input:focus { border-color: var(--ink); }
.al-cart-est__list { display: flex; flex-direction: column; gap: 12px; }
.al-cart-est__list:empty { display: none; }
.al-cart-est__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.al-cart-est__eta { color: var(--muted); }
.al-cart-est__caption { font-size: 13px; color: var(--muted); }

/* coupon */
.al-cart-coupon { gap: 10px; }
.al-cart-coupon__form { display: flex; gap: 8px; margin: 0; }
.al-cart-coupon__input {
  flex: 1; min-width: 0; height: 46px; border-radius: 999px; border: 1px solid var(--line2); background: var(--paper);
  padding: 0 16px; font: 400 14px var(--font-body); color: var(--ink); outline: none; text-transform: uppercase;
}
.al-cart-coupon__input::placeholder { text-transform: uppercase; }
.al-cart-coupon__btn {
  height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--ink); background: transparent;
  font: 600 14px var(--font-body); cursor: pointer; color: var(--ink); transition: background .2s, color .2s;
}
.al-cart-coupon__btn:hover { background: var(--ink); color: var(--paper); }
.al-cart-coupon__msg { font-size: 13px; color: var(--accent-ink); min-height: 16px; }
.al-cart-coupon__msg.is-ok { color: var(--success); }
.al-cart-coupon__none { font-size: 14px; color: var(--muted); }

/* totals */
.al-cart-sum { padding: 24px; }
.al-cart-sum__row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.al-cart-sum__row--disc { color: var(--accent-ink); }
.al-cart-sum__go { display: flex; flex-direction: column; gap: 12px; }
.al-cart-sum__total {
  display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 12px;
}
.al-cart-sum__lbl-m { display: none; }
.al-cart-sum__price { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 36px; }
.al-cart-sum__tax { font-size: 12px; color: var(--muted); margin-top: -6px; }
.al-cart-sum__hint { font-size: 13px; color: var(--muted); }
:where(.jtlw) .al-cart-sum__cta, .al-cart-sum__cta {
  height: 58px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; font-size: 16px;
  transition: background .2s;
}
.al-cart-sum__cta:hover { background: var(--ink); color: var(--paper); }
/* express buttons: filled by a payment plugin, hidden until then */
.al-cart-express { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.al-cart-express__btn {
  height: 44px; border-radius: 999px; border: none; background: #111; color: #fff; font: 600 14px var(--font-body); cursor: pointer; padding: 1px 6px;
}
.al-cart-express__btn--paypal { background: #FFC439; color: #003087; font-weight: 700; }

/* ---- „Passt dazu" ----------------------------------------------------------- */
.al-cart-xsell { padding-top: 96px; }
.al-cart-xsell__h {
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -.025em; font-size: 44px; margin: 0 0 24px;
}

/* free gifts (JTL's slider, kept) */
.al-cart-gifts { margin-top: 40px; }
.al-cart-gifts__h { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 30px; margin-bottom: 16px; }

/* ---- empty cart ------------------------------------------------------------- */
.al-cart-empty {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 48px; align-items: center; padding: 20px 0;
}
.al-cart-empty__text { display: flex; flex-direction: column; gap: 16px; }
.al-cart-empty__ic {
  width: 120px; height: 120px; border-radius: 50%; background: var(--hover); display: flex; align-items: center; justify-content: center;
}
.al-cart-empty__h {
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -.025em; font-size: 44px; line-height: 1.05;
}
.al-cart-empty__p { color: var(--ink2); line-height: 1.6; }
.al-cart-empty__btns { display: flex; gap: 10px; flex-wrap: wrap; }
:where(.jtlw) .al-cart-empty__btn, .al-cart-empty__btn {
  height: 52px; padding: 0 24px; border-radius: 999px; border: 1px solid var(--ink); display: flex; align-items: center;
  font-weight: 600; color: var(--ink); transition: background .2s, color .2s;
}
.al-cart-empty__btn:hover { background: var(--ink); color: var(--paper); }
:where(.jtlw) .al-cart-empty__btn--go, .al-cart-empty__btn--go { background: var(--ink); color: var(--paper); border: 0; }
.al-cart-empty__btn--go:hover { background: var(--accent); color: var(--on-accent); }
.al-cart-empty__picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

/* ---- tablet 768–1099: one column, the side cards below in two columns ------- */
@media (max-width: 1099px) {
  .al-cart-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .al-cart-side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
  .al-cart-sum { grid-column: 2; grid-row: 1 / span 2; }
  .al-cart-xsell { padding-top: 72px; }
  .al-cart-xsell .al-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .al-cart-xsell .al-grid--4 > :nth-child(n+4) { display: none; }
  .al-cart-empty { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

/* ---- phone < 768 (M5): no stepper/table head, compact rows, sticky total bar ---- */
@media (max-width: 767px) {
  .al-cart-page { padding-top: 18px; padding-bottom: 150px; }
  .al-cart-page.is-empty { padding-bottom: 0; }
  .al-cart-steps { display: none; }
  .al-cart-head { margin-bottom: 0; }
  .al-cart-head__title { font-size: 40px; line-height: normal; letter-spacing: -.02em; }
  .al-cart-head__n { display: none; }
  .al-cart-grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .al-cart-main { order: 1; }
  .al-cart-side { display: contents; }
  .al-cart-coupon { order: 2; }
  .al-cart-sum { order: 3; }
  .al-cart-est { order: 4; }
  .al-cart-ship { background: none; border: 0; border-radius: 0; padding: 0; margin: 14px 0 0; }
  .al-cart-ship.al-ship { gap: 6px; }
  .al-cart-ship .al-ship__txt { font-size: 13px; }
  .al-cart-ship .al-ship__track { height: 5px; border-radius: 5px; }
  .al-cart-thead { display: none; }
  .al-cart-table { margin-top: 18px; }
  .al-cart-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; grid-template-rows: 1fr auto; gap: 0 12px; padding: 14px 0; align-items: end; }
  .al-cart-row__item { display: contents; }
  :where(.jtlw) .al-cart-row__img, .al-cart-row__img { grid-column: 1; grid-row: 1 / span 2; width: 84px; height: 104px; aspect-ratio: auto; border-radius: 12px; }
  .al-cart-row__info { grid-column: 2 / span 2; grid-row: 1; gap: 3px; align-self: start; }
  .al-cart-row__brand, .al-cart-row__meta, .al-cart-row__stock, .al-cart-row__acts { display: none; }
  .al-cart-row__meta--m { display: block; font-size: 12px; color: var(--muted); order: 2; }
  :where(.jtlw) .al-cart-row__name, .al-cart-row__name { font-family: var(--font-body); font-size: 15px; font-weight: 700; line-height: normal; order: 1; }
  .al-cart-qty { grid-column: 2; grid-row: 2; height: 34px; }
  .al-cart-qty__btn { width: 34px; font-size: 13.3333px; }
  .al-cart-qty__input { width: 16px; min-width: 16px; font-size: 14px; }
  .al-cart-row__sum { grid-column: 3; grid-row: 2; align-self: center; }
  .al-cart-row__total { font-size: 16px; font-weight: 700; }
  .al-cart-row__each { display: none; }
  .al-cart-row--extra { grid-template-rows: auto; }
  .al-cart-row--extra .al-cart-row__info { grid-column: 1 / span 2; }
  .al-cart-row--extra .al-cart-row__sum { grid-row: 1; }
  .al-cart-after { display: none; }
  .al-cart-card { background: none; border: 0; border-radius: 0; padding: 0; }
  .al-cart-coupon { margin: 16px 0 0; gap: 6px; }
  .al-cart-coupon .al-cart-card__h { display: none; }
  .al-cart-coupon__form { gap: 6px; }
  .al-cart-coupon__input { background: transparent; text-transform: none; }
  .al-cart-coupon__input::placeholder { text-transform: none; }
  .al-cart-coupon__btn { padding: 0 16px; }
  .al-cart-coupon__msg:empty { display: none; }
  .al-cart-sum { margin: 0 0 20px; padding: 0; gap: 8px; }
  .al-cart-coupon + .al-cart-sum, .al-cart-sum { margin-top: 16px; }
  .al-cart-sum__row { font-size: 14px; }
  .al-cart-sum__row.shipping-costs > span:first-child { font-size: 0; }
  .al-cart-sum__row.shipping-costs > span:first-child::before { content: 'Versand'; font-size: 14px; }
  .al-cart-sum__go {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 0;
    padding: 12px 16px 26px; border-top: 1px solid var(--line); background: var(--surface);
  }
  .al-cart-sum__total { border-top: 0; padding-top: 0; margin-bottom: 10px; }
  .al-cart-sum__lbl { display: none; }
  .al-cart-sum__lbl-m { display: inline; }
  .al-cart-sum__price { font-size: 28px; }
  .al-cart-sum__tax { display: none; }
  .al-cart-sum__cta { height: 52px; font-size: 15px; }
  .al-cart-express { margin-top: 4px; }
  .al-cart-est { margin-bottom: 20px; gap: 10px; }
  .al-cart-xsell { padding-top: 48px; }
  .al-cart-xsell__h { font-size: 30px; margin-bottom: 16px; letter-spacing: -.02em; }
  .al-cart-xsell .al-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .al-cart-xsell .al-grid--4 > :nth-child(n+4) { display: block; }
  .al-cart-empty__h { font-size: 34px; }
  .al-cart-empty__ic { width: 96px; height: 96px; }
  .al-cart-empty__picks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
  .al-cart-empty__picks > :nth-child(3) { display: none; }
}
