/* =============================================
   SnoutToScale — Design System
   Warm, editorial, multi-species pet food store
   ============================================= */

:root {
  --bg: #FAF7F2;
  --bg-warm: #F2EDE5;
  --surface: #FFFFFF;
  --fg: #1A1714;
  --fg-muted: #6B6259;
  --fg-faint: #A89F94;
  --accent: #C4694A;
  --accent-warm: #E8956A;
  --accent-deep: #9E4F32;
  --dog-color: #7BAE7F;
  --cat-color: #C4A96B;
  --dragon-color: #8B9E6E;
  --border: #E8E0D6;
  --shadow: rgba(26, 23, 20, 0.08);
  --shadow-md: rgba(26, 23, 20, 0.14);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Figtree', system-ui, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== Typography helpers ===== */
.font-display { font-family: var(--font-display); }

/* ===== Navigation ===== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo span { color: var(--accent); }

.nav-species {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-tab {
  padding: 6px 20px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--fg-muted);
  background: transparent;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.nav-tab:hover { color: var(--fg); background: var(--bg-warm); }

.nav-tab.active-dog   { color: var(--dog-color);   border-color: var(--dog-color);   background: rgba(123,174,127,0.07); }
.nav-tab.active-cat    { color: var(--cat-color);    border-color: var(--cat-color);   background: rgba(196,169,107,0.07); }
.nav-tab.active-dragon { color: var(--dragon-color); border-color: var(--dragon-color); background: rgba(139,158,110,0.07); }

.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 100px;
  background: var(--fg);
  color: var(--surface);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
  transition: background 0.18s;
}

.nav-cart:hover { background: #2d2925; }

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 100px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.nav-cart.has-items .cart-badge { background: var(--accent); }

/* ===== Hero ===== */
.hero {
  background: var(--bg);
  padding: 80px 48px 0;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding-bottom: 80px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  color: var(--fg);
  margin-bottom: 24px;
}

.hero-headline em {
  font-style: italic;
  color: var(--accent);
}

.hero-lede {
  font-size: 1.05rem;
  color: var(--fg-muted);
  max-width: 440px;
  line-height: 1.65;
  margin-bottom: 32px;
}

.hero-species-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--fg-muted);
}

.pill-dog   { border-color: var(--dog-color);   color: var(--dog-color); }
.pill-cat   { border-color: var(--cat-color);    color: var(--cat-color); }
.pill-dragon { border-color: var(--dragon-color); color: var(--dragon-color); }

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-hero-img {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--bg-warm);
}

/* ===== Sections ===== */
.section {
  padding: 72px 48px;
}

.section-header {
  max-width: 1200px;
  margin: 0 auto 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  color: var(--fg);
  line-height: 1.15;
}

.section-title-dog   { color: var(--dog-color); }
.section-title-cat   { color: var(--cat-color); }
.section-title-dragon { color: var(--dragon-color); }

.section-desc {
  font-size: 0.95rem;
  color: var(--fg-muted);
  margin-top: 8px;
  line-height: 1.55;
}

.section-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--fg);
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
  flex-shrink: 0;
}

.section-nav-btn:hover { border-color: var(--fg-muted); background: var(--bg-warm); }

/* ===== Product Grid ===== */
.products-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* ===== Product Card ===== */
.product-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--shadow-md);
}

.product-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-warm);
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-img { transform: scale(1.04); }

.product-badge-species {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
}

.product-badge-species.dog   { color: var(--dog-color); }
.product-badge-species.cat   { color: var(--cat-color); }
.product-badge-species.dragon { color: var(--dragon-color); }

.product-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }

.product-brand {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 6px;
}

.product-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 6px;
  line-height: 1.3;
}

.product-desc {
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
}

/* ===== Add to Cart Button ===== */
.btn-add-cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.18s ease;
  white-space: nowrap;
  background: var(--accent);
  color: #fff;
}

.btn-add-cart:hover { background: var(--accent-deep); transform: scale(1.03); }

.btn-add-cart.added {
  background: var(--dog-color);
}

.btn-add-cart.added:hover { background: #6a9e6e; }

/* ===== Divider ===== */
.section-divider {
  max-width: 1200px;
  margin: 0 auto;
  border: none;
  border-top: 1.5px solid var(--border);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--fg);
  color: rgba(255,255,255,0.6);
  padding: 48px;
  font-size: 0.82rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.footer-logo span { color: var(--accent-warm); }

/* ===== Cart Toast ===== */
.cart-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--fg);
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  z-index: 999;
}

.cart-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-inner { padding: 0 20px; gap: 16px; }
  .nav-species { gap: 2px; }
  .nav-tab { padding: 5px 12px; font-size: 0.78rem; }

  .hero { padding: 48px 20px 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding-bottom: 48px; }
  .hero-visual { display: none; }
  .hero-headline { font-size: 2.4rem; }

  .section { padding: 48px 20px; }
  .section-header { flex-direction: column; align-items: flex-start; }

  .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

  .site-footer { padding: 32px 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ===== Utility ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }