/* Да! Еда — static MVP */
:root {
  --brand: #ea580c;
  --brand-dark: #c2410c;
  --brand-light: #fff7ed;
  --mint: #10b981;
  --text: #1c1917;
  --muted: #78716c;
  --border: #e7e5e4;
  --bg: #fafaf9;
  --page-padding: clamp(1.25rem, 5vw, 2rem);
  --content-max: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fff7ed 0%, var(--bg) 240px, var(--bg) 100%);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--page-padding);
  padding-right: var(--page-padding);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: .625rem;
  min-width: 0;
  flex-shrink: 1;
}
.logo-img {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
  background: linear-gradient(135deg, #ea580c, #fb923c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.logo-img-fallback {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
  background: linear-gradient(135deg, #ea580c, #fb923c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .85rem;
  color: #fff;
}
.logo-text { min-width: 0; }
.logo-title {
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo-sub {
  font-size: .7rem;
  color: var(--muted);
  margin-top: .1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #ffedd5;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .875rem var(--page-padding);
  max-width: var(--content-max);
  margin: 0 auto;
}
.nav {
  display: none;
  gap: 1.5rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
}
.nav a:hover { color: var(--brand); }
.header-actions {
  display: flex;
  gap: .5rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: #fff; color: var(--brand-dark); border: 1px solid #fed7aa; }
.btn-outline:hover { background: var(--brand-light); }
.btn-dark { background: #1c1917; color: #fff; }
.btn-mint { background: var(--mint); color: #fff; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

@media (min-width: 768px) {
  .nav { display: flex; }
  .hide-sm { display: inline-flex !important; }
}
.hide-sm { display: none; }

@media (max-width: 480px) {
  .logo-sub { display: none; }
  .btn-primary { padding: .5rem .85rem; font-size: .8125rem; }
}

/* Hero */
.hero {
  padding: clamp(2rem, 6vw, 3.5rem) 0;
}
.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
}
.badge {
  display: inline-block;
  background: #ffedd5;
  color: var(--brand-dark);
  padding: .35rem .875rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}
.hero h1 {
  font-size: clamp(1.75rem, 5.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-top: 1rem;
  letter-spacing: -0.02em;
  padding-right: .25rem;
}
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  color: var(--muted);
  margin-top: 1rem;
  max-width: 36em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.hero-mini-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: #fff;
  padding: 1rem 1.125rem;
}

/* Cards */
.card-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.master-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  transition: .15s;
}
.master-card:hover {
  transform: translateY(-2px);
  border-color: #fed7aa;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}
.master-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}
.master-card-body { padding: 1.125rem 1.25rem 1.25rem; }
.master-card-cat {
  font-size: .7rem;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.master-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: .35rem;
  line-height: 1.35;
  word-wrap: break-word;
}
.master-card p {
  font-size: .875rem;
  color: var(--muted);
  margin-top: .35rem;
  line-height: 1.45;
}
.master-card-meta {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .65rem;
  line-height: 1.4;
}

/* Sections */
.section {
  padding: clamp(2rem, 5vw, 3rem) 0;
}
.section-white {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-dark {
  background: #1c1917;
  color: #fff;
  padding: clamp(2.5rem, 6vw, 3.5rem) 0;
}
.section h2,
.section-dark h2 {
  font-size: clamp(1.35rem, 4vw, 1.5rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: .75rem 1rem;
  margin-bottom: 1.5rem;
}
.link {
  color: var(--brand);
  font-weight: 600;
  font-size: .875rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
}
.tag {
  padding: .55rem 1rem;
  border-radius: 999px;
  background: #ffedd5;
  color: #9a3412;
  font-size: .8125rem;
  font-weight: 600;
}
.tag:hover { background: #fed7aa; }

.steps {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}
.step {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.125rem 1.25rem;
}
.step-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fb923c;
}
.step p {
  font-size: .875rem;
  color: #d6d3d1;
  margin-top: .35rem;
  line-height: 1.45;
}

/* Catalog */
.catalog-layout {
  display: grid;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
}
@media (min-width: 1024px) {
  .catalog-layout { grid-template-columns: minmax(280px, 360px) 1fr; }
}

.page-title {
  font-size: clamp(1.5rem, 4.5vw, 1.75rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  padding-top: clamp(1.25rem, 3vw, 2rem);
}
.page-title.flush { padding-top: 0; }
.page-sub {
  color: var(--muted);
  margin-top: .5rem;
  line-height: 1.5;
  max-width: 36em;
}

#map {
  height: 280px;
  border-radius: 1rem;
  border: 1px solid var(--border);
  z-index: 0;
  margin-top: 1rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .875rem;
}
.chip {
  padding: .4rem .85rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--border);
  cursor: pointer;
  line-height: 1.3;
}
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip.district.active { background: var(--mint); border-color: var(--mint); }

.selected-district {
  font-size: .875rem;
  color: var(--muted);
  margin-top: .75rem;
  line-height: 1.5;
  padding: .5rem 0;
}

.filter-block { margin-top: 1.5rem; }
.filter-label {
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: .5rem;
  color: #44403c;
}

input, select, textarea {
  width: 100%;
  padding: .65rem .875rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  font: inherit;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
}
label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: .875rem;
}
label span {
  display: block;
  margin-bottom: .35rem;
  color: #44403c;
}

.form-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: clamp(1.25rem, 3vw, 1.5rem);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.form-box h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}
.form-box > p {
  font-size: .875rem;
  color: var(--muted);
  margin-top: .35rem;
  margin-bottom: 1.125rem;
  line-height: 1.5;
}

/* Master page */
.master-layout {
  display: grid;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
}
@media (min-width: 1024px) {
  .master-layout { grid-template-columns: 1fr minmax(300px, 360px); }
}
.master-hero {
  height: clamp(220px, 40vw, 300px);
  border-radius: 1rem;
  overflow: hidden;
  background: #eee;
}
.master-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.master-info { margin-top: 1.5rem; }
.master-info h1 {
  font-size: clamp(1.5rem, 4vw, 1.75rem);
  font-weight: 800;
  margin-top: .35rem;
  line-height: 1.25;
}
.master-info .tagline {
  font-size: 1.05rem;
  color: var(--muted);
  margin-top: .5rem;
  line-height: 1.5;
}
.master-info .meta {
  font-size: .875rem;
  color: var(--muted);
  margin-top: 1rem;
  line-height: 1.5;
}
.master-info .desc {
  margin-top: 1.25rem;
  line-height: 1.65;
}
.master-info .districts {
  font-size: .875rem;
  color: var(--muted);
  margin-top: .875rem;
  line-height: 1.55;
}

.menu-section { margin-top: 2rem; }
.menu-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
}
.menu-item {
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1rem 1.125rem;
  background: #fff;
  margin-top: .75rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.menu-item-price {
  font-weight: 700;
  color: var(--brand);
  font-size: .875rem;
  text-align: right;
  line-height: 1.4;
}

/* Chat */
.page-content {
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--page-padding);
  max-width: 800px;
  margin: 0 auto;
}

.chat-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
}
.chat-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f5f5f4;
}
.chat-messages {
  max-height: 360px;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.msg {
  max-width: 85%;
  padding: .625rem .875rem;
  border-radius: 1rem;
  font-size: .875rem;
  line-height: 1.45;
}
.msg-customer { align-self: flex-end; background: var(--brand); color: #fff; }
.msg-master { align-self: flex-start; background: #f5f5f4; }
.msg-system {
  align-self: center;
  background: #f5f5f4;
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
  padding: .5rem 1rem;
}
.msg-role {
  font-size: .6rem;
  text-transform: uppercase;
  opacity: .7;
  margin-bottom: .2rem;
}
.chat-input {
  border-top: 1px solid #f5f5f4;
  padding: 1rem 1.25rem;
}
.role-switch {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .625rem;
}
.role-switch button {
  font-size: .7rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: #f5f5f4;
}
.role-switch button.active { background: var(--brand); color: #fff; }
.chat-input-row { display: flex; gap: .5rem; }

.sidebar-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.125rem 1.25rem;
  font-size: .875rem;
}
.sidebar-box h4 { font-weight: 700; margin-bottom: .5rem; }
.sidebar-box p { line-height: 1.5; }

.order-layout {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: #fff;
  margin-top: 3rem;
  padding: clamp(2rem, 5vw, 2.5rem) 0;
}
.footer-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}
.footer h4 { font-weight: 700; }
.footer p, .footer li {
  font-size: .875rem;
  color: var(--muted);
  margin-top: .5rem;
  line-height: 1.5;
}
.footer ul { list-style: none; }
.footer a:hover { color: var(--brand); }

.empty {
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem) 1.5rem;
  color: var(--muted);
  border: 2px dashed var(--border);
  border-radius: 1rem;
  background: #fff;
  line-height: 1.5;
}

.info-box {
  background: var(--brand-light);
  border: 1px solid #fed7aa;
  border-radius: 1rem;
  padding: clamp(1.125rem, 3vw, 1.375rem) clamp(1.25rem, 3vw, 1.5rem);
  margin-top: 1.5rem;
}
.info-box h3 {
  color: var(--brand-dark);
  font-weight: 700;
  line-height: 1.35;
}
.info-box p {
  font-size: .875rem;
  color: #9a3412;
  margin-top: .5rem;
  line-height: 1.55;
}

.content-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: clamp(1.25rem, 3vw, 1.5rem);
  margin-top: 1.5rem;
}
.content-box h2 {
  font-weight: 700;
  line-height: 1.3;
}

