:root {
  --bg: #ffffff;
  --surface: #f6f6f8;
  --surface-2: #fbfbfc;
  --border: #ececf1;
  --text: #21222b;
  --muted: #8a8a96;
  --brand: #ff6900;
  --brand-dark: #e85f00;
  --brand-soft: #fff3ea;
  --brand-blue: #1559d6;
  --success: #1f9d55;
  --danger: #e23b3b;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 2px 14px rgba(30, 30, 50, 0.05);
  --shadow-hover: 0 14px 34px rgba(30, 30, 50, 0.13);
  --font-sans: "Inter", "Segoe UI", Roboto, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --topbar-h: 0px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
  /* Подвал всегда внизу страницы, даже если контента мало */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* Нет горизонтального скролла всей страницы (катбар скроллится сам по себе) */
  overflow-x: hidden;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
  color: var(--brand);
}

/* Иконки-SVG (вместо эмодзи): наследуют цвет текста через currentColor */
.ic {
  width: 1.05em;
  height: 1.05em;
  display: inline-block;
  vertical-align: -0.16em;
  flex: 0 0 auto;
}

/* ============ Тонкая верхняя строка-навбар ============ */
.utilbar {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.utilbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.utilbar a {
  color: var(--muted);
  font-weight: 500;
  transition: color 0.15s ease;
}
.utilbar a:hover {
  color: var(--text);
}
.utilbar .spacer {
  flex: 1;
}
.lang-menu {
  position: relative;
}
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 8px;
}
.lang-toggle:hover {
  color: var(--text);
  background: var(--surface);
}
.lang-globe {
  font-size: 14px;
}
.lang-drop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  min-width: 168px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(20, 20, 40, 0.16);
  padding: 6px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}
.lang-menu.open .lang-drop {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.lang-drop button {
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.lang-drop button:hover {
  background: var(--surface);
}
.lang-drop button.active {
  color: var(--brand);
}

/* ============ Главная шапка ============ */
header.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
}
.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  line-height: 1.15;
}
/* Бренд: иконка + текст GoGo, вся область - ссылка на главную */
.brand-home {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand-home:hover { text-decoration: none; }
.brand-logo-img {
  height: 58px;
  width: auto;
  display: block;
}
.brand-home:hover { opacity: 0.92; }
.brand .delivery {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}
.brand .subtitle {
  font-size: 15.5px;
  color: var(--text);
  font-weight: 600;
  margin-top: 0;
}
.rating {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  color: var(--muted);
  cursor: default;
  outline: none;
}
.star-ic {
  width: 1.05em;
  height: 1.05em;
  color: var(--brand);
  vertical-align: -0.14em;
}
/* Всплывашка о времени/рейтинге доставки (по наведению/фокусу).
   Тёмная полупрозрачная с блюром (glassmorphism), текст крупнее. */
.delivery-popover {
  position: absolute;
  top: calc(100% + 12px);
  left: -12px;
  z-index: 60;
  width: 372px;
  background: rgba(26, 26, 36, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.45);
  padding: 20px 22px;
  text-align: left;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.rating:hover .delivery-popover,
.rating:focus-within .delivery-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dp-title {
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  line-height: 1.3;
}
.dp-sub {
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  margin-top: 3px;
}
.dp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0 12px;
}
.dp-big {
  font-size: 27px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.dp-stars {
  color: #ffc043;
  font-size: 20px;
}
.dp-cap {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin-top: 3px;
}
.dp-note {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  margin-top: 5px;
}
.rating .time {
  font-weight: 700;
  color: var(--text);
}
.rating .dot {
  color: var(--muted);
}
.rating .stars {
  color: var(--muted);
}
.topbar .spacer {
  flex: 1;
}
.coins-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 15px;
  border-radius: 999px;
}
.topbar-auth {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
}
.topbar-auth a:not(.btn) {
  color: var(--text);
}
.topbar-auth a:not(.btn):hover {
  color: var(--brand);
}

/* ============ Липкая строка категорий ============ */
.catbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.catbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}
.catbar-inner::-webkit-scrollbar {
  height: 0;
}
.cat-chip {
  white-space: nowrap;
  padding: 9px 17px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.cat-chip:hover {
  background: var(--surface);
}
.cat-chip.active {
  background: var(--brand);
  color: #fff;
}
.catbar .spacer {
  flex: 1;
}
.cart-btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 10px 19px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 105, 0, 0.22);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.cart-btn:hover {
  background: var(--brand-dark);
  box-shadow: 0 6px 16px rgba(255, 105, 0, 0.3);
}
.cart-btn:active {
  transform: translateY(1px);
}
.cart-btn .count {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0 8px;
  font-size: 13px;
  min-width: 22px;
  text-align: center;
}

