/* ============================================ */
/*  PetPicks - 宠物用品推荐网站 样式           */
/*  响应式设计，移动端优先                      */
/* ============================================ */

/* --- 基础重置 --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  color: #333; line-height: 1.7; background: #fafafa;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- 导航栏 --- */
.navbar {
  background: #fff; border-bottom: 1px solid #e5e7eb;
  position: sticky; top: 0; z-index: 100;
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { font-size: 1.5rem; font-weight: 700; color: #333; text-decoration: none !important; }
.logo:hover { color: #2563eb; }
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  padding: 8px 16px; border-radius: 8px; font-size: 0.9rem; color: #555; transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  background: #f0f4ff; color: #2563eb; text-decoration: none;
}
.hamburger { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* --- 主横幅 --- */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff; padding: 80px 0; text-align: center;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 12px; }
.hero .subtitle { font-size: 1.1rem; opacity: 0.9; margin-bottom: 30px; }
.hero-search { display: flex; max-width: 500px; margin: 0 auto; gap: 0; }
.hero-search input {
  flex: 1; padding: 14px 20px; border: none; border-radius: 12px 0 0 12px;
  font-size: 1rem; outline: none;
}
.hero-search button {
  padding: 14px 24px; border: none; background: #fbbf24; color: #333;
  font-size: 1rem; font-weight: 600; border-radius: 0 12px 12px 0; cursor: pointer;
  transition: background 0.2s;
}
.hero-search button:hover { background: #f59e0b; }

/* --- 分类卡片 --- */
.categories-section { padding: 60px 0; }
.categories-section h2, .featured-section h2, .blog-section h2 {
  font-size: 1.8rem; margin-bottom: 30px; text-align: center;
}
.section-desc { text-align: center; color: #666; margin-bottom: 40px; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.category-card {
  background: #fff; border-radius: 16px; padding: 30px 20px;
  text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 0.3s; display: block; color: #333 !important; text-decoration: none !important;
}
.category-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.category-card .emoji { font-size: 3rem; display: block; margin-bottom: 12px; }
.category-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.category-card p { font-size: 0.9rem; color: #666; }

/* --- 产品网格 --- */
.featured-section { background: #fff; padding: 60px 0; }
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.product-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  overflow: hidden; transition: all 0.3s;
}
.product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-2px); }
.product-img {
  width: 100%; height: 200px; object-fit: cover; background: #f3f4f6;
  display: flex; align-items: center; justify-content: center;
  color: #ccc; font-size: 3rem;
}
.product-info { padding: 16px; }
.product-info h3 { font-size: 1rem; margin-bottom: 8px; line-height: 1.4; }
.product-info h3 a { color: #333; }
.product-info h3 a:hover { color: #2563eb; }
.product-price { font-size: 1.2rem; font-weight: 700; color: #e11d48; margin-bottom: 8px; }
.product-meta { font-size: 0.85rem; color: #888; margin-bottom: 12px; }
.product-commission { font-size: 0.8rem; color: #059669; }
.affiliate-btn {
  display: inline-block; padding: 10px 20px; background: #2563eb; color: #fff !important;
  border-radius: 8px; font-size: 0.9rem; font-weight: 500; transition: background 0.2s;
  text-decoration: none !important; text-align: center;
}
.affiliate-btn:hover { background: #1d4ed8; }
.affiliate-btn-small { padding: 6px 14px; font-size: 0.8rem; }

/* --- 评测文章 --- */
.blog-section { padding: 60px 0; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: all 0.3s;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.blog-img { height: 180px; background: #f3f4f6; }
.blog-content { padding: 20px; }
.blog-tag {
  display: inline-block; padding: 4px 10px; background: #ede9fe; color: #6d28d9;
  border-radius: 20px; font-size: 0.8rem; margin-bottom: 10px;
}
.blog-content h3 { font-size: 1.1rem; margin-bottom: 8px; }
.blog-content h3 a { color: #333; }
.blog-content p { font-size: 0.9rem; color: #666; margin-bottom: 10px; }
.blog-date { font-size: 0.8rem; color: #999; }

/* --- 产品详情页 --- */
.product-detail { padding: 40px 0; }
.breadcrumb { font-size: 0.9rem; color: #888; margin-bottom: 30px; }
.breadcrumb a { color: #2563eb; }
.product-showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.product-showcase .product-img-large {
  width: 100%; min-height: 300px; background: #f3f4f6; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 5rem;
}
.product-info-detail h1 { font-size: 1.8rem; margin-bottom: 12px; }
.product-info-detail .price { font-size: 1.5rem; font-weight: 700; color: #e11d48; margin-bottom: 16px; }
.product-info-detail .rating { color: #f59e0b; margin-bottom: 8px; }
.product-info-detail .spec { color: #666; font-size: 0.9rem; margin-bottom: 8px; }

/* 购买按钮组 */
.buy-buttons { display: flex; gap: 12px; margin: 20px 0; flex-wrap: wrap; }
.buy-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 12px; font-size: 1rem; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.2s; text-decoration: none !important;
}
.buy-btn-jd { background: #e4393c; color: #fff !important; }
.buy-btn-jd:hover { background: #c2272a; }
.buy-btn-amazon { background: #ff9900; color: #333 !important; }
.buy-btn-amazon:hover { background: #e68a00; }
.buy-btn-primary { background: #2563eb; color: #fff !important; }
.buy-btn-primary:hover { background: #1d4ed8; }

/* 文章内容 */
.article-content { max-width: 800px; margin: 0 auto; }
.article-content h2 { font-size: 1.5rem; margin: 30px 0 16px; color: #111; }
.article-content h3 { font-size: 1.2rem; margin: 24px 0 12px; }
.article-content p { margin-bottom: 16px; color: #444; }
.article-content ul { padding-left: 24px; margin-bottom: 16px; }
.article-content li { margin-bottom: 8px; color: #444; }
.article-content .pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }
.article-content .pros { background: #f0fdf4; padding: 20px; border-radius: 12px; }
.article-content .cons { background: #fef2f2; padding: 20px; border-radius: 12px; }
.article-content .pros h4 { color: #16a34a; margin-bottom: 10px; }
.article-content .cons h4 { color: #dc2626; margin-bottom: 10px; }

/* --- 页脚 --- */
.footer { background: #1f2937; color: #d1d5db; padding: 60px 0 20px; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 1.1rem; }
.footer-col p { font-size: 0.9rem; line-height: 1.6; }
.footer-col a { display: block; color: #9ca3af; font-size: 0.9rem; margin-bottom: 8px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #374151; padding-top: 20px; text-align: center; }
.footer-bottom p { font-size: 0.85rem; color: #6b7280; margin-bottom: 8px; }
.footer-bottom .disclosure { font-size: 0.8rem; color: #4b5563; }

/* --- 响应式 --- */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid #e5e7eb;
    flex-direction: column; padding: 16px; gap: 4px;
  }
  .nav-links.open { display: flex; }
  .hero h1 { font-size: 1.8rem; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: 1fr; }
  .product-showcase { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; }
  .article-content .pros-cons { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .category-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .hero-search { flex-direction: column; }
  .hero-search input { border-radius: 12px; }
  .hero-search button { border-radius: 12px; margin-top: 8px; }
}
