/* m.carbonfiberinsoles.shop - Headless WordPress
   极简 CSS, 没有 JS 框架
   移动优先设计 */

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

:root {
  --primary: #ff6b35;
  --dark: #1a1a1a;
  --gray: #666;
  --light: #f8f8f8;
  --border: #eee;
  --max-w: 1200px;
  --radius: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  font-size: 16px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* 布局 */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }

header {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
header .container {
  display: flex; align-items: center; justify-content: space-between;
}
.logo { font-size: 22px; font-weight: 800; color: var(--primary); }
.logo small { display: block; font-size: 11px; font-weight: 400; color: var(--gray); }
nav ul { list-style: none; display: flex; gap: 24px; }
nav a { color: var(--dark); font-weight: 500; }
.lang-switcher { display: flex; gap: 8px; }
.lang-switcher a {
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 4px;
  font-size: 13px;
}
.lang-switcher a.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Hero */
.hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
}
.hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 16px; }
.hero p { font-size: 18px; opacity: 0.9; max-width: 600px; margin: 0 auto 24px; }
.hero .cta {
  display: inline-block; background: var(--primary); color: white;
  padding: 12px 32px; border-radius: var(--radius); font-weight: 600;
}
.hero .cta:hover { background: #e55a2b; text-decoration: none; }

/* Section */
section { padding: 40px 0; }
section h2 { font-size: 28px; font-weight: 800; margin-bottom: 24px; text-align: center; }
section h2 small { display: block; font-size: 14px; color: var(--gray); font-weight: 400; margin-top: 8px; }

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.product-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s;
}
.product-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.product-card img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
}
.product-info { padding: 12px; }
.product-title {
  font-size: 14px; font-weight: 500; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.8em;
}
.product-price {
  color: var(--primary); font-size: 18px; font-weight: 700; margin-top: 8px;
}

/* Post Grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.post-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.post-thumb { aspect-ratio: 16/9; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-content { padding: 16px; }
.post-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.post-meta { color: var(--gray); font-size: 13px; margin-bottom: 8px; }
.post-excerpt { color: var(--gray); font-size: 14px; line-height: 1.5; }

/* Article */
.article {
  max-width: 760px; margin: 0 auto; padding: 20px 16px;
}
.article h1 { font-size: 32px; margin-bottom: 16px; line-height: 1.3; }
.article-meta { color: var(--gray); margin-bottom: 24px; }
.article-content { line-height: 1.8; font-size: 17px; }
.article-content h2 { font-size: 24px; margin: 32px 0 16px; }
.article-content h3 { font-size: 20px; margin: 24px 0 12px; }
.article-content p { margin-bottom: 16px; }
.article-content img { margin: 16px 0; border-radius: var(--radius); }
.article-content ul, .article-content ol { margin: 16px 0 16px 24px; }

/* Breadcrumb */
.breadcrumb {
  background: var(--light);
  padding: 12px 0;
  font-size: 13px;
  color: var(--gray);
}
.breadcrumb a { color: var(--gray); }
.breadcrumb .sep { margin: 0 8px; }

/* Sidebar layout for product */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.product-gallery img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius);
}
.thumb-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.thumb-row img { aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.product-side h1 { font-size: 28px; margin-bottom: 12px; line-height: 1.3; }
.product-price-big { color: var(--primary); font-size: 32px; font-weight: 800; margin: 16px 0; }
.product-cta { 
  display: block; width: 100%; padding: 16px;
  background: var(--primary); color: white;
  text-align: center; border-radius: var(--radius);
  font-size: 18px; font-weight: 600; border: none; cursor: pointer;
  margin-top: 16px;
}
.product-cta:hover { background: #e55a2b; }
.product-meta { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.product-meta dt { font-weight: 600; margin-top: 8px; }
.product-meta dd { color: var(--gray); margin-left: 0; }

footer {
  background: var(--dark);
  color: white;
  padding: 40px 0 20px;
  margin-top: 40px;
}
footer .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
footer h4 { color: var(--primary); margin-bottom: 12px; font-size: 16px; }
footer ul { list-style: none; }
footer a { color: rgba(255,255,255,0.7); }
footer a:hover { color: white; }
.copyright { text-align: center; margin-top: 32px; padding-top: 16px; border-top: 1px solid #333; color: rgba(255,255,255,0.5); font-size: 13px; }

/* Responsive */
@media (max-width: 768px) {
  .hero { padding: 40px 0; }
  .hero h1 { font-size: 28px; }
  .product-detail { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  section { padding: 24px 0; }
  nav ul { gap: 12px; font-size: 14px; }
  .logo small { display: none; }
}
