/* ── Chewy Design System ─────────────────────────────────────────────────── */
:root {
  --bg-page: #EBF0F8;
  --bg-white: #FFFFFF;
  --bg-card: #FFFFFF;
  --chewy-blue: #0070CC;
  --chewy-navy: #003087;
  --chewy-dark: #1A1A2E;
  --chewy-pink: #E91E8C;
  --chewy-teal: #00B4C8;
  --chewy-yellow: #FFB800;
  --text-primary: #1A1A2E;
  --text-secondary: #4A5568;
  --text-muted: #718096;
  --border: #D1DCF0;
  --border-light: #E8EEF8;
  --shadow-sm: 0 1px 3px rgba(0,48,135,0.08);
  --shadow-md: 0 4px 16px rgba(0,48,135,0.12);
  --shadow-lg: 0 8px 32px rgba(0,48,135,0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 100px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Navigation ──────────────────────────────────────────────────────────── */
.navbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.navbar-logo-img {
  height: 36px;
  width: auto;
}

.navbar-logo-text {
  font-size: 28px;
  font-weight: 800;
  color: var(--chewy-blue);
  letter-spacing: -0.5px;
  font-style: italic;
}

.navbar-search {
  flex: 1;
  max-width: 600px;
  position: relative;
}

.navbar-search input {
  width: 100%;
  height: 42px;
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0 16px 0 42px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  background: var(--bg-page);
}

.navbar-search input:focus {
  border-color: var(--chewy-blue);
  background: var(--bg-white);
}

.navbar-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.navbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.navbar-btn-ghost {
  background: transparent;
  color: var(--text-primary);
}

.navbar-btn-ghost:hover {
  background: var(--bg-page);
  color: var(--chewy-blue);
}

.navbar-btn-primary {
  background: var(--chewy-blue);
  color: white;
}

.navbar-btn-primary:hover {
  background: var(--chewy-navy);
}

.cart-count {
  background: var(--chewy-pink);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Nav tabs */
.navbar-tabs {
  background: var(--chewy-navy);
  border-bottom: none;
}

.navbar-tabs-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.navbar-tabs-inner::-webkit-scrollbar { display: none; }

.nav-tab {
  padding: 10px 16px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-tab:hover, .nav-tab.active {
  color: white;
  border-bottom-color: white;
}

/* ── Hero Banner ─────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 72vh;
  min-height: 500px;
  overflow: hidden;
  background: var(--bg-page);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.hero-slide.active { opacity: 1; }

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-slide img[src=""], .hero-slide img:not([src]) {
  display: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,48,135,0.65) 0%, rgba(0,48,135,0.2) 55%, transparent 100%);
  display: flex;
  align-items: center;
  padding: 0 80px;
}

.hero-content {
  color: white;
  max-width: 520px;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 17px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 28px;
  line-height: 1.5;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--chewy-navy);
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.hero-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.hero-dot.active {
  background: white;
  width: 24px;
  border-radius: 4px;
}

/* Sparkle decorations */
.sparkle {
  position: absolute;
  pointer-events: none;
}

/* ── Main content ─────────────────────────────────────────────────────────── */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ── Section headers ─────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 36px 0 16px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--chewy-navy);
}

.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--chewy-blue);
  text-decoration: none;
}

.section-link:hover { text-decoration: underline; }

/* ── Category mosaic grid ────────────────────────────────────────────────── */
.category-mosaic {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 8px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.category-tile {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-white);
  transition: transform 0.2s;
}

.category-tile:hover { transform: scale(1.01); }

.category-tile-main {
  grid-row: span 2;
}

.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 160px;
  max-height: 340px;
}

.category-tile img[src=""], .category-tile img:not([src]) {
  min-height: 160px;
  background: var(--bg-page);
}

.category-tile-label {
  position: absolute;
  bottom: 10px;
  left: 12px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  color: var(--chewy-navy);
}

/* sparkle decoration on tiles */
.tile-sparkle {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
}

/* ── Pet species navigation ──────────────────────────────────────────────── */
.pet-nav {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0 8px;
}

.pet-nav::-webkit-scrollbar { display: none; }

.pet-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.pet-nav-item:hover { transform: translateY(-2px); }

.pet-nav-img-wrap {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid var(--chewy-pink);
  overflow: hidden;
  background: var(--bg-white);
  padding: 2px;
}

.pet-nav-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.pet-nav-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Product card row ─────────────────────────────────────────────────────── */
.product-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  padding: 4px 2px 12px;
}

.product-row::-webkit-scrollbar { height: 4px; }
.product-row::-webkit-scrollbar-track { background: transparent; }
.product-row::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: 14px;
  width: 200px;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--chewy-blue);
}

.product-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--bg-page);
}

.product-card-img[src=""], .product-card-img:not([src]) {
  background: var(--bg-page);
  min-height: 140px;
}

.product-card-brand {
  font-size: 11px;
  font-weight: 600;
  color: var(--chewy-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.product-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--chewy-navy);
  margin-top: auto;
}

.product-card-autoship {
  font-size: 11px;
  color: var(--chewy-blue);
  font-weight: 500;
}

.product-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.rating-stars { color: var(--chewy-yellow); }

/* ── Services row ─────────────────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--chewy-blue);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--bg-page);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon svg { color: var(--chewy-blue); }

.service-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--chewy-navy);
  line-height: 1.3;
}

/* ── VetCare promo banner ─────────────────────────────────────────────────── */
.vetcare-banner {
  background: linear-gradient(135deg, #D6E8FF 0%, #B8D4F4 100%);
  border-radius: var(--radius-lg);
  padding: 32px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
  margin: 24px 0;
}

.vetcare-banner-text {
  flex: 1;
}

.vetcare-eyebrow {
  font-size: 13px;
  font-weight: 700;
  color: var(--chewy-blue);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.vetcare-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--chewy-navy);
  line-height: 1.2;
  margin-bottom: 8px;
}

.vetcare-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.btn-vetcare {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--chewy-blue);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-vetcare:hover { background: var(--chewy-navy); }

.vetcare-banner-img {
  width: 280px;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  line-height: 1;
}

.btn-primary {
  background: var(--chewy-blue);
  color: white;
}

.btn-primary:hover { background: var(--chewy-navy); }

.btn-outline {
  background: transparent;
  color: var(--chewy-blue);
  border: 2px solid var(--chewy-blue);
}

.btn-outline:hover { background: var(--chewy-blue); color: white; }

/* ── Chat widget trigger ──────────────────────────────────────────────────── */
#chat-trigger {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  background: var(--chewy-blue);
  color: white;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,112,204,0.4);
  transition: all 0.2s;
  z-index: 999;
}

#chat-trigger:hover {
  transform: scale(1.1);
  background: var(--chewy-navy);
  box-shadow: 0 6px 28px rgba(0,112,204,0.5);
}

#chat-trigger svg { width: 26px; height: 26px; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-overlay { padding: 0 32px; }
  .hero-title { font-size: 28px; }
  .hero-subtitle { font-size: 14px; }
  .navbar-search { display: none; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .category-mosaic { grid-template-columns: 1fr 1fr; }
  .category-tile-main { grid-row: span 1; }
  .vetcare-banner { flex-direction: column; padding: 24px; }
  .vetcare-banner-img { width: 100%; height: 160px; }
}

@media (max-width: 480px) {
  .main-content { padding: 0 16px 40px; }
  .navbar-inner { padding: 0 16px; gap: 12px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