main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 44px 24px 64px;
  flex: 1 0 auto;
}
.site-footer { flex-shrink: 0; }

/* Страницы входа/регистрации - форма по центру */
.auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 64px;
}
.auth-page h1 { text-align: center; }
.auth-page .form-card { width: 100%; max-width: 420px; }

h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 4px 0 22px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
h2 {
  font-size: 23px;
  font-weight: 700;
  margin: 30px 0 16px;
  letter-spacing: -0.02em;
}

.muted {
  color: var(--muted);
}

/* ============ Промо-баннеры ============ */
.promos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 8px 0 34px;
}
.promo {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  line-height: 0;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.promo:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.promo img {
  display: block;
  width: 100%;
  height: auto;
}

/* ============ Сетка товаров ============ */
.section-title {
  font-size: 27px;
  font-weight: 800;
  margin: 30px 0 18px;
  letter-spacing: -0.025em;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.card {
  border-radius: var(--radius);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.card .img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Плейсхолдер, когда у товара нет фото (логотип на сером фоне) */
.img-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--surface);
}
.img-empty img {
  width: 56%;
  height: auto;
  object-fit: contain;
  opacity: 0.16;
}
/* Брендовые «синие» карточки (Том ям, Шашлык) - в стиле Додо */
.card--blue {
  background: var(--brand-blue);
}
.card--blue .img-wrap {
  background: var(--brand-blue);
}
.card--blue .card-body {
  align-items: center;
  text-align: center;
}
.card--blue .card-title a,
.card--blue .card-desc,
.card--blue .card-meta {
  color: #fff;
}
.card--blue .card-foot {
  justify-content: center;
}
.card--blue .price-pill {
  background: #fff;
  border-color: #fff;
  color: var(--text);
}
.card--blue .price-pill:hover {
  background: #fff;
  border-color: #fff;
  color: var(--brand);
}
.card--blue:hover {
  box-shadow: 0 14px 34px rgba(20, 86, 214, 0.34);
}
.badge-new {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.badge-discount {
  display: inline-block;
  background: var(--success);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 700;
  /* BUG-R6: бейдж скидки смещён вниз и не выровнен по кнопке цены (неоднозначный
     визуальный дефект - заметен только на товарах со скидкой). (Не чинить!) */
  position: relative;
  top: 6px;
}
.badge-out {
  display: inline-block;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.card-body {
  padding: 14px 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card-title {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.card-title a {
  color: var(--text);
}
.card-desc {
  color: var(--muted);
  font-size: 13px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  font-size: 12px;
  color: var(--muted);
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}
.price-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 15px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.price-pill:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}
.price .old {
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 400;
  font-size: 13px;
  margin-right: 6px;
}

/* ============ Кнопки ============ */
button,
.btn {
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.005em;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
button:hover,
.btn:hover {
  background: var(--brand-dark);
}
button:active,
.btn:active {
  transform: translateY(1px);
}
button:disabled {
  background: #d6d6dd;
  cursor: not-allowed;
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--border);
}
.btn-outline {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--surface);
}
.btn-danger {
  background: transparent;
  color: var(--danger);
  padding: 6px 10px;
  font-size: 14px;
}
.btn-danger:hover {
  background: #fdeaea;
}

/* ============ Формы ============ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  width: 100%;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 105, 0, 0.12);
}
input::placeholder,
textarea::placeholder {
  color: #b6b6c0;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.form-card {
  max-width: 440px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow);
}
.msg {
  padding: 11px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
}
.msg.error {
  background: #fdecec;
  color: var(--danger);
}
.msg.ok {
  background: #e7f6ee;
  color: var(--success);
}

/* ============ Таблицы ============ */
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

/* ============ Корзина-сайдбар ============ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 18, 28, 0.5);
  backdrop-filter: blur(5px) saturate(120%);
  -webkit-backdrop-filter: blur(5px) saturate(120%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 40;
}
.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
/* Корзина - центрированный попап с плавной анимацией (scale + fade) */
.cart-drawer {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 440px;
  max-width: 94vw;
  max-height: 86vh;
  background: var(--bg);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -46%) scale(0.96);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.24s ease, visibility 0.28s ease;
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cart-drawer.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}
.cart-body { min-height: 0; }
.cart-drawer header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--border);
}
.cart-drawer header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.cart-close {
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}
.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 22px;
}
.cart-foot {
  border-top: 1px solid var(--border);
  padding: 20px 22px;
  background: var(--surface-2);
}
.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface);
}
.cart-item .ci-main {
  flex: 1;
  min-width: 0;
}
.cart-item .ci-name {
  font-weight: 700;
  font-size: 15px;
}
.cart-item .ci-meta {
  font-size: 12px;
  color: var(--muted);
}
.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: 999px;
  padding: 4px 6px;
}
.qty-stepper button {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1;
}
.qty-stepper button:hover {
  background: var(--brand-soft);
  color: var(--brand);
}
.qty-stepper .val {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
}
.addon-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.addon-row img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 15px;
}
.summary-total {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 10px;
}
.promo-input {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

/* ============ Карточка товара (страница) ============ */
.product-detail {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 36px;
}
.product-detail .pimg {
  width: 100%;
  border-radius: var(--radius-lg);
  background: var(--surface);
}

/* ============ Чекаут ============ */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.panel h3 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.slot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.slot {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.slot:hover {
  border-color: var(--brand);
}
.slot.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.pay-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pay-option:hover {
  border-color: var(--brand);
}
.pay-option.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.summary-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 16px;
}

/* ============ Cookie-баннер ============ */
.cookie-banner {
  position: fixed;
  left: 16px;
  bottom: 16px;
  max-width: 420px;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 60;
  font-size: 13px;
}
.cookie-banner button {
  background: var(--brand);
  padding: 8px 14px;
  font-size: 13px;
  white-space: nowrap;
}
.cookie-close {
  background: transparent;
  color: #fff;
  padding: 4px 8px;
}

/* ============ Чипсы профиля ============ */
.card-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

/* ============ Подвал (footer) ============ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  margin-top: 48px;
}
.footer-stats {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 10px;
  display: flex;
  gap: 80px;
  flex-wrap: wrap;
}
.fstat-num {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.fstat-cap {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
  line-height: 1.5;
}
.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 13px;
  color: var(--muted);
}
.site-footer a {
  color: var(--muted);
  font-weight: 500;
  transition: color 0.15s ease;
}
.site-footer a:hover {
  color: var(--text);
}
.site-footer .footer-brand {
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.02em;
  font-size: 15px;
  margin-right: 4px;
}
.site-footer .spacer {
  flex: 1;
}
.site-footer .footer-admin {
  color: #c2c2cc;
  font-weight: 500;
}
.site-footer .footer-admin:hover {
  color: var(--muted);
}

/* ============ Выбор города (подпись в шапке + модалка) ============ */
.brand .subtitle.city-pick {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
}
/* Название города выделяем фирменным оранжевым. */
.brand .subtitle .city-name-hl {
  color: var(--brand);
  font-weight: 700;
}
.brand .subtitle.city-pick:hover .city-name-hl {
  color: var(--brand-dark);
}

.city-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 30, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 70;
}
.city-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.city-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: 720px;
  max-width: 94vw;
  max-height: 80vh;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  z-index: 80;
  padding: 26px 28px 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.city-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}
