/* ============================================================
   Лунный Ларец — стили
   Пастельная палитра, мягкие тени, плавные анимации.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Manrope:wght@300;400;500;600;700&display=swap');

:root {
  /* Пастельная палитра */
  --cream: #faf6f1;
  --cream-2: #f4ece4;
  --blush: #f3d9dc;
  --lavender: #e7def4;
  --sage: #dcebdd;
  --peach: #fbe3d3;
  --sky: #e0e7f2;

  --ink: #4a423d;
  --ink-soft: #8c8079;
  --accent: #c9a2a8;       /* пыльная роза */
  --accent-deep: #b3868c;
  --line: #ece2d8;
  --white: #ffffff;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow-soft: 0 18px 50px -22px rgba(120, 95, 90, 0.35);
  --shadow-hover: 0 28px 70px -25px rgba(120, 95, 90, 0.45);
  --font-head: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; overflow-anchor: none; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-anchor: none;
  -webkit-font-smoothing: antialiased;
}

body.page-auth,
body.page-checkout {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(250,246,241,0.9) 0%, rgba(250,246,241,0.58) 48%, rgba(250,246,241,0.88) 100%),
    var(--cream);
}

body.page-auth > *,
body.page-checkout > * {
  position: relative;
  z-index: 1;
}

body.page-auth::before,
body.page-checkout::before,
body.page-auth::after,
body.page-checkout::after {
  content: '';
  position: fixed;
  inset: -18%;
  z-index: 0;
  pointer-events: none;
}

body.page-auth::before,
body.page-checkout::before {
  background:
    radial-gradient(ellipse at 18% 24%, rgba(243,217,220,0.86) 0 16%, transparent 38%),
    radial-gradient(ellipse at 78% 20%, rgba(231,222,244,0.78) 0 18%, transparent 42%),
    radial-gradient(ellipse at 52% 54%, rgba(251,227,211,0.86) 0 20%, transparent 46%),
    radial-gradient(ellipse at 24% 76%, rgba(220,235,221,0.78) 0 18%, transparent 44%),
    radial-gradient(ellipse at 84% 82%, rgba(224,231,242,0.8) 0 18%, transparent 42%);
  background-size: 140% 140%;
  filter: blur(38px) saturate(1.12);
  animation: pageAuraDrift 18s ease-in-out infinite alternate;
  will-change: transform, background-position, opacity;
}

body.page-auth::after,
body.page-checkout::after {
  background:
    linear-gradient(115deg, transparent 4%, rgba(255,255,255,0.42) 20%, transparent 36%),
    linear-gradient(62deg, transparent 26%, rgba(255,208,204,0.36) 45%, transparent 62%),
    linear-gradient(148deg, transparent 43%, rgba(218,235,220,0.3) 59%, transparent 76%);
  background-size: 160% 160%;
  filter: blur(14px);
  opacity: 0.86;
  animation: pageVeilDrift 13s ease-in-out infinite alternate;
  will-change: transform, background-position, opacity;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 500; line-height: 1.1; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container { width: min(1180px, 92vw); margin: 0 auto; }

/* ---------------- Хедер ---------------- */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(250, 246, 241, 0.72);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo__mark {
  width: 78px; height: 48px; border-radius: 14px;
  background: rgba(255,255,255,0.78);
  display: grid; place-items: center; overflow: hidden; padding: 3px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7), var(--shadow-soft);
}
.logo__mark img {
  width: 100%; height: 100%; object-fit: contain; border-radius: 11px;
}
.logo__text { font-family: var(--font-head); font-size: 26px; letter-spacing: 0.5px; }
.logo__text span { color: var(--accent-deep); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 15px; color: var(--ink-soft); transition: color 0.25s; position: relative; }
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); transition: width 0.3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 100%; }

