/* ===== ANIUMDISH — дизайн-система: тёплая терракота + Soft UI =====
   Палитра: ui-ux-pro-max «Warm terracotta + fresh green» */

:root {
  --primary: #9a3412;
  --primary-dark: #7c2a0e;
  --on-primary: #ffffff;
  --secondary: #c2410c;
  --accent: #059669;
  --accent-dark: #047857;
  --bg: #fffbeb;
  --fg: #1c1917;
  --card: #ffffff;
  --muted: #f8f2f0;
  --muted-fg: #57606e;
  --border: #f2e6e2;
  --destructive: #dc2626;
  --ring: #9a3412;
  --wa: #1fab55;
  --wa-dark: #178f46;

  --font-head: 'Rubik', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.06);
  --shadow-md: 0 6px 18px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 18px 50px rgba(28, 25, 23, 0.18);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
}

body.no-scroll {
  overflow: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  letter-spacing: -0.01em;
}

img {
  max-width: 100%;
}

svg {
  width: 1.2em;
  height: 1.2em;
  flex: 0 0 auto;
}

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Кнопки ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

.btn-wa {
  background: var(--wa);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-wa:hover {
  background: var(--wa-dark);
  box-shadow: var(--shadow-md);
}

.btn-ig {
  background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
  color: #fff;
}

.btn-ig:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--primary);
  background: var(--muted);
}

.btn-lg {
  min-height: 50px;
  font-size: 1.02rem;
  border-radius: 13px;
}

.grow {
  flex: 1;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--muted);
  color: var(--fg);
  transition: background 0.2s;
}

.icon-btn:hover {
  background: var(--border);
}

.icon-btn.sm {
  width: 36px;
  height: 36px;
}

/* ===== Шапка ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 251, 235, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--primary);
  text-decoration: none;
}

.logo-mark {
  width: 26px;
  height: 26px;
  color: var(--primary);
}

.logo span {
  color: var(--fg);
}

.header-meta {
  font-size: 0.85rem;
  color: var(--muted-fg);
  margin-right: auto;
}

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--fg);
  font-weight: 700;
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cart-btn:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.cart-count[hidden] {
  display: none;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Геро ===== */

.hero {
  overflow: hidden;
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--space-6) 24px var(--space-5);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(1.7rem, 3.8vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 14px;
}

.hero-text p {
  color: var(--muted-fg);
  font-size: 1.05rem;
  max-width: 46ch;
  margin-bottom: 18px;
}

.hero-trust {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.trust-item svg {
  color: var(--accent);
}

.hero-collage {
  position: relative;
  height: 380px;
}

.hero-collage img {
  position: absolute;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  border: 4px solid #fff;
}

.collage-1 {
  width: 62%;
  height: 62%;
  top: 0;
  left: 0;
  transform: rotate(-2deg);
}

.collage-2 {
  width: 48%;
  height: 52%;
  right: 0;
  top: 14%;
  transform: rotate(2.5deg);
}

.collage-3 {
  width: 55%;
  height: 44%;
  bottom: 0;
  left: 16%;
  transform: rotate(-1deg);
}

/* ===== Орнамент-разделитель (кыргызский мотив, деликатно) ===== */

.ornament {
  height: 14px;
  margin: 6px 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M14 2 26 7 14 12 2 7Z' fill='none' stroke='%239a3412' stroke-width='1.3' opacity='0.28'/%3E%3Ccircle cx='14' cy='7' r='1.3' fill='%239a3412' opacity='0.28'/%3E%3C/svg%3E") repeat-x center;
}

/* ===== Плитки категорий ===== */

.cat-tiles {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--space-2) 24px var(--space-4);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.cat-tile {
  position: relative;
  border: none;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  padding: 0;
  background: var(--muted);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.cat-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.cat-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(28, 18, 10, 0.72));
}

.cat-tile span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  z-index: 1;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.86rem;
  text-align: left;
  line-height: 1.2;
}

.cat-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.cat-tile:hover img {
  transform: scale(1.06);
}

/* ===== Баннер акции ===== */

.promo-banner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px var(--space-3);
}

.promo-banner-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(100deg, #fff4e8, #ffe9d6);
  border: 1px solid #f7d9bd;
  border-radius: var(--radius);
  padding: 14px 20px;
}

.promo-flame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  flex: 0 0 auto;
}

.promo-banner-inner strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1rem;
}

.promo-banner-inner span {
  font-size: 0.88rem;
  color: var(--muted-fg);
}

.promo-banner-inner .btn {
  margin-left: auto;
  flex: 0 0 auto;
}

