:root {
  --pomegranate: #b8322a;
  --pomegranate-dark: #8e2119;
  --saffron: #f2a33a;
  --apricot: #f7c58f;
  --terracotta: #c8553d;
  --pistachio: #6f8f2f;
  --cream: #fff6e9;
  --sand: #f6e6cf;
  --card: #fffdf9;
  --ink: #3b1f14;
  --muted: #8a6a58;
  --line: #ecd8bd;
  --shadow: 0 10px 30px -12px rgba(110, 50, 20, .35);
  --radius: 18px;
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 140px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  background-image: radial-gradient(circle at 1px 1px, rgba(200, 85, 61, .07) 1px, transparent 0);
  background-size: 22px 22px;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); font-size: .92em; }
[hidden] { display: none !important; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 700; text-decoration: none; transition: transform .15s, background .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--pomegranate); color: #fff; box-shadow: 0 8px 20px -8px rgba(184, 50, 42, .7); }
.btn--primary:hover { background: var(--pomegranate-dark); }
.btn--primary:disabled { opacity: .5; cursor: not-allowed; }
.btn--ghost { background: rgba(255, 255, 255, .15); color: #fff; border: 2px solid rgba(255, 255, 255, .7); backdrop-filter: blur(4px); }
.btn--ghost:hover { background: rgba(255, 255, 255, .28); }
.btn--small { padding: 9px 18px; font-size: .92rem; }
.btn--block { width: 100%; }
.btn--wa { background: #25a35a; color: #fff; }
.btn--tg { background: #2a9ed8; color: #fff; }
.icon-btn { background: var(--sand); border: 0; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; }
.link-btn { background: none; border: 0; color: var(--pomegranate); cursor: pointer; padding: 0; font-weight: 500; justify-self: start; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 246, 233, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__row { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--saffron), var(--terracotta), var(--pomegranate), var(--saffron));
  color: #fff; font-size: 1.3rem;
}
.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__text b { font-family: var(--font-head); font-size: 1.45rem; color: var(--pomegranate); }
.logo__text small { color: var(--muted); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--pomegranate); }
.header__phone { font-weight: 700; text-decoration: none; white-space: nowrap; }
.cart-btn {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--cream); border: 0; border-radius: 999px;
  padding: 10px 18px; cursor: pointer; font-weight: 700;
}
.cart-btn__count {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: var(--saffron); color: var(--ink); font-size: .75rem;
  display: grid; place-items: center;
}
.cart-btn.bump { animation: bump .4s; }
@keyframes bump { 40% { transform: scale(1.12); } }