.menu-btn {
  display: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--white); color: var(--ink); font-size: 22px;
  box-shadow: var(--shadow-soft); transition: transform 0.2s var(--ease), background 0.2s;
}
.menu-btn:hover { transform: translateY(-2px); }
.menu-btn.is-open { background: var(--ink); color: var(--cream); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 100px; font-size: 15px; font-weight: 600;
  background: var(--ink); color: var(--cream);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s;
  box-shadow: var(--shadow-soft);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn--ghost {
  background: var(--white); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn--accent { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--block { width: 100%; justify-content: center; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; min-height: clamp(620px, calc(100vh - 78px), 820px);
  overflow: hidden; display: flex; align-items: center;
  background: #7b6262;
}
.hero__inner { position: relative; z-index: 4; width: min(1180px, 92vw); }
.hero__text { max-width: 610px; padding: 72px 0 92px; color: #fff7ef; text-shadow: 0 2px 22px rgba(40, 27, 28, 0.38); }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: #f4cbc7; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(42px, 6vw, 76px); margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: #ffd6d1; }
.hero p { font-size: 18px; color: rgba(255,247,239,0.86); max-width: 500px; margin-bottom: 30px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn--accent {
  background: #fff7ef; color: var(--ink);
  box-shadow: 0 18px 50px -22px rgba(255, 235, 217, 0.95);
}
.hero .btn--ghost {
  background: rgba(255,255,255,0.12); color: #fff7ef;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.36);
  backdrop-filter: blur(10px);
}

/* Сцена героя */
.hero__backdrop {
  position: absolute; inset: -18px; z-index: 1; overflow: hidden;
  isolation: isolate; will-change: transform;
}
.hero__backdrop img {
  width: 100%; height: 100%; object-fit: cover; object-position: 58% 52%;
  transform: scale(1.035);
}
.hero__backdrop::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(42,29,31,0.78) 0%, rgba(72,48,50,0.58) 34%, rgba(70,48,50,0.16) 62%, rgba(39,28,34,0.22) 100%),
    linear-gradient(0deg, rgba(34,24,25,0.34), transparent 34%, rgba(32,34,48,0.16));
}
.hero__backdrop::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(circle at 83% 12%, rgba(218,229,255,0.2), transparent 18%),
    radial-gradient(circle at 68% 70%, rgba(255,169,95,0.2), transparent 30%),
    radial-gradient(circle at 17% 58%, rgba(255,218,198,0.12), transparent 26%);
  mix-blend-mode: screen;
}
.hero__moonlight {
  position: absolute; right: 6%; top: 5%; z-index: 3; width: 190px; height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236,242,255,0.28), transparent 65%);
  filter: blur(10px); opacity: 0.65; animation: moonPulse 7s ease-in-out infinite;
}
.hero__candle-glow {
  position: absolute; z-index: 3; width: 230px; height: 170px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,194,107,0.5), rgba(255,143,73,0.12) 48%, transparent 72%);
  filter: blur(18px); mix-blend-mode: screen; pointer-events: none;
  animation: candleFlicker 2.8s ease-in-out infinite;
}
.hero__candle-glow--left { left: 36%; top: 58%; }
.hero__candle-glow--right { right: 7%; top: 61%; animation-delay: -1.1s; }
.hero__shadow {
  position: absolute; left: 26%; right: 4%; bottom: 2%; z-index: 3; height: 28%;
  background: radial-gradient(ellipse at center, rgba(45,27,31,0.26), transparent 68%);
  filter: blur(20px); opacity: 0.55; animation: shadowDrift 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes candleFlicker {
  0%, 100% { opacity: 0.58; transform: scale(1); }
  35% { opacity: 0.82; transform: scale(1.06) translateY(-2px); }
  62% { opacity: 0.5; transform: scale(0.96) translateX(2px); }
}
@keyframes moonPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.08); }
}
@keyframes shadowDrift {
  0%, 100% { transform: translateX(0); opacity: 0.5; }
  50% { transform: translateX(12px); opacity: 0.68; }
}

