/* ============================================================
   «Теплюшка» — дарим тепло близким
   тёплая, спокойная тема: дерево, мёд, сливки
   ============================================================ */

:root {
  --wood-900: #3e240c;
  --wood-700: #6b4423;
  --wood-500: #9a6b3a;
  --honey: #d98a35;
  --honey-soft: #f6cd8b;
  --cream: #fff8ec;
  --paper: rgba(255, 253, 246, 0.96);
  --moss: #6f9a4e;
  --berry: #c9515f;
  --line: rgba(120, 80, 40, 0.14);
  --radius: 24px;
  --shadow: 0 16px 40px rgba(62, 36, 12, 0.16);
  --font-head: 'Comfortaa', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--wood-900);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------- фон: сцена сама рисует лес, ниже — тёмная чаща ---------- */
body { background: #203118; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; }

a { color: var(--wood-700); }

/* ============================================================
   Шапка: готовая сцена с планкой и дощечками-вкладками.
   Ссылки — невидимые зоны точно над нарисованными дощечками.
   ============================================================ */
.scene {
  position: relative;
  z-index: 1;
  width: 100%;
  line-height: 0;
  overflow: hidden;
}
.scene-inner { transform-origin: 50% 18%; will-change: transform; }
.scene-img {
  display: block;
  width: 100%;
  height: auto;
}
/* плавный переход сцены в тёмную чащу ниже */
.scene::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 15%;
  background: linear-gradient(180deg, rgba(32, 49, 24, 0), #203118 96%);
  pointer-events: none;
}

.hs { position: absolute; display: block; }
.hs-home {
  left: 26.9%; top: 4.6%;
  width: 46.6%; height: 17.6%;
  border-radius: 5% / 18%;
}

.scene-nav a {
  top: 26.5%;
  height: 6.9%;
  font-size: 0;
  color: transparent;
  transition: background 0.15s ease;
}
.hs-t1 { left: 27.5%; width: 11.2%; }
.hs-t2 { left: 39.3%; width: 10.9%; }
.hs-t3 { left: 51.3%; width: 10.05%; }
.hs-t4 { left: 62.4%; width: 10.4%; }

/* никаких рамок: только мягкое тёплое свечение при наведении */
.scene-nav a:hover {
  background: radial-gradient(closest-side, rgba(255, 216, 140, 0.32), rgba(255, 216, 140, 0));
}
.hs:focus-visible {
  outline: 3px solid var(--honey);
  outline-offset: 2px;
}

/* мобильная сцена 9:16 — свои координаты дощечек */
@media (max-width: 760px) {
  .hs-home { left: 9.5%; top: 2.3%; width: 78%; height: 12.5%; }
  .scene-nav a { top: 15.8%; height: 3.9%; }
  .hs-t1 { left: 12.9%; width: 17.4%; }
  .hs-t2 { left: 31.9%; width: 18.4%; }
  .hs-t3 { left: 52%;   width: 16.6%; }
  .hs-t4 { left: 70.3%; width: 17.3%; }
}

/* ============================================================
   Каркас страницы
   ============================================================ */
.page {
  position: relative;
  z-index: 2;
  width: min(1120px, 94vw);
  margin: 26px auto 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
/* только там, где сверху лежит сцена: поднимаем контент на её полянку */
.scene ~ .page {
  /* сцена ~55.81vw высотой */
  margin-top: calc(55.81vw * -0.58);
}
@media (max-width: 760px) {
  /* мобильная сцена выше: 179.18vw; контент начинается под дощечками */
  .scene ~ .page { margin-top: calc(179.18vw * -0.775); }
}

.panel {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px clamp(18px, 3.4vw, 36px);
}
/* уютная «сшитая» рамка-строчка по краю панели */
.panel::before {
  content: '';
  position: absolute;
  inset: 9px;
  border: 2px dashed rgba(120, 80, 40, 0.2);
  border-radius: 16px;
  pointer-events: none;
}
.admin-body .panel::before { display: none; }
.panel > h1:first-child, .panel > h2:first-child { margin-top: 0; }

h1 { font-size: clamp(23px, 3.4vw, 32px); }
h2 { font-size: clamp(19px, 2.6vw, 24px); }

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

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- герой на главной ---------- */
.hero { text-align: center; padding-top: 34px; }
.tagline {
  margin: 0 0 18px;
  font-size: clamp(24px, 3.8vw, 36px);
  letter-spacing: 0.01em;
}
/* слоган вырезан на планке обеих сцен — текстовый дубль прячем визуально */
.tagline {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.hero { padding-top: 30px; }
.hero .btn { margin-bottom: 30px; }
.hero .grid { text-align: left; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15.5px;
  color: var(--cream);
  background: var(--wood-700);
  border: none;
  border-radius: 16px;
  padding: 13px 22px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(62, 36, 12, 0.22);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 11px 22px rgba(62, 36, 12, 0.26); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }

.btn-honey { background: linear-gradient(180deg, #e59a44, #d07f27); }
.btn-ghost {
  background: var(--cream);
  color: var(--wood-700);
  border: 1.5px solid rgba(120, 80, 40, 0.35);
  box-shadow: none;
}
.btn-small { padding: 9px 15px; font-size: 13.5px; border-radius: 13px; }

.link-quiet {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--wood-500);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 4px;
}
.link-quiet:hover { color: var(--wood-700); }

/* ---------- иконки ---------- */
.ic { width: 1em; height: 1em; flex: none; }

/* ============================================================
   Каталог
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 20px;
}
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(62, 36, 12, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(62, 36, 12, 0.18); }
.card:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }

.card-art {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-art img, .modal-art img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.card-art .ph { width: 44%; height: auto; opacity: 0.85; }

/* мягкие сливочные подложки для заглушек */
.tone-0 { background: #fdeeda; color: #c98d4b; }
.tone-1 { background: #f3e2c9; color: #a9743a; }
.tone-2 { background: #fbe7d4; color: #cd7f4a; }
.tone-3 { background: #f0e3cc; color: #97713d; }
.tone-4 { background: #fdf1e0; color: #d29a55; }
.tone-5 { background: #f6e6cf; color: #b07c40; }

.card-badge {
  position: absolute;
  top: 10px; left: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 11.5px;
  color: #fff;
  background: var(--berry);
  border-radius: 999px;
  padding: 5px 11px;
  box-shadow: 0 4px 10px rgba(150, 50, 60, 0.3);
}
.badge-alt { background: var(--moss); box-shadow: 0 4px 10px rgba(80, 110, 50, 0.3); }

.card-media { position: relative; }
.card-art { overflow: hidden; }
.card-art img { transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1); }
.card:hover .card-art img, .card:focus-within .card-art img { transform: scale(1.06); }
.card { animation: tw-fadeup 0.55s ease-out both; }
@keyframes tw-fadeup {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* плавное появление секций при прокрутке */
.rv { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.rv-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .card { animation: none; }
}

/* вылетающее сердечко у любимчиков */
.heart-fly {
  position: absolute;
  left: 50%;
  top: -2px;
  width: 14px;
  height: 14px;
  color: var(--berry);
  pointer-events: none;
  animation: tw-heart 0.85s ease-out both;
}
.heart-fly .ic { width: 14px; height: 14px; }
@keyframes tw-heart {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.6); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -34px) scale(1.15) rotate(-14deg); }
}
#pm-fav { position: relative; }

@keyframes tw-wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-7deg); }
  55% { transform: rotate(6deg); }
  80% { transform: rotate(-3deg); }
}
@keyframes tw-pop {
  0% { transform: scale(0.3); }
  60% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.cart-fab.bump { animation: tw-wiggle 0.5s ease-out; }
#cart-fab-count.pop { animation: tw-pop 0.45s ease-out; }
.card-cart {
  position: absolute;
  left: 10px; right: 10px; bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: none;
  border-radius: 14px;
  background: rgba(62, 36, 12, 0.88);
  color: var(--cream);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s;
}
.card-cart .ic { width: 16px; height: 16px; }
.card:hover .card-cart, .card:focus-within .card-cart { opacity: 1; transform: none; }
.card-cart:hover { background: rgba(62, 36, 12, 0.97); }
@media (hover: none) {
  .card-cart { opacity: 1; transform: none; background: rgba(62, 36, 12, 0.82); }
}

.fav-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 252, 244, 0.92);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  color: var(--wood-500);
  transition: transform 0.12s ease;
}
.fav-btn .ic { width: 17px; height: 17px; }
.fav-btn:hover { transform: scale(1.08); }
.fav-btn.on { color: var(--berry); animation: heart-pop 0.3s ease; }
@keyframes heart-pop {
  0% { transform: scale(0.7); }
  55% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.card-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-name { font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.card-desc { font-size: 13px; color: var(--wood-500); line-height: 1.45; flex: 1; }
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.price { font-weight: 900; font-size: 17px; }
.old-price {
  font-size: 13px;
  color: var(--wood-500);
  text-decoration: line-through;
  margin-right: 7px;
}
.sold-out .card-art { filter: grayscale(0.55) opacity(0.75); }
.sold-out-note { font-size: 12.5px; color: var(--wood-500); }

/* скелетоны загрузки */
.skel {
  border-radius: 20px;
  min-height: 270px;
  background: linear-gradient(100deg, #f4e9d8 40%, #fdf6ea 50%, #f4e9d8 60%);
  background-size: 220% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { to { background-position: -120% 0; } }

/* ============================================================
   Акции
   ============================================================ */
.promo-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.promo-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.promo-icon {
  flex: none;
  width: 46px; height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--honey);
  background: #fdeeda;
  border-radius: 14px;
}
.promo-icon .ic { width: 24px; height: 24px; }
.promo-title { font-family: var(--font-head); font-weight: 700; font-size: 16.5px; }
.promo-desc { font-size: 14px; color: var(--wood-500); margin-top: 4px; line-height: 1.5; }
.promo-meta { display: flex; gap: 12px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.promo-until { font-size: 12.5px; color: var(--wood-500); }
.promo-code {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--wood-900);
  background: var(--honey-soft);
  border: none;
  border-radius: 10px;
  padding: 7px 13px;
  cursor: pointer;
}
.promo-code:hover { background: #f2c078; }

/* ============================================================
   Добрая подписка
   ============================================================ */
.sub-hero { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.sub-hero-text { flex: 1; min-width: 260px; }
.sub-hero-text p { line-height: 1.6; }

.price-tag {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: linear-gradient(180deg, #e59a44, #d07f27);
  color: #fff;
  border-radius: 20px;
  padding: 20px 28px;
  transform: rotate(2deg);
  box-shadow: 0 12px 26px rgba(190, 115, 35, 0.35);
}
.price-tag .big { font-family: var(--font-head); font-weight: 700; font-size: 30px; }
.price-tag .small { font-size: 13px; opacity: 0.92; }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.step {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--wood-500);
  line-height: 1.5;
}
.step b {
  display: block;
  font-family: var(--font-head);
  color: var(--wood-900);
  font-size: 14px;
  margin-bottom: 5px;
}

.sub-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 880px) { .sub-layout { grid-template-columns: 1fr; } }

/* --- календарь --- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-title { font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.cal-nav-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  background: var(--cream);
  border-radius: 12px;
  font-size: 20px;
  color: var(--wood-700);
  cursor: pointer;
  line-height: 1;
}
.cal-nav-btn:hover { background: #f6e9d3; }

.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 5px;
  font-size: 11.5px;
  color: var(--wood-500);
  text-align: center;
  text-transform: lowercase;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }

.cal-cell {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--wood-700);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px;
  transition: transform 0.1s ease, background 0.12s ease;
}
.cal-cell:hover { transform: scale(1.06); background: var(--cream); }
.cal-cell.empty { visibility: hidden; }
.cal-cell.holiday { background: #fdeeda; border-color: rgba(217, 138, 53, 0.45); }
.cal-cell.picked {
  background: var(--wood-700);
  border-color: var(--wood-700);
  color: var(--cream);
}
.cal-cell.today { outline: 2px solid var(--honey); outline-offset: 1px; }
.cal-cell.past, .cal-cell.out {
  background: #efe9df;
  border-color: #e6ddce;
  color: #b6a68f;
  cursor: default;
}
.cal-cell.past:hover, .cal-cell.out:hover { transform: none; background: #efe9df; }
.cal-cell.past .cell-mark, .cal-cell.out .cell-mark { background: #cdbfa8; }

.cell-mark { width: 6px; height: 6px; border-radius: 50%; background: var(--honey); }
.cal-cell.picked .cell-mark { background: var(--honey-soft); }

.cal-hint { font-size: 13px; color: var(--wood-500); margin: 12px 0 4px; }

/* плашка «ваш год тепла» */
.cal-cap {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--wood-700);
  background: #fdeeda;
  border: 1px solid rgba(217, 138, 53, 0.35);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

/* полоса месяцев, входящих в год подписки */
.month-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin-bottom: 8px;
  scrollbar-width: thin;
}
.m-chip {
  flex: none;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  color: var(--wood-700);
  background: var(--honey-soft);
  border: 1.5px solid rgba(190, 120, 40, 0.35);
  border-radius: 999px;
  padding: 6px 11px;
  cursor: pointer;
}
.m-chip.on { background: var(--wood-700); border-color: var(--wood-700); color: var(--cream); }

.cal-nav-btn:disabled { opacity: 0.35; cursor: default; }
.cal-nav-btn:disabled:hover { background: var(--cream); }

/* --- чипы личных дат и праздников --- */
.mode-chips, .holi-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mode-chip, .holi-chip {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  color: var(--wood-700);
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s;
}
.mode-chip:hover, .holi-chip:hover { border-color: rgba(120, 80, 40, 0.4); }
.mode-chip.on { background: var(--wood-700); border-color: var(--wood-700); color: var(--cream); }
.mode-chip:disabled { opacity: 0.45; cursor: default; }
.holi-chip.picked { background: var(--honey-soft); border-color: rgba(190, 120, 40, 0.5); }

/* --- панель выбранных дат --- */
.slots { display: flex; gap: 5px; margin: 6px 0 4px; color: var(--berry); }
.slots .ic { width: 19px; height: 19px; }
.slots .off { color: rgba(120, 80, 40, 0.25); }

.pick-list { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.pick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
}
.pick-item .pe { flex: none; display: flex; color: var(--berry); }
.pick-item .pe .ic { width: 18px; height: 18px; }
.pick-item .pe.holi { color: var(--honey); }
.pick-item .pd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pick-item .pd b { font-size: 14px; }
.pick-item .pd span { font-size: 12.5px; color: var(--wood-500); }
.pick-del {
  flex: none;
  width: 28px; height: 28px;
  border: none;
  background: none;
  color: var(--wood-500);
  font-size: 15px;
  cursor: pointer;
  border-radius: 50%;
}
.pick-del:hover { background: #f6e6d0; color: var(--berry); }

.pick-empty {
  background: var(--cream);
  border: 1.5px dashed rgba(120, 80, 40, 0.3);
  border-radius: 16px;
  padding: 20px;
  font-size: 14px;
  color: var(--wood-500);
  text-align: center;
  line-height: 1.6;
}

.sub-actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }

/* --- что внутри --- */
.gift-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.gift-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--wood-700);
  line-height: 1.45;
}
.gift-card .gi { flex: none; color: var(--honey); display: flex; }
.gift-card .gi .ic { width: 22px; height: 22px; }

/* ============================================================
   Кабинет
   ============================================================ */
.login-card { max-width: 470px; margin: 0 auto; text-align: center; }
.login-card .field { text-align: left; }

.cab-grid { display: flex; flex-direction: column; gap: 24px; }

.date-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
}
.date-row:last-child { border-bottom: none; }
.date-row .de { flex: none; display: flex; color: var(--berry); }
.date-row .de.holi { color: var(--honey); }
.date-row .de .ic { width: 18px; height: 18px; }
.date-row .dd { flex: 1; min-width: 0; }
.date-row .soon {
  flex: none;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--wood-700);
  background: var(--honey-soft);
  border-radius: 999px;
  padding: 5px 11px;
}

.status-pill {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--wood-700);
  background: var(--cream);
  border: 1.5px dashed rgba(120, 80, 40, 0.35);
  border-radius: 999px;
  padding: 6px 13px;
  margin: 4px 0 12px;
}

/* ============================================================
   Формы, модалки, тост
   ============================================================ */
.field { margin: 14px 0; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--wood-700);
  margin-bottom: 6px;
}
input[type="text"], input[type="password"], input[type="number"], input[type="email"], select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--wood-900);
  background: #fff;
  border: 1.5px solid rgba(120, 80, 40, 0.28);
  border-radius: 13px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.12s ease;
}
input:focus, textarea:focus { border-color: var(--honey); }
textarea { resize: vertical; }