.city-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.city-modal-head h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.city-close {
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}
#city-search {
  margin-bottom: 16px;
}
.city-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  overflow-y: auto;
}
.city-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.city-item:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.city-item.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.city-item .city-name {
  font-weight: 700;
  font-size: 15px;
}
.city-item .city-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.city-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  padding: 18px 4px;
  font-size: 14px;
}

/* =====================================================================
   ОБЩАЯ АДАПТИВКА (планшет/мобайл). Идёт ДО блока BUG-R1..R4, чтобы те
   намеренно кривые правила (480px) перебивали общие и оставались «сломанными».
   ===================================================================== */
@media (max-width: 1024px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .brand { flex-wrap: wrap; }
}
@media (max-width: 768px) {
  main { padding: 28px 16px 48px; }
  .utilbar-inner, .catbar-inner, .site-footer-inner, .footer-stats { padding-left: 16px; padding-right: 16px; }
  .brand-logo-img { height: 44px; }
  .brand .delivery { padding-left: 12px; }
  .rating { font-size: 14px; }
  .topbar { gap: 14px; padding: 14px 16px; }
  .delivery-popover { width: min(92vw, 360px); left: 0; }
  .content-page h1 { font-size: 28px; }
  .content-page h2 { font-size: 20px; }
  .pizzeria-list { grid-template-columns: 1fr; }
  .footer-stats { gap: 32px; padding: 28px 16px 8px; }
  .fstat-num { font-size: 24px; }
  .about-stats { gap: 28px; }
  .pf-section, .content-page { padding-left: 0; padding-right: 0; }
  .orders-table { font-size: 13px; }
  .orders-table th, .orders-table td { padding: 10px 6px; }
  .success-modal { padding: 30px 22px; }
  .cart-drawer { width: 96vw; }
}
@media (max-width: 560px) {
  .topbar-auth { gap: 10px; font-size: 14px; }
  .utilbar { font-size: 12px; }
  .utilbar-inner { gap: 14px; }
  .section-title { font-size: 22px; }
  .pm-name { font-size: 22px; }
}

