/* Pora Cvesty — Mini App по ТЗ (референс MATE flowers) */

/* Брендовая палитра (по сэмплам): два оранжевых, яркий розовый, красный, лиловый */
:root {
  /* Основные брендовые цвета */
  --brand-orange: #FF6B1F;         /* Яркий оранжевый фон */
  --brand-orange-deep: #E5581D;    /* Более тёплый, плотный оранжевый */
  --brand-pink: #FF9BEF;           /* Яркий розовый фон */
  --brand-red: #E3453C;            /* Тёплый красный/корал (губы) */
  --brand-lilac: #C7A5E8;          /* Мягкий лиловый */
  --brand-white: #FFFFFF;

  /* Семантика UI (на базе бренда) */
  --color-accent: var(--brand-red);          /* основной UI: кнопки, активные элементы */
  --color-accent-hover: var(--brand-orange-deep); /* hover темнее/теплее */
  --color-accent-strong: var(--brand-orange);     /* важные акценты, бейджи и т.п. */
  --color-menu-bg: #2d2d2d;
  --color-text: #1a1a1a;
  --color-text-muted: #666;
  --color-white: var(--brand-white);
  --font-sans: "Montserrat", sans-serif;
  --header-h: 56px;
  --fab-size: 56px;
  --category-circle-size: 88px;
  --category-circle-large: 105px;
}

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

html, body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-white);
  overflow-x: hidden;
}

button, input, select, textarea {
  font-family: inherit;
}

#app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--fab-size) + 20px);
}

/* ---------- Wizard: выбор города и раздела (ТЗ 4.1) ---------- */
.screen-wizard {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: linear-gradient(180deg, #f8faf8 0%, var(--color-white) 100%);
}
section.screen-wizard[hidden],
#main-app[hidden] {
  display: none !important;
}

.wizard-inner {
  width: 100%;
  max-width: 360px;
}

.wizard-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: var(--color-text);
}

.wizard-hint {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 16px;
}

.city-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.city-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 16px 24px;
  min-height: 48px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: var(--color-white);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.city-btn:hover {
  border-color: var(--color-accent);
  background: rgba(0, 139, 129, 0.06);
  box-shadow: 0 2px 8px rgba(0, 139, 129, 0.15);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
  align-items: end;
  justify-items: center;
  max-width: 320px;
  margin: 0 auto;
}

.category-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: var(--category-circle-size);
  height: var(--category-circle-size);
  padding: 0;
  border: 2px solid #e8e8e8;
  border-radius: 50%;
  background: var(--color-white);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
}

.category-circle:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 139, 129, 0.2);
  border-color: var(--color-accent);
}

.category-circle-img {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22%;
  box-sizing: border-box;
}

.category-icon {
  width: 100%;
  height: 100%;
  max-width: 36px;
  max-height: 36px;
  color: var(--color-text);
}

.category-circle--large .category-circle-img {
  padding: 20%;
}

.category-circle--large .category-icon {
  max-width: 44px;
  max-height: 44px;
}

.category-circle-img--toned {
  opacity: 0.6;
}

.category-circle--locked .category-icon {
  color: var(--color-text-muted);
}

.category-circle-label {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  text-align: center;
  width: max-content;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-circle--large {
  width: var(--category-circle-large);
  height: var(--category-circle-large);
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 28px;
}

.category-circle--large .category-circle-img {
  font-size: 2.5rem;
}

.category-circle--large .category-circle-label {
  bottom: -26px;
  font-size: 0.8rem;
}

.category-circle--locked {
  opacity: 0.85;
  cursor: not-allowed;
  background: #f0f0f0;
  border-color: #ddd;
}

.category-circle--locked .category-circle-label {
  color: var(--color-text-muted);
}

.category-circle-lock {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
  pointer-events: none;
}

/* ---------- Header (ТЗ: телефон, соц.сети, меню; лого, город) ---------- */
.header-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid #eee;
  padding: 8px 12px 10px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.header-phone {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.header-phone:hover {
  color: var(--color-accent);
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Брендовые значки соцсетей (VK, Telegram, MAX) — логотипы в виде иконок */
.header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  text-decoration: none;
  overflow: hidden;
  transition: opacity 0.2s, transform 0.15s;
}
.header-icon:hover {
  opacity: 0.9;
  transform: scale(1.08);
}
.header-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

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

.header-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-accent);
}