/* ===== Панель поиска и фильтров ===== */

.toolbar {
  position: sticky;
  top: 68px;
  z-index: 20;
  background: rgba(255, 251, 235, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px 10px;
}

.toolbar-row {
  display: flex;
  gap: 10px;
  max-width: 680px;
  margin: 0 auto 12px;
}

.search-wrap {
  position: relative;
  flex: 1;
}

#sort {
  min-height: 46px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s;
}

#sort:focus {
  border-color: var(--primary);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-fg);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

#search {
  width: 100%;
  min-height: 46px;
  padding: 11px 18px 11px 44px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--fg);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

#search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(154, 52, 18, 0.12);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1180px;
  margin: 0 auto;
}

.filters button {
  min-height: 40px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--fg);
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}

.filters button .count {
  color: var(--muted-fg);
  font-size: 0.78rem;
  margin-left: 5px;
  font-weight: 700;
}

.filters button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filters button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.filters button.active .count {
  color: rgba(255, 255, 255, 0.8);
}

/* ===== Сетка карточек ===== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 22px;
  padding: var(--space-4) 24px var(--space-6);
  max-width: 1180px;
  margin: 0 auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.card.out {
  opacity: 0.6;
}

.card-img {
  aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, #f6efe3, #efe3d2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.card:hover .card-img img {
  transform: scale(1.04);
}

.img-stub {
  color: #cbb9a5;
}

.img-stub svg {
  width: 52px;
  height: 52px;
}

.card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}

.badge svg {
  width: 0.95em;
  height: 0.95em;
}

.badge-promo {
  background: var(--primary);
  color: #fff;
}

.badge-out {
  background: rgba(28, 25, 23, 0.72);
  color: #fff;
}

.img-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(28, 25, 23, 0.62);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  pointer-events: none;
}

.card-body {
  padding: 15px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-category {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted-fg);
  font-weight: 800;
}

.card-title {
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-hint {
  font-size: 0.82rem;
  color: var(--muted-fg);
}

.card-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}

.card-price {
  font-family: var(--font-head);
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--primary);
}

.card-out {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted-fg);
}

.card-more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--muted-fg);
  white-space: nowrap;
  transition: color 0.2s, transform 0.2s;
}

.card:hover .card-more {
  color: var(--primary);
  transform: translateX(2px);
}

.empty {
  text-align: center;
  color: var(--muted-fg);
  padding: 40px 20px 60px;
}

/* ===== Появление при скролле ===== */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ===== Оверлеи ===== */

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 22, 18, 0.55);
  backdrop-filter: blur(3px);
}

/* ===== Страница товара ===== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden],
.cart[hidden],
.toast[hidden] {
  display: none;
}

.modal-panel {
  position: relative;
  background: var(--card);
  border-radius: 20px;
  max-width: 940px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(28, 25, 23, 0.55);
  color: #fff;
}

.modal-close:hover {
  background: rgba(28, 25, 23, 0.8);
}

.modal-gallery {
  padding: 18px 0 18px 18px;
}

.modal-main {
  aspect-ratio: 1 / 1;
  background: linear-gradient(150deg, #f6efe3, #efe3d2);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.thumb {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: none;
  opacity: 0.7;
  transition: all 0.15s;
}

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

.thumb:hover {
  opacity: 1;
}

.thumb.active {
  border-color: var(--primary);
  opacity: 1;
}

.modal-info {
  padding: 26px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.22;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  min-height: 40px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--fg);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 10px;
  transition: all 0.15s;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.chip.na {
  opacity: 0.5;
  text-decoration: line-through;
}

.chip.na.active {
  opacity: 0.85;
}

.modal-price {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}

.promo {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff4e8;
  border: 1px solid #f7d9bd;
  color: var(--secondary);
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.modal-out {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted-fg);
  background: var(--muted);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.qty {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1.5px solid var(--border);
  border-radius: 13px;
  background: var(--card);
}

.qty button {
  width: 44px;
  height: 48px;
  border: none;
  background: none;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  transition: background 0.15s;
}

.qty button:hover {
  background: var(--muted);
}

.qty span {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
  font-size: 1.02rem;
}

.qty.sm button {
  width: 34px;
  height: 34px;
}

.qty.sm span {
  min-width: 22px;
  font-size: 0.92rem;
}

.modal-desc,
.modal-desc-block p {
  font-size: 0.94rem;
  color: var(--fg);
}

.modal-desc-block span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted-fg);
  font-weight: 800;
  margin-bottom: 3px;
}

.modal-note {
  font-size: 0.82rem;
  color: var(--muted-fg);
  text-align: center;
}

/* ===== Корзина ===== */