ol.steps-list {
  padding-left: 1.35rem;
  margin-top: .875rem;
  font-size: .875rem;
  line-height: 1.55;
}
ol.steps-list li { margin-bottom: .4rem; }

.page-wrap {
  padding-bottom: clamp(2rem, 5vw, 3rem);
}

.dark-link {
  color: #fdba74;
  display: inline-block;
  margin-top: 1.5rem;
}

/* Map — master markers */
.master-map-marker {
  background: none !important;
  border: none !important;
}
.master-map-pin {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: #fff;
  border: 3px solid #ea580c;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.master-map-marker.visible .master-map-pin,
.master-map-marker.default .master-map-pin {
  border-color: #ea580c;
  transform: scale(1);
}
.master-map-marker.active .master-map-pin {
  border-color: #059669;
  background: #ecfdf5;
  transform: scale(1.15);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}
.master-map-marker.dimmed .master-map-pin {
  border-color: #d6d3d1;
  opacity: 0.6;
  transform: scale(0.85);
}
.map-popup {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.4;
  min-width: 180px;
}
.map-popup-cat {
  font-size: 0.65rem;
  font-weight: 700;
  color: #ea580c;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.map-popup strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.95rem;
}
.map-popup p {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #57534e;
}
.map-popup-loc {
  color: #78716c !important;
}
.map-popup-meta {
  font-size: 0.75rem !important;
  color: #78716c !important;
}
.map-popup a {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ea580c;
}