.place-select-button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f5f5f5;
  font-size: 0.9rem;
  color: var(--color-text);
  cursor: pointer;
  border: none;
}

.place-select-icon {
  font-size: 0.9rem;
}

.place-select-item-icon {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.menu-mobile-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
}

.menu-mobile-btn:hover,
.menu-mobile-btn:focus {
  background: #f0f0f0;
}

.burger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
}

/* Sidebar menu */
.nav-menu-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.25s, opacity 0.25s;
}

.nav-menu-wrap.active-mobile {
  visibility: visible;
  opacity: 1;
}

.nav-menu-mobile {
  position: absolute;
  top: 0;
  left: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--color-menu-bg);
  color: var(--color-white);
  padding: 24px 20px;
  overflow-y: auto;
  scrollbar-gutter: stable; /* резерв под скроллбар — ширина не меняется при раскрытии ИНФОРМАЦИЯ */
  box-shadow: 4px 0 20px rgba(0,0,0,0.2);
}

.nav-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.nav-menu-mobile-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-menu-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: var(--color-white);
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.nav-menu-close:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.nav-menu-close:active {
  transform: scale(0.96);
}

.nav-menu-mobile-delivery {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 12px;
}

.nav-menu-list {
  list-style: none;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 12px;
}

.nav-menu-item {
  margin-bottom: 4px;
}

