/* ДВА друга — homepage implementation. Tokens from design/design.md. */
:root {
  --canvas: #FFFDF5;
  --primary: #173329;
  --mint: #DCE9D8;
  --cream: #F5EAD6;
  --rust: #7A2A0A;
  --lime: #A9D15E;
  --border: #B7C9B8;
  --muted: #51685E;
  --field: clamp(20px, 5.56vw, 80px);
  --gap: clamp(10px, 1.8vw, 26px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--canvas); }
body {
  margin: 0;
  min-width: 0;
  color: var(--primary);
  background: var(--canvas);
  font-family: "DejaVu Sans", Arial, sans-serif;
  line-height: 1.45;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
.trust-card, .cat-card, .offer-card, .live-card, .help-card, .store-card, .contact-panel { min-width: 0; }
.trust-card > span, .cat-body, .offer-card > h3, .offer-card > p { min-width: 0; }
.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}
.skip-link { position: fixed; z-index: 6; left: 8px; top: 8px; padding: 8px 12px; color: var(--canvas); background: var(--primary); text-decoration: none; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.eyebrow { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: 1.2px; color: var(--rust); }

/* ── Utility bar ── */
.utility {
  min-height: 48px; padding: 12px var(--field);
  color: var(--canvas); background: var(--primary);
  font-size: 15px; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}

/* ── Masthead ── */
.masthead {
  background: var(--canvas);
  padding: 16px var(--field);
  display: flex; align-items: center; gap: clamp(16px, 3vw, 60px);
}
.brand img { display: block; width: 182px; height: 70px; object-fit: cover; }
.search { flex: 1 1 260px; max-width: 430px; display: flex; position: relative; }
.search input {
  flex: 1; min-width: 0; height: 54px;
  border: 2px solid var(--border); border-radius: 27px;
  background: #fff; color: var(--primary);
  font: inherit; font-size: 17px; padding: 0 56px 0 22px;
}
.search input::placeholder { color: var(--muted); }
.search button {
  position: absolute; right: 10px; top: 10px;
  width: 34px; height: 34px; padding: 0; border: 0; background: transparent; cursor: pointer;
}
.phones { margin: 0; display: flex; flex-direction: column; gap: 4px; white-space: nowrap; }
.phones a { font-size: 18px; font-weight: 700; text-decoration: none; }
.phones a:hover { color: var(--rust); }
.cart {
  margin-left: auto; min-width: 235px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 27px; background: var(--cream);
  font-size: 16px; font-weight: 700;
}

/* ── Main nav ── */
.mainnav {
  position: relative;
  background: #fff; border-top: 1px solid #F0EADB;
  padding: 11px var(--field);
  display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px);
}
.nav-link { font-size: 15px; font-weight: 700; letter-spacing: .5px; text-decoration: none; white-space: nowrap; }
.nav-link:hover { color: var(--rust); }
.nav-cta {
  margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 208px; height: 40px; padding: 0 18px;
  border-radius: 20px; background: var(--lime);
  font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.menu-toggle {
  display: none; margin-left: auto;
  border: 2px solid var(--primary); border-radius: 999px;
  padding: 8px 16px; color: var(--primary); background: #fff;
  font: inherit; font-weight: 700; cursor: pointer;
}
.menu {
  position: absolute; top: 100%; right: var(--field); z-index: 5;
  display: none; flex-direction: column; align-items: stretch;
  min-width: 180px; padding: 14px; border-radius: 16px;
  background: var(--canvas); box-shadow: 0 8px 30px #17332933;
  gap: 4px;
}
.menu a { padding: 8px 10px; border-radius: 10px; color: var(--primary); font-size: 15px; font-weight: 700; text-decoration: none; }
.menu a:hover { background: var(--mint); color: var(--rust); }
.menu.is-open { display: flex; }

/* ── Hero ── */
.hero {
  margin: var(--field);
  padding: clamp(28px, 4vw, 66px);
  border-radius: 42px; background: var(--mint);
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  gap: clamp(20px, 3vw, 48px); align-items: center;
}
.hero h1 { margin: 18px 0 24px; font-size: clamp(34px, 3.75vw, 54px); line-height: 1.22; font-weight: 800; }
.hero-sub { margin: 0; font-size: clamp(16px, 1.46vw, 21px); color: var(--primary); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 58px; padding: 0 30px; border-radius: 29px;
  font-size: 17px; font-weight: 700; text-decoration: none;
}
.btn-rust { background: var(--rust); color: var(--canvas); }
.btn-outline { background: #fff; color: var(--primary); border: 2px solid var(--primary); }
.btn-dark { background: var(--primary); color: var(--canvas); }
.btn:hover { filter: brightness(.96); }
.hero-photo { margin: 0; position: relative; min-width: 0; }
.hero-photo > img {
  display: block; width: 100%; height: clamp(280px, 32vw, 460px);
  object-fit: cover; border-radius: 36px;
}
.hero-badge {
  position: absolute; left: 32px; bottom: 32px;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px 14px 14px; border-radius: 22px;
  background: var(--canvas); box-shadow: 0 6px 24px #1733291f;
}
.hero-badge-text { display: flex; flex-direction: column; line-height: 1.3; }
.hero-badge-text strong { font-size: 15px; }
.hero-badge-text small { font-size: 14px; }

/* ── Trust ── */
#trust { padding: clamp(24px, 4vw, 48px) var(--field) 0; }
.trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-top: 24px; }
.trust-card {
  display: flex; align-items: center; gap: 16px;
  min-height: 120px; padding: 18px 20px;
  background: #fff; border: 1px solid var(--border); border-radius: 24px;
}
.trust-card p, .trust-copy { margin: 0; }
.trust-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.trust-title { font-size: 20px; font-weight: 800; }
.trust-sub { font-size: 15px; }
.paw {
  flex: 0 0 auto; width: 50px; height: 50px; border-radius: 50%;
  background: radial-gradient(circle at 50% 62%, var(--rust) 0 12%, transparent 13%),
    radial-gradient(circle at 30% 32%, var(--rust) 0 6.5%, transparent 7.5%),
    radial-gradient(circle at 45% 24%, var(--rust) 0 6.5%, transparent 7.5%),
    radial-gradient(circle at 60% 24%, var(--rust) 0 6.5%, transparent 7.5%),
    radial-gradient(circle at 75% 32%, var(--rust) 0 6.5%, transparent 7.5%),
    var(--mint);
}

/* ── Catalog ── */
section { scroll-margin-top: 16px; }
#catalog, #offers, #contacts, #delivery { padding: clamp(32px, 5vw, 64px) var(--field) 0; }
h2 { margin: 0; font-size: clamp(30px, 3.2vw, 46px); font-weight: 800; line-height: 1.15; }
.section-sub { margin: 10px 0 0; font-size: clamp(16px, 1.4vw, 20px); }
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: 28px; }
.cat-card {
  display: flex; align-items: center; gap: 16px;
  min-height: 142px; padding: 18px 22px; border-radius: 26px;
  text-decoration: none;
}
.cat-card .paw { width: 58px; height: 58px; background-color: var(--canvas); }
.cat-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cat-title { font-size: 22px; font-weight: 800; }
.cat-sub { font-size: 15px; }
.cat-arrow { margin-left: auto; font-size: 22px; font-weight: 800; }
.cat-cat { background: #F5D9C7; }
.cat-dog { background: var(--mint); }
.cat-rodent { background: var(--cream); }
.cat-bird { background: #DCE6F1; }
.cat-fish { background: #D8EEF0; }
.cat-reptile { background: #E4E1C5; }

/* ── Live categories ── */
.eyebrow-live { margin-bottom: 14px; }
.live-heading { font-size: clamp(22px, 2vw, 30px); font-weight: 800; }
.live-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: 20px; }
.live-card { margin: 0; border-radius: 28px; overflow: hidden; background: #fff; }
.live-card img { display: block; width: 100%; height: 300px; object-fit: cover; }
.live-card figcaption { padding: 14px 18px; font-weight: 700; font-size: 16px; }
.help-card {
  border-radius: 28px; background: var(--primary); color: var(--canvas);
  padding: clamp(20px, 2.2vw, 34px);
  display: flex; flex-direction: column;
}
.help-card h2 { font-size: clamp(22px, 1.9vw, 28px); margin-bottom: 14px; }
.help-card p { margin: 0; font-size: clamp(15px, 1.25vw, 18px); }
.help-phone { margin-top: auto !important; padding-top: 18px; font-weight: 700; }
.help-phone a { color: var(--canvas); text-decoration: none; }
.help-link { margin-top: 16px; color: var(--lime); font-weight: 700; text-decoration: none; }

/* ── Offers ── */
.offers-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.offers-all { color: var(--rust); font-size: 17px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.offers-all:hover { text-decoration: underline; }
.offers-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-top: 28px; }
.offer-card {
  position: relative; background: #fff; border: 1px solid var(--border); border-radius: 28px;
  padding: 20px; display: flex; flex-direction: column;
}
.badge {
  position: absolute; top: 20px; left: 20px; z-index: 1;
  margin: 0; padding: 6px 14px; border-radius: 15px;
  background: var(--mint); font-size: 12px; font-weight: 800; letter-spacing: .3px;
}
.offer-art {
  display: flex; align-items: center; justify-content: center;
  min-height: 156px; margin-top: 18px;
}
.offer-art svg { display: block; max-width: 100%; }
.offer-art-photo { min-height: 0; }
.offer-art-photo img {
  width: 144px; height: 144px; object-fit: cover; border-radius: 50%;
  border: 2px solid var(--border); background: var(--cream);
}
.offer-title { margin: 16px 0 4px; font-size: 18px; font-weight: 800; }
.offer-sub { margin: 0 0 14px; font-size: 15px; }
.offer-row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.offer-price { font-size: 22px; font-weight: 800; }
.offer-add {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: var(--canvas); font-size: 22px; font-weight: 700;
}

/* ── Delivery ── */
.delivery {
  margin-top: 8px;
  padding: clamp(28px, 3.5vw, 48px) var(--field) clamp(28px, 3.5vw, 48px);
  border-radius: 38px; background: var(--cream);
  display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px); align-items: start;
}
.delivery h2 { font-size: clamp(28px, 2.64vw, 38px); margin: 16px 0 20px; }
.delivery-sub { margin: 0; font-size: clamp(15px, 1.32vw, 19px); }
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step-num { display: block; font-size: 14px; font-weight: 800; color: var(--rust); }
.step-line { display: block; height: 2px; background: var(--border); margin: 12px 0; }
.step-title { display: block; font-size: 20px; font-weight: 800; }
.step-sub { display: block; font-size: 14px; }
.delivery .btn-dark { margin-top: 32px; width: fit-content; }

/* ── Contacts / stores ── */
.stores-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 340px); gap: var(--gap); margin-top: 28px; }
.store-card {
  position: relative; background: #fff; border: 1px solid var(--border); border-radius: 26px;
  padding: 24px 26px;
}
.store-dot { position: absolute; top: 26px; left: 26px; width: 44px; height: 44px; border-radius: 50%; background: var(--lime); }
.store-card h3 { margin: 6px 0 12px 54px; font-size: 21px; font-weight: 800; }
.store-note { margin: 0 0 10px 54px; font-size: 16px; }
.store-hours { margin: 0 0 16px 54px; font-size: 15px; font-weight: 600; }
.store-map { margin-left: 54px; color: var(--rust); font-size: 15px; font-weight: 700; text-decoration: none; }
.store-map:hover { text-decoration: underline; }
.contact-panel {
  margin: 0; border-radius: 26px; background: var(--primary); color: var(--canvas);
  padding: 26px; font-style: normal;
}
.contact-panel h3 { margin: 0 0 14px; font-size: 21px; font-weight: 800; }
.contact-panel a { color: var(--canvas); font-size: 15px; font-weight: 700; text-decoration: none; display: block; margin-bottom: 6px; }
.contact-panel a:hover { color: var(--lime); }
.contact-form { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.contact-form label { font-size: 13px; font-weight: 700; }
.contact-form input {
  min-width: 0; height: 42px; padding: 0 12px;
  border: 1px solid #3E6F78; border-radius: 21px;
  background: #fff; color: var(--primary); font: inherit; font-size: 14px;
}
.contact-form button {
  height: 42px; border: 0; border-radius: 21px;
  background: var(--lime); color: var(--primary);
  font: inherit; font-size: 14px; font-weight: 800; cursor: pointer;
}
#form-message { margin: 0; font-size: 13px; font-weight: 700; color: var(--lime); min-height: 18px; }

/* ── Footer ── */
.site-footer {
  margin-top: clamp(40px, 6vw, 80px);
  background: var(--primary); color: var(--canvas);
  padding: 28px var(--field);
  display: flex; align-items: center; gap: clamp(20px, 3vw, 48px); flex-wrap: wrap;
}
.footer-logo { display: block; width: 156px; height: 60px; object-fit: cover; border-radius: 8px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-nav a { color: var(--canvas); font-size: 15px; font-weight: 700; text-decoration: none; }
.footer-nav a:hover { color: var(--lime); }
.footer-company { margin: 0; font-size: 14px; }
.footer-legal { margin-left: auto; display: flex; flex-direction: column; gap: 6px; text-align: right; }
.footer-legal p { margin: 0; font-size: 13px; }
.footer-legal a { color: var(--canvas); text-decoration: none; }
.footer-legal a:hover { color: var(--lime); }

/* ── Responsive ── */
@media (max-width: 1200px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); }
  .trust-grid, .offers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stores-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-panel { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .search { display: none; }
  .phones { display: none; }
  .cart { min-width: 0; padding: 0 18px; height: 44px; font-size: 14px; }
  .nav-cta { display: none; }
  .menu-toggle { display: block; }
  .mainnav .nav-link { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-photo > img { height: clamp(220px, 52vw, 380px); }
  .live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-card { grid-column: 1 / -1; }
  .delivery { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .utility { min-height: 36px; padding: 10px 20px; font-size: 12px; }
  .masthead { min-height: 88px; padding: 12px 20px; gap: 12px; }
  .brand img { width: 142px; height: 55px; }
  .cart { height: 44px; padding: 0 14px; }
  .mainnav { padding: 10px 20px; }
  .menu { top: calc(100% + 8px); right: 20px; }
  .hero { grid-template-columns: 1fr; padding: 24px 20px; border-radius: 30px; gap: 20px; }
  .hero h1 { font-size: 38px; line-height: 1.18; margin: 14px 0 16px; }
  .hero-sub { font-size: 17px; }
  .hero-actions .btn { min-height: 52px; padding: 0 22px; font-size: 16px; }
  .hero-badge { left: 16px; bottom: 16px; padding: 10px 16px 10px 10px; }
  .hero-badge-text strong { font-size: 14px; }
  .hero-badge-text small { font-size: 13px; }
  .trust-grid { gap: 10px; }
  .trust-card { min-height: 104px; padding: 12px 14px; gap: 10px; }
  .trust-card .paw { width: 40px; height: 40px; }
  .trust-title { font-size: 16px; }
  .trust-sub { font-size: 12px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cat-card { min-height: 118px; padding: 14px 16px; gap: 12px; }
  .cat-card .paw { width: 44px; height: 44px; }
  .cat-title { font-size: 16px; }
  .cat-sub { font-size: 12px; }
  .cat-arrow { display: none; }
  .live-grid { grid-template-columns: 1fr; }
  .live-card img { height: 240px; }
  .offers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .offer-card { padding: 14px; }
  .badge { top: 14px; left: 14px; font-size: 9px; padding: 5px 10px; }
  .offer-art { min-height: 100px; margin-top: 12px; }
  .offer-art svg { width: 96px; height: 72px; }
  .offer-art-photo img { width: 96px; height: 96px; }
  .offer-title { font-size: 15px; margin-top: 10px; }
  .offer-sub { font-size: 13px; margin-bottom: 8px; }
  .offer-price { font-size: 17px; }
  .offer-add { width: 38px; height: 38px; font-size: 18px; }
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .stores-grid { grid-template-columns: 1fr; gap: 12px; }
  .site-footer { padding: 22px 20px; flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-legal { margin-left: 0; text-align: left; }
}