.hint-note { font-size: 12px; color: var(--wood-500); font-weight: 400; }

/* выпадающие подсказки адреса */
.field.has-hints { position: relative; }
.addr-hints {
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  z-index: 85;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 14px 30px rgba(62, 36, 12, 0.2);
  overflow: hidden;
  max-height: 224px;
  overflow-y: auto;
}
.addr-hints button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--wood-900);
  padding: 10px 13px;
  cursor: pointer;
}
.addr-hints button:hover { background: var(--cream); }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(52, 30, 10, 0.45);
  backdrop-filter: blur(3px);
}
.modal-overlay.open { display: flex; }
.modal {
  position: relative;
  width: min(440px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(40, 22, 6, 0.4);
  padding: 26px;
  animation: modal-in 0.18s ease;
}
@keyframes modal-in {
  from { transform: translateY(14px) scale(0.97); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.modal h2 { margin: 0 0 12px; }
.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border: none;
  background: var(--cream);
  border-radius: 50%;
  font-size: 15px;
  color: var(--wood-700);
  cursor: pointer;
}
.modal-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.modal-art {
  aspect-ratio: 1.6;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 16px;
}
.modal-art .ph { width: 26%; height: auto; opacity: 0.85; }

/* галерея в карточке товара */
.thumbs { display: flex; gap: 8px; margin: -6px 0 14px; flex-wrap: wrap; }
.thumb {
  width: 56px; height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: #f4e7d2;
  cursor: pointer;
  flex: none;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.on { border-color: var(--honey); }

#toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 16px);
  z-index: 90;
  max-width: min(460px, 92vw);
  background: var(--wood-900);
  color: var(--cream);
  font-size: 14px;
  border-radius: 14px;
  padding: 12px 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   Атмосфера: пылинки в свете и редкие листики
   (солнечных бликов не добавляем — солнце уже на фоне)
   ============================================================ */
.firefly {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffe9a8;
  box-shadow: 0 0 12px 4px rgba(255, 220, 130, 0.55);
  opacity: 0;
  pointer-events: none;
  animation: tw-firefly 8s ease-in-out infinite;
}
@keyframes tw-firefly {
  0%, 100% { opacity: 0; transform: translate(0, 0); }
  22% { opacity: 0.9; }
  50% { opacity: 0.35; transform: translate(7px, -11px); }
  78% { opacity: 0.85; transform: translate(-5px, -4px); }
}

.mote {
  position: fixed;
  z-index: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 244, 210, 0.95), rgba(255, 244, 210, 0));
  pointer-events: none;
  animation: mote-drift linear infinite;
}
@keyframes mote-drift {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: 0.85; }
  50% { transform: translate(3.2vw, -4vh); opacity: 0.5; }
  88% { opacity: 0.8; }
  100% { transform: translate(-2vw, 3vh); opacity: 0; }
}