/* ---------------- Секции ---------------- */
.content-flow {
  position: relative; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(250,246,241,0.94) 0%, rgba(250,246,241,0.56) 22%, rgba(250,246,241,0.78) 100%),
    var(--cream);
  perspective: 1200px;
}
.pastel-ambient {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; min-height: 100%;
  pointer-events: none; transform-style: preserve-3d;
}
.pastel-ambient__wash,
.pastel-ambient__veil,
.pastel-ambient__depth {
  position: absolute; left: -18%; top: -18%; width: 136%; height: 136%;
  display: block; will-change: transform, background-position, opacity;
}
.pastel-ambient__wash {
  z-index: 0;
  background:
    radial-gradient(ellipse at 18% 24%, rgba(243,217,220,0.95) 0 16%, transparent 38%),
    radial-gradient(ellipse at 78% 20%, rgba(231,222,244,0.88) 0 18%, transparent 42%),
    radial-gradient(ellipse at 52% 54%, rgba(251,227,211,0.92) 0 20%, transparent 46%),
    radial-gradient(ellipse at 24% 76%, rgba(220,235,221,0.84) 0 18%, transparent 44%),
    radial-gradient(ellipse at 84% 82%, rgba(224,231,242,0.86) 0 18%, transparent 42%);
  background-size: 140% 140%;
  filter: blur(38px) saturate(1.12);
  opacity: 0.95;
  transform: translate3d(-4%, -3%, -80px) rotate(-5deg) scale(1.1);
  animation: ambientWash 16s ease-in-out infinite alternate;
}
.pastel-ambient__veil {
  z-index: 1;
  background:
    linear-gradient(115deg, transparent 4%, rgba(255,255,255,0.48) 20%, transparent 36%),
    linear-gradient(62deg, transparent 26%, rgba(255,208,204,0.42) 45%, transparent 62%),
    linear-gradient(148deg, transparent 43%, rgba(218,235,220,0.36) 59%, transparent 76%);
  background-size: 160% 160%;
  filter: blur(14px);
  opacity: 0.88;
  transform: rotateZ(-8deg) translate3d(-8%, -15%, 0) scale(1.2) skewY(-8deg);
  animation: ambientVeil 12s ease-in-out infinite alternate;
}
.pastel-ambient__depth {
  z-index: 2;
  background:
    conic-gradient(from 35deg at 50% 50%,
      rgba(255,255,255,0.22),
      rgba(243,217,220,0.38),
      rgba(231,222,244,0.34),
      rgba(220,235,221,0.32),
      rgba(251,227,211,0.38),
      rgba(255,255,255,0.22));
  filter: blur(62px);
  opacity: 0.58;
  transform: translate3d(6%, 10%, 40px) rotate(12deg) scale(1.08);
  animation: ambientDepth 20s ease-in-out infinite alternate;
}
.content-flow > * {
  position: relative; z-index: 2;
}
.content-flow > .pastel-ambient {
  position: absolute; inset: 0; z-index: 0;
}
.section { padding: 70px 0; }
.section__head { text-align: center; margin-bottom: 46px; }
.section__head h2 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 12px; }
.section__head p { color: var(--ink-soft); max-width: 540px; margin: 0 auto; }

@keyframes ambientWash {
  0% {
    background-position: 0% 0%;
    transform: translate3d(-5%, -4%, -80px) rotate(-6deg) scale(1.1);
  }
  50% {
    background-position: 70% 36%;
    transform: translate3d(4%, 2%, -30px) rotate(4deg) scale(1.18);
  }
  100% {
    background-position: 100% 84%;
    transform: translate3d(-1%, 7%, -60px) rotate(9deg) scale(1.13);
  }
}
@keyframes ambientVeil {
  0% {
    background-position: 0% 30%;
    transform: rotateZ(-10deg) translate3d(-10%, -16%, 0) scale(1.16) skewY(-9deg);
  }
  100% {
    background-position: 100% 72%;
    transform: rotateZ(6deg) translate3d(7%, 7%, 0) scale(1.26) skewY(7deg);
  }
}
@keyframes ambientDepth {
  0% { transform: translate3d(8%, 10%, 40px) rotate(0deg) scale(1.08); opacity: 0.45; }
  100% { transform: translate3d(-7%, -2%, 80px) rotate(42deg) scale(1.2); opacity: 0.72; }
}

@keyframes pageAuraDrift {
  0% {
    background-position: 0% 0%;
    transform: translate3d(-3%, -2%, 0) rotate(-4deg) scale(1.04);
    opacity: 0.88;
  }
  50% {
    background-position: 72% 38%;
    transform: translate3d(3%, 2%, 0) rotate(3deg) scale(1.08);
    opacity: 1;
  }
  100% {
    background-position: 100% 86%;
    transform: translate3d(-1%, 4%, 0) rotate(-2deg) scale(1.05);
    opacity: 0.9;
  }
}

@keyframes pageVeilDrift {
  0% {
    background-position: 0% 28%;
    transform: translate3d(-5%, -4%, 0) rotate(-7deg) skewY(-5deg);
    opacity: 0.72;
  }
  100% {
    background-position: 100% 74%;
    transform: translate3d(4%, 3%, 0) rotate(5deg) skewY(4deg);
    opacity: 0.9;
  }
}

