/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Pets at Home inspired palette */
  --primary: #00a651;          /* Bright trustworthy green */
  --primary-dark: #008c44;
  --primary-deep: #006b34;
  --accent: #ff6b00;           /* Warm orange accent */
  --accent-soft: #fff0e6;
  --bg: #f5f7f6;
  --card-bg: #ffffff;
  --text: #1c1c1c;
  --text-muted: #5a635c;
  --border: #e5ebe7;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 28px rgba(0,0,0,0.1);
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.22s ease;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hidden { display: none !important; }

/* ===== Header ===== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 0.75rem;
  overflow: visible;
}

.logo {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--primary-deep);
  text-decoration: none;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: visible;
}

.main-nav {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.nav-link {
  background: none;
  border: none;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}

.nav-link:hover {
  color: var(--primary-dark);
  background: #eef8f1;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #006b34 0%, #00a651 55%, #2bbd6a 100%);
  color: white;
  padding: 4rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 0.85rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.hero-sub {
  font-size: 1.1rem;
  opacity: 0.92;
  max-width: 540px;
  margin: 0 auto 2rem;
  font-weight: 400;
}

.search-box {
  display: flex;
  max-width: 520px;
  margin: 0 auto;
  background: white;
  border-radius: 60px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.18);
}

.search-box input {
  flex: 1;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
  outline: none;
  color: var(--text);
  font-family: inherit;
}

.search-box input::placeholder {
  color: #9ca3af;
}

.search-box button {
  background: var(--accent);
  border: none;
  color: white;
  padding: 0 1.5rem;
  font-size: 1.15rem;
  cursor: pointer;
  transition: background var(--transition);
  font-weight: 600;
}

.search-box button:hover {
  background: #e55f00;
}

.search-hint {
  margin-top: 1.15rem;
  font-size: 0.9rem;
  opacity: 0.8;
  position: relative;
  z-index: 1;
}

/* ===== Categories ===== */
.categories-section {
  padding: 2.5rem 0 4rem;
}

.categories-section h2 {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
  text-align: center;
  color: var(--primary-deep);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.categories-section .section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.35rem;
}

.category-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.75rem 1.4rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
  opacity: 0;
  transition: opacity var(--transition);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: #c5e0d0;
}

.category-card:hover::before {
  opacity: 1;
}

.category-icon {
  font-size: 2.75rem;
  margin-bottom: 0.7rem;
  display: block;
  line-height: 1;
}

.category-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
  color: var(--primary-deep);
  font-weight: 650;
}

.category-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ===== Detail View ===== */
.detail-section {
  padding: 2rem 0 4rem;
}