/* =====================================================================
   АДАПТИВ-БАГИ (W9). Сайт на мобиле в целом юзабелен (R1/R2 расслаблены),
   но оставлены ДВА точечных бага: BUG-R3 (форма checkout вылезает) и
   BUG-R4 (длинное имя товара ломает карточку). НЕ ЧИНИТЬ R3/R4.
   ===================================================================== */

/* R1/R2 РАССЛАБЛЕНЫ: на мобиле шапка переносится, каталог корректно встаёт
   в 2 колонки - сайт юзабелен. Точечные адаптив-баги оставлены: BUG-R3
   (форма checkout) и BUG-R4 (длинное имя товара). */
@media (max-width: 480px) {
  header.topbar {
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 12px 16px;
  }
  .brand .delivery { padding-left: 10px; }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .card { width: auto; }
  .promos {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* BUG-R3: форма checkout вылезает за вьюпорт. Жёстко фиксируем ширину
   карточки больше экрана, из-за чего кнопка "Оформить заказ" уходит за край. */
@media (max-width: 480px) {
  .form-card {
    width: 520px;
    max-width: none;
  }
  .checkout-grid {
    grid-template-columns: 520px;
  }
}

/* BUG-R4: длинные названия товаров не переносятся и не обрезаются на узких
   экранах (overflow виден, перенос отключён) и ломают карточку. */
@media (max-width: 480px) {
  .card-title,
  .card-title a {
    white-space: nowrap;
    overflow: visible;
    word-break: keep-all;
  }
}

/* BUG-R7: на мобиле у товаров СО СКИДКОЙ плашка цены и бейдж «-N%» не помещаются
   (запрет переноса), из-за чего бейдж/цена вылезают за край карточки. На десктопе
   ок. Видно на меню у скидочных пицц (Флотская -10%, Двойная пепперони -20% и т.п.). */
@media (max-width: 480px) {
  .card-foot {
    flex-wrap: nowrap;
    gap: 6px;
  }
  .card-foot .price-pill {
    white-space: nowrap;
    padding: 10px 16px;
  }
  .card-foot .badge-discount {
    flex: 0 0 auto;
  }
}

/* ============ Модальная карточка товара ============ */
body.pm-lock { overflow: hidden; }
.pm-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 18, 28, 0.55);
  backdrop-filter: blur(6px) saturate(120%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.pm-overlay.open { opacity: 1; visibility: visible; }
.pm-modal {
  width: min(960px, 100%);
  height: min(620px, 90vh);
  background: var(--bg);
  border-radius: 28px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  grid-template-rows: minmax(0, 1fr);
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.24s ease;
}
.pm-overlay.open .pm-modal { transform: none; }
.pm-loading { padding: 48px; text-align: center; color: var(--muted); grid-column: 1 / -1; }
.pm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.pm-close:hover { background: #fff; }
.pm-left {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 24px;
  min-height: 0;
  overflow: hidden;
}
.pm-left img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.pm-left .img-empty { width: 100%; aspect-ratio: 1 / 1; border-radius: 16px; }
.pm-right { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.pm-scroll { padding: 30px 30px 12px; overflow-y: auto; flex: 1; min-height: 0; }
.pm-info-wrap { position: relative; float: right; margin-left: 12px; margin-right: 34px; }
.pm-info {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: var(--surface);
  color: var(--muted);
  font-style: italic;
  font-weight: 700;
  font-family: Georgia, serif;
  cursor: pointer;
}
.pm-info:hover { background: var(--border); color: var(--text); }
.pm-nutri {
  position: absolute;
  top: 34px;
  right: 0;
  z-index: 4;
  width: 260px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(20, 20, 40, 0.18);
  padding: 14px 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}
.pm-nutri.open { opacity: 1; visibility: visible; transform: none; }
.pm-nutri-title { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.pm-nutri-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding: 5px 0;
  border-top: 1px solid var(--border);
}
.pm-nutri-row:first-of-type { border-top: none; }
.pm-name { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.pm-meta { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.pm-desc { color: var(--text); font-size: 14px; line-height: 1.5; margin: 0 0 18px; }
.pm-seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--surface);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 10px;
}
.pm-seg.pm-seg-2 { grid-template-columns: 1fr 1fr; }
.pm-seg button {
  border: none;
  background: transparent;
  padding: 9px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.pm-seg button.active { background: #fff; box-shadow: 0 2px 8px rgba(20, 20, 40, 0.1); }
.pm-addons-title { font-size: 19px; font-weight: 800; margin: 18px 0 12px; letter-spacing: -0.02em; }
.pm-addons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pm-addon {
  border: 2px solid transparent;
  background: var(--surface);
  border-radius: 16px;
  padding: 10px;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.pm-addon:hover { background: var(--surface-2); }
.pm-addon.active { border-color: var(--brand); background: var(--brand-soft); }
.pm-addon img { width: 64px; height: 64px; object-fit: contain; }
.pm-addon-name { font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--text); }
.pm-addon-price { font-size: 13px; font-weight: 700; color: var(--text); }
.pm-addon.active .pm-addon-price { color: var(--brand-dark); }
.pm-foot {
  padding: 16px 30px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg);
}
.pm-add {
  flex: 1;
  border: none;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  padding: 16px 20px;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(255, 105, 0, 0.28);
}
.pm-add:hover { background: var(--brand-dark); }
.pm-add:active { transform: translateY(1px); }
.pm-qty { flex-shrink: 0; }

@media (max-width: 760px) {
  .pm-modal { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: min(620px, 90vh); }
  .pm-left { padding: 16px; }
  .pm-left img { max-height: 220px; }
  .pm-addons { grid-template-columns: repeat(2, 1fr); }
}

/* ============ Контентные страницы (О нас, Контакты) ============ */
/* Страницы ошибок 404 / 500 */
.errpage { max-width: 560px; margin: 0 auto; padding: 60px 0 40px; text-align: center; }
.errpage-code {
  font-size: 120px; font-weight: 800; line-height: 1; letter-spacing: -0.04em;
  color: var(--brand); margin-bottom: 8px;
}
.errpage-code--500 { color: var(--danger); }
.errpage-title { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; }
.errpage-text { font-size: 16px; line-height: 1.6; color: var(--muted); margin: 0 0 28px; }
.errpage-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.err-btn {
  display: inline-block; padding: 12px 24px; border-radius: 12px; font-weight: 700;
  font-size: 15px; cursor: pointer; text-decoration: none; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text); font-family: inherit; transition: all .15s;
}
.err-btn:hover { border-color: var(--brand); color: var(--brand); }
.err-btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.err-btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
@media (max-width: 600px) { .errpage-code { font-size: 88px; } }

.content-page { max-width: 760px; margin: 0 auto; padding: 8px 0 20px; }
.content-page h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; margin: 8px 0 16px; }
.content-page h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 28px 0 12px; }
.content-page p { font-size: 16px; line-height: 1.6; color: var(--text); margin: 0 0 14px; }
.content-page .lead { font-size: 18px; }
.about-stats { display: flex; gap: 50px; flex-wrap: wrap; margin: 24px 0 8px; }
.about-stat-num { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.about-stat-cap { color: var(--muted); font-size: 14px; margin-top: 4px; }
.about-list { padding-left: 20px; line-height: 1.7; font-size: 16px; }
.about-list li { margin-bottom: 8px; }
.contacts-general { display: flex; gap: 40px; flex-wrap: wrap; margin: 18px 0 8px; font-size: 15px; }
.pizzeria-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 8px; }
.pizzeria-card { border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; }
.pizzeria-metro { font-weight: 700; font-size: 16px; }
.pizzeria-addr { margin-top: 4px; }
.pizzeria-phone { color: var(--muted); font-size: 14px; margin-top: 4px; }
.contacts-error {
  margin-top: 40px;
  padding: 18px 20px;
  border: 1px solid rgba(226, 59, 59, 0.3);
  background: rgba(226, 59, 59, 0.06);
  border-radius: 14px;
  color: var(--danger);
  font-size: 15px;
}
.contacts-error .muted { color: var(--muted); }
@media (max-width: 560px) { .pizzeria-list { grid-template-columns: 1fr; } }

/* ============ Профиль ============ */
.pf-section { max-width: 760px; margin: 0 auto 8px; padding: 20px 0; }
.pf-section + .pf-section { border-top: 1px solid var(--border); }
.pf-h { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 8px 0 18px; }
.pf-field { margin-bottom: 18px; max-width: 440px; }
.pf-field > label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.pf-hint { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 999px; background: var(--surface); color: var(--muted); font-style: italic; font-size: 10px; font-family: Georgia, serif; cursor: help; }
.pf-control { display: flex; align-items: center; gap: 10px; }
.pf-input { flex: 1; min-width: 0; background: var(--surface); border: 1px solid transparent; border-radius: 12px; padding: 14px 16px; font-size: 15px; color: var(--text); font-family: inherit; }
.pf-input:disabled { color: var(--muted); }
.pf-input:focus { outline: none; border-color: var(--brand); background: #fff; }
.pf-year { flex: 0 0 92px; cursor: pointer; }
.pf-edit { background: none; border: none; color: var(--brand); font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.pf-edit:hover { color: var(--brand-dark); }
.pf-err { color: var(--danger); font-size: 13px; margin-top: 6px; }
.pf-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.pf-check input { width: 18px; height: 18px; accent-color: var(--brand); }
.pf-msg { min-height: 20px; margin-top: 8px; font-size: 14px; }
.pf-msg .msg.ok, .msg.ok { color: var(--success); }
.pf-msg .msg.error, .msg.error { color: var(--danger); }
.pf-cardform { max-width: 400px; margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.pf-cardform-title { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.pf-cardform-row { display: flex; gap: 10px; }
.pf-cardform-row .pf-input { flex: 1; }
.pf-cardform .btn-outline { align-self: flex-start; }
.card-line { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.card-brand { font-weight: 800; color: #1a1f71; min-width: 46px; }
.card-num { flex: 1; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.btn-soft { background: var(--brand-soft); color: var(--brand-dark); border: none; border-radius: 10px; padding: 8px 16px; font-weight: 600; cursor: pointer; }
.btn-soft:hover { background: #ffe6d2; }
.orders-table { width: 100%; border-collapse: collapse; max-width: 760px; }
.orders-table th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.orders-table td { padding: 14px 12px; border-bottom: 1px solid var(--border); font-size: 15px; }
.link-btn { background: none; border: none; color: var(--brand); font-weight: 600; cursor: pointer; font-size: 15px; }
.link-btn:hover { color: var(--brand-dark); }
.receipt-row td { background: var(--surface-2); }
.oi-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.oi-name { flex: 1; }
.oi-price { font-weight: 600; white-space: nowrap; }
/* BUG-R5: фиксированные width/height без object-fit -> превью растянуто/искажено */
.oi-thumb {
  width: 56px;
  height: 40px;
  border-radius: 8px;
  background: var(--surface);
}

/* ============ Админ-панель ============ */
.adm-section { margin: 0 0 34px; }
.adm-section h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 16px; }
.adm-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.adm-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  background: var(--surface-2);
}
.adm-card-val { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.adm-card-cap { color: var(--muted); font-size: 13px; margin-top: 4px; }
.adm-chart-wrap {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px 8px;
  background: var(--bg);
}
.adm-chart { width: 100%; height: auto; display: block; }
.adm-bar { fill: var(--brand); transition: fill 0.15s ease; }
.adm-bar:hover { fill: var(--brand-dark); }
.adm-bar-lbl { fill: var(--muted); font-size: 11px; }
.adm-pz { width: 100%; max-width: 520px; border-collapse: collapse; }
.adm-pz th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.adm-pz td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 15px; }
.adm-products { width: 100%; border-collapse: collapse; }
.adm-products th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.adm-products td { padding: 12px 10px; border-bottom: 1px solid var(--border); }
.adm-actions { display: flex; gap: 8px; justify-content: flex-end; }
.adm-actions button { padding: 7px 14px; border-radius: 10px; font-size: 14px; cursor: pointer; }

/* ============ Попап успешного заказа ============ */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 18, 28, 0.55);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.success-overlay.open { opacity: 1; visibility: visible; }
.success-modal {
  background: #fff;
  border-radius: 26px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  transform: translateY(14px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.success-overlay.open .success-modal { transform: none; }
.success-check {
  width: 86px;
  height: 86px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(31, 157, 85, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-check svg { width: 54px; height: 54px; }
.success-check circle {
  fill: none;
  stroke: var(--success);
  stroke-width: 3;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: scDrawCircle 0.5s ease forwards;
}
.success-check path {
  fill: none;
  stroke: var(--success);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: scDrawCheck 0.35s 0.45s ease forwards;
}
@keyframes scDrawCircle { to { stroke-dashoffset: 0; } }
@keyframes scDrawCheck { to { stroke-dashoffset: 0; } }
.success-modal h2 { font-size: 26px; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.02em; }
.success-sub { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0 0 24px; }
.success-actions { display: flex; gap: 12px; }
.success-actions a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 16px;
  border-radius: 14px;
  font-weight: 700;
}

/* ============ Страница логов ============ */
.logs-toolbar { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; flex-wrap: wrap; }
.logs-filters { display: inline-flex; gap: 6px; background: var(--surface); border-radius: 999px; padding: 4px; }
.logs-fbtn { border: none; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--text); cursor: pointer; }
.logs-fbtn.active { background: #fff; box-shadow: 0 2px 8px rgba(20,20,40,0.1); }
.logs-auto { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.logs-view {
  background: #fcfcfd;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.65;
  max-height: 72vh;
  overflow-y: auto;
}
.logs-empty { color: var(--muted); padding: 22px; text-align: center; }
/* Компактные строки как в лог-файле: время, уровень, логгер, сообщение */
.log-row {
  padding: 1px 14px 1px 11px;
  border-left: 3px solid transparent;
  color: #34353f;
  cursor: pointer;
  white-space: normal;
}
.log-row:hover { background: var(--surface); }
.log-row.open { background: var(--surface); }
.log-row > span { margin-right: 10px; }
.log-ts { color: #9aa0ab; }
.log-lvl { font-weight: 700; }
.log-logger { color: #9a7b1f; }
.log-msg { color: #2b2c34; word-break: break-word; }
.log-count {
  margin-left: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 7px;
  font-size: 11px;
  color: var(--muted);
}
.log-INFO .log-lvl { color: #2f6fd6; }
.log-WARNING { border-left-color: #e0b35e; background: rgba(217, 154, 31, 0.1); }
.log-WARNING .log-lvl { color: #a9720a; }
/* Ошибки подсвечиваем красным полупрозрачным фоном (виднее на ленте) */
.log-ERROR { border-left-color: var(--danger); background: rgba(226, 59, 59, 0.12); }
.log-ERROR:hover { background: rgba(226, 59, 59, 0.18); }
.log-ERROR.open { background: rgba(226, 59, 59, 0.14); }
.log-ERROR .log-lvl { color: #c0392b; }
.log-ERROR .log-msg { color: #c0392b; }
/* Деталь записи - аккуратная карточка в общем стиле сайта */
.log-detail {
  border-left: 3px solid var(--brand);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 14px 16px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px;
}
.det-WARNING { border-left-color: #d99a1f; background: rgba(217, 154, 31, 0.06); }
.det-ERROR { border-left-color: var(--danger); background: rgba(226, 59, 59, 0.07); }
.log-detail-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 6px 16px;
  font-size: 12.5px;
  margin-bottom: 10px;
}
.log-detail-grid span { color: var(--muted); }
.log-detail-grid b { color: var(--text); font-weight: 600; }
.log-detail-msg {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}
@media (max-width: 600px) {
  .log-row { grid-template-columns: 56px 66px 1fr; gap: 8px; }
  .log-logger { display: none; }
  .log-detail-grid { grid-template-columns: 110px 1fr; }
}

/* «Пасхалка» разработчика - видимая строка в подвале (неуместна для бренда) */
.footer-egg {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 24px 18px;
  font-size: 12px;
  color: #c2c2cc;
  font-style: italic;
}

/* «Пасхалка» разработчика - тост внизу экрана */
.dev-egg-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 400;
  max-width: 520px;
  background: #1a1a24;
  color: #fff;
  padding: 14px 20px;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
  font-size: 14px;
  text-align: center;
  animation: fadeUp 0.3s ease both;
}

/* ============ Плавные анимации ============ */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

/* появление контента */
.section-title { animation: fadeUp 0.4s ease both; }
/* Карточки/баннеры появляются только через opacity, чтобы анимация не
   перебивала transform у :hover (иначе hover-«подъём» не работает). */
.grid .card { animation: fadeIn 0.42s ease both; }
.promos .promo { animation: fadeIn 0.5s ease both; }
.site-footer { animation: fadeIn 0.5s ease both; }

/* лёгкий каскад для первого ряда карточек и баннеров */
.grid .card:nth-child(2) { animation-delay: 0.04s; }
.grid .card:nth-child(3) { animation-delay: 0.08s; }
.grid .card:nth-child(4) { animation-delay: 0.12s; }
.promos .promo:nth-child(2) { animation-delay: 0.07s; }
.promos .promo:nth-child(3) { animation-delay: 0.14s; }
.promos .promo:nth-child(4) { animation-delay: 0.21s; }

/* плавные переходы для интерактивных элементов */
a, button, input, select, .cat-chip, .price-pill, .card, .promo,
.coins-badge, .badge-discount, .city-item, .lang-switch button {
  transition: color 0.15s ease, background-color 0.15s ease,
              border-color 0.15s ease, box-shadow 0.15s ease,
              transform 0.15s ease, opacity 0.15s ease;
}

/* уважение к настройке «меньше движения» */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