@keyframes drawerAuraDrift {
  0% {
    background-position: 8% 0%;
    transform: translate3d(-4%, -2%, 0) rotate(-3deg) scale(1.02);
    opacity: 0.76;
  }
  100% {
    background-position: 94% 82%;
    transform: translate3d(4%, 3%, 0) rotate(4deg) scale(1.08);
    opacity: 0.92;
  }
}

@keyframes drawerVeilDrift {
  0% {
    background-position: 0% 32%;
    transform: translate3d(-6%, 0, 0) rotate(-6deg);
    opacity: 0.6;
  }
  100% {
    background-position: 100% 68%;
    transform: translate3d(5%, 2%, 0) rotate(5deg);
    opacity: 0.78;
  }
}

/* Фильтры */
.filters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.filter {
  padding: 10px 22px; border-radius: 100px; font-size: 15px; color: var(--ink-soft);
  background: var(--white); box-shadow: inset 0 0 0 1px var(--line);
  transition: all 0.25s var(--ease);
}
.filter:hover { color: var(--ink); transform: translateY(-2px); }
.filter.is-active {
  background: var(--ink); color: var(--cream); box-shadow: var(--shadow-soft);
}

/* ---------------- Сетка карточек ---------------- */
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
  overflow-anchor: none;
}

.card {
  position: relative; border-radius: var(--radius); background: var(--white);
  box-shadow: var(--shadow-soft); overflow: hidden;
  transform-style: preserve-3d; will-change: transform;
  contain: layout paint;
  overflow-anchor: none;
  transition: box-shadow 0.3s var(--ease);
  cursor: pointer;
}
.card:hover { box-shadow: var(--shadow-hover); }
.card__media {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--cream-2);
  contain: strict;
  overflow-anchor: none;
}
.card__slider {
  position: absolute; inset: 0;
  contain: strict;
  isolation: isolate;
  overflow-anchor: none;
}
.card__slider .slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.15s ease, transform 0.9s var(--ease);
  overflow-anchor: none;
  pointer-events: none;
}
.card__slider .slide.is-active { opacity: 1; }
.card:hover .card__slider .slide.is-active { transform: scale(1.06); }

.card__dots {
  position: absolute; bottom: 12px; left: 0; right: 0; z-index: 2;
  display: flex; gap: 6px; justify-content: center;
}
.card__dots .dot {
  width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.65);
  box-shadow: 0 0 0 1px rgba(120,95,90,0.18); transition: all 0.4s var(--ease);
}
.card__dots .dot.is-active { background: #fff; width: 18px; border-radius: 100px; }
.card__glare {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%),
    rgba(255,255,255,0.22), rgba(255,255,255,0.08) 18%, transparent 34%);
  transition: opacity 0.3s;
}
.card:hover .card__glare { opacity: 0.55; }

.badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  padding: 6px 14px; border-radius: 100px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.5px; backdrop-filter: blur(6px);
  background: rgba(255,255,255,0.78); color: var(--accent-deep);
}
.badge--out {
  top: 14px; left: auto; right: 14px; background: rgba(74,66,61,0.85); color: #fff;
}

.card__body { padding: 22px 22px 24px; transform: translateZ(30px); }
.card__cat { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent-deep); }
.card__title { font-size: 24px; margin: 6px 0 8px; }
.card__desc {
  font-size: 14px; color: var(--ink-soft); margin-bottom: 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__foot { display: flex; align-items: center; justify-content: space-between; }
.card__price { font-family: var(--font-head); font-size: 26px; font-weight: 600; }
.card__qty { font-size: 13px; color: var(--ink-soft); }

/* Появление при скролле */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------------- Модалка товара ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 24px;
}
.modal.is-open { display: flex; }
.modal__overlay {
  position: absolute; inset: 0; background: rgba(74,66,61,0.35);
  backdrop-filter: blur(6px); animation: fade 0.3s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(0.96); } to { opacity: 1; transform: none; } }