.cart {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100%);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: slide-in 0.28s ease-out;
}

@keyframes slide-in {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
}

.cart-head h2 {
  font-size: 1.3rem;
}

.cart-head-count {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--muted-fg);
  font-weight: 600;
  margin-left: 6px;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 60px 24px;
  text-align: center;
  color: var(--muted-fg);
}

.cart-empty svg {
  width: 54px;
  height: 54px;
  color: #d9c6b4;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  align-items: center;
}

.cart-item:hover {
  background: var(--muted);
}

.cart-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  flex: 0 0 auto;
  background: var(--muted);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-title {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
}

.cart-item-variant {
  font-size: 0.8rem;
  color: var(--muted-fg);
}

.cart-item-price {
  font-weight: 800;
  color: var(--primary);
  font-size: 0.92rem;
  margin-top: 2px;
}

.cart-item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  margin: 10px 12px 0;
  border-top: 2px dashed var(--border);
  font-size: 1.05rem;
}

.cart-total strong {
  font-family: var(--font-head);
  font-size: 1.35rem;
  color: var(--primary);
}

.cart-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 20px 24px;
}

.cart-form h3 {
  font-size: 1.05rem;
  margin-top: 4px;
}

.cart-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted-fg);
}

.cart-form input,
.cart-form select,
.cart-form textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--fg);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  min-height: 46px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

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

.cart-form input:focus,
.cart-form select:focus,
.cart-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(154, 52, 18, 0.1);
}

.cart-pay-note {
  font-size: 0.83rem;
  color: var(--muted-fg);
  background: var(--muted);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

/* ===== Экран «заказ готов» ===== */

.order-done {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 10px 20px 26px;
}

.order-done-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e7f8ee;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 0;
}

.order-done-icon svg {
  width: 28px;
  height: 28px;
}

.order-done p {
  text-align: center;
  font-size: 0.95rem;
}

.order-done textarea {
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--fg);
  background: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  resize: vertical;
}

/* ===== Кнопка «наверх» ===== */

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--card);
  color: var(--primary);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.to-top[hidden] {
  display: none;
}

/* ===== Уведомление ===== */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--fg);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 13px 20px;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  max-width: min(92vw, 480px);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast svg {
  color: #6ee7a8;
}

/* ===== Подвал ===== */

footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: var(--space-6) 24px;
  color: var(--muted-fg);
  font-size: 0.92rem;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: var(--space-5);
}

footer h4 {
  color: var(--fg);
  margin-bottom: 8px;
}

.footer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== Адаптация ===== */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: var(--space-4);
  }

  .hero-collage {
    height: 300px;
    max-width: 460px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

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

  .modal-panel {
    grid-template-columns: 1fr;
    border-radius: 18px 18px 0 0;
    max-height: 94vh;
  }

  .modal-gallery {
    padding: 14px 14px 0;
  }

  .modal-info {
    padding: 16px 16px 22px;
  }
}

@media (max-width: 900px) {
  .cat-tiles {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .cat-tiles {
    display: flex;
    overflow-x: auto;
    padding: 4px 14px 18px;
    gap: 10px;
    scrollbar-width: none;
  }

  .cat-tiles::-webkit-scrollbar {
    display: none;
  }

  .cat-tile {
    flex: 0 0 108px;
  }

  .toolbar-row {
    flex-direction: column;
    gap: 8px;
  }

  #sort {
    width: 100%;
  }

  .to-top {
    right: 14px;
    bottom: 14px;
  }

  .header-inner {
    padding: 10px 14px;
    gap: 10px;
  }

  .header-meta {
    display: none;
  }

  .cart-btn {
    margin-left: auto;
  }

  .cart-btn > span:first-of-type {
    display: none;
  }

  .hero-inner {
    padding: var(--space-4) 16px var(--space-3);
  }

  .hero-collage {
    height: 230px;
  }

  .promo-banner {
    padding: 0 14px var(--space-2);
  }

  .promo-banner-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
  }

  .promo-banner-inner .btn {
    margin-left: 0;
    width: 100%;
  }

  .toolbar {
    top: 60px;
    padding: 10px 12px 8px;
  }

  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 12px;
    padding: 16px 12px 40px;
  }

  .card-body {
    padding: 12px;
  }

  .card-more {
    display: none;
  }

  .modal-actions {
    flex-wrap: wrap;
  }
}

/* ===== Доступность: меньше движения ===== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