.nav-menu-item a {
  display: block;
  padding: 12px 0;
  color: var(--color-white);
  text-decoration: none;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.nav-menu-item a:hover {
  color: var(--color-accent);
}

.nav-menu-item.active a {
  color: var(--color-accent);
  font-weight: 600;
}

/* Раскрывающийся пункт «ИНФОРМАЦИЯ» в бургер-меню */
.nav-menu-item--expandable {
  margin-bottom: 0;
}

.nav-menu-expand-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 0;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.nav-menu-expand-trigger:hover {
  color: var(--color-accent);
}

.nav-menu-arrow {
  display: inline-block;
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.nav-menu-item--expandable.is-expanded .nav-menu-arrow {
  transform: rotate(180deg);
}

.nav-menu-sublist {
  list-style: none;
  padding: 0 0 8px 12px;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.nav-menu-item--expandable.is-expanded .nav-menu-sublist {
  max-height: 320px;
}

.nav-menu-subitem {
  margin: 0;
}

.nav-menu-subitem a {
  display: block;
  padding: 8px 0;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0;
}

.nav-menu-subitem a:hover {
  color: var(--color-accent);
}

.nav-menu-basket {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.nav-menu-basket a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(0,0,0,0.4);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: visibility 0.25s, opacity 0.25s;
}

.nav-menu-wrap.active-mobile + .overlay {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Modal: привязка номера (имя) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 299;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.modal-overlay[hidden] { display: none; }
.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 300;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  max-width: 360px;
  width: calc(100% - 24px);
  max-height: 90vh;
  overflow: auto;
  pointer-events: auto;
}
.modal[hidden] { display: none; }
.modal-inner { padding: 20px; }
.modal-title { margin: 0 0 8px; font-size: 1.2rem; }
.modal-desc { margin: 0 0 16px; color: var(--color-text-muted); font-size: 0.9rem; line-height: 1.4; }
.modal-form .form-label { display: block; margin-bottom: 4px; font-weight: 600; }
.modal-form .form-input { width: 100%; margin-bottom: 16px; box-sizing: border-box; }
.modal-form input,
.modal-form select,
.modal-form textarea {
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.bind-phone-row { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.bind-phone-row .form-select-country { flex: 0 0 110px; min-width: 0; margin-bottom: 0; }
.bind-phone-row #bind-phone { flex: 1; margin-bottom: 0; }

/* Main content */
.main-content {
  flex: 1;
  padding: 16px 12px;
}

.tabs-header {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  flex-shrink: 0;
  padding: 10px 18px;
  border: none;
  border-radius: 20px;
  background: #f0f0f0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tab-btn:hover {
  background: #e5e5e5;
}

.tab-btn.active {
  background: var(--color-accent);
  color: var(--color-white);
}

.tabs-header[hidden] {
  display: none !important;
}

/* Фильтры 2-го уровня: меньшие кнопки, перенос строк и/или горизонтальная прокрутка */
.tabs-header--level2 {
  margin-bottom: 12px;
  overflow: hidden;
}

.tabs-level2-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 4px;
  align-content: flex-start;
}

.tabs-header--level2 .tab-btn,
.tabs-level2-inner .tab-btn {
  flex-shrink: 0;
  padding: 5px 10px;
  font-size: 0.75rem;
  border-radius: 16px;
}

.tabs-level2-inner .tab-btn.active {
  background: var(--color-accent);
  color: var(--color-white);
}

/* Products grid */
.products-grid {
  position: relative;
  min-height: 120px;
}

.products-loading {
  color: var(--color-text-muted);
  text-align: center;
  padding: 24px;
}

.products-loading.hidden {
  display: none;
}

.products-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  align-items: start;
  box-sizing: border-box;
}

.products-sentinel {
  text-align: center;
  padding: 16px;
  color: var(--color-text-muted, #666);
  font-size: 0.9rem;
  grid-column: 1 / -1;
}

.products-sentinel.hidden {
  display: none;
}

.product-card {
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.product-card-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f5f5f5;
}

.product-card-body {
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.product-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card-price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 0;
}

.product-card-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-accent);
}

.product-card-add {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-white);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.product-card-add:hover {
  background: var(--color-accent-hover);
}

.product-card-add:active {
  transform: scale(0.98);
}

.product-card-add-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-card-image {
  cursor: pointer;
}

/* Screens (basket, profile) */
.screen {
  padding: 16px 0;
}

.screen h2 {
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.cart-empty,
.profile-phone,
.profile-bonuses {
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.back-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--color-accent);
  text-decoration: none;
}

.product-detail .back-link {
  margin-top: 4px;
  margin-bottom: 12px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid #ccc;
}

.btn-secondary:hover {
  background: #f5f5f5;
  border-color: #999;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.profile-actions button[hidden] {
  display: none !important;
}

.profile-actions .btn-block {
  width: 100%;
}

.profile-orders {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border, #eee);
}

.profile-orders-title {
  font-size: 1rem;
  margin: 0 0 12px;
  color: var(--color-text);
}

.profile-orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-order-item {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-order-card {
  padding: 12px;
  background: var(--color-bg-soft, #f8f8f8);
  border-radius: 8px;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.profile-order-card:hover {
  background: var(--color-border, #eee);
}
.profile-order-card:focus {
  outline: 2px solid var(--color-primary, #6b9080);
  outline-offset: 2px;
}

.profile-order-id { font-weight: 600; }
.profile-order-date { color: var(--color-text-muted); }
.profile-order-status { text-transform: capitalize; }
.profile-order-total { font-weight: 600; }

.profile-order-detail {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease;
}
.profile-order-detail[aria-expanded="true"] {
  max-height: 500px;
  opacity: 1;
}

.profile-order-detail-inner {
  padding: 12px 12px 14px;
  margin-top: 4px;
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #eee);
  border-radius: 8px;
  font-size: 0.875rem;
}
.profile-order-detail-inner p {
  margin: 0 0 8px;
}
.profile-order-detail-inner p:last-of-type { margin-bottom: 0; }
.profile-order-lines {
  margin: 4px 0 0;
  padding-left: 20px;
}
.profile-order-detail-loading,
.profile-order-detail-error {
  padding: 12px;
  margin: 4px 0 0;
  background: var(--color-bg, #fff);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.profile-order-detail-error { color: var(--color-danger, #c44); }

.profile-orders-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.profile-orders-pagination .btn {
  min-width: 90px;
}
.profile-orders-page-info {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.profile-orders-pagination .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.profile-orders-empty {
  color: var(--color-text-muted);
  margin: 0;
  font-size: 0.95rem;
}

/* FAB */
.fab-wrap {
  position: fixed;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
  z-index: 90;
}

.fab {
  pointer-events: auto;
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 139, 129, 0.4);
  transition: background 0.2s, transform 0.2s;
  position: relative;
}

.fab:hover {
  background: var(--color-accent-hover);
  transform: scale(1.05);
}

.fab-icon {
  font-size: 1.5rem;
}

.fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #e53935;
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Карточка товара (ТЗ: галерея, описание, в корзину) ---------- */
.product-detail {
  padding-bottom: 24px;
}

.product-detail-gallery {
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
  display: block;
  border-radius: 12px;
  margin-bottom: 16px;
  background: #f5f5f5;
  flex-shrink: 0;
}

.product-detail-gallery img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
  vertical-align: middle;
}

.product-detail-info {
  position: sticky;
  bottom: 0;
  background: var(--color-white);
  padding: 0 0 16px;
}

.product-detail-title {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.product-detail-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  white-space: pre-line;
  line-height: 1.4;
}

.product-detail-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.btn-block {
  width: 100%;
}

/* ---------- Корзина: итог, кнопка оформления ---------- */
.cart-total-wrap {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.cart-total {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.btn-checkout {
  width: 100%;
}

.cart-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 10px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}

.cart-item-thumb {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #f0f0f0;
  grid-column: 1;
  grid-row: 1;
}

.cart-item-name {
  grid-column: 2 / span 2;
  grid-row: 1;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cart-item-qty {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.cart-qty-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-qty-val {
  min-width: 18px;
  text-align: center;
  font-weight: 500;
}

.cart-item-price {
  grid-column: 3;
  grid-row: 2;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  align-self: center;
}

.cart-item-remove {
  display: none;
}

/* ---------- Оформление заказа ---------- */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin-bottom: 16px;
}
.checkout-section {
  border: none;
  margin: 0 0 16px 0;
  padding: 0;
}
.checkout-section-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 8px;
  padding: 0;
}

.checkout-delivery-type {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.checkout-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  cursor: pointer;
}
.checkout-radio input { margin: 0; }

.checkout-open-card { margin-top: 12px; }
.checkout-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
}
.checkout-checkbox input { margin: 0; }
.checkout-i-am-recipient { margin-bottom: 12px; }
.checkout-recipient-fields[hidden] { display: none; }
.checkout-recipient-fields { margin-bottom: 12px; }
.checkout-card-text-row { margin-top: 8px; }
.checkout-card-text-row[hidden] { display: none; }

/* ---------- Аккордеон 5 шагов ---------- */
.checkout-accordion { max-width: 400px; }
.checkout-step { border: 1px solid var(--color-border, #e0e0e0); border-radius: 8px; margin-bottom: 12px; overflow: hidden; }
.checkout-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--color-bg-soft, #f5f5f5);
  font-weight: 600;
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1rem;
}
.checkout-step-header:hover { background: var(--color-bg-hover, #eee); }
.checkout-step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-accent, #008b81);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.checkout-step.expanded .checkout-step-number { background: var(--color-accent-hover, #007a70); }
.checkout-step-body {
  padding: 14px;
  display: none;
}
.checkout-step.expanded .checkout-step-body { display: block; }
.checkout-step-header[aria-expanded="true"] .checkout-step-title { font-weight: 700; }
.checkout-step-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.checkout-step-actions .btn { flex: 1; min-width: 120px; }
.checkout-pickup-address {
  margin: 8px 0;
  padding: 10px;
  background: var(--color-bg-soft, #f5f5f5);
  border-radius: 6px;
  font-size: 0.95rem;
}
.checkout-intervals { display: flex; flex-direction: column; gap: 8px; }
.checkout-interval { display: flex; align-items: center; gap: 8px; }
.checkout-intervals-note { font-size: 0.85rem; color: var(--color-text-muted, #666); margin-top: 8px; }
.checkout-promo-row { margin-bottom: 12px; }
.checkout-promo-input-row { display: flex; gap: 8px; margin-top: 6px; }
.checkout-promo-input-row .form-input { flex: 1; }
.checkout-promo-message { font-size: 0.9rem; margin-top: 6px; }
.checkout-delivery-bonuses { margin: 12px 0; padding: 12px; background: var(--color-bg-soft, #f5f5f5); border-radius: 8px; }
.checkout-delivery-bonuses .checkout-label { font-weight: 600; }
.checkout-delivery-bonuses .checkout-icon { margin-right: 6px; }
.checkout-delivery-line {
  margin: 0 0 10px 0;
  padding: 10px 12px;
  background: rgba(76, 175, 80, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.checkout-bonuses-available { margin: 10px 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.checkout-bonuses-use-row { margin: 10px 0 6px 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.checkout-bonus-input-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.checkout-bonus-input { width: 100px; text-align: center; }
.checkout-bonus-limit-hint { margin: 6px 0 0 0; font-size: 0.9em; color: var(--muted-color, #666); }
.checkout-delivery-bonuses .checkout-promo-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,.08); }
.checkout-summary { margin: 12px 0; padding: 12px; background: var(--color-bg-soft, #f5f5f5); border-radius: 6px; }
.checkout-total-line { margin: 0; font-size: 1.1rem; }
.checkout-consent { margin-top: 8px; }
.checkout-consent span { font-size: 0.9rem; }

.checkout-address-row[hidden] { display: none; }

.checkout-address-suggest-wrap {
  position: relative;
}
.checkout-address-suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--color-border, #e5e7eb);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.checkout-address-suggest-list li {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--color-text, #222);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.checkout-address-suggest-list li:last-child {
  border-bottom: none;
}
.checkout-address-suggest-list li:hover,
.checkout-address-suggest-list li:focus {
  background: #f3f4f6;
  outline: none;
}

.checkout-address-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin-top: 12px;
}
.checkout-address-details .form-label {
  margin-bottom: 4px;
}
.checkout-address-details .form-input {
  margin-bottom: 0;
}

.checkout-map-wrap {
  margin: 12px 0;
  width: 100%;
  max-width: 100vw;
  position: relative;
  box-sizing: border-box;
}
.checkout-map-wrap[hidden] { display: none; }
.checkout-map-hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  padding: 0 12px;
  line-height: 1.35;
}
.checkout-map {
  width: 100%;
  height: min(260px, 45vh);
  min-height: 200px;
  border-radius: 0;
  overflow: hidden;
  border: none;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  background: #f0f0f0;
  /* Жесты (скролл, пинч-зум) обрабатывает карта, а не родительская прокрутка. */
  touch-action: none;
}
.checkout-delivery-price-row {
  margin-top: 10px;
}
.checkout-delivery-price-result {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--color-text);
}
.checkout-summary-line {
  margin: 4px 0;
  font-size: 0.95rem;
}
.checkout-summary-delivery[hidden] { display: none !important; }

.checkout-datetime-fields {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.checkout-datetime-fields .form-input { flex: 1; min-width: 120px; }

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* ---------- Footer: блоки Pora Cvesty + Информация (ТЗ 4.1) ---------- */
.app-footer {
  padding: 24px 16px 16px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  background: #f9f9f9;
  border-top: 1px solid #eee;
}

.footer-block {
  margin-bottom: 20px;
}

.footer-block-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.footer-block-text,
.footer-block-contact {
  font-size: 0.9rem;
  margin-bottom: 4px;
  line-height: 1.4;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 6px;
}

.footer-links a {
  color: var(--color-accent);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.app-footer-copy {
  text-align: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  font-size: 0.85rem;
}
