/* ============================================================
   MONT LIBAN BREITENRAIN – Bestell-Shop
   Ergänzt styles.css. Nur für bestellen.html und die
   Sprachfassungen in /en/ /fr/ /it/ /ar/.
   ============================================================ */

/* Hoehe der fixierten Kopfleiste und der Zustandsleiste. shop.js misst die
   echten Werte beim Laden nach und schreibt sie hier hinein – die Angaben
   unten sind nur der Startwert, damit vor dem ersten Messen nichts springt.
   Alles, was klebt, richtet sich danach; sonst rutscht es unter den Kopf. */
:root{ --ml-hdr:94px; --ml-state:48px; --ml-cat:63px; }

.shop-page { padding: calc(var(--ml-hdr) + 10px) 0 120px; }

/* ── Zustandsleiste (offen / geschlossen) ── */
.shop-state{
  position:sticky; top:var(--ml-hdr); z-index:900;
  display:flex; align-items:center; justify-content:center; gap:14px;
  padding:12px 20px; font-size:.82rem; letter-spacing:.08em;
  background:var(--emerald-2); color:var(--cream); text-align:center;
  border-bottom:1px solid var(--emerald-line);
}
.shop-state .dot{width:8px;height:8px;border-radius:50%;background:#6fcf97;flex:none;box-shadow:0 0 0 4px rgba(111,207,151,.18)}
.shop-state.closed{background:#4a1f1f;color:#f6dede}
.shop-state.closed .dot{background:#e07a7a;box-shadow:0 0 0 4px rgba(224,122,122,.18)}
.shop-state b{color:var(--gold-l);font-weight:500}

/* ── Grundraster ── */
.shop-grid{
  max-width:var(--maxw); margin:0 auto; padding:44px 34px 0;
  display:grid; grid-template-columns:1fr 366px; gap:44px; align-items:start;
}
/* Rasterkinder duerfen nie breiter werden als ihre Spalte. Ohne diese Zeile
   setzt min-width:auto die Spalte auf die Breite des breitesten Inhalts —
   die Kategorienleiste (rund 2000 px) wuerde die Seite aufspannen und
   Preis, Mengensteuerung und Warenkorb aus dem Fenster schieben. */
.shop-grid > *{ min-width:0; }
/* In der Bestaetigungsansicht ist der Warenkorb ausgeblendet. Ohne diese
   Zeile bleibt seine 366-px-Spalte als Leerraum stehen und der Inhalt sitzt
   205 px links neben der Seitenmitte. */
.shop-grid.solo{ grid-template-columns:1fr; }

/* styles.css gibt jedem <section> bis zu 130 px Innenabstand – gedacht fuer
   die grossen Seitenabschnitte. Im Shop sind aber auch die drei Ansichten
   und JEDE Kategorie ein <section>; ohne diese Zeile klaffen ueberall
   riesige Luecken. Die Abstaende im Shop macht .msec selbst. */
.shop-page section{ padding:0; }
@media(max-width:1040px){ .shop-grid{grid-template-columns:1fr; padding:30px 20px 0} }

/* ── Seitentitel ── */
.shop-title{
  font-size:clamp(1.75rem, 5.5vw, 2.4rem); color:var(--emerald); margin-bottom:8px;
  text-wrap:balance;
}
.shop-sub{color:var(--ink-soft); max-width:620px; margin-bottom:6px}
@media(max-width:560px){ .shop-sub{font-size:.92rem} }

/* ── Kategorienleiste ── */
.cat-bar{
  position:sticky; top:calc(var(--ml-hdr) + var(--ml-state)); z-index:800;
  display:flex; gap:8px; overflow-x:auto; padding:12px 0 14px;
  background:linear-gradient(var(--ivory) 72%, rgba(247,242,232,0));
  -ms-overflow-style:none; scrollbar-width:none;
  scroll-behavior:smooth;   /* animiert das Mitfuehren des aktiven Kaertchens */
}
@media(prefers-reduced-motion:reduce){ .cat-bar{scroll-behavior:auto} }
.cat-bar::-webkit-scrollbar{display:none}
.cat-bar button{
  flex:none; padding:9px 18px; font-size:.74rem; letter-spacing:.14em; text-transform:uppercase;
  border:1px solid rgba(13,59,44,.18); border-radius:100px; color:var(--emerald);
  background:#fff; transition:all .3s var(--ease); white-space:nowrap;
}
.cat-bar button:hover{border-color:var(--gold); color:var(--gold-d)}
.cat-bar button.on{background:var(--emerald); color:var(--ivory); border-color:var(--emerald)}

/* ── Kategorie-Abschnitt ── */
.msec{margin:0 0 28px; scroll-margin-top:calc(var(--ml-hdr) + var(--ml-state) + var(--ml-cat) + 14px)}
.msec-head{display:flex; align-items:center; gap:16px; margin-bottom:2px}
.msec-head h2{font-size:1.7rem; color:var(--emerald); white-space:nowrap}
.msec-head .line{flex:1; height:1px; background:var(--emerald-line)}
.msec-head .note{
  font-size:.66rem; letter-spacing:.2em; text-transform:uppercase; color:var(--gold-d);
  border:1px solid var(--emerald-line); padding:4px 10px; border-radius:100px; white-space:nowrap;
}
.msec-sub{color:var(--ink-soft); font-size:.9rem; margin-bottom:20px}
/* Auf schmalen Schirmen darf die Kategoriezeile umbrechen. Sonst schieben
   die Ueberschrift und der Hinweis "Alkohol · ab 18 Jahren" (beide nowrap)
   die Seite ueber den Rand hinaus. */
@media(max-width:560px){
  .msec-head{flex-wrap:wrap; gap:8px}
  .msec-head h2{white-space:normal; font-size:1.4rem}
  .msec-head .line{display:none}
  .msec{margin-bottom:22px}
}

/* ── Artikelzeile ── */
.mi{
  display:grid; grid-template-columns:1fr auto auto; gap:18px; align-items:center;
  padding:13px 0; border-bottom:1px solid rgba(13,59,44,.09);
}
.mi-info{min-width:0}
.mi-name{font-size:1.02rem; color:var(--ink); display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.mi-name b{font-weight:500}
.mi-tag{
  font-size:.6rem; letter-spacing:.14em; text-transform:uppercase; color:var(--gold-d);
  border:1px solid rgba(198,161,91,.5); padding:2px 7px; border-radius:100px; line-height:1.6;
}
.mi-desc{font-size:.86rem; color:var(--ink-soft); margin-top:4px; line-height:1.55}
.mi-price{font-size:1rem; color:var(--emerald); white-space:nowrap; font-variant-numeric:tabular-nums}
.mi.out{opacity:.45}
.mi.out .mi-price{text-decoration:line-through}
.mi-out-lbl{
  font-size:.62rem; letter-spacing:.14em; text-transform:uppercase; color:#a33;
  border:1px solid rgba(170,51,51,.4); padding:3px 9px; border-radius:100px;
}

/* Mengensteuerung */
.qty{display:flex; align-items:center; gap:2px; border:1px solid rgba(13,59,44,.18); border-radius:100px; background:#fff}
.qty button{
  width:36px; height:36px; display:flex; align-items:center; justify-content:center;
  color:var(--emerald); font-size:1.1rem; border-radius:50%; transition:background .25s;
}
.qty button:hover{background:var(--sand)}
.qty button:disabled{opacity:.3; cursor:not-allowed}
.qty .n{min-width:26px; text-align:center; font-size:.95rem; font-variant-numeric:tabular-nums}
.qty.zero .n, .qty.zero .minus{display:none}
.qty.zero{border-color:var(--emerald); background:var(--emerald)}
.qty.zero button{color:var(--ivory)}
.qty.zero button:hover{background:var(--emerald-3)}

/* ── Warenkorb ── */
.cart{
  position:sticky; top:calc(var(--ml-hdr) + var(--ml-state) + 18px); background:#fff; border:1px solid var(--emerald-line);
  border-radius:var(--radius); box-shadow:0 18px 50px rgba(13,59,44,.07);
}
.cart-head{
  padding:20px 22px 16px; border-bottom:1px solid rgba(13,59,44,.1);
  display:flex; align-items:baseline; justify-content:space-between; gap:10px;
}
.cart-head h3{font-size:1.25rem; color:var(--emerald)}
.cart-head .c{font-size:.74rem; letter-spacing:.16em; text-transform:uppercase; color:var(--gold-d)}
.cart-body{max-height:min(46vh,420px); overflow-y:auto; padding:6px 22px}
.cart-empty{padding:32px 22px; text-align:center; color:var(--ink-soft); font-size:.9rem}
.cl{display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:start; padding:13px 0; border-bottom:1px solid rgba(13,59,44,.07)}
.cl:last-child{border-bottom:0}
.cl .q{color:var(--gold-d); font-size:.9rem; font-variant-numeric:tabular-nums}
.cl .n{font-size:.92rem; line-height:1.45}
.cl .n small{display:block; color:var(--ink-soft); font-size:.78rem}
.cl .p{font-size:.92rem; white-space:nowrap; font-variant-numeric:tabular-nums}
.cl .x{color:#b46; font-size:.95rem; line-height:1; padding:2px 4px; opacity:.6}
.cl .x:hover{opacity:1}
.cart-foot{padding:18px 22px 22px; border-top:1px solid rgba(13,59,44,.1); background:var(--ivory)}
.sumrow{display:flex; justify-content:space-between; font-size:.9rem; color:var(--ink-soft); padding:3px 0}
.sumrow.total{font-size:1.22rem; color:var(--emerald); padding-top:12px; margin-top:8px; border-top:1px solid rgba(13,59,44,.12)}
.sumrow.total b{font-weight:500}
.cart .btn{width:100%; justify-content:center; margin-top:16px}
.cart-hint{font-size:.78rem; color:var(--ink-soft); text-align:center; margin-top:10px; line-height:1.5}

/* Mobiler Warenkorb */
.cart-fab{
  display:none; position:fixed; left:16px; right:16px; bottom:16px; z-index:950;
  background:var(--emerald); color:var(--ivory); border-radius:100px;
  padding:15px 24px; align-items:center; justify-content:space-between; gap:14px;
  box-shadow:0 16px 40px rgba(13,59,44,.35); font-size:.9rem;
}
.cart-fab .lbl{letter-spacing:.14em; text-transform:uppercase; font-size:.72rem; color:var(--gold-l)}
.cart-fab b{font-weight:500}
/* Rechts bleibt Platz fuer den Reservieren-Knopf des Widgets. Der ist
   fix positioniert (rechts 20 px, 80 px breit, z-index 99998) und wuerde
   sonst den Betrag im Warenkorb-Balken verdecken. */
.cart-fab{ right:112px; }
@media(max-width:1040px){
  .cart{position:fixed; inset:auto 0 0 0; top:auto; max-height:88vh; border-radius:14px 14px 0 0;
        transform:translateY(101%); transition:transform .4s var(--ease); z-index:960; border-bottom:0}
  .cart.open{transform:translateY(0)}
  .cart-body{max-height:44vh}
  .cart-fab{display:flex}
  .cart-close{display:block !important}
  .shop-page{padding-bottom:90px}
}
.cart-close{display:none; position:absolute; top:14px; inset-inline-end:16px; font-size:1.4rem; color:var(--ink-soft); line-height:1}
.cart-backdrop{position:fixed; inset:0; background:rgba(10,47,35,.5); opacity:0; visibility:hidden; transition:.35s; z-index:955}
.cart-backdrop.on{opacity:1; visibility:visible}

/* ── Kasse ── */
.steps{display:flex; gap:0; margin-bottom:32px; border-bottom:1px solid rgba(13,59,44,.12)}
.steps div{
  flex:1; padding:0 6px 14px; font-size:.7rem; letter-spacing:.14em; text-transform:uppercase;
  color:var(--ink-soft); border-bottom:2px solid transparent; margin-bottom:-1px; text-align:center;
}
.steps div.on{color:var(--emerald); border-bottom-color:var(--gold)}
.steps div.done{color:var(--gold-d)}

.co h2{font-size:1.7rem; color:var(--emerald); margin-bottom:8px}
.co .lead{color:var(--ink-soft); margin-bottom:26px}
.fgrid{display:grid; grid-template-columns:1fr 1fr; gap:18px}
@media(max-width:640px){ .fgrid{grid-template-columns:1fr} }
.f{display:flex; flex-direction:column; gap:7px}
.f.wide{grid-column:1/-1}
.f label{font-size:.7rem; letter-spacing:.16em; text-transform:uppercase; color:var(--gold-d)}
.f input, .f textarea, .f select{
  width:100%; background:#fff; border:1px solid rgba(13,59,44,.2); padding:14px 16px;
  font-family:inherit; font-size:.98rem; color:var(--ink); border-radius:var(--radius); transition:border .3s;
}
.f input:focus, .f textarea:focus, .f select:focus{outline:none; border-color:var(--gold)}
.f textarea{resize:vertical; min-height:96px}
.f.err input, .f.err select{border-color:#c25; background:#fff8f8}
.f .msg{font-size:.78rem; color:#c25; display:none}
.f.err .msg{display:block}

.choice{display:grid; gap:12px; margin-bottom:8px}
.choice label{
  display:flex; align-items:flex-start; gap:14px; padding:16px 18px; cursor:pointer;
  border:1px solid rgba(13,59,44,.18); border-radius:var(--radius); background:#fff; transition:all .3s var(--ease);
}
.choice label:hover{border-color:var(--gold)}
.choice input{margin-top:3px; accent-color:var(--emerald); flex:none}
.choice label.on{border-color:var(--emerald); background:var(--cream); box-shadow:inset 0 0 0 1px var(--emerald)}
.choice .t{font-size:1rem; color:var(--ink)}
.choice .d{font-size:.84rem; color:var(--ink-soft); margin-top:3px; line-height:1.5}
.choice label.off{opacity:.45; pointer-events:none}

.co-actions{display:flex; gap:14px; margin-top:30px; flex-wrap:wrap}
.co-actions .btn{flex:1; justify-content:center; min-width:180px}
.back-link{display:inline-flex; align-items:center; gap:8px; color:var(--ink-soft); font-size:.82rem; margin-bottom:22px}
.back-link:hover{color:var(--gold-d)}

.pay-box{border:1px solid rgba(13,59,44,.18); border-radius:var(--radius); padding:20px; background:#fff; margin-top:6px; min-height:80px}
.pay-note{font-size:.82rem; color:var(--ink-soft); margin-top:14px; line-height:1.6}

.err-box{
  display:none; padding:14px 18px; background:#fff2f2; border:1px solid #e2b8b8; color:#8a2b2b;
  border-radius:var(--radius); font-size:.9rem; margin-bottom:20px; line-height:1.6;
}
.err-box.on{display:block}

/* ── Bestätigung ── */
.done{text-align:center; padding:40px 0 20px; max-width:560px; margin:0 auto}
.done .tick{
  width:72px; height:72px; margin:0 auto 24px; border-radius:50%; background:var(--emerald);
  display:flex; align-items:center; justify-content:center;
}
.done .tick svg{width:32px; height:32px; fill:none; stroke:var(--gold-l); stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round}
.done h2{font-size:2rem; color:var(--emerald); margin-bottom:10px}
.done .onr{
  display:inline-block; margin:18px 0 6px; padding:12px 26px; background:var(--emerald); color:var(--gold-l);
  font-size:1.35rem; letter-spacing:.12em; border-radius:var(--radius);
}
.done p{color:var(--ink-soft); line-height:1.75}
.done .card{background:#fff; border:1px solid var(--emerald-line); padding:24px; margin:26px 0; text-align:start}
.done .card .sumrow{padding:5px 0}

/* ── Beilagen-Dialog ── */
.mdl{position:fixed; inset:0; z-index:1200; display:none; align-items:center; justify-content:center; padding:20px}
.mdl.on{display:flex}
.mdl-bg{position:absolute; inset:0; background:rgba(10,47,35,.6); backdrop-filter:blur(3px)}
.mdl-box{position:relative; background:var(--ivory); border:1px solid var(--gold); max-width:420px; width:100%; padding:32px; border-radius:var(--radius)}
.mdl-box h3{font-size:1.4rem; color:var(--emerald); margin-bottom:6px}
.mdl-box p{font-size:.88rem; color:var(--ink-soft); margin-bottom:20px}
.mdl-box .choice{margin-bottom:22px}

/* ── Skelett beim Laden ── */
.sk{height:64px; background:linear-gradient(90deg,rgba(13,59,44,.05),rgba(13,59,44,.1),rgba(13,59,44,.05));
    background-size:200% 100%; animation:skg 1.4s linear infinite; margin-bottom:12px; border-radius:var(--radius)}
@keyframes skg{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* ── Arabisch ── */
[dir="rtl"] .cl{grid-template-columns:auto 1fr auto}
[dir="rtl"] .cat-bar{direction:rtl}
[dir="rtl"] .done .card{text-align:right}

/* ============================================================
   HANDY — steht bewusst am Dateiende, damit diese Regeln die
   Grundregeln weiter oben ueberschreiben. Weiter oben platziert
   wuerden sie von .mi wieder ausgehebelt (gleiche Spezifitaet,
   spaeter im Dokument gewinnt).
   ============================================================ */
@media(max-width:560px){
  /* Preis und Mengenknoepfe unter den Namen statt daneben.
     Nebeneinander bleiben dem Gerichtsnamen auf einem 390-px-Schirm
     nur 199 px, und die Beschreibung bricht auf drei Zeilen um. */
  .mi{grid-template-columns:1fr auto; gap:6px 12px; padding:14px 0}
  .mi-info{grid-column:1 / -1}
  .mi-price{justify-self:start; align-self:center; font-size:1.05rem}
  .qty{justify-self:end}
  .mi.out > div:last-child:empty{display:none}
}

/* Platzhalter, solange Stripe das Bezahlfeld aufbaut. Ohne ihn schaut
   der Gast einige Sekunden auf eine leere Flaeche und weiss nicht, ob
   etwas passiert. */
.pay-loading{
  display:flex; align-items:center; gap:12px;
  color:var(--ink-soft); font-size:.9rem; padding:6px 0;
}
.pay-loading .sp{
  width:18px; height:18px; flex:none; border-radius:50%;
  border:2px solid rgba(13,59,44,.18); border-top-color:var(--gold);
  animation:paySpin .8s linear infinite;
}
@keyframes paySpin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){ .pay-loading .sp{animation-duration:2.4s} }

/* Wartekreis in der Rueckmeldung nach einer Weiterleitung (TWINT usw.) */
.done .tick .sp{
  width:26px; height:26px; border-radius:50%;
  border:2px solid rgba(198,161,91,.3); border-top-color:var(--gold);
  animation:paySpin .8s linear infinite;
}
