/* HUNDEWETTER – Warenkorb-Seitenfenster (cart.js) */
html.hwc-lock { overflow: hidden; }

.hwc { position: fixed; inset: 0; z-index: 300; }
.hwc[hidden] { display: none; }
.hwc__dim {
  position: absolute; inset: 0; background: rgba(20, 20, 20, .38);
  opacity: 0; transition: opacity .35s ease;
}
.hwc__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%);
  display: flex; flex-direction: column; background: #fff; color: var(--ink);
  box-shadow: -18px 0 50px rgba(0, 0, 0, .08);
  transform: translate3d(100%, 0, 0); transition: transform .38s cubic-bezier(.2, .8, .2, 1);
  outline: none;
}
.hwc.is-open .hwc__dim { opacity: 1; }
.hwc.is-open .hwc__panel { transform: none; }

.hwc__head {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--hdr, 64px); padding: 0 24px; border-bottom: 1px solid var(--line);
}
.hwc__title { font-size: 17px; font-weight: 500; letter-spacing: -.005em; }
.hwc__n { color: var(--muted); font-weight: 400; }
.hwc__x { width: 44px; height: 44px; margin-right: -12px; border: 0; background: none; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.hwc__x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

/* Fortschritt zum kostenlosen Versand */
.hwc__free { padding: 16px 24px 18px; font-size: 13px; color: rgba(27, 27, 27, .75); border-bottom: 1px solid var(--line); }
.hwc__free b { font-weight: 500; color: var(--ink); }
.hwc__free[hidden] { display: none; }
.hwc__bar { display: block; height: 3px; margin-top: 10px; background: var(--panel); border-radius: 2px; overflow: hidden; }
.hwc__bar i { display: block; height: 100%; background: var(--red); transform-origin: left; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }

.hwc__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }
.hwc__list { list-style: none; margin: 0; padding: 0 24px; }
.hwc__item { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.hwc__img { display: block; aspect-ratio: 4 / 3; background: #fff; border-radius: 2px; overflow: hidden; align-self: start; }
.hwc__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hwc__info { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; font-size: 13px; }
.hwc__name { font-size: 14px; font-weight: 500; color: var(--ink); }
.hwc__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.hwc__kind, .hwc__meta { color: var(--muted); }
.hwc__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: 10px; }
.hwc__qty { display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--line-strong); border-radius: 2px; }
.hwc__qty button { width: 36px; height: 100%; border: 0; background: none; cursor: pointer; font-size: 16px; color: var(--ink); }
.hwc__qty button:disabled { opacity: .3; cursor: default; }
.hwc__qty span { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.hwc__price { font-variant-numeric: tabular-nums; font-size: 14px; }
.hwc__del { margin-top: 8px; padding: 6px 0; border: 0; background: none; cursor: pointer; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.hwc__del:hover { color: var(--ink); }

/* leerer Korb */
.hwc__empty { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 72px 24px; text-align: center; color: var(--muted); }
.hwc__empty svg { width: 40px; height: 40px; fill: none; stroke: rgba(27, 27, 27, .3); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }

/* Summe + Kasse */
.hwc__foot { padding: 18px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.hwc__foot[hidden] { display: none; }
.hwc__sum { margin: 0; font-size: 14px; }
.hwc__sum div { display: flex; justify-content: space-between; padding: 3px 0; }
.hwc__sum dt { color: rgba(27, 27, 27, .7); }
.hwc__sum dd { margin: 0; font-variant-numeric: tabular-nums; }
.hwc__total { margin-top: 6px; padding-top: 10px !important; border-top: 1px solid var(--line); font-size: 16px; font-weight: 500; }
.hwc__total dt { color: var(--ink) !important; }
.hwc__vat { margin: 2px 0 14px; font-size: 11.5px; color: var(--muted); text-align: right; }
.hwc__checkout { width: 100%; height: 50px; }
.hwc__note { margin: 10px 0 0; font-size: 12.5px; color: var(--ink); text-align: center; }
.hwc__note:empty { display: none; }
.hwc__more { display: block; width: 100%; margin-top: 6px; padding: 12px 0; border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.hwc__more:hover { color: var(--ink); }

/* Korb-Symbol hüpft kurz, wenn etwas dazukommt */
.cart.is-bump svg { animation: hwc-bump .5s cubic-bezier(.3, 1.6, .5, 1); }
.cart.is-bump .cart__count { animation: hwc-pop .5s ease; }
@keyframes hwc-bump { 0% { transform: none; } 35% { transform: translateY(-4px) rotate(-8deg); } 70% { transform: translateY(0) rotate(4deg); } 100% { transform: none; } }
@keyframes hwc-pop { 0%, 100% { color: inherit; } 30% { color: var(--red); } }

@media (prefers-reduced-motion: reduce) {
  .hwc__dim, .hwc__panel, .hwc__bar i { transition: none; }
}
