/* Современная дизайн-система «Стрит Фуд» v2 (FoodTech Light + Dark) */
:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-2: #f1ece4;
  --surface-3: #e7dfd4;
  --text: #1b1613;
  --text-2: #6f665e;
  --line: rgba(27, 22, 19, 0.08);
  --brand: #ff5a1f;
  --brand-hover: #e54912;
  --brand-soft: rgba(255, 90, 31, 0.11);
  --on-brand: #ffffff;
  --gold: #ffb800;
  --ok: #15803d;
  --ok-soft: rgba(22, 163, 74, 0.13);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.12);
  --glass: rgba(246, 243, 238, 0.86);
  --shadow-sm: 0 2px 10px rgba(27, 22, 19, 0.05), 0 1px 2px rgba(27, 22, 19, 0.04);
  --shadow-md: 0 14px 32px -12px rgba(27, 22, 19, 0.16);
  --shadow-lg: 0 28px 70px -16px rgba(27, 22, 19, 0.32);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 28px;
}

[data-theme="dark"] {
  --bg: #0f0e0d;
  --surface: #191715;
  --surface-2: #24211d;
  --surface-3: #2f2a25;
  --text: #f7f4ef;
  --text-2: #a59c92;
  --line: rgba(255, 255, 255, 0.08);
  --brand: #ff6b2c;
  --brand-hover: #ff5514;
  --brand-soft: rgba(255, 107, 44, 0.16);
  --on-brand: #ffffff;
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, 0.15);
  --danger: #ff6958;
  --danger-soft: rgba(255, 105, 88, 0.16);
  --glass: rgba(15, 14, 13, 0.88);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 14px 36px -10px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 30px 80px -12px rgba(0, 0, 0, 0.72);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 92px;
  transition: background 0.2s, color 0.2s;
}

.hidden { display: none !important; }
.flex-1 { flex: 1; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.brand-title {
  font-family: 'Unbounded', 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
}

.brand-sub {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.closed {
  background: var(--danger-soft);
  color: var(--danger);
}

@media (max-width: 560px) {
  .status-pill { display: none; }
}

.pill-btn {
  background: var(--brand-soft);
  color: var(--brand);
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* ── Main Layout ─────────────────────────────────────────────────────────── */
.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  padding-top: 20px;
  align-items: start;
}

@media (max-width: 1020px) {
  .main-layout { grid-template-columns: 1fr; }
  .cart-sidebar { display: none; }
}

/* Hero strip */
.hero-strip {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 2px;
}

.hero-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.2px;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 340px;
}

@media (max-width: 680px) {
  .search-wrap { max-width: none; width: 100%; }
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.55;
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 11px 16px 11px 40px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: 0.15s;
}

.search-wrap input:focus {
  background: var(--surface);
  border-color: var(--brand);
}

/* ── Sticky Categories ───────────────────────────────────────────────────── */
.sticky-cats {
  position: sticky;
  top: 68px;
  z-index: 25;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  margin: 0 -16px 14px;
  padding: 10px 16px 6px;
}

.cats-scroll, .subcats-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.cats-scroll::-webkit-scrollbar, .subcats-scroll::-webkit-scrollbar { display: none; }

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  color: var(--text);
  border: none;
  border-radius: 999px;
  padding: 5px 15px 5px 5px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, background 0.15s, color 0.15s;
}

.cat-pill.no-img { padding-left: 16px; padding-top: 9px; padding-bottom: 9px; }

.cat-pill img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.cat-pill:hover { transform: translateY(-1px); }

.cat-pill.active {
  background: var(--text);
  color: var(--surface);
  box-shadow: 0 6px 16px -6px rgba(27, 22, 19, 0.4);
}

.subcat-pill {
  background: var(--surface-2);
  color: var(--text-2);
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: 0.15s;
}

.subcat-pill.active {
  background: var(--brand-soft);
  color: var(--brand);
}

.section-heading {
  font-family: 'Unbounded', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 4px 0 14px;
  letter-spacing: -0.3px;
}

/* ── Product Grid & Cards ────────────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1180px) {
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

.product-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(.2, .8, .2, 1), box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product-card.stopped {
  opacity: 0.52;
  cursor: not-allowed;
}

.product-card.stopped:hover { transform: none; box-shadow: var(--shadow-sm); }

.pc-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #171412;
  overflow: hidden;
}

.pc-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1);
}

.product-card:hover .pc-photo img { transform: scale(1.03); }

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: #1b1613;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.stop-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 14, 13, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  color: #fff;
  letter-spacing: 0.6px;
}

.pc-body {
  padding: 13px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 5px;
}

.pc-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.28;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-meta {
  font-size: 12px;
  color: var(--text-2);
}

.pc-foot {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pc-price {
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.3px;
}

.pc-add-btn {
  background: var(--brand-soft);
  color: var(--brand);
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}

.pc-add-btn:hover {
  background: var(--brand);
  color: var(--on-brand);
}

.pc-add-btn:active { transform: scale(0.95); }

@media (max-width: 560px) {
  .pc-body { padding: 10px 11px 12px; }
  .pc-title { font-size: 13.5px; }
  .pc-price { font-size: 15px; }
  .pc-add-btn { padding: 7px 11px; font-size: 12px; }
}

/* ── Desktop Cart Sidebar ────────────────────────────────────────────────── */
.cart-sidebar {
  position: sticky;
  top: 84px;
}