.leaf {
  position: fixed;
  top: -50px;
  z-index: 1;
  pointer-events: none;
  animation: leaf-fall linear forwards;
}
.leaf .ic { width: 100%; height: 100%; }
@keyframes leaf-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  8% { opacity: 0.9; }
  30% { transform: translate(-3vw, 30vh) rotate(70deg); }
  60% { transform: translate(3vw, 62vh) rotate(160deg); }
  90% { opacity: 0.85; }
  100% { transform: translate(-1.5vw, 108vh) rotate(230deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .mote, .leaf, .firefly { display: none; }
  * { animation-duration: 0.001s !important; transition: none !important; }
}

/* ---------- «Письма из леса» ---------- */
.news-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.news-ic {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--honey-soft);
  border: 1.5px solid rgba(190, 120, 40, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wood-700);
}
.news-ic::before {
  content: '';
  width: 24px;
  height: 24px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5' fill='none' stroke='black' stroke-width='1.9'/%3E%3Cpath d='m3.5 7 8.5 6 8.5-6' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5' fill='none' stroke='black' stroke-width='1.9'/%3E%3Cpath d='m3.5 7 8.5 6 8.5-6' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.news-text { flex: 1; min-width: 220px; }
.news-form { display: flex; gap: 10px; flex-wrap: wrap; }
.news-form input { width: 240px; max-width: 62vw; }
.news-done { color: var(--moss); font-size: 14.5px; }

/* ---------- плавающая кнопка корзины ---------- */
.cart-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--wood-700);
  color: var(--cream);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14.5px;
  padding: 13px 19px;
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(40, 22, 6, 0.35);
  transition: transform 0.12s ease, background 0.12s;
}
.cart-fab:hover { transform: translateY(-2px); background: #5c3a1d; }
.cart-fab .ic { width: 19px; height: 19px; }
.cart-fab b {
  position: absolute;
  top: -7px;
  right: -5px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--berry);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(150, 50, 60, 0.4);
}