/* ---------- Первый экран ---------- */
.hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; }
.hero__media {
  position: absolute; inset: 0; z-index: -1;
  background: url('hero.jpg') center / cover no-repeat, var(--terracotta);
}
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(59, 20, 10, .88) 0%, rgba(142, 33, 25, .62) 45%, rgba(242, 163, 58, .15) 100%);
}
.hero__video { width: 100%; height: 100%; object-fit: cover; }
.hero__content { padding: 96px 0 84px; max-width: 1200px; }
.hero__kicker { color: var(--apricot); letter-spacing: .12em; text-transform: uppercase; font-size: .82rem; font-weight: 500; margin: 0 0 14px; }
.hero h1 { font-family: var(--font-head); font-size: clamp(2.1rem, 5vw, 3.9rem); line-height: 1.08; margin: 0 0 18px; max-width: 14ch; }
.hero h1 span { color: var(--saffron); }
.hero__lead { font-size: 1.2rem; max-width: 40ch; margin: 0 0 30px; opacity: .92; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__facts { list-style: none; padding: 0; margin: 46px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__facts li { background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px); border-radius: 999px; padding: 8px 16px; font-size: .95rem; }
.hero__facts b { margin-right: 4px; }

/* ---------- Каталог ---------- */
.catalog__bar {
  position: sticky; top: 68px; z-index: 20;
  background: rgba(255, 246, 233, .95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); padding: 12px 0;
}
/* Компьютер: все пункты видны, переносятся на следующую строку. Телефон: лента с прокруткой и затуханием справа. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 10px; }
.chip {
  flex: none; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 6px 14px; cursor: pointer; font-weight: 500; white-space: nowrap; transition: .2s;
}
.chip:hover { border-color: var(--saffron); }
.chip--pick { background: #fff1dc; border-color: var(--apricot); }
.chip.active { background: var(--pomegranate); border-color: var(--pomegranate); color: #fff; }
@media (max-width: 760px) {
  .chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 40px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
  }
  .chips::-webkit-scrollbar { display: none; }
}
.tools { display: flex; gap: 10px; }
.search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 16px; color: var(--muted);
}
.search:focus-within { border-color: var(--saffron); }
.search input { flex: 1; border: 0; background: none; outline: none; padding: 10px 0; color: var(--ink); min-width: 0; }
#sort { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 0 14px; cursor: pointer; }

.loading, .empty { text-align: center; padding: 60px 0; color: var(--muted); font-size: 1.1rem; }
.cat-section { padding-top: 34px; }
.cat-title { font-family: var(--font-head); font-size: 1.9rem; margin: 0 0 18px; display: flex; align-items: center; gap: 12px; }
.cat-title small { font-family: var(--font-body); font-size: .9rem; color: var(--muted); font-weight: 400; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }

.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 2px 0 var(--line), var(--shadow);
  display: flex; flex-direction: column; transition: transform .2s;
}
.card:hover { transform: translateY(-4px); }
.card.is-out { opacity: .55; }
.card__img { position: relative; aspect-ratio: 4 / 3; background: var(--sand); cursor: pointer; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card__img img { transform: scale(1.06); }
.badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.badges--static { position: static; flex-direction: row; flex-wrap: wrap; }
.badge {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  background: var(--saffron); color: var(--ink);
}
.badge--new { background: var(--pistachio); color: #fff; }
.badge--sale { background: var(--pomegranate); color: #fff; font-size: .85rem; letter-spacing: 0; }
.badge--hit { background: var(--saffron); color: var(--ink); }

/* ---------- Подборки на главной: новинка крупно и ленты ---------- */
.feature {
  margin-top: 34px; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--card); border-radius: 24px;
  overflow: hidden; box-shadow: var(--shadow); border: 2px solid var(--apricot);
}
.feature__img { cursor: pointer; min-height: 300px; background: var(--sand); }
.feature__img img { width: 100%; height: 100%; object-fit: cover; }
.feature__body { padding: 30px 34px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.feature__kicker { align-self: flex-start; background: var(--pistachio); color: #fff; font-weight: 700; padding: 5px 14px; border-radius: 999px; font-size: .85rem; }
.feature h2 { font-family: var(--font-head); font-size: 2.3rem; margin: 0; line-height: 1.1; cursor: pointer; }
.feature p { margin: 0; color: var(--muted); }
.feature__buy { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.feature__buy .price { font-size: 1.7rem; }
.pick__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pick__head .cat-title { margin: 0; }
.pick__nav { display: flex; align-items: center; gap: 6px; flex: none; }
.pick__nav .icon-btn { font-size: 1.4rem; line-height: 1; }
.pick__nav .link-btn { margin-left: 6px; font-weight: 700; color: var(--pomegranate); }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, calc((100% - 60px) / 4)); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding: 4px 2px 14px;
}
.rail > .card { scroll-snap-align: start; }
.pick--sale { background: linear-gradient(180deg, rgba(184, 50, 42, .07), transparent 70%); border-radius: 24px; margin-top: 30px; padding: 22px 18px 4px; }
.modal__more { grid-column: 1 / -1; padding: 6px 30px 26px; border-top: 1px solid var(--line); }
.modal__more h4 { font-family: var(--font-head); font-size: 1.4rem; margin: 16px 0 12px; }
.rail--mini { grid-auto-columns: 170px; gap: 12px; }
.rail--mini .card__body { padding: 10px 12px 12px; }
.rail--mini .card__name { font-size: .92rem; }
.rail--mini .card__bottom { flex-direction: column; align-items: stretch; }
.rail--mini .price { font-size: 1.05rem; }
.rail--mini .add-btn { padding: 8px 10px; }
.save { color: var(--pistachio); font-weight: 600; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature__img { min-height: 0; aspect-ratio: 16 / 10; }
  .feature__body { padding: 20px; }
  .feature h2 { font-size: 1.8rem; }
  .rail { grid-auto-columns: 46%; gap: 12px; }
  .pick__nav .icon-btn { display: none; }
  .pick--sale { padding: 16px 10px 2px; }
  .modal__more { padding: 4px 16px 20px; }
}
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card__name { font-weight: 700; font-size: 1.05rem; margin: 0; cursor: pointer; }
.card__origin { color: var(--muted); font-size: .85rem; }
.card__bottom { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.card__ctrl { margin-left: auto; }
.price { font-weight: 700; font-size: 1.25rem; color: var(--pomegranate); white-space: nowrap; }
.price small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.price s { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; line-height: 1; }
.add-btn {
  border: 0; background: var(--saffron); color: var(--ink); border-radius: 999px; padding: 10px 16px;
  font-weight: 700; cursor: pointer; transition: .2s; white-space: nowrap;
}
.add-btn:hover { background: var(--terracotta); color: #fff; }

.stepper { display: inline-flex; align-items: center; background: var(--sand); border-radius: 999px; }
.stepper button {
  width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--saffron);
  font-weight: 700; font-size: 1.1rem; cursor: pointer; line-height: 1;
}
.stepper button:hover { background: var(--terracotta); color: #fff; }
.stepper span { min-width: 58px; text-align: center; font-weight: 700; font-size: .9rem; }

/* ---------- Шаги / инфо ---------- */
.section-title { font-family: var(--font-head); font-size: 2.2rem; text-align: center; margin: 0 0 34px; }
.steps { padding: 80px 0 40px; }
.steps__list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.steps__list li { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.steps__list span {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--saffron), var(--terracotta)); color: #fff; font-weight: 700; font-size: 1.2rem;
}
.steps__list h3 { margin: 14px 0 6px; }
.steps__list p { margin: 0; color: var(--muted); }

.info { padding: 40px 0 80px; }
.info__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.info__card { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.info__card h2 { font-family: var(--font-head); margin: 0 0 14px; }
.info__card--accent { background: linear-gradient(150deg, var(--pomegranate), var(--terracotta)); color: #fff; }
.info__card--accent .muted { color: rgba(255, 255, 255, .8); }
.info__list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.info__list li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.info__list li span:last-child { font-weight: 700; text-align: right; }
.big-link { font-size: 1.5rem; font-weight: 700; text-decoration: none; }
.messengers { display: flex; gap: 10px; flex-wrap: wrap; }

.footer { background: var(--ink); color: var(--apricot); padding: 26px 0; font-size: .9rem; }
.footer__row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer__links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer__seller { margin-top: 10px; font-size: .8rem; opacity: .75; }
.consent { margin: 0; font-size: .8rem; color: var(--muted); }

/* ---------- Рецепты ---------- */
.nav-mobile { display: none; text-decoration: none; font-weight: 600; white-space: nowrap; }
.nav a { white-space: nowrap; }
@media (max-width: 1100px) { .header__phone { display: none; } }
.rhero { background: linear-gradient(135deg, var(--pomegranate), var(--terracotta)); color: #fff; padding: 46px 0 40px; }
.rhero h1 { font-family: var(--font-head); font-size: 2.6rem; margin: 0 0 8px; }
.rhero p { margin: 0; max-width: 720px; opacity: .95; }
.recipes { padding-bottom: 60px; }
.rchips { padding-top: 22px; }
.rchips .chip { text-decoration: none; color: var(--ink); }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.rcard { display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; transition: transform .2s; }
.rcard:hover { transform: translateY(-3px); }
.rcard__img { aspect-ratio: 4 / 3; background: var(--sand); overflow: hidden; }
.rcard__img img { width: 100%; height: 100%; object-fit: cover; }
.rcard__body { padding: 12px 16px 16px; display: grid; gap: 4px; }
.rcard__body small { color: var(--pomegranate); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.rcard__body b { font-size: 1.05rem; line-height: 1.25; }
.rpromo { padding: 70px 0 10px; }
.rpromo__all { text-align: center; margin: 26px 0 0; }
.recipe { padding: 20px 0 60px; }
.crumbs { margin: 0 0 16px; color: var(--muted); }
.crumbs a { color: var(--pomegranate); text-decoration: none; font-weight: 500; }
.recipe__top { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; }
.recipe__img { border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--sand); box-shadow: var(--shadow); }
.recipe__img img { width: 100%; height: 100%; object-fit: cover; }
.recipe__head h1 { font-family: var(--font-head); font-size: 2.4rem; line-height: 1.1; margin: 0 0 10px; }
.recipe__meta { display: flex; gap: 18px; margin: 0 0 12px; font-weight: 600; color: var(--muted); }
.recipe__intro { font-size: 1.08rem; margin: 0; }
.recipe__body { display: grid; grid-template-columns: 380px 1fr; gap: 30px; margin-top: 34px; align-items: start; }
.ings { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; position: sticky; top: 84px; }
.ings h2, .steps-text h2 { font-family: var(--font-head); font-size: 1.6rem; margin: 0 0 12px; }
.ings ul { list-style: none; margin: 0 0 16px; padding: 0; }
.ing { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.ing label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.ing input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--pomegranate); flex: none; }
.ing__dot { color: var(--muted); margin-right: 8px; }
.ing:not(.ing--buy) { justify-content: flex-start; color: var(--muted); }
.ing__buy { white-space: nowrap; color: var(--pomegranate); font-weight: 600; font-size: .85rem; }
.ings__note { margin: 10px 0 0; font-size: .82rem; }
.recipe__steps ol { counter-reset: st; list-style: none; padding: 0; margin: 0; }
.recipe__steps li { counter-increment: st; position: relative; padding: 0 0 18px 52px; font-size: 1.04rem; }
.recipe__steps li::before { content: counter(st); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%; background: var(--saffron); color: var(--ink); font-weight: 700; display: grid; place-items: center; }
.modal__recipes { font-size: .92rem; }
.modal__recipes a { color: var(--pomegranate); font-weight: 500; }
.toast a { color: var(--saffron); font-weight: 700; margin-left: 6px; }
a.cart-btn { text-decoration: none; }
@media (max-width: 860px) {
  .nav-mobile { display: inline-block; margin-left: auto; }
  .nav-mobile + .header__phone + .cart-btn, .nav-mobile ~ .cart-btn { margin-left: 0; }
  .recipe__top, .recipe__body { grid-template-columns: 1fr; }
  .ings { position: static; }
  .recipe__head h1 { font-size: 1.9rem; }
  .rhero h1 { font-size: 2rem; }
}
@media (max-width: 520px) { .rgrid { grid-template-columns: repeat(2, 1fr); gap: 12px; } .rcard__body { padding: 10px 12px 12px; } .rcard__body b { font-size: .95rem; } }

/* ---------- Страницы товара и категории, вопросы и ответы ---------- */
.crumbs span { color: var(--ink); }
.catalog__title { font-family: var(--font-body); font-size: .95rem; font-weight: 500; color: var(--muted); margin: 22px 0 0; }
.card__name a { color: inherit; text-decoration: none; }
a.card__img { display: block; }
.modal__page { color: var(--pomegranate); font-weight: 600; text-decoration: none; }
.product { padding: 20px 0 60px; }
.product__top { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
.product__img { border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--sand); box-shadow: var(--shadow); }
.product__img img { width: 100%; height: 100%; object-fit: cover; }
.product__info { display: flex; flex-direction: column; gap: 12px; }
.product__info h1 { font-family: var(--font-head); font-size: 2.4rem; line-height: 1.1; margin: 0; }
.product__info .card__origin { margin: 0; }
.product__desc { margin: 0; font-size: 1.08rem; }
.product__price { font-size: 2rem; }
.product__buy { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.product__buy .stepper { min-width: 170px; }
.product__out { color: var(--pomegranate); font-weight: 500; }
.product__facts { list-style: none; padding: 14px 16px; margin: 4px 0 0; background: var(--card); border-radius: 14px; display: grid; gap: 6px; font-size: .95rem; }
.catpage { padding: 20px 0 60px; }
.catpage h1 { font-family: var(--font-head); font-size: 2.4rem; margin: 0 0 10px; }
.catpage h1 small { font-family: var(--font-body); font-size: 1rem; color: var(--muted); font-weight: 400; }
.catpage__text { max-width: 820px; color: var(--ink); }
.catpage__text p { margin: 0 0 8px; }
.catpage__grid { margin-top: 20px; }
.faq { padding: 30px 0 70px; }
.faq__grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 30px; align-items: start; }
.faq h2 { font-family: var(--font-head); font-size: 1.8rem; margin: 0 0 14px; }
.faq__about { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.faq__about a { color: var(--pomegranate); font-weight: 500; }
.faq details { background: var(--card); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; box-shadow: 0 4px 14px -10px rgba(110, 50, 20, .4); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--ink); }
.footer__cats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: .85rem; }
.footer__cats a { color: var(--apricot); opacity: .85; }
@media (max-width: 860px) {
  .product__top, .faq__grid { grid-template-columns: 1fr; }
  .product__info h1, .catpage h1 { font-size: 1.9rem; }
}

/* ---------- Плашка cookie ---------- */
.cookie {
  position: fixed; left: 16px; bottom: 16px; z-index: 80; max-width: 420px; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 16px 18px; font-size: .9rem;
}
.cookie p { margin: 0 0 10px; }
.cookie > div { display: flex; gap: 8px; flex-wrap: wrap; }
.btn--ghost-dark { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
@media (max-width: 520px) { .cookie { left: 8px; right: 8px; bottom: 8px; max-width: none; } }

/* ---------- Корзина ---------- */
.drawer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(59, 31, 20, .5); opacity: 0; transition: opacity .3s; }
.drawer__panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(440px, 100%);
  background: var(--cream); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.drawer.open { pointer-events: auto; }
.drawer.open .drawer__backdrop { opacity: 1; }
.drawer.open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-family: var(--font-head); margin: 0; }
.drawer__body { flex: 1; overflow-y: auto; padding: 16px 22px; }
.drawer__foot { padding: 16px 22px 22px; border-top: 1px solid var(--line); background: var(--card); display: grid; gap: 10px; }

.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--sand); }
.line__name { font-weight: 500; line-height: 1.25; }
.line__price { color: var(--muted); font-size: .85rem; }
.line__right { display: grid; justify-items: end; gap: 6px; }
.line__sum { font-weight: 700; }
.line .stepper button { width: 28px; height: 28px; font-size: 1rem; }
.line .stepper span { min-width: 50px; font-size: .82rem; }
.cart-empty { text-align: center; padding: 50px 10px; color: var(--muted); }
.cart-empty div { font-size: 3rem; }

