:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-soft: #f0f2f8;
  --text: #1d2433;
  --muted: #6a7488;
  --accent: #ff7a18;
  --accent-dark: #e96608;
  --ring: rgba(255, 122, 24, 0.25);
  --border: #e4e8f1;
  --shadow: 0 12px 30px rgba(20, 30, 55, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, #fff2e8 0, transparent 35%), var(--bg);
}

.app-shell { width: min(1200px, 100% - 2rem); margin: 1rem auto 2rem; }

.header {
  position: sticky;
  top: 0.5rem;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-wrap { display: flex; align-items: center; gap: 0.75rem; }
.brand-dot { width: 2.2rem; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(130deg, var(--accent), #ffb26b); }
.brand-title { margin: 0; font-size: 1.1rem; }
.brand-subtitle { margin: 0; color: var(--muted); font-size: 0.85rem; }

.header-actions { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 0.2rem; background: var(--surface); }
.lang-btn { border: none; background: transparent; border-radius: 999px; padding: 0.35rem 0.65rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.lang-btn.active { background: var(--accent); color: #fff; }

.main-nav { display: flex; gap: 0.5rem; }
.nav-link { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0.55rem 0.9rem; border-radius: 999px; cursor: pointer; transition: 0.2s; font-weight: 600; }
.nav-link.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.cart-badge { margin-left: 0.3rem; font-size: 0.8rem; }

.screen { display: none; margin-top: 1.2rem; }
.screen.active { display: block; }

.hero, .section-head, .menu-item, .cart-item, .checkout-panel, .empty-state { background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; box-shadow: var(--shadow); }
.hero { padding: 2rem; }
.pill { display: inline-block; margin: 0; padding: 0.3rem 0.7rem; border-radius: 999px; background: #fff3e8; color: #c45500; font-weight: 600; }
.hero h2 { margin: 0.8rem 0; font-size: clamp(1.4rem, 3vw, 2.2rem); }
.hero p { color: var(--muted); max-width: 65ch; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.8rem; margin: 1.2rem 0; }
.info-card { padding: 0.9rem; background: var(--surface-soft); border-radius: 0.8rem; }
.info-card h3, .info-card p { margin: 0; }
.info-card h3 { margin-bottom: 0.2rem; }

.section-head { padding: 1rem 1.2rem; margin-bottom: 0.8rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0.35rem 0 0; color: var(--muted); }

.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.9rem; }

.menu-item { overflow: hidden; display: flex; flex-direction: column; }
.menu-item img { width: 100%; height: 150px; object-fit: cover; }
.menu-body { padding: 0.9rem; display: flex; flex-direction: column; flex: 1; }
.menu-top { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; }
.menu-top h3 { margin: 0; font-size: 1.05rem; }
.price { color: #2f425f; font-weight: 700; white-space: nowrap; }
.menu-body p { color: var(--muted); margin: 0.45rem 0 0.8rem; min-height: 3.2rem; }

.add-btn,
.checkout-btn,
.glovo-btn {
  border: none;
  border-radius: 0.8rem;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 1.03rem;
  line-height: 1;
  cursor: pointer;
  transition: 0.2s;
  min-height: 46px;
}

.add-btn,
.checkout-btn,
.glovo-btn { width: 100%; padding: 0.75rem 1rem; }

.add-btn,
.menu-qty-controls { margin-top: auto; }

.glovo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-decoration: none;
  margin-top: 0.7rem;
}

.glovo-icon { width: 1.3rem; height: 1.3rem; border-radius: 0.4rem; display: inline-flex; align-items: center; justify-content: center; background: #f7c34b; color: #00a082; font-weight: 800; font-size: 0.8rem; }
.add-btn:hover, .checkout-btn:hover, .glovo-btn:hover { background: var(--accent-dark); transform: translateY(-1px); }

.menu-qty-controls { display: flex; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.38rem; border: 1px solid var(--border); border-radius: 0.8rem; background: var(--surface-soft); }

.small-btn { border: 1px solid var(--border); background: #fff; border-radius: 0.5rem; cursor: pointer; width: 2rem; height: 2rem; font-size: 1rem; }
.small-btn.remove { color: #b00020; }
.qty { min-width: 1.5rem; text-align: center; font-weight: 700; }

.cart-layout { display: grid; grid-template-columns: 1.35fr 1fr; gap: 0.9rem; }
.cart-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.cart-item { padding: 0.8rem; display: grid; grid-template-columns: 72px 1fr auto; gap: 0.8rem; align-items: center; }
.cart-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 0.8rem; }
.cart-main h4 { margin: 0; }
.cart-main p { margin: 0.3rem 0 0; color: var(--muted); }
.cart-controls { display: flex; gap: 0.3rem; align-items: center; }

.checkout-panel { padding: 1rem; display: flex; flex-direction: column; }
.checkout-panel h3 { margin: 0; }
.total-line { font-size: 1.1rem; }
.checkout-form { display: grid; gap: 0.75rem; }
.checkout-form label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.92rem; }

.checkout-form input,
.checkout-form textarea,
.checkout-form select { border: 1px solid var(--border); border-radius: 0.65rem; padding: 0.62rem 0.8rem; font: inherit; color: var(--text); background-color: #fff; }

.checkout-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.2rem;
  background-image: linear-gradient(45deg, transparent 50%, #6a7488 50%), linear-gradient(135deg, #6a7488 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 10px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.checkout-form input:focus,
.checkout-form textarea:focus,
.checkout-form select:focus { border-color: var(--accent); outline: 3px solid var(--ring); }

.empty-state { padding: 1.2rem; color: var(--muted); }
.footer { text-align: center; color: var(--muted); margin-top: 1rem; }
.footer a { color: inherit; }
.hidden { display: none !important; }

@media (max-width: 760px) {
  .app-shell { width: calc(100% - 1rem); }
  .header { top: 0.3rem; }
  .header-actions { width: 100%; justify-content: space-between; }
  .main-nav { width: 100%; }
  .nav-link { flex: 1; }
  .hero { padding: 1.2rem; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 56px 1fr; }
  .cart-thumb { width: 56px; height: 56px; }
  .cart-controls { grid-column: 1 / -1; justify-content: flex-end; }
}
