@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --surface: #ffffff;
  --text: #432818;
  --muted: #7a5c4d;
  --primary: #ff6b6b;
  --accent: #ffd166;
  --ring: rgba(255, 107, 107, 0.22);
  --shadow: 0 20px 50px rgba(162, 91, 70, 0.14);
  --shadow-soft: 0 10px 24px rgba(162, 91, 70, 0.1);
  --radius-xl: 28px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  color: var(--text);
  background-color: #ffffff;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  overflow-x: hidden;
  overflow-y: scroll;
}

.app-shell {
  max-width: 1240px;
  position: relative;
  z-index: 1;
  padding-bottom: calc(8.4rem + env(safe-area-inset-bottom));
}

header {
  padding: 1.5rem 1.5rem 0;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  color: var(--primary);
}

.hero-title {
  font-size: clamp(2.2rem, 4vw, 4rem);
  margin-top: 1rem;
}

.hero-title .highlight {
  color: var(--primary);
}

.hero-subtitle {
  max-width: 760px;
  color: var(--muted);
}

.order-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.35rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.14), rgba(255, 209, 102, 0.24));
  border: 1px solid rgba(255, 150, 113, 0.26);
  box-shadow: var(--shadow-soft);
}

.order-box__content {
  min-width: 0;
}

.order-box__eyebrow {
  color: var(--primary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
}

.order-box__title {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 800;
}

.order-box__name {
  font-size: 1.03rem;
  font-weight: 700;
}

.order-box__address,
.order-box__phone {
  color: var(--text);
  font-weight: 500;
}

.order-box__phone a {
  color: var(--text);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.order-box__cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.72rem 1.1rem;
  background: linear-gradient(135deg, #ff6b6b, #f97316);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.33);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.order-box__cta:hover,
.order-box__cta:focus-visible {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(249, 115, 22, 0.4);
}

.card {
  background: var(--surface);
  border: 0;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.card-body {
  padding: 1.6rem !important;
}

.form-control {
  border-radius: 16px;
  min-height: 52px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 150, 113, 0.34);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem var(--ring);
}

.ingredient-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.ingredient-item {
  width: 100%;
  text-align: left;
  border: 0;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 20px rgba(119, 65, 42, 0.07);
  cursor: pointer;
  color: var(--text);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.ingredient-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(119, 65, 42, 0.11);
}

.ingredient-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.24rem var(--ring);
}

.ingredient-item.active {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.14), rgba(255, 209, 102, 0.22));
}

.ingredient-main {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ingredient-name {
  font-weight: 700;
}

.selection-badge {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(255, 150, 113, 0.24);
  box-shadow: 0 16px 32px rgba(119, 65, 42, 0.2);
}

.selection-badge__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.selection-badge__label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.selection-badge__summary {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.selection-badge__clear {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff6b6b, #f97316);
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.36);
  transition: transform 0.14s ease, opacity 0.14s ease, box-shadow 0.14s ease;
}

.selection-badge__clear:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(249, 115, 22, 0.42);
}

.selection-badge__clear:disabled {
  opacity: 0.5;
  box-shadow: none;
  cursor: not-allowed;
}

.selection-badge.is-empty .selection-badge__summary {
  color: var(--muted);
}

.message {
  min-height: 1.25rem;
  color: var(--muted);
}

.message.error {
  color: #b42318;
}

.message.success {
  color: #067647;
}

.results-count {
  color: var(--muted);
  font-weight: 700;
}

.results-list {
  display: grid;
  gap: 1rem;
}

.pizza-card {
  padding: 1.15rem;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 150, 113, 0.12);
}

.pizza-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.pizza-title {
  font-size: 1.2rem;
  font-weight: 800;
}

.pizza-number {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(123, 220, 181, 0.18);
  font-size: 0.82rem;
  color: var(--text);
}

.pizza-prices {
  color: var(--muted);
  font-weight: 600;
  margin-top: 0.35rem;
  margin-bottom: 0.8rem;
}

.pizza-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.ingredient-chip {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(255, 107, 107, 0.1);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}

.ingredient-chip--match {
  border-color: #198754;
  background: rgba(25, 135, 84, 0.16);
  color: #146c43;
  box-shadow: inset 0 0 0 1px rgba(25, 135, 84, 0.09);
}

.empty-state {
  margin: 0;
  padding: 0.5rem 0.25rem;
  color: var(--muted);
}

.legal-box {
  border-radius: 14px;
  border: 1px solid rgba(255, 150, 113, 0.3);
  background: #fff;
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 18px rgba(119, 65, 42, 0.08);
}

.legal-box__text {
  color: var(--muted);
  line-height: 1.45;
}

.legal-box__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.legal-box__links a {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 107, 0.28);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  background: rgba(255, 209, 102, 0.2);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.legal-box__links a:hover,
.legal-box__links a:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(249, 115, 22, 0.22);
}

.install-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 209, 102, 0.22);
  border: 1px solid rgba(255, 150, 113, 0.34);
  box-shadow: 0 8px 18px rgba(119, 65, 42, 0.08);
}

.install-box[hidden] {
  display: none !important;
}

.install-box__content {
  min-width: 0;
}

.install-box__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.install-box__hint {
  color: var(--muted);
  line-height: 1.35;
}

.install-box__button {
  border: 0;
  border-radius: 999px;
  padding: 0.58rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  background: linear-gradient(135deg, #ff6b6b, #f97316);
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.34);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.install-box__button:hover,
.install-box__button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(249, 115, 22, 0.4);
}

@media (max-width: 991.98px) {
  header {
    padding: 0.2rem 0.2rem 0;
  }

  header::after {
    right: 0;
  }

  .app-shell {
    max-width: 860px;
  }

  .legal-box {
    margin-bottom: 4.3rem;
  }
}

@media (min-width: 992px) {
  .app-shell {
    padding-bottom: 1.5rem;
  }

  .selection-badge {
    left: auto;
    right: 1rem;
    bottom: 1rem;
    width: min(360px, calc(100vw - 2rem));
    border-radius: 20px;
  }
}

@media (max-width: 575.98px) {
  .app-shell {
    padding-bottom: calc(10.6rem + env(safe-area-inset-bottom));
  }

  .install-box {
    flex-direction: column;
    align-items: stretch;
    padding: 0.92rem 0.9rem;
  }

  .install-box__button {
    width: 100%;
  }

  .order-box {
    align-items: flex-start;
    flex-direction: column;
    padding: 1.05rem 1rem;
  }

  .order-box__cta {
    width: 100%;
  }

  .ingredient-list {
    grid-template-columns: 1fr;
  }

  .selection-badge {
    padding: 0.8rem 0.85rem;
  }

  .pizza-card {
    padding: 0.95rem;
  }

  .legal-box {
    padding: 0.9rem;
  }
}
