/* Public website / online store. Builds on base.css tokens; logical properties keep RTL (Arabic) and LTR correct. */

body.store { display: flex; flex-direction: column; min-height: 100vh; }
body.store main { flex: 1; outline: none; }
.skip-link { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: var(--radius); z-index: 100; }
.skip-link:focus { top: 8px; }
.mt { margin-top: var(--s4); }
.center { justify-content: center; }
.grow { flex: 1; min-width: 0; }
.nowrap { flex-wrap: nowrap; }
.ok-text { color: var(--ok); }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inline-form { display: inline-block; margin-inline-start: var(--s2); }
.label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: var(--s1); }
.btn.is-disabled { opacity: .5; pointer-events: none; }
.btn[aria-busy="true"] { cursor: progress; }

/* ---------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: var(--s4); min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: var(--s2); color: var(--ink); font-weight: 800; font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 1.1rem; }
.main-nav ul { display: flex; gap: var(--s1); list-style: none; margin: 0; padding: 0; }
.main-nav a, .mobile-nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--s3); border-radius: var(--radius); color: var(--ink-2); font-weight: 600; }
.main-nav a:hover, .mobile-nav a:hover { background: var(--surface-2); text-decoration: none; }
.main-nav a[aria-current="page"], .mobile-nav a[aria-current="page"] { color: var(--brand-ink, var(--brand)); background: var(--brand-soft); }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--s2); }
.icon-link, .lang-switch { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 var(--s2); color: var(--ink-2); font-weight: 600; border-radius: var(--radius); }
.icon-link:hover, .lang-switch:hover { background: var(--surface-2); text-decoration: none; }
.cart-link { position: relative; min-height: var(--tap); }
.cart-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--brand-strong); font-size: .8rem; font-weight: 800; }
.cart-count.is-empty { opacity: .7; }
.mobile-nav { display: none; gap: var(--s1); overflow-x: auto; padding-bottom: var(--s2); scrollbar-width: none; }
.mobile-nav::-webkit-scrollbar { display: none; }
.closed-strip { background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: .9rem; padding: var(--s2) 0; }
.closed-strip a { color: inherit; text-decoration: underline; }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .mobile-nav { display: flex; }
  .mobile-nav a { white-space: nowrap; min-height: 38px; }
  .hide-sm { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .header-inner { gap: var(--s2); }
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-actions { flex: none; gap: 2px; }
  .cart-link { padding: 0 var(--s3); }
}
@media (max-width: 380px) { .brand-name { display: none; } }

/* ---------------------------------------------------------------- hero / sections */
.hero { background: radial-gradient(1200px 400px at 80% -10%, var(--brand-soft), transparent), linear-gradient(180deg, var(--surface), var(--bg)); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s6); align-items: center; padding-block: var(--s7); }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: var(--s3); }
.hero .lead { font-size: 1.1rem; color: var(--ink-2); max-width: 52ch; margin-bottom: var(--s5); }
.hero-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; background: var(--surface); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; }
.hero-note { margin-top: var(--s3); }
.hero-art { display: grid; place-items: center; aspect-ratio: 1; max-width: 340px; justify-self: center; width: 100%; border-radius: 50%; background: var(--brand-soft); font-size: clamp(5rem, 14vw, 9rem); }
@media (max-width: 760px) { .hero-inner { grid-template-columns: 1fr; padding-block: var(--s6); } .hero-art { display: none; } }

.section { padding-block: var(--s6); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.section-head h2 { margin: 0; }
.page { padding-block: var(--s5) var(--s7); }
.page.narrow, .container.narrow { max-width: 860px; }
.page-head { margin-bottom: var(--s5); }
.page-head h1 { margin-bottom: var(--s2); }
.breadcrumbs { margin-bottom: var(--s4); color: var(--muted); }
.cta-band { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; justify-content: space-between; background: var(--ink); color: var(--bg);
  border-radius: var(--radius-lg); padding: var(--s6); }
.cta-band p { color: color-mix(in srgb, var(--bg) 80%, transparent); margin: 0; }

.cat-chips { display: flex; gap: var(--s2); list-style: none; padding: 0; margin: 0 0 var(--s4); overflow-x: auto; scrollbar-width: thin; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s4); border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink); font-weight: 600; white-space: nowrap; }
.chip:hover { border-color: var(--brand-ink, var(--brand)); text-decoration: none; }
.chip.active { background: var(--brand); border-color: var(--brand-ink, var(--brand)); color: #fff; }
.sticky-chips { position: sticky; top: 64px; z-index: 5; background: var(--bg); padding-block: var(--s2); }
@media (max-width: 860px) { .sticky-chips { top: 108px; } }

/* ---------------------------------------------------------------- product cards */
.product-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
@media (max-width: 520px) { .product-grid { grid-template-columns: 1fr 1fr; gap: var(--s3); } }
.product-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.product-card.is-unavailable { opacity: .65; }
.product-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--surface-2); }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-ph { display: grid; place-items: center; width: 100%; height: 100%; font-size: 2.6rem; font-weight: 800; color: var(--brand-ink, var(--brand)); background: var(--brand-soft); }
.product-ph.big { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); font-size: 5rem; }
.ribbon { position: absolute; top: 10px; inset-inline-start: 10px; }
.product-body { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3) var(--s4) var(--s4); flex: 1; }
.product-name { font-size: 1rem; margin: 0; }
.product-name a { color: var(--ink); }
.product-desc { margin: 0; }
.product-foot { margin-top: auto; padding-top: var(--s2); display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.price { font-weight: 800; color: var(--ink); }
.price .from { font-weight: 500; color: var(--muted); font-size: .8rem; }
.pulse { animation: pulse .6s; }
@keyframes pulse { 50% { transform: scale(1.08); } }

.menu-filters { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-bottom: var(--s3); }
.menu-filters .field { margin: 0; }
.menu-filters .grow { flex: 1 1 240px; }
.menu-section { margin-top: var(--s6); scroll-margin-top: 130px; }

/* ---------------------------------------------------------------- product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); align-items: start; }
.product-gallery img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 860px) { .product-detail { grid-template-columns: 1fr; gap: var(--s4); } }
.opt-group { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3) var(--s4); margin: 0 0 var(--s4); }
.opt-group legend { font-weight: 700; padding: 0 var(--s1); display: flex; align-items: center; gap: var(--s2); }
.opt-group.has-error { border-color: var(--bad); }
.opt { display: flex; align-items: center; gap: var(--s3); min-height: var(--tap); padding: 0 var(--s2); margin: 0; border-radius: var(--radius); font-weight: 500; cursor: pointer; }
.opt:hover { background: var(--surface-2); }
.opt input { width: 20px; height: 20px; accent-color: var(--brand-ink, var(--brand)); flex: none; }
.opt-name { flex: 1; }
.opt-price { color: var(--ink-2); font-weight: 600; }
.opt.is-disabled { opacity: .5; cursor: not-allowed; }
.allergens { background: var(--warn-soft); color: var(--warn); padding: var(--s2) var(--s3); border-radius: var(--radius); }
.add-bar { display: flex; gap: var(--s3); align-items: center; position: sticky; bottom: 0; background: var(--surface); padding-block: var(--s3); border-top: 1px solid var(--line); margin-top: var(--s4); }
.qty-stepper { display: inline-flex; align-items: center; gap: 4px; }
.qty-stepper input { width: 56px; text-align: center; min-height: var(--tap); }
.qty-stepper .btn { min-width: var(--tap); min-height: var(--tap); padding: 0; font-size: 1.2rem; }
.qty-stepper .btn.sm { min-width: 34px; min-height: 34px; }
.qty-stepper .num { min-width: 2ch; text-align: center; font-weight: 700; }

/* ---------------------------------------------------------------- offers */
.offer-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.offer-card { position: relative; background: var(--surface); border: 2px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); border-radius: var(--radius-lg); padding: var(--s5); }
.offer-value { font-size: 1.6rem; font-weight: 800; color: var(--brand-ink, var(--brand)); }
.offer-name { margin: var(--s1) 0 var(--s2); }
.offer-terms { margin: 0 0 var(--s3); padding-inline-start: 1.1em; }
.offer-code { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.offer-code code { background: var(--brand-soft); color: var(--brand-strong); padding: 4px 10px; border-radius: 6px; font-weight: 800; letter-spacing: .05em; direction: ltr; }

/* ---------------------------------------------------------------- state pages (404, empty cart, closed, unavailable) */
.state-page { max-width: 560px; margin: var(--s6) auto; text-align: center; }
.state-icon { font-size: 3rem; margin-bottom: var(--s2); }
.state-code { font-size: 3rem; font-weight: 800; color: var(--brand-ink, var(--brand)); margin: 0; }
.state-hours { display: flex; justify-content: center; margin-bottom: var(--s4); }

/* ---------------------------------------------------------------- locations / hours / content */
.hours-table { border-collapse: collapse; font-size: .92rem; min-width: 240px; }
.hours-table th, .hours-table td { padding: 4px var(--s3) 4px 0; text-align: start; border-bottom: 1px solid var(--line); }
.hours-table th { font-weight: 600; color: var(--ink-2); padding-inline-end: var(--s4); }
.location-card h2 { margin: 0; }
.prose { max-width: 70ch; }
.prose p { line-height: 1.75; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: var(--s2); }
.faq summary { cursor: pointer; padding: var(--s3) var(--s4); font-weight: 700; min-height: var(--tap); }
.faq details p { padding: 0 var(--s4) var(--s3); margin: 0; }
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: var(--s5); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- cart */
.cart-layout, .checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s5); align-items: start; }
@media (max-width: 960px) { .cart-layout, .checkout-layout { grid-template-columns: 1fr; } }
.summary { position: sticky; top: 84px; }
@media (max-width: 960px) { .summary { position: static; } }
.cart-lines { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s3); }
.cart-line { display: grid; grid-template-columns: 1fr auto auto auto; gap: var(--s3); align-items: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--s3) var(--s4); }
.cart-line.has-error { border-color: var(--bad); background: var(--bad-soft); }
.cl-name { font-weight: 700; margin: 0; }
.cl-name a { color: var(--ink); }
.cl-mods { list-style: none; margin: 2px 0 0; padding: 0; }
.cl-total { font-weight: 800; min-width: 90px; text-align: end; }
@media (max-width: 560px) {
  .cart-line { grid-template-columns: 1fr auto; }
  .cl-main { grid-column: 1 / -1; }
  .cl-remove { grid-column: 2; grid-row: 1; }
}
.totals { margin: 0 0 var(--s4); }
.totals > div { display: flex; justify-content: space-between; gap: var(--s3); padding: 6px 0; }
.totals dt { color: var(--ink-2); }
.totals dd { margin: 0; font-weight: 600; }
.totals .total { border-top: 1px solid var(--line); margin-top: var(--s2); padding-top: var(--s3); font-size: 1.15rem; }
.totals .total dt, .totals .total dd { font-weight: 800; color: var(--ink); }
.mini-lines { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.mini-lines li { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px dashed var(--line); }
.mini-lines li.has-error { color: var(--bad); }

/* ---------------------------------------------------------------- checkout */
.step { margin: 0 0 var(--s4); border: 1px solid var(--line); }
.step[hidden] { display: none; }
.step-title { font-weight: 800; font-size: 1.1rem; display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s1); }
.step-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .9rem; }
.seg { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }
.seg-opt { position: relative; margin: 0; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg-opt span { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--s4); border: 1px solid var(--line-2); border-radius: 999px; font-weight: 600; background: var(--surface); }
.seg-opt input:checked + span { background: var(--brand); border-color: var(--brand-ink, var(--brand)); color: #fff; }
.seg-opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.seg-opt input:disabled + span { opacity: .45; }
.address-list { display: grid; gap: var(--s2); margin-bottom: var(--s3); }
.address-opt { border: 1px solid var(--line); padding: var(--s2) var(--s3); align-items: flex-start; }
.address-opt input { margin-top: 3px; }
.map-box { margin: var(--s2) 0 var(--s3); }
.map { height: 320px; border-radius: var(--radius-lg); border: 1px solid var(--line); margin-top: var(--s3); z-index: 0; }
.zone-chip { padding: var(--s2) var(--s3); border-radius: var(--radius); font-size: .9rem; }
.zone-chip.ok { background: var(--ok-soft); color: var(--ok); }
.zone-chip.warn { background: var(--warn-soft); color: var(--warn); }
.pay-methods { display: grid; gap: var(--s2); }
.pay-opt { border: 1px solid var(--line); padding: var(--s2) var(--s3); }
.pay-opt:has(input:checked), .address-opt:has(input:checked) { border-color: var(--brand-ink, var(--brand)); background: var(--brand-soft); }
.checkout-summary .btn.primary { margin-top: var(--s2); }

/* ---------------------------------------------------------------- tracking */
.track-head h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
.eta { font-size: 1.1rem; font-weight: 700; color: var(--brand-ink, var(--brand)); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; display: flex; align-items: center; gap: var(--s3); padding: var(--s2) 0; color: var(--muted); }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 8px; top: 50%; height: 100%; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); flex: none; }
.timeline li.done { color: var(--ink-2); }
.timeline li.done .tl-dot { background: var(--ok); border-color: var(--ok); }
.timeline li.done::before { background: var(--ok); }
.timeline li.current { color: var(--ink); font-weight: 800; }
.timeline li.current .tl-dot { border-color: var(--brand-ink, var(--brand)); background: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.tl-time { margin-inline-start: auto; }
.page > .card, .page.narrow > .card, .page > section.card { margin-bottom: var(--s4); }
.placed { font-size: 1rem; }

/* ---------------------------------------------------------------- account / auth */
.auth-page { display: grid; place-items: start center; }
.auth-card { width: min(460px, 100%); }
.address-card summary { cursor: pointer; list-style: none; }
.address-card summary::-webkit-details-marker { display: none; }
.address-card[open] summary { margin-bottom: var(--s3); }
@media (max-width: 640px) {
  .orders-table thead { display: none; }
  .orders-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px var(--s3); padding: var(--s3); border-bottom: 1px solid var(--line); }
  .orders-table td { border: 0; padding: 2px 0; }
  .orders-table td.actions { grid-column: 1 / -1; text-align: start; }
  .orders-table td.right { text-align: start; }
}
.test-pay h1 { margin-top: var(--s2); }

/* ---------------------------------------------------------------- footer */
.site-footer { margin-top: var(--s7); background: var(--surface); border-top: 1px solid var(--line); padding-top: var(--s6); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s5); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.footer-brand { margin-bottom: var(--s2); }
.footer-h { font-size: .95rem; margin-bottom: var(--s2); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-flex; min-height: 36px; align-items: center; color: var(--ink-2); }
.footer-bottom { padding-block: var(--s4); border-top: 1px solid var(--line); margin-top: var(--s5); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print { .site-header, .site-footer, .closed-strip { display: none !important; } }
[hidden] { display: none !important; }

/* Track by phone: each open order with its steps */
.track-results { display: grid; gap: 12px; margin-top: 16px; }
.track-mini .mini-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 10px 0; }
.track-mini .mini-steps li { padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(127, 127, 127, .35); font-size: .85rem; opacity: .75; }
.track-mini .mini-steps li.done { background: #04395C; border-color: #04395C; color: #fff; opacity: 1; }
.track-mini .mini-steps li.current { background: #BF040B; border-color: #BF040B; color: #fff; font-weight: 700; opacity: 1; }
