/* Base styles and shared components. Mobile first; logical properties so RTL/LTR both work. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--c-cream);
  color: var(--c-brown);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; margin: 0; line-height: 1.3; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--c-maroon); }
a:hover { color: var(--c-brown); }
button, input, select, textarea { font: inherit; color: inherit; }
::placeholder { color: var(--c-placeholder); }
:focus-visible { outline: 3px solid var(--c-saffron); outline-offset: 2px; }
.icon { flex-shrink: 0; vertical-align: middle; }
/* A <span> around an icon would put the icon on the text baseline (room for letter tails under it),
   so it looked too high inside round buttons. Make these wrappers boxes of exactly the icon size. */
.flip-ltr, .dish__add-icon { display: inline-flex; }
[dir="ltr"] .flip-ltr { transform: scaleX(-1); }

[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: var(--content-max); margin-inline: auto; padding-inline: var(--page-pad); }
@media (min-width: 900px) { :root { --page-pad: 32px; } }

main { flex: 1; }

/* ---------------------------------------------------------------- header */
.site-header { background: var(--c-cream); border-bottom: 1px solid var(--c-border); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__logo { width: 52px; height: 52px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 19px; color: var(--c-maroon); }
.brand__sub { font-size: 13px; color: var(--c-brown-light); }
.site-nav { display: none; gap: 28px; font-weight: 700; font-size: 16px; }
.site-nav a { color: var(--c-brown); text-decoration: none; padding-bottom: 4px; }
.site-nav a[aria-current="page"] { color: var(--c-maroon); border-bottom: 2px solid var(--c-saffron); }
.header-actions { display: flex; align-items: center; gap: 8px; }
@media (min-width: 900px) {
  .brand__logo { width: 60px; height: 60px; }
  .brand__name { font-size: 22px; }
  .brand__sub { font-size: 14px; }
  .site-nav { display: flex; }
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap-lg); padding: 0 24px; border-radius: var(--r-pill);
  border: none; font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer;
}
.btn--primary { background: var(--c-maroon); color: var(--c-white); }
.btn--primary:hover { color: var(--c-white); filter: brightness(1.15); }
.btn--secondary { background: var(--c-maroon); color: var(--c-cream); }
.btn--secondary:hover { color: var(--c-cream); }
.btn--outline { background: transparent; color: var(--c-maroon); border: 1.5px solid var(--c-maroon); }
.btn--wa { background: var(--c-whatsapp); color: var(--c-white); }
.btn--wa:hover { color: var(--c-white); filter: brightness(1.05); }
.btn--yellow { background: var(--c-saffron); color: var(--c-brown); }
.btn--yellow:hover { color: var(--c-brown); }
.btn--block { width: 100%; }
.btn--xl { min-height: var(--tap-xl); font-size: 17px; }

.icon-btn {
  width: var(--tap); height: var(--tap); border-radius: var(--r-pill); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--c-input-border); background: var(--c-white); color: var(--c-brown);
  text-decoration: none; cursor: pointer; position: relative;
}
.icon-btn--maroon { background: var(--c-maroon); border-color: var(--c-maroon); color: var(--c-white); }
.icon-btn--maroon:hover { color: var(--c-white); }
.pill-btn {
  height: var(--tap); padding: 0 12px; border-radius: var(--r-pill);
  border: 1px solid var(--c-input-border); background: var(--c-white); color: var(--c-brown);
  font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; text-decoration: none;
}
.badge-count {
  position: absolute; top: -2px; inset-inline-end: -2px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--c-saffron); color: var(--c-brown);
  font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}

/* ------------------------------------------------------------ category chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-block: 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; height: 40px; padding: 0 16px; border-radius: 20px;
  border: 1px solid var(--c-input-border); background: var(--c-white); color: var(--c-brown);
  font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap;
}
.chip[aria-current="true"], .chip[aria-pressed="true"] { background: var(--c-maroon); border-color: var(--c-maroon); color: var(--c-cream); font-weight: 800; }

/* ------------------------------------------------------------------- cards */
.card { background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--r-card); }
.section-title { font-size: 22px; color: var(--c-brown); }

.item-row { display: flex; gap: 12px; align-items: center; padding: 10px; }
.item-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item-row__name { font-weight: 800; font-size: 16px; line-height: 1.35; }
.item-row__opts { font-size: 13px; color: var(--c-brown-light); }
.item-row__media {
  position: relative; flex-shrink: 0; width: 92px; height: 92px; border-radius: 14px;
  background: var(--c-photo-bg); color: var(--c-photo-fg);
  display: flex; align-items: center; justify-content: center; font-size: 11px;
}
.item-row__media img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.item-row__add {
  position: absolute; bottom: -8px; inset-inline-end: -8px;
  width: var(--tap); height: var(--tap); border-radius: var(--r-pill);
  border: 3px solid var(--c-cream); background: var(--c-maroon); color: var(--c-white);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.item-row.is-sold-out { opacity: 0.6; }

.price { font-weight: 800; font-size: 15px; color: var(--c-brown); }
.price__old { color: var(--c-brown-light); font-weight: 700; text-decoration: line-through; margin-inline-start: 6px; font-size: 13px; }

.tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 12px; font-size: 13px; font-weight: 800; }
.tag--pay { background: var(--chip-pay-bg); color: var(--chip-pay-fg); }
.tag--ok { background: var(--chip-ok-bg); color: var(--chip-ok-fg); }
.tag--prep { background: var(--chip-prep-bg); color: var(--chip-prep-fg); }
.tag--out { background: var(--chip-out-bg); color: var(--chip-out-fg); }

.promo-strip {
  padding: 12px 16px; border-radius: 16px; background: var(--c-cream-dark); border: 1px dashed var(--c-promo-border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.promo-strip__title { font-weight: 800; font-size: 16px; color: var(--c-maroon); }
.promo-strip__sub { font-size: 13px; color: var(--c-promo-text); }

/* ------------------------------------------------------------------ inputs */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-weight: 700; font-size: 14px; }
.input {
  height: 48px; padding: 0 14px; border-radius: var(--r-input);
  border: 1px solid var(--c-input-border); background: var(--c-input-bg); font-size: 15px; width: 100%;
}
textarea.input { height: auto; padding: 12px 14px; resize: vertical; }

/* ------------------------------------------------------------------ footer */
.site-footer { margin-top: 32px; padding-block: 24px 28px; background: var(--c-brown); color: var(--c-on-maroon-soft); }
.site-footer__inner { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.site-footer__name { font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--c-cream); }
.site-footer__links { display: flex; gap: 16px; }
.site-footer a { color: var(--c-saffron); }

.whatsapp-float {
  position: fixed; inset-inline-end: 16px; bottom: 24px; z-index: 20;
  width: 56px; height: 56px; border-radius: 28px; background: var(--c-whatsapp); color: var(--c-white);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-float);
}
.whatsapp-float:hover { color: var(--c-white); }