.totals { display: grid; gap: 4px; }
.totals div { display: flex; justify-content: space-between; }
.totals .total { font-size: 1.25rem; font-weight: 700; padding-top: 6px; }
.totals .warn { color: var(--pomegranate); font-size: .88rem; display: block; }

.checkout { display: grid; gap: 14px; align-content: start; }
.checkout label { display: grid; gap: 5px; font-weight: 500; font-size: .92rem; }
.checkout input, .checkout textarea {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 11px 13px; outline: none; font-weight: 400;
}
.checkout input:focus, .checkout textarea:focus { border-color: var(--saffron); }
.checkout input.invalid { border-color: var(--pomegranate); }
.checkout fieldset { border: 0; padding: 0; margin: 0; }
.checkout legend { font-weight: 500; font-size: .92rem; margin-bottom: 6px; }
.addr { display: grid; gap: 8px; }
.addr__city { margin: 0; font-weight: 600; color: var(--pomegranate); }
.addr__row { display: grid; grid-template-columns: 1fr 90px; gap: 8px; }
.addr__row--4 { grid-template-columns: repeat(4, 1fr); }
.addr label { font-size: .82rem; font-weight: 400; color: var(--muted); }
.addr input { min-width: 0; }
.req { color: var(--pomegranate); }
.radio-list { display: grid; gap: 8px; }
.radio-list label {
  display: flex; align-items: flex-start; gap: 10px; border: 1.5px solid var(--line); background: var(--card);
  border-radius: 12px; padding: 10px 12px; cursor: pointer; font-weight: 400;
}
.radio-list label:has(input:checked) { border-color: var(--pomegranate); background: #fff1e6; }
.radio-list input { accent-color: var(--pomegranate); margin-top: 4px; }
.radio-list small { display: block; color: var(--muted); }
.form-error { color: var(--pomegranate); margin: 0; font-weight: 500; }
.alt-send { font-size: .9rem; display: flex; flex-wrap: wrap; gap: 8px; }
.alt-send p { margin: 0; width: 100%; }

.done { text-align: center; display: grid; place-content: center; gap: 8px; }
.done__icon { width: 80px; height: 80px; margin: 0 auto; border-radius: 50%; background: var(--pistachio); color: #fff; font-size: 2.6rem; display: grid; place-items: center; }

/* ---------- Карточка товара (модалка) ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; pointer-events: none; opacity: 0; transition: opacity .25s; }
.modal.open { pointer-events: auto; opacity: 1; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(59, 31, 20, .55); }
.modal__panel {
  position: relative; background: var(--card); border-radius: 22px; overflow: hidden; width: min(820px, 100%);
  max-height: calc(100vh - 32px); overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr;
}
.modal__panel img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.modal__info { padding: 30px; display: flex; flex-direction: column; gap: 10px; }
.modal__info h3 { font-family: var(--font-head); font-size: 2rem; margin: 0; line-height: 1.1; }
.modal__info .price { font-size: 1.7rem; }
.modal__close { position: absolute; top: 12px; right: 12px; z-index: 2; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px); z-index: 70;
  background: var(--ink); color: var(--cream); padding: 12px 22px; border-radius: 999px; font-weight: 500;
  transition: transform .3s; box-shadow: var(--shadow); max-width: calc(100% - 32px);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- Мобильная версия ---------- */
@media (max-width: 860px) {
  .nav, .header__phone { display: none; }
  .cart-btn { margin-left: auto; }
  .hero__content { padding: 64px 0 56px; }
  .modal__panel { grid-template-columns: 1fr; }
  .modal__panel img { min-height: 0; aspect-ratio: 4 / 3; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card__body { padding: 10px 12px 12px; }
  .card__name { font-size: .95rem; }
  .card__bottom { flex-direction: column; align-items: stretch; }
  .price { font-size: 1.1rem; }
  .add-btn { padding: 9px 10px; }
  .stepper { justify-content: space-between; }
  .cat-title { font-size: 1.5rem; }
  .section-title { font-size: 1.8rem; }
  .cart-btn__sum { display: none; }
  #sort { max-width: 120px; }
}

/* ---------- Обычные страницы (например, «Авторы фотографий») ---------- */
.page { padding: 50px 0 80px; }
.page h1 { font-family: var(--font-head); font-size: 2.2rem; margin: 0 0 18px; }
.page__body { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); overflow-x: auto; }
.credits-table { width: 100%; border-collapse: collapse; }
.credits-table td, .credits-table th { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .92rem; }
.credits-table th { background: var(--sand); }
.credits-table img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
@media (max-width: 600px) { .credits-table td:first-child, .credits-table th:first-child { display: none; } .page__body { padding: 16px; } }