/* Getränkeauswahl und Warenkorb – ohne zusätzliche UI-Abhängigkeiten. */
#products {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#products article {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
#products .pic { flex-shrink: 0; }
#products h3 { font-size: 1rem; overflow-wrap: anywhere; }
#products article > p { font-size: .875rem; line-height: 1.4; }
#products footer {
  display: grid;
  gap: .6rem;
  margin-top: auto;
  padding-top: 1rem;
}
#products footer > strong { font-size: 1.125rem; }
#products .add-to-cart {
  width: 100%;
  height: auto;
  min-height: 48px;
  padding: .625rem .375rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .3rem;
  color: #101722;
  background: var(--gold);
  border: 1px solid #ffd16b;
  border-radius: 11px;
  font-size: .875rem;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 3px 12px #ffb51524;
  touch-action: manipulation;
  transition: background .15s, transform .15s;
}
.add-symbol { font-size: 1.6rem; line-height: 1; font-weight: 800; }
#products .add-to-cart:hover:not(:disabled) { background: #ffcc55; }
#products .add-to-cart:active:not(:disabled) { transform: scale(.97); }
#products .add-to-cart:disabled { background: #263247; color: #b5bfcd; border-color: #364257; box-shadow: none; cursor: not-allowed; }
.add-to-cart:focus-visible,
.cart button:focus-visible,
.mobile-cart-bar button:focus-visible,
.cart-sheet-head button:focus-visible { outline: 3px solid #87c9ff; outline-offset: 3px; }

.cart { min-height: 430px; }
.cart .cart-title h2 { font-size: 1.2rem; }
.cart .cart-title p { font-size: .875rem; }
.cart .cart-title > b { width: 36px; height: 36px; font-size: .875rem; }
.cart .empty { padding: 2rem .5rem; min-height: 150px; }
.cart .empty strong { font-size: 1rem; }
.cart .empty p { font-size: .875rem; max-width: 230px; line-height: 1.45; }
.cart .items { margin-top: .75rem; }
.items > .cart-line {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: .65rem;
  padding: 1rem 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.cart-line .cart-item-image { width: 44px; height: 52px; border-radius: 10px; }
.cart-line-info { min-width: 0; }
.cart-line-info b { display: block; font-size: .9375rem; overflow-wrap: anywhere; line-height: 1.3; }
.cart-line-info small { display: block; font-size: .8125rem; color: var(--muted); margin-top: .3rem; }
.cart-line-total { white-space: nowrap; font-size: .9375rem; }
.cart-line-actions { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem; }
.quantity-stepper { display: flex; align-items: center; border: 1px solid #3b4c65; border-radius: 10px; overflow: hidden; background: #172334; }
.cart-line .quantity-stepper button { width: 44px; height: 44px; border: 0; border-radius: 0; font-size: 1.5rem; background: #1b3049; color: #e6f3ff; cursor: pointer; touch-action: manipulation; }
.quantity-stepper b { min-width: 32px; text-align: center; font-size: 1rem; }
.cart-line .quantity-stepper button:disabled { opacity: .35; cursor: not-allowed; }
.cart-line .remove-cart-item { width: auto; min-height: 44px; height: auto; padding: .5rem; border: 0; background: transparent; color: #ffafb4; font-size: .875rem; cursor: pointer; touch-action: manipulation; }
.cart-line .remove-cart-item:disabled { opacity: .4; cursor: not-allowed; }
.cart-checkout { flex: none; padding-top: .5rem; }
.cart .total { align-items: center; gap: .5rem; }
.cart .total span { font-size: 1rem; }
.cart .total b { font-size: 1.4rem; white-space: nowrap; }
.cart .pay { display: block; width: 100%; min-height: 48px; height: auto; padding: .75rem; font-size: .9375rem; line-height: 1.3; touch-action: manipulation; }
.cart .notice { font-size: .875rem; line-height: 1.4; }
.mobile-cart-bar { display: none; }

.cart-toast {
  position: fixed;
  z-index: 100;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  width: min(420px, calc(100% - 36px));
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem;
  border: 1px solid #418961;
  border-radius: 16px;
  background: #102b22;
  color: #f4fff8;
  box-shadow: 0 12px 36px #0008;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity .18s, transform .18s;
}
.cart-toast.is-visible { opacity: 1; transform: translateY(0); }
.cart-toast-icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; color: #052614; background: #78e6a6; font-weight: 900; font-size: 1.25rem; }
.cart-toast strong { display: block; font-size: 1rem; line-height: 1.35; }
.cart-toast small { display: block; font-size: .875rem; color: #bbe2cf; margin-top: .25rem; overflow-wrap: anywhere; }
.cart-toast[data-tone="warning"] { background: #332817; border-color: #97713d; }
.cart-toast[data-tone="warning"] .cart-toast-icon { background: #ffc65c; color: #302006; }
.cart-toast[data-tone="warning"] small { color: #ffe0a9; }
body.cart-sheet-open { overflow: hidden; }

dialog#mobile-cart-dialog {
  position: fixed;
  inset: auto 0 0;
  margin: 0;
  width: 100%;
  max-width: none;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - max(24px, env(safe-area-inset-top)));
  border-radius: 22px 22px 0 0;
  border: 1px solid #3b4d68;
  border-bottom: 0;
  padding: 0 0 env(safe-area-inset-bottom);
  background: var(--panel);
  overflow: hidden;
}
#mobile-cart-dialog[open] { display: flex; flex-direction: column; }
.cart-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 1rem; flex: none; border-bottom: 1px solid var(--line); }
.cart-sheet-head h2 { font-size: 1.2rem; margin: 0; }
.cart-sheet-head button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid #354963; background: #1a293c; color: #fff; font-size: 1.75rem; cursor: pointer; }
#mobile-cart-content { min-height: 0; display: flex; overflow: hidden; }
#mobile-cart-content > .cart { position: static; top: auto; min-height: 0; min-width: 0; flex: 1; align-self: stretch; border: 0; border-radius: 0; padding: 0 1rem 1rem; max-height: calc(100dvh - 108px - env(safe-area-inset-bottom)); }
#mobile-cart-dialog .cart-title { display: none; }
#mobile-cart-dialog .items,
#mobile-cart-dialog .empty { overflow-y: auto; min-height: 80px; flex: 1 1 auto; overscroll-behavior: contain; }
#mobile-cart-dialog .cart-checkout { border-top: 1px solid var(--line); }
#mobile-cart-dialog .total { border: 0; padding: .75rem 0 .25rem; }

@media (max-width: 720px) {
  #products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #products article { padding: 12px; }
  .content { padding-bottom: calc(190px + env(safe-area-inset-bottom)); }
  .side { height: calc(68px + env(safe-area-inset-bottom)); padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .mobile-cart-bar { position: fixed; z-index: 25; left: 0; right: 0; bottom: calc(68px + env(safe-area-inset-bottom)); display: flex; gap: .75rem; align-items: center; justify-content: space-between; padding: .8rem 1rem; background: #101c2c; border-top: 1px solid #385172; box-shadow: 0 -8px 25px #0005; }
  .mobile-cart-summary { min-width: 0; }
  .mobile-cart-summary span { display: block; color: #b4c6dc; font-size: .875rem; }
  .mobile-cart-summary strong { display: block; font-size: 1.25rem; margin-top: .15rem; }
  .mobile-cart-bar button { min-height: 48px; padding: .65rem .85rem; display: flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid #ffd16b; border-radius: 12px; background: var(--gold); color: #101722; font-size: .875rem; font-weight: 800; cursor: pointer; }
  .mobile-cart-bar button span { font-size: 1.4rem; }
  .cart-toast { top: max(12px, env(safe-area-inset-top)); right: 12px; width: calc(100% - 24px); }
}
@media (max-width: 350px) {
  #products { grid-template-columns: 1fr; }
  .mobile-cart-bar { padding: .6rem; gap: .5rem; }
  .mobile-cart-bar button { max-width: 60%; }
}
@media (max-height: 550px) {
  #mobile-cart-content { display: block; overflow-y: auto; }
  #mobile-cart-content > .cart { max-height: none; }
  #mobile-cart-dialog .items { overflow-y: visible; }
}
@media (prefers-reduced-motion: reduce) {
  #products .add-to-cart, .cart-toast { transition: none; transform: none; }
}
