/* ZooFood — элегантная засечная типографика, палитра из логотипа */
:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #efebe4;
  --ink: #232323;
  --ink-soft: #5c5853;
  --muted: #8f8a83;
  --line: #e2ddd4;
  --gold: #c5a05a;
  --gold-dark: #a8853f;
  --danger: #b4483c;
  --success: #4f7d55;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(35, 35, 35, .04), 0 8px 24px rgba(35, 35, 35, .06);
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'EB Garamond', Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.45rem; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- Кнопки и формы ---------- */
.btn {
  --b: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .7em 1.5em;
  border: 1px solid var(--b);
  background: var(--b);
  color: #fff;
  font: inherit; font-size: 1rem; letter-spacing: .04em;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s, transform .1s;
}
.btn:hover { background: #000; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-gold { --b: var(--gold); }
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-danger { --b: var(--danger); background: transparent; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: .4em 1em; font-size: .9rem; }
.btn-block { width: 100%; }

label { display: block; font-size: .95rem; color: var(--ink-soft); margin-bottom: .3em; }
input, textarea, select {
  width: 100%;
  font: inherit; font-size: 1rem;
  padding: .65em .9em;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(197, 160, 90, .18); }
textarea { resize: vertical; min-height: 90px; }
.field { margin-bottom: 1rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } }
.error-box { background: #f8e9e6; color: var(--danger); border-radius: 10px; padding: .7em 1em; margin-bottom: 1rem; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 245, 241, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand img { width: 48px; height: 48px; border-radius: 12px; }
.brand span { font-family: var(--font-display); font-size: 1.9rem; font-weight: 500; letter-spacing: .01em; }
.nav { display: flex; gap: 1.8rem; }
.nav a { text-decoration: none; color: var(--ink-soft); font-size: 1.05rem; }
.nav a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav { display: none; } }
.cart-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--ink); border-radius: 999px;
  padding: .45em 1.1em; font: inherit; cursor: pointer; color: var(--ink);
}
.cart-btn:hover { background: var(--ink); color: #fff; }
.cart-count {
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--gold); color: #fff;
  font-size: .8rem; display: inline-grid; place-items: center; font-family: system-ui, sans-serif;
}

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); text-align: center; }
.hero-logo { width: 130px; margin: 0 auto 1.5rem; border-radius: 28px; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: .3em; font-size: .8rem; color: var(--gold-dark); margin-bottom: 1rem; }
.hero p.lead { max-width: 620px; margin: 0 auto 2rem; color: var(--ink-soft); font-size: 1.2rem; }
.hero .actions { display: flex; justify-content: center; gap: .8rem; flex-wrap: wrap; }
.divider { width: 60px; height: 1px; background: var(--gold); margin: 1.5rem auto; border: 0; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; padding: 2rem 0 3rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature { text-align: center; padding: 0 1rem; }
.feature .ico { font-size: 1.6rem; color: var(--gold); font-family: var(--font-display); }
.feature h4 { font-size: 1.3rem; margin: .3rem 0; }
.feature p { margin: 0; color: var(--muted); font-size: 1rem; }
@media (max-width: 700px) { .features { grid-template-columns: 1fr; } }

/* ---------- Партнёры: бегущая лента ---------- */
.partners { padding: 3.5rem 0 1rem; overflow: hidden; }
.partners-title { text-align: center; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.8rem; }
.marquee {
  display: flex; gap: 1.2rem; overflow: hidden; user-select: none;
  /* мягкое затухание по краям */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  flex-shrink: 0; display: flex; gap: 1.2rem; margin: 0; padding: 0; list-style: none;
  min-width: 100%; justify-content: space-around;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-100% - 1.2rem)); } }
.partner {
  flex: 0 0 auto; height: 96px; width: 200px;
  display: grid; place-items: center; padding: 14px 22px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.partner img { max-width: 100%; max-height: 64px; object-fit: contain; }
@media (max-width: 600px) {
  .partner { height: 76px; width: 150px; padding: 10px 16px; }
  .partner img { max-height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { flex-wrap: wrap; justify-content: center; -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; min-width: 0; }
  .marquee-track[aria-hidden="true"] { display: none; }
}

/* ---------- Каталог ---------- */
.catalog { padding: 4rem 0; }
.catalog-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.catalog-head h2 { margin: 0; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface);
  padding: .4em 1.1em; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 1rem; color: var(--ink-soft);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.filter-bar { display: grid; gap: .7rem; margin-bottom: 2rem; }
.chip-soft { font-size: .92rem; padding: .3em .95em; background: transparent; }
.chip-soft.active { background: var(--gold); border-color: var(--gold); color: #fff; }
.search { width: min(320px, 100%); border-radius: 999px; padding: .55em 1.1em; }
.count { color: var(--muted); font-size: .95rem; margin: -1rem 0 1.2rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(35,35,35,.05), 0 16px 36px rgba(35,35,35,.09); }
.card-media { position: relative; aspect-ratio: 4 / 5; background: #fff; cursor: pointer; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  background: rgba(255,255,255,.92); box-shadow: 0 1px 3px rgba(0,0,0,.08); color: var(--ink-soft);
  font-size: .8rem; padding: .2em .8em; border-radius: 999px; letter-spacing: .03em;
}
.badge.sale { background: var(--gold); color: #fff; left: auto; right: 12px; }
.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card-brand { font-size: .8rem; text-transform: uppercase; letter-spacing: .18em; color: var(--gold-dark); }
.card-title { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.2; margin: .2rem 0 .3rem; cursor: pointer; }
.card-meta { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.card-foot .btn { white-space: nowrap; }
.price { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; }
.price s { font-size: 1.05rem; color: var(--muted); font-weight: 400; margin-left: .35rem; }
.out { color: var(--muted); font-size: .95rem; }
.empty { text-align: center; padding: 4rem 1rem; color: var(--muted); }

/* ---------- Модальное окно товара ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(35, 35, 35, .45);
  display: grid; place-items: center; padding: 16px;
  animation: fade .2s;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--surface); border-radius: 18px; max-width: 900px; width: 100%;
  max-height: calc(100vh - 32px); overflow: auto;
  display: grid; grid-template-columns: 1fr 1fr; position: relative;
}
.modal-media { background: #fff; min-height: 300px; display: grid; place-items: center; }
.modal-media img { width: 100%; height: 100%; max-height: calc(100vh - 32px); object-fit: contain; }
.modal-body { padding: 2rem; }
.modal-body p { color: var(--ink-soft); white-space: pre-line; }
.close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: var(--surface); box-shadow: var(--shadow); cursor: pointer; font-size: 1.4rem; line-height: 1;
}
@media (max-width: 720px) { .modal { grid-template-columns: 1fr; } .modal-media { aspect-ratio: 1; min-height: 0; } }

/* ---------- Корзина (боковая панель) ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 110;
  width: min(420px, 100%);
  background: var(--bg); box-shadow: -10px 0 40px rgba(0,0,0,.12);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s ease;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; }
.drawer-head .close { position: static; box-shadow: none; background: transparent; }
.drawer-items { flex: 1; overflow: auto; padding: 1rem 1.5rem; }
.drawer-foot { padding: 1.2rem 1.5rem; border-top: 1px solid var(--line); background: var(--surface); }
.backdrop { position: fixed; inset: 0; z-index: 105; background: rgba(35,35,35,.35); }

.line { display: grid; grid-template-columns: 64px 1fr auto; gap: .9rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.line img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 10px; background: var(--surface-2); }
.line-name { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.2; }
.line-price { color: var(--muted); font-size: .95rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-top: .3rem; background: var(--surface); }
.qty button { border: 0; background: none; width: 30px; height: 28px; cursor: pointer; font-size: 1.05rem; color: var(--ink); }
.qty button:hover { background: var(--surface-2); }
.qty span { min-width: 26px; text-align: center; font-size: .95rem; }
.line-remove { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .9rem; text-decoration: underline; padding: 0; }
.totals { display: grid; gap: .3rem; margin-bottom: 1rem; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; border-top: 1px solid var(--line); padding-top: .5rem; margin-top: .3rem; }

/* ---------- Оформление заказа ---------- */
.page { padding: 3rem 0 5rem; }
.checkout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.8rem; }
.panel h3 { margin-bottom: 1.2rem; }
.pay-options { display: grid; gap: .7rem; margin-bottom: 1.5rem; }
.pay-option {
  display: flex; gap: .9rem; align-items: center;
  padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px;
  cursor: pointer; margin: 0; color: var(--ink); background: var(--surface);
}
.pay-option input { width: auto; accent-color: var(--gold); }
.pay-option:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(197,160,90,.15); }
.pay-option.disabled { opacity: .5; cursor: not-allowed; }
.pay-option strong { display: block; font-weight: 500; font-size: 1.05rem; }
.pay-option small { color: var(--muted); font-size: .9rem; }
.summary .line { grid-template-columns: 56px 1fr auto; }
.summary .line img { width: 56px; height: 56px; }

.notice { text-align: center; max-width: 560px; margin: 2rem auto; }
.notice .mark { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1.5rem; font-size: 2rem; border: 1px solid var(--gold); color: var(--gold); }

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--line); padding: 2.5rem 0; color: var(--muted); font-size: .95rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.footer-address { font-style: normal; }
.footer-address a { color: var(--ink-soft); text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.footer-address a::before { content: '⌖'; color: var(--gold); font-size: 1.1rem; }
.footer-address a:hover { color: var(--ink); text-decoration: underline; }
.footer .brand span { font-size: 1.4rem; color: var(--ink); }
.footer .brand img { width: 36px; height: 36px; }

/* ---------- Тост ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 200;
  transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: #fff; padding: .7em 1.4em; border-radius: 999px;
  transition: all .3s; pointer-events: none; font-size: 1rem;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Админка ---------- */
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.admin-login .panel { width: min(380px, 100%); text-align: center; }
.admin-login img { width: 90px; margin: 0 auto 1rem; border-radius: 20px; }
.tabs { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.admin-grid { display: grid; grid-template-columns: 380px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 960px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-form .panel { position: sticky; top: 96px; }
.img-drop {
  border: 1px dashed var(--line); border-radius: 12px; background: var(--bg);
  aspect-ratio: 4 / 3; display: grid; place-items: center; cursor: pointer;
  overflow: hidden; position: relative; color: var(--muted); text-align: center; font-size: .95rem;
}
.img-drop:hover { border-color: var(--gold); }
.img-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.check { display: flex; align-items: center; gap: .5rem; color: var(--ink); }
.check input { width: auto; accent-color: var(--gold); }

.table-wrap { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 500; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
tr:last-child td { border-bottom: 0; }
td img.thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: contain; background: #fff; background: var(--surface-2); }
td .actions { display: flex; gap: .4rem; justify-content: flex-end; }
td select { width: auto; padding: .35em .6em; font-size: .95rem; }
.pill { display: inline-block; font-size: .8rem; padding: .15em .7em; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); }
.pill.on { background: #e5efe6; color: var(--success); }
.order-items { font-size: .92rem; color: var(--ink-soft); }

/* Отступ под липкую шапку при переходе по якорям */
[id] { scroll-margin-top: 90px; }