.modal__card {
  position: relative; z-index: 2; width: min(900px, 100%); max-height: 88vh; overflow: auto;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-hover);
  display: grid; grid-template-columns: 1fr 1fr; animation: pop 0.4s var(--ease);
}
.modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 40px; height: 40px; border-radius: 50%; font-size: 20px;
  background: rgba(255,255,255,0.9); box-shadow: var(--shadow-soft); color: var(--ink);
  transition: transform 0.2s;
}
.modal__close:hover { transform: rotate(90deg); }
.gallery__main { aspect-ratio: 1/1; background: var(--cream-2); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 10px; padding: 14px; flex-wrap: wrap; }
.gallery__thumbs img {
  width: 64px; height: 64px; border-radius: 12px; object-fit: cover; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line); transition: transform 0.2s, box-shadow 0.2s;
}
.gallery__thumbs img:hover { transform: translateY(-2px); }
.gallery__thumbs img.is-active { box-shadow: 0 0 0 2px var(--accent); }
.modal__info { padding: 38px 38px 34px; }
.modal__info .card__cat { font-size: 13px; }
.modal__info h2 { font-size: 38px; margin: 8px 0 14px; }
.modal__scent { display: inline-block; padding: 6px 14px; border-radius: 100px;
  background: var(--lavender); font-size: 13px; margin-bottom: 16px; color: var(--accent-deep); }
.modal__info p { color: var(--ink-soft); margin-bottom: 22px; }
.modal__meta { display: flex; align-items: baseline; gap: 18px; margin-bottom: 24px; }
.modal__price { font-family: var(--font-head); font-size: 40px; font-weight: 600; }

/* ---------------- Преимущества ---------------- */
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.perk { background: var(--white); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-soft); }
.perk__icon { font-size: 34px; margin-bottom: 14px; }
.perk h3 { font-size: 24px; margin-bottom: 8px; }
.perk p { color: var(--ink-soft); font-size: 15px; }

/* ---------------- Футер ---------------- */
.footer { padding: 50px 0 36px; border-top: 1px solid var(--line); margin-top: 30px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer p { color: var(--ink-soft); font-size: 14px; }
.footer a { color: var(--accent-deep); }

/* ---------------- Пусто ---------------- */
.empty { text-align: center; padding: 60px 0; color: var(--ink-soft); grid-column: 1 / -1; }

/* ============================================================
   АДМИНКА
   ============================================================ */
.admin-bar { background: var(--ink); color: var(--cream); padding: 14px 0; }
.admin-bar__inner { display: flex; align-items: center; justify-content: space-between; }
.admin-bar a, .admin-bar button { color: var(--cream); font-size: 15px; }

.admin-wrap { padding: 40px 0 80px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; flex-wrap: wrap; gap: 16px; }
.admin-head h1 { font-size: 40px; }

.panel { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 28px; margin-bottom: 26px; }
.panel h2 { font-size: 28px; margin-bottom: 18px; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table th { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); }
.admin-table img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.admin-table .row-actions { display: flex; gap: 8px; }
.pill { padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.pill--ok { background: var(--sage); color: #4d6a4f; }
.pill--out { background: var(--blush); color: var(--accent-deep); }

/* Формы */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); font-family: inherit; font-size: 15px;
  background: var(--cream); border: 1px solid var(--line); color: var(--ink); transition: border 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,162,168,0.2);
}
.field textarea { min-height: 110px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.uploader {
  border: 2px dashed var(--line); border-radius: var(--radius-sm); padding: 22px; text-align: center;
  color: var(--ink-soft); cursor: pointer; transition: border 0.2s, background 0.2s;
}
.uploader:hover { border-color: var(--accent); background: var(--cream); }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.thumb { position: relative; }
.thumb img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; box-shadow: inset 0 0 0 1px var(--line); }
.thumb button {
  position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-deep); color: #fff; font-size: 14px; box-shadow: var(--shadow-soft);
}

.btn--danger { background: #c98a8a; color: #fff; }
.btn--soft { background: var(--cream-2); color: var(--ink); }

/* Логин */
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 40px 0; }
.login-card {
  background: rgba(255,255,255,0.86); border-radius: var(--radius); box-shadow: var(--shadow-soft);
  padding: 44px; width: min(420px, 92vw); text-align: center;
  border: 1px solid rgba(255,255,255,0.7); backdrop-filter: blur(18px);
}
.login-card .logo { justify-content: center; margin-bottom: 18px; }
.login-card h1 { font-size: 32px; margin-bottom: 6px; }
.login-card p { color: var(--ink-soft); margin-bottom: 24px; font-size: 15px; }
.login-error { color: #c0686e; font-size: 14px; margin-top: 12px; min-height: 18px; }
.login-error.is-ok { color: #5d8a63; }

/* Вкладки вход / регистрация */
.auth-tabs {
  display: flex; gap: 6px; background: var(--cream-2); padding: 5px; border-radius: 100px;
  margin: 8px 0 22px;
}
.auth-tab {
  flex: 1; padding: 10px 14px; border-radius: 100px; font-size: 15px; font-weight: 600;
  color: var(--ink-soft); transition: all 0.25s var(--ease);
}
.auth-tab.is-active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-soft); }

/* Блок пользователя в шапке */
.header__auth { display: flex; align-items: center; }
.auth-user { display: flex; align-items: center; gap: 12px; }
.auth-email {
  font-size: 14px; color: var(--ink-soft); max-width: 180px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 700px) { .auth-email { display: none; } }

/* Поле пароля с кнопкой показать/скрыть */
.pw-field { position: relative; }
.pw-field input { padding-right: 48px; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 8px; font-size: 17px; line-height: 1;
  opacity: 0.55; transition: opacity 0.2s, background 0.2s;
}
.pw-toggle:hover { opacity: 1; background: var(--cream-2); }

/* Тост */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--ink); color: var(--cream); padding: 14px 24px; border-radius: 100px;
  box-shadow: var(--shadow-hover); z-index: 200; transition: transform 0.4s var(--ease); font-size: 15px;
}
.toast.is-show { transform: translateX(-50%) translateY(0); }

/* ---------------- Адаптив ---------------- */
@media (max-width: 900px) {
  .header { position: sticky; }
  .header__inner { position: relative; }
  .menu-btn { display: grid; place-items: center; flex: 0 0 auto; }
  .nav {
    position: absolute; left: 0; right: 0; top: calc(100% + 10px);
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px; border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.96); box-shadow: var(--shadow-hover);
    border: 1px solid var(--line); backdrop-filter: blur(12px);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 14px; border-radius: 12px; color: var(--ink); }
  .nav a:hover { background: var(--cream-2); }
  .nav a::after { display: none; }
  .hero { min-height: 720px; align-items: flex-end; }
  .hero__backdrop img { object-position: 63% 50%; }
  .hero__backdrop::before {
    background:
      linear-gradient(0deg, rgba(42,29,31,0.86) 0%, rgba(63,42,45,0.58) 48%, rgba(52,36,45,0.12) 100%),
      linear-gradient(90deg, rgba(45,30,34,0.38), transparent 72%);
  }
  .hero__text { max-width: 620px; padding: 330px 0 58px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .perks { grid-template-columns: 1fr; }
  .modal__card { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .container { width: min(100% - 28px, 1180px); }
  .header__inner { gap: 10px; padding: 12px 0; }
  .logo { gap: 8px; min-width: 0; }
  .logo__mark { width: 58px; height: 36px; font-size: 19px; flex: 0 0 auto; }
  .logo__text { font-size: 21px; white-space: nowrap; }
  .header__right { gap: 8px; flex: 0 0 auto; }
  .menu-btn, .cart-btn { width: 40px; height: 40px; }
  .btn--sm { padding: 8px 12px; font-size: 13px; }
  .hero { min-height: 720px; }
  .hero__backdrop { inset: -10px; }
  .hero__backdrop img { object-position: 68% 50%; transform: scale(1.02); }
  .hero__text { padding: 330px 0 44px; }
  .hero h1 { font-size: clamp(36px, 12vw, 46px); margin-bottom: 16px; }
  .hero p { font-size: 16px; margin-bottom: 22px; }
  .hero__actions .btn { flex: 1 1 150px; justify-content: center; }
  .hero__moonlight { width: 86px; height: 86px; }
  .hero__candle-glow { width: 104px; height: 86px; }
  .pastel-ambient__wash { filter: blur(32px) saturate(1.08); opacity: 0.82; }
  .pastel-ambient__veil { opacity: 0.58; }
  .pastel-ambient__depth { opacity: 0.42; }
  .section { padding: 46px 0; }
  .section__head { margin-bottom: 30px; }
  .grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}

/* ============================================================
   КОРЗИНА / ОФОРМЛЕНИЕ / РЕЗУЛЬТАТ
   ============================================================ */
.header__right { display: flex; align-items: center; gap: 16px; }

.cart-btn {
  position: relative; font-size: 22px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--white); box-shadow: var(--shadow-soft); transition: transform 0.2s var(--ease);
}
.cart-btn:hover { transform: translateY(-2px); }
.cart-badge {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 100px; background: var(--accent-deep); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Выдвижная корзина */
.drawer { position: fixed; inset: 0; z-index: 120; pointer-events: none; }
.drawer.is-open { pointer-events: auto; }
.drawer__overlay {
  position: absolute; inset: 0; background: rgba(74,66,61,0.35); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.3s;
}
.drawer.is-open .drawer__overlay { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(420px, 92vw);
  background:
    linear-gradient(180deg, rgba(250,246,241,0.9), rgba(250,246,241,0.74)),
    var(--cream);
  box-shadow: -20px 0 60px -30px rgba(120,95,90,0.5);
  display: flex; flex-direction: column; transform: translateX(100%);
  transition: transform 0.4s var(--ease); overflow: hidden;
}
.drawer__panel::before,
.drawer__panel::after {
  content: '';
  position: absolute;
  inset: -18%;
  pointer-events: none;
}
.drawer__panel::before {
  background:
    radial-gradient(ellipse at 18% 18%, rgba(243,217,220,0.82) 0 18%, transparent 42%),
    radial-gradient(ellipse at 78% 28%, rgba(231,222,244,0.72) 0 18%, transparent 42%),
    radial-gradient(ellipse at 36% 72%, rgba(220,235,221,0.76) 0 18%, transparent 44%),
    radial-gradient(ellipse at 86% 82%, rgba(251,227,211,0.82) 0 20%, transparent 44%);
  background-size: 145% 145%;
  filter: blur(30px) saturate(1.1);
  opacity: 0.86;
  animation: drawerAuraDrift 16s ease-in-out infinite alternate;
  will-change: transform, background-position, opacity;
}
.drawer__panel::after {
  background:
    linear-gradient(120deg, transparent 8%, rgba(255,255,255,0.44) 28%, transparent 48%),
    linear-gradient(42deg, transparent 32%, rgba(255,208,204,0.34) 52%, transparent 70%);
  background-size: 160% 160%;
  filter: blur(12px);
  opacity: 0.72;
  animation: drawerVeilDrift 11s ease-in-out infinite alternate;
  will-change: transform, background-position, opacity;
}
.drawer__panel > * { position: relative; z-index: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between; padding: 22px 24px;
  border-bottom: 1px solid rgba(236,226,216,0.78);
}
.drawer__head h3 { font-size: 26px; }
.drawer__close { width: 38px; height: 38px; border-radius: 50%; font-size: 18px; background: var(--white); box-shadow: var(--shadow-soft); transition: transform 0.2s; }
.drawer__close:hover { transform: rotate(90deg); }
.drawer__body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.drawer__foot { padding: 20px 24px; border-top: 1px solid rgba(236,226,216,0.78); }

.cart-empty { text-align: center; color: var(--ink-soft); padding: 50px 0; font-size: 18px; }
.cart-empty span { font-size: 14px; }

.cart-item { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
.cart-item__info { flex: 1; }
.cart-item__name { font-size: 15px; font-weight: 600; }
.cart-item__price { font-size: 14px; color: var(--ink-soft); margin-bottom: 6px; }
.cart-item__rm { color: var(--ink-soft); font-size: 16px; align-self: flex-start; transition: color 0.2s; }
.cart-item__rm:hover { color: var(--accent-deep); }

.qty { display: inline-flex; align-items: center; gap: 12px; background: var(--white); border-radius: 100px; padding: 4px 6px; box-shadow: inset 0 0 0 1px var(--line); }
.qty button { width: 26px; height: 26px; border-radius: 50%; font-size: 16px; color: var(--ink); transition: background 0.2s; }
.qty button:hover { background: var(--cream-2); }
.qty span { min-width: 18px; text-align: center; font-weight: 600; }

.cart-total { display: flex; justify-content: space-between; font-family: var(--font-head); font-size: 24px; font-weight: 600; margin-bottom: 16px; }

/* Оформление */
.checkout { padding: 40px 0 80px; }
.checkout__title { font-size: clamp(34px, 5vw, 52px); margin-bottom: 30px; }
.checkout__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 26px; align-items: start; }
.summary { position: sticky; top: 100px; }
.co-sum { display: flex; justify-content: space-between; font-size: 15px; color: var(--ink-soft); margin: 10px 0; }

.summary__item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary__item img { width: 50px; height: 50px; border-radius: 12px; object-fit: cover; }
.summary__info { flex: 1; }
.summary__name { font-size: 14px; font-weight: 600; }
.summary__meta { font-size: 13px; color: var(--ink-soft); }
.summary__line { font-weight: 600; }
.summary__note { font-size: 13px; color: var(--ink-soft); text-align: center; margin-top: 12px; }

/* Способы доставки */
.delivery { display: flex; flex-direction: column; gap: 10px; }
.delivery__opt {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--cream); border: 1px solid var(--line); cursor: pointer; transition: all 0.2s var(--ease);
}
.delivery__opt.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,162,168,0.15); background: var(--white); }
.delivery__opt input { accent-color: var(--accent-deep); }
.delivery__label { flex: 1; }
.delivery__price { font-weight: 600; }

/* Результат оплаты */
.result-card {
  max-width: 540px; margin: 70px auto; text-align: center; background: var(--white);
  border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 50px 40px;
}
.result-emoji { font-size: 64px; margin-bottom: 16px; }
.result-card h1 { font-size: 38px; margin-bottom: 12px; }
.result-card p { color: var(--ink-soft); margin-bottom: 18px; }
.result-meta { font-size: 14px; color: var(--accent-deep); margin-bottom: 24px; }
.result-actions { display: flex; gap: 12px; justify-content: center; }

/* ============================================================
   АКЦИИ / СКИДКИ
   ============================================================ */
.badge--sale {
  left: auto; right: 14px; top: 14px;
  background: linear-gradient(135deg, #e8a0a6, var(--accent-deep)); color: #fff; font-weight: 700;
}
/* если есть и «нет в наличии», и скидка — сдвигаем скидку ниже */
.card__media .badge--out + .badge--sale,
.card__media .badge--sale ~ .badge--out { top: 48px; }

.price-old { color: var(--ink-soft); text-decoration: line-through; font-size: 0.8em; font-weight: 400; }
.price-sale { color: var(--accent-deep); }

.filter--sale.is-active { background: linear-gradient(135deg, #e8a0a6, var(--accent-deep)); }

/* ============================================================
   АДМИНКА: вкладки и заказы
   ============================================================ */
.admin-tabs { display: flex; gap: 6px; background: var(--cream-2); padding: 5px; border-radius: 100px; }
.admin-tab {
  padding: 10px 22px; border-radius: 100px; font-size: 15px; font-weight: 600;
  color: var(--ink-soft); transition: all 0.25s var(--ease);
}
.admin-tab.is-active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-soft); }

.order { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; margin-bottom: 14px; }
.order__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.order__num { font-weight: 700; }
.order__date { color: var(--ink-soft); font-size: 13px; margin-left: 10px; }
.order__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 12px; }
.order__label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-deep); margin-bottom: 4px; }
.order__muted { color: var(--ink-soft); font-size: 14px; }
.order__comment { background: var(--cream); border-radius: 12px; padding: 8px 12px; font-size: 14px; margin-bottom: 12px; }
.order__items { font-size: 14px; color: var(--ink-soft); padding-top: 12px; border-top: 1px solid var(--line); line-height: 1.8; }
.order__total { font-family: var(--font-head); font-size: 22px; font-weight: 600; margin-top: 10px; }
@media (max-width: 560px) { .order__grid { grid-template-columns: 1fr; } }

@media (max-width: 860px) {
  .checkout__grid { grid-template-columns: 1fr; }
  .summary { position: static; }
}

@media (max-width: 560px) {
  .header__right { gap: 6px; }
  .menu-btn, .cart-btn { width: 36px; height: 36px; font-size: 19px; }
  .logo__mark { width: 52px; height: 32px; font-size: 17px; }
  .logo { gap: 6px; }
  .logo__text { font-size: clamp(16px, 4.7vw, 19px); }
  .header__auth .btn { padding: 7px 10px; font-size: 12px; white-space: nowrap; }
}

@media (max-width: 420px) {
  .logo__mark { width: 64px; height: 40px; }
  .logo__text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.1ms !important; }
  .pastel-ambient * { transform: none !important; }
  body.page-auth::before,
  body.page-checkout::before,
  body.page-auth::after,
  body.page-checkout::after,
  .drawer__panel::before,
  .drawer__panel::after { transform: none !important; }
}