.back-btn {
  background: white;
  border: 1px solid var(--border);
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 1.75rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.back-btn:hover {
  background: #eef8f1;
  color: var(--primary-dark);
  border-color: var(--primary);
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.detail-header .icon {
  font-size: 3.25rem;
  line-height: 1;
}

.detail-header h2 {
  font-size: 1.9rem;
  color: var(--primary-deep);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.care-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.35rem;
  margin-bottom: 2.25rem;
}

.care-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

.care-card:hover {
  box-shadow: var(--shadow-hover);
}

.care-card h3 {
  font-size: 1.08rem;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 650;
}

.care-card ul {
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.care-card li {
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.products-cta {
  text-align: center;
  margin-top: 1.75rem;
  padding: 1.75rem;
  background: linear-gradient(135deg, #eef8f1 0%, #e6f6ec 100%);
  border-radius: var(--radius);
  border: 1px solid #c5e0d0;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.95rem 2rem;
  font-size: 1.08rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(0, 166, 81, 0.3);
  font-family: inherit;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 166, 81, 0.35);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
  backdrop-filter: blur(3px);
}

.modal {
  background: white;
  border-radius: 18px;
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,0.22);
}

.modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.15rem;
  background: #f3f4f6;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: #e5e7eb;
  color: var(--text);
}

.modal h3 {
  margin-bottom: 1.4rem;
  color: var(--primary-deep);
  font-size: 1.4rem;
  font-weight: 700;
  padding-right: 2rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.1rem;
}

.product-card {
  background: #f8faf9;
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid var(--border);
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(0,166,81,0.12);
}

.product-card h4 {
  font-size: 0.98rem;
  margin-bottom: 0.4rem;
  color: var(--primary-deep);
  font-weight: 650;
}

.product-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
  line-height: 1.4;
}

.product-card a {
  display: inline-block;
  background: var(--primary);
  color: white;
  text-decoration: none;
  padding: 0.45rem 1rem;
  border-radius: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background var(--transition);
}

.product-card a:hover {
  background: var(--primary-dark);
}

.affiliate-note {
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

.affiliate-note a {
  color: var(--primary-dark);
  font-weight: 500;
}

/* ===== Footer ===== */
.site-footer {
  margin-top: auto;
  background: var(--primary-deep);
  color: rgba(255,255,255,0.88);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.92rem;
}

.footer-note {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  opacity: 0.75;
}

.footer-note a {
  color: #a8e6c1;
  text-decoration: none;
  font-weight: 500;
}

.footer-note a:hover {
  text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .header-inner { height: 60px; gap: 0.4rem; }
  .logo { font-size: 1.1rem; }
  .nav-link { padding: 0.35rem 0.45rem; font-size: 0.8rem; }
  .main-nav { gap: 0.15rem; flex-wrap: nowrap; }
  .hero { padding: 3rem 0 2.75rem; }
  .hero::after { height: 28px; }
  .categories-grid { grid-template-columns: 1fr 1fr; gap: 0.9rem; }
  .category-card { padding: 1.25rem 0.9rem; }
  .category-icon { font-size: 2.2rem; }
  .category-card h3 { font-size: 1.05rem; }
  .modal { padding: 1.4rem; border-radius: 14px; }
  .care-grid { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .categories-grid { grid-template-columns: 1fr; }
}

/* ===== Difficulty badges on cards ===== */
.card-diff {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.diff-beginner { background: #d1fae5; color: #065f46; }
.diff-intermediate { background: #fef3c7; color: #92400e; }
.diff-experienced { background: #fee2e2; color: #991b1b; }

/* ===== Difficulty box on detail page ===== */
.difficulty-box {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.diff-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.diff-label { font-size: 1rem; color: var(--text); }
.diff-scale { font-size: 0.82rem; color: var(--text-muted); }
.diff-bar-track {
  height: 10px;
  background: #e5e7eb;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 0.7rem;
}
.diff-bar-fill {
  height: 100%;
  border-radius: 20px;
  transition: width 0.4s ease;
}
.diff-beginner .diff-bar-fill { background: linear-gradient(90deg, #10b981, #34d399); }
.diff-intermediate .diff-bar-fill { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.diff-experienced .diff-bar-fill { background: linear-gradient(90deg, #ef4444, #f87171); }
.diff-note {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.detail-short {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-top: 0.2rem;
}

/* ===== FAQ on detail page ===== */
.faq-section {
  margin: 2.25rem 0 1.5rem;
}
.faq-heading {
  font-size: 1.25rem;
  color: var(--primary-deep);
  margin-bottom: 1rem;
  font-weight: 700;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.faq-item summary {
  padding: 0.95rem 1.15rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  transition: background 0.15s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 500;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:hover { background: #f8faf9; }
.faq-item p {
  padding: 0 1.15rem 1.1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* ===== FAQ Search Results ===== */
.faq-results-section {
  padding: 0 0 3rem;
}
.faq-results-title {
  font-size: 1.35rem;
  color: var(--primary-deep);
  margin-bottom: 1.25rem;
  font-weight: 700;
}
.faq-results-list {
  display: grid;
  gap: 1rem;
}
.faq-result-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.faq-result-pet {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
}
.faq-result-card h4 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
  color: var(--text);
}
.faq-result-card p {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0.75rem;
}
.link-btn {
  background: none;
  border: none;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.link-btn:hover { text-decoration: underline; }