/* ---------- страница корзины ---------- */
.cart-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.cart-thumb {
  flex: none;
  width: 56px; height: 56px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb .ph { width: 55%; }
.cart-info { flex: 1; min-width: 0; }
.qty { display: flex; align-items: center; gap: 6px; flex: none; }
.qty button {
  width: 30px; height: 30px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  color: var(--wood-700);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.qty button:hover { background: #f6e9d3; }
.qty b { min-width: 22px; text-align: center; }
.gift-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--moss);
  border-radius: 999px;
  padding: 3px 9px;
  margin-left: 8px;
  vertical-align: 2px;
}
.promo-mini {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 13px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.45;
}
.promo-apply { margin-top: 7px; }
.promo-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--honey-soft);
  border: 1px solid rgba(190, 120, 40, 0.4);
  border-radius: 999px;
  padding: 5px 7px 5px 12px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--wood-700);
  margin: 0 6px 6px 0;
}
.promo-chip button {
  border: none;
  background: rgba(120, 75, 30, 0.16);
  color: var(--wood-700);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.soc-row { display: inline-flex; gap: 7px; vertical-align: middle; margin-left: 4px; }
.soc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--wood-700);
  color: var(--cream);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 11.5px;
  text-decoration: none;
  letter-spacing: 0.03em;
}
.soc-btn:hover { background: #5c3a1d; }

/* ============================================================
   Подвал
   ============================================================ */
.site-footer {
  margin-top: 34px;
  background: linear-gradient(180deg, #2e1f10, #221607);
  color: var(--cream);
}
.foot-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.foot-brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.06em;
}
.foot-tag { opacity: 0.75; font-size: 13.5px; }
.foot-legal { margin-left: auto; opacity: 0.55; font-size: 12px; }
@media (max-width: 700px) {
  .foot-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
  .foot-legal { margin-left: 0; }
}

/* ============================================================
   Админка
   ============================================================ */
.admin-body { background: #203118; }
.admin-body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #b9d18a url('/img/bg-16x9.webp') center / cover no-repeat;
  filter: saturate(0.85) brightness(0.97);
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.admin-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.admin-tab {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  color: var(--wood-700);
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
}
.admin-tab.on { background: var(--wood-700); border-color: var(--wood-700); color: var(--cream); }

.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 14px;
}
.admin-row.admin-off { opacity: 0.6; }
.admin-thumb {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: #fdeeda;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  color: #c98d4b;
  overflow: hidden;
}
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.admin-info b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-info span { font-size: 12.5px; color: var(--wood-500); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.dot-on { background: var(--moss); }
.dot-off { background: #c9b39a; }

.icon-btn {
  flex: none;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--cream);
  border-radius: 11px;
  color: var(--wood-700);
  cursor: pointer;
}
.icon-btn .ic { width: 16px; height: 16px; }
.icon-btn:hover { background: #f6e9d3; }
.icon-btn.danger:hover { background: #f8dede; color: var(--berry); border-color: rgba(200, 80, 90, 0.4); }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.form-grid .wide { grid-column: 1 / -1; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }

.img-preview {
  flex: none;
  width: 84px; height: 84px;
  border-radius: 14px;
  background: #fdeeda;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c98d4b;
  overflow: hidden;
}
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-preview .ph { width: 46%; }

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  color: var(--wood-700);
  margin-top: 6px;
  cursor: pointer;
}
.check-row input { width: 17px; height: 17px; accent-color: var(--honey); }

/* страница сборки заказов */
.done-row { opacity: 0.55; }
.done-row .dd b { text-decoration: line-through; }
.day-head {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: var(--wood-700);
  margin: 18px 0 4px;
}
.stat-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.stat-line:last-child { border-bottom: none; }
.stat-line b { font-size: 15px; }

/* дополнительные фото товара в админке */
.extra-row { display: flex; gap: 10px; margin: 8px 0 10px; flex-wrap: wrap; }
.extra-item {
  position: relative;
  width: 64px; height: 64px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  flex: none;
}
.extra-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.extra-del {
  position: absolute;
  top: 2px; right: 2px;
  width: 20px; height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(40, 22, 6, 0.6);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