.cart-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 104px);
  overflow-y: auto;
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cart-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}

.link-btn {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.link-btn:hover { color: var(--danger); }

/* Progress bar */
.free-deliv-box {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 12.5px;
  color: var(--text);
}

.free-deliv-track {
  height: 7px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.free-deliv-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--brand));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.ci-title { font-weight: 700; font-size: 14px; }
.ci-opts { font-size: 12px; color: var(--text-2); margin-top: 2px; line-height: 1.35; }
.ci-price { font-weight: 800; font-size: 14px; color: var(--text); margin-top: 5px; }

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 700;
}

.qty-control button {
  background: none;
  border: none;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qty-control button:hover { background: var(--surface-3); }

/* Segmented control & forms */
.seg-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-2);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.15s;
}

.seg-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 10px; }
.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 5px;
  font-weight: 600;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: 0.15s;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  background: var(--surface);
  border-color: var(--brand);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--text-2);
  margin: 7px 0;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 800;
  margin: 12px 0 14px;
  color: var(--text);
}

.primary-btn {
  width: 100%;
  background: var(--brand);
  color: var(--on-brand);
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 10px 22px -8px rgba(255, 90, 31, 0.55);
  transition: background 0.15s, transform 0.1s;
}

.primary-btn:hover { background: var(--brand-hover); }
.primary-btn:active { transform: scale(0.98); }
.primary-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* ── Mobile Floating Cart Bar ────────────────────────────────────────────── */
.mobile-cart-bar {
  display: none;
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 45;
  background: var(--brand);
  color: var(--on-brand);
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 800;
  font-size: 15px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 14px 32px -6px rgba(255, 90, 31, 0.55);
  cursor: pointer;
}

@media (max-width: 1020px) {
  .mobile-cart-bar { display: flex; }
}

.mcb-left { display: flex; align-items: center; gap: 10px; }
.mcb-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 13px;
}

/* ── Modals & Bottom Sheet ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 14, 13, 0.56);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: fadeIn 0.18s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(28px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 640px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
}

.modal-sheet {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.22s cubic-bezier(.2, .8, .2, 1);
}

@media (max-width: 640px) {
  .modal-sheet { border-radius: 26px 26px 0 0; max-height: 94vh; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 14, 13, 0.62);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close-light {
  background: var(--surface-2);
  color: var(--text);
}

.modal-title-bar {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-title-bar h3 { margin: 0; font-size: 19px; font-weight: 800; }

.modal-scroll-body, .pm-scroll {
  overflow-y: auto;
  flex: 1;
}

.modal-scroll-body { padding: 18px 20px; }

.pm-photo-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #171412;
}

.pm-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pm-body { padding: 18px 20px 10px; }

.pm-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.pm-head h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.weight-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Option Groups — FIRST in modal! */
.opt-group { margin-bottom: 18px; }

.opt-group-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.opt-req {
  font-size: 11px;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 700;
}

.opt-pills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 8px;
}

.opt-pill {
  background: var(--surface-2);
  color: var(--text);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: 0.15s;
}

.opt-pill small {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
}

.opt-pill.active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}

.opt-pill.active small { color: var(--brand); }

.opt-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 2px solid transparent;
  border-radius: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: 0.15s;
}

.opt-toggle-row.active {
  background: var(--brand-soft);
  border-color: var(--brand);
}

.switch {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: var(--surface-3);
  position: relative;
  transition: 0.2s;
  flex-shrink: 0;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
  transition: 0.2s;
}

.opt-toggle-row.active .switch { background: var(--brand); }
.opt-toggle-row.active .switch::after { transform: translateX(20px); }

/* Collapsible description BELOW options */
.pm-desc-details {
  margin-top: 8px;
  margin-bottom: 8px;
  background: var(--surface-2);
  border-radius: 14px;
  padding: 12px 14px;
}

.pm-desc-details summary {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pm-desc-details summary::after {
  content: "▾";
  font-size: 14px;
  transition: transform 0.2s;
}

.pm-desc-details[open] summary::after { transform: rotate(180deg); }

.pm-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
  white-space: pre-line;
  margin: 10px 0 0;
}

.pm-footer {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--surface);
}

.empty-state {
  text-align: center;
  color: var(--text-2);
  padding: 44px 16px;
  font-size: 14px;
  line-height: 1.5;
}

.warn-box {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 12px;
}

.tracker-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: 14px;
  color: var(--text-2);
}

.tracker-step.active { color: var(--brand); font-weight: 800; }
.tracker-step.done { color: var(--ok); font-weight: 600; }

.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  background: #1b1613;
  color: #ffffff;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
}
