/* ---------- Design tokens ---------- */
:root {
  --color-primary: #F97A3A;
  --color-primary-dark: #E5652A;
  --color-bg: #FFFBF5;
  --color-surface: #FFFFFF;
  --color-text: #2E2A26;
  --color-text-muted: #7A736C;
  --color-border: #F0E4D8;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-card: 0 2px 12px rgba(46, 42, 38, 0.08);
  --shadow-card-hover: 0 8px 24px rgba(46, 42, 38, 0.14);
  --container-width: 1200px;
  --font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

/* ---------- Reset ---------- */
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
h1, h2, h3, h4, p {
  margin: 0;
}
button, input, select {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}
.main-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  flex-direction: column;
  padding: 8px 20px 16px;
}
.main-nav.is-open {
  display: flex;
}
.main-nav a {
  padding: 10px 0;
  color: var(--color-text-muted);
  font-weight: 500;
}
.main-nav a.active,
.main-nav a:hover {
  color: var(--color-primary-dark);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang-toggle,
.menu-toggle {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
}
.lang-toggle:hover,
.menu-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}
.menu-toggle {
  padding: 8px 12px;
  font-size: 1.1rem;
  line-height: 1;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-primary-dark);
  border-color: var(--color-primary);
}
.btn-secondary:hover {
  background: #FFF3EA;
}
.btn-block {
  width: 100%;
}

/* ---------- Hero ---------- */
.hero {
  padding: 40px 0;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
  text-align: center;
}
.hero-image {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.hero-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.hero-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 20px;
}

/* ---------- Section headings ---------- */
.section {
  padding: 32px 0;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ---------- Category grid ---------- */
.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.category-card {
  border-radius: var(--radius-md);
  padding: 32px 20px;
  min-height: 120px;
  display: flex;
  align-items: flex-end;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}
.category-card--dog { background: linear-gradient(135deg, #FDECD9, #F7C7A3); color: #8A4A22; }
.category-card--cat { background: linear-gradient(135deg, #FDECEF, #F6CBD6); color: #9C3B57; }
.category-card--aquarium { background: linear-gradient(135deg, #E6F3FB, #BFDDF0); color: #1F5C82; }
.category-card--reptile { background: linear-gradient(135deg, #EAF6E8, #C3E4BE); color: #356B31; }

/* ---------- Product grid & cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: block;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.product-card-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-border);
}
.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card-body {
  padding: 16px;
}
.product-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 8px 0 6px;
}
.product-card-price {
  color: var(--color-primary-dark);
  font-weight: 700;
}
.badge {
  display: inline-block;
  background: #FFF3EA;
  color: var(--color-primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------- Filters bar (product list page) ---------- */
.filters-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.filters-bar input,
.filters-bar select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}
.filters-row {
  display: flex;
  gap: 12px;
}
.filters-row select {
  flex: 1;
}
.empty-state {
  text-align: center;
  color: var(--color-text-muted);
  padding: 40px 0;
}

/* ---------- Product detail page ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 32px 0;
}
.gallery-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 3;
  background: var(--color-border);
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.gallery-thumb {
  width: 72px;
  height: 54px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: var(--color-border);
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumb.active {
  border-color: var(--color-primary);
}
.product-info-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 10px 0 8px;
}
.product-info-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin: 8px 0 16px;
}
.product-info-description {
  color: var(--color-text-muted);
  margin-bottom: 20px;
}
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}
.specs-table th, .specs-table td {
  text-align: left;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.specs-table th {
  width: 40%;
  color: var(--color-text-muted);
  font-weight: 600;
}
.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.not-found {
  text-align: center;
  padding: 60px 0;
}
.not-found h1 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

/* ---------- About / FAQ page ---------- */
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 4px 18px;
  margin-bottom: 12px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 0;
}
.faq-item p {
  color: var(--color-text-muted);
  padding-bottom: 14px;
}
.prose {
  color: var(--color-text-muted);
  max-width: 720px;
}
.prose + .prose {
  margin-top: 10px;
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.contact-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.contact-card h3 {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.contact-card .value {
  font-size: 1.15rem;
  font-weight: 700;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: 48px;
  padding: 32px 0;
  color: var(--color-text-muted);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-brand {
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}
.footer-links a:hover {
  color: var(--color-primary-dark);
}

/* ---------- Responsive breakpoints ---------- */
@media (min-width: 600px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-title {
    font-size: 2.4rem;
  }
}

@media (min-width: 900px) {
  .header-actions {
    order: 3;
  }
  .main-nav {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 28px;
    border: none;
    padding: 0;
    background: transparent;
  }
  .main-nav a {
    padding: 0;
  }
  .menu-toggle {
    display: none;
  }
  .hero-inner {
    flex-direction: row;
    text-align: left;
  }
  .hero-text {
    flex: 1;
  }
  .hero-image {
    flex: 1;
    max-width: 520px;
  }
  .hero-subtitle {
    margin: 0 0 20px;
  }
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .product-detail {
    grid-template-columns: 1fr 1fr;
  }
  .filters-bar {
    flex-direction: row;
    align-items: center;
  }
  .filters-bar input {
    flex: 1;
  }
  .filters-row {
    flex-shrink: 0;
  }
  .filters-row select {
    width: 200px;
    flex: none;
  }
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
