:root {
  --ink: #1a1612;
  --ink-soft: #3d342c;
  --muted: #6b5e52;
  --paper: #f4efe6;
  --paper-deep: #e8dfd0;
  --porcelain: #fbf8f2;
  --celadon: #5e7a68;
  --celadon-dark: #3f5648;
  --tea: #c4783a;
  --tea-deep: #8c4a22;
  --line: #d9d0c2;
  --gold: #c4a36a;
  --header-height: 72px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

.font-display,
.brand-name,
h1, h2, h3,
.offcanvas-title {
  font-family: "Cormorant Garamond", Georgia, serif;
}

a { color: var(--celadon-dark); }
a:hover { color: var(--tea-deep); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1040;
  background: rgba(244, 239, 230, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.brand-name {
  font-size: 1.35rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--tea);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.menu-nav a {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.6rem;
  color: var(--ink);
  text-decoration: none;
}

.menu-nav a:hover { color: var(--celadon-dark); }

/* Home hero — две карточки под шапкой, как на irotea */
.home-hero {
  height: calc(100dvh - var(--header-height));
  box-sizing: border-box;
  padding: 1.25rem 0 1.5rem;
  display: flex;
}

.home-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  height: 100%;
  min-height: 0;
}

.home-hero-title {
  font-size: clamp(1.75rem, 4.2vw, 3.5rem);
  font-weight: 500;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}

.home-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  flex: 1;
  min-height: 0;
}

.home-cat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 0;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none;
  color: #fbf8f2;
  background: var(--ink);
}

.home-cat-media {
  position: absolute;
  inset: 5px;
  border-radius: 0.7rem;
  overflow: hidden;
  z-index: 0;
}

.home-cat-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.25s ease;
}

.home-cat-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 22, 18, 0.45) 0%, rgba(26, 22, 18, 0.08) 55%, rgba(26, 22, 18, 0.25) 100%);
}

.home-cat:hover {
  color: #fbf8f2;
}

.home-cat:hover .home-cat-media img {
  transform: scale(1.04);
}

.home-cat-kicker,
.home-cat-name,
.home-cat-price {
  position: relative;
  z-index: 1;
}

.home-cat-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.home-cat-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 500;
  line-height: 1.05;
  margin: 0.15rem 0 0.2rem;
}

.home-cat-price {
  font-size: 0.95rem;
  opacity: 0.92;
}

.home-cat-arrow {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 0.4rem;
  background: var(--celadon);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

@media (max-width: 575.98px) {
  .home-hero {
    padding: 1rem 0 1.15rem;
  }

  .home-hero-title {
    font-size: 1.75rem;
  }

  .home-cat {
    padding: 0.85rem;
  }

  .home-cat-name {
    font-size: 1.45rem;
  }
}

.page-wrap { padding: 3rem 0 4rem; }

.page-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin-bottom: 0.75rem;
}

.cat-tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 1rem;
  color: #fff;
  text-decoration: none;
  background: var(--ink);
}

.cat-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.cat-tile:hover img { opacity: 0.6; color: #fff; }

.cat-tile-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.9rem 1rem;
  background: linear-gradient(to top, rgba(26,22,18,.75), transparent);
}

.cat-tile-caption strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.btn-fav {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(251, 248, 242, 0.92);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-fav:hover,
.btn-fav.is-active {
  color: var(--tea-deep);
}

.btn-fav-lg {
  position: static;
  flex-shrink: 0;
}

.auth-card {
  max-width: 28rem;
  margin: 0 auto;
}

.product-card-img {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--paper-deep);
  margin-bottom: 0.75rem;
}

.product-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-new {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--porcelain);
  color: var(--ink);
  border-radius: 999px;
  font-size: 11px;
  padding: 0.25rem 0.6rem;
}

.product-card-title {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.3;
}

.product-card-title:hover { color: var(--celadon-dark); }

.product-card-cn {
  font-size: 0.8rem;
  color: var(--muted);
}

.product-card-buy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.variant-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.variant-pill {
  border: 1px solid var(--line);
  background: var(--porcelain);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.8rem;
  line-height: 1.25;
  cursor: pointer;
}

.variant-pill:hover {
  border-color: var(--celadon);
}

.variant-pill.is-active {
  background: var(--ink);
  color: var(--porcelain);
  border-color: var(--ink);
}

.variant-pill-price {
  display: block;
  font-size: 0.72rem;
  opacity: 0.75;
}

.product-buy .variant-pill {
  padding: 0.5rem 0.95rem;
  font-size: 0.9rem;
  text-align: left;
}

.btn-cart {
  align-self: flex-end;
  border-radius: 999px;
  background: var(--ink);
  color: var(--porcelain);
  border: 0;
  padding: 0.35rem 0.85rem;
  font-size: 0.875rem;
  white-space: nowrap;
}

.btn-cart:hover {
  background: var(--celadon-dark);
  color: #fff;
}

.btn-tea {
  background: var(--tea);
  color: #fff;
  border: 0;
  border-radius: 999px;
}

.btn-tea:hover {
  background: var(--tea-deep);
  color: #fff;
}

.surface {
  background: var(--porcelain);
  border-radius: 1.25rem;
  padding: 1.5rem;
}

.site-footer {
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer a:hover { color: var(--celadon-dark); }

.footer-help {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
}

.footer-help-card {
  flex: 1 1 10rem;
  background: var(--porcelain);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
}

a.footer-help-card:hover {
  color: var(--celadon-dark);
  border-color: var(--celadon);
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  border-radius: 0.65rem;
  background: var(--porcelain);
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.footer-socials a:hover {
  background: var(--celadon-dark);
  border-color: var(--celadon-dark);
  color: #fff;
}

.footer-copy { border-top: 1px solid var(--line); }

.cookie-notice {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  left: 1.25rem;
  max-width: 28rem;
  margin-left: auto;
  z-index: 1080;
  background: var(--porcelain);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 12px 32px rgba(26, 22, 18, 0.12);
}

.prose p, .prose li { color: var(--ink-soft); }
.prose h2 {
  font-size: 1.75rem;
  margin-top: 1.75rem;
}

.filter-chip {
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  color: var(--muted);
  text-decoration: none;
}

.filter-chip.active {
  background: var(--ink);
  color: #fff;
}

.search-hit {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem;
  border-radius: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}

.search-hit:hover { background: var(--paper); }

.search-hit img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 0.5rem;
}

.qty-control {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.qty-control button {
  border: 0;
  background: transparent;
  width: 36px;
  height: 36px;
}

.qty-control input {
  width: 40px;
  border: 0;
  text-align: center;
  background: transparent;
}

.form-control, .form-select {
  border-color: var(--line);
  background: var(--paper);
}

.form-control:focus, .form-select:focus {
  border-color: var(--celadon);
  box-shadow: 0 0 0 0.2rem rgba(94, 122, 104, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
