/* ===== 基础变量 ===== */
:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --accent: #f97316;
  --text: #1e293b;
  --text-muted: #64748b;
  --bg: #ffffff;
  --bg-soft: #f0fdf4;
  --border: #d1d5db;
  --shadow: 0 4px 24px rgba(13, 148, 136, 0.10);
  --radius: 12px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
  object-fit: contain;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  background: var(--bg-soft);
}

.main-image img,
.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-grid img {
  width: 100%;
  height: auto;
  object-fit: cover;
  min-height: 280px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== 导航栏 ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav a {
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-soft);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.2s;
}

.btn-icon:hover {
  background: var(--border);
}

.btn-login {
  padding: 8px 22px;
  background: var(--primary);
  color: #fff;
  border: none;
}

.btn-login:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.875rem;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #f0fdf4 0%, #ccfbf1 50%, #ffedd5 100%);
  padding: 80px 0;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
}

.hero-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-card img {
  border-radius: 16px;
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.hero-float {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-float-icon {
  width: 44px;
  height: 44px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* ===== 区块标题 ===== */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ===== 分类 ===== */
.categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.category-card {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all 0.25s;
  border: 2px solid transparent;
}

.category-card:hover {
  background: #fff;
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.category-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.category-card span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== 商品卡片 ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.25s;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

.product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-soft);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.product-card:hover .product-image img {
  transform: scale(1.06);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.product-badge.sale {
  background: #ef4444;
}

.product-info {
  padding: 20px;
}

.product-category {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.product-info h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-rating {
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.price-current {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.price-original {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-actions {
  display: flex;
  gap: 8px;
}

.product-actions .btn {
  flex: 1;
}

/* ===== 特色服务 ===== */
.features {
  background: var(--bg-soft);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.feature-item {
  text-align: center;
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 16px;
  box-shadow: var(--shadow);
}

.feature-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ===== 页脚 ===== */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 16px;
  display: block;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 20px 0;
  background: var(--bg-soft);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  margin: 0 8px;
}

/* ===== 商品列表页 ===== */
.page-header {
  padding: 48px 0 32px;
  background: var(--bg-soft);
}

.page-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
}

.products-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  padding: 48px 0 80px;
}

.sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}

.filter-group {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.filter-group h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.filter-list {
  list-style: none;
}

.filter-list li {
  margin-bottom: 10px;
}

.filter-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--text-muted);
}

.filter-list label:hover {
  color: var(--text);
}

.filter-list input {
  accent-color: var(--primary);
}

.products-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.products-count {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.sort-select {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  background: #fff;
  cursor: pointer;
}

.products-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ===== 商品详情页 ===== */
.product-detail {
  padding: 48px 0 80px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.product-gallery {
  position: sticky;
  top: 96px;
}

.main-image {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  margin-bottom: 16px;
  aspect-ratio: 1;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnails {
  display: flex;
  gap: 12px;
}

.thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: all 0.2s;
}

.thumbnail.active,
.thumbnail:hover {
  border-color: var(--primary);
  opacity: 1;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-info h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.product-meta .rating {
  color: var(--accent);
  font-weight: 600;
}

.product-meta .reviews {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.product-meta .sku {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.detail-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}

.detail-price .current {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
}

.detail-price .original {
  font-size: 1.125rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.detail-price .discount {
  background: #fef2f2;
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

.product-desc {
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.8;
}

.option-group {
  margin-bottom: 24px;
}

.option-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.color-options,
.size-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.color-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  outline: 2px solid var(--border);
  outline-offset: 2px;
}

.color-btn.active,
.color-btn:hover {
  outline-color: var(--primary);
  transform: scale(1.1);
}

.size-btn {
  min-width: 48px;
  height: 40px;
  padding: 0 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.size-btn.active,
.size-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0fdf4;
}

.quantity-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.quantity-control button {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-soft);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.2s;
}

.quantity-control button:hover {
  background: var(--border);
}

.quantity-control input {
  width: 56px;
  height: 40px;
  border: none;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
}

.detail-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.detail-actions .btn {
  flex: 1;
  padding: 16px 32px;
}

.product-features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 24px;
  background: var(--bg-soft);
  border-radius: var(--radius);
}

.product-features-list li {
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-features-list li::before {
  content: "✓";
  color: #22c55e;
  font-weight: 700;
}

/* ===== 详情 Tab ===== */
.product-tabs {
  margin-top: 64px;
}

.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 32px;
}

.tab-btn {
  padding: 16px 32px;
  border: none;
  background: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-panel p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table tr {
  border-bottom: 1px solid var(--border);
}

.spec-table td {
  padding: 14px 0;
  font-size: 0.9rem;
}

.spec-table td:first-child {
  color: var(--text-muted);
  width: 160px;
}

/* ===== 关于 / 联系页 ===== */
.about-hero {
  background: linear-gradient(135deg, #f0fdf4, #ffedd5);
  padding: 80px 0;
  text-align: center;
}

.about-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.about-content {
  padding: 80px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-grid img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-grid h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.about-grid p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.8;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 64px 0;
  background: var(--bg-soft);
  text-align: center;
}

.stat-item h3 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.contact-section {
  padding: 80px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
}

.contact-info h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-item-icon {
  width: 48px;
  height: 48px;
  background: #ccfbf1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-item h4 {
  font-weight: 700;
  margin-bottom: 4px;
}

.contact-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.contact-form {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color 0.2s;
  background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===== 登录弹框 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
  transform: scale(0.92) translateY(16px);
  transition: transform 0.3s ease;
}

.modal-overlay.is-open .modal {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-soft);
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-header {
  text-align: center;
  margin-bottom: 32px;
}

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form-extra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 0.875rem;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  cursor: pointer;
}

.login-remember input {
  accent-color: var(--primary);
}

.login-forgot {
  color: var(--primary);
  font-weight: 500;
}

.login-forgot:hover {
  text-decoration: underline;
}

.login-register-tip {
  text-align: center;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.login-register-tip a {
  color: var(--primary);
  font-weight: 600;
}

.login-register-tip a:hover {
  text-decoration: underline;
}

body.modal-open {
  overflow: hidden;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .hero-inner,
  .product-detail-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .categories,
  .products-grid,
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .products-list-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-gallery {
    position: static;
  }
}

@media (max-width: 640px) {
  .nav {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .categories,
  .products-grid,
  .features-grid,
  .products-list-grid,
  .footer-grid,
  .stats-row {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    flex-direction: column;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ===== 动画 ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.3); }
  50% { box-shadow: 0 0 0 12px rgba(13, 148, 136, 0); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* 页面加载动画 */
.header {
  animation: slideDown 0.6s ease forwards;
}

.hero-content {
  animation: fadeInUp 0.8s ease forwards;
}

.hero-visual {
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.hero-tag {
  animation: fadeInUp 0.6s ease 0.1s forwards;
  opacity: 0;
}

.hero h1 {
  animation: fadeInUp 0.7s ease 0.25s forwards;
  opacity: 0;
}

.hero p {
  animation: fadeInUp 0.7s ease 0.4s forwards;
  opacity: 0;
}

.hero-actions {
  animation: fadeInUp 0.7s ease 0.55s forwards;
  opacity: 0;
}

.hero-card {
  animation: float 4s ease-in-out infinite;
}

.hero-float {
  animation: floatBadge 3s ease-in-out infinite;
}

/* 滚动入场 */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }

.products-list-grid .product-card:nth-child(1) { transition-delay: 0.05s; }
.products-list-grid .product-card:nth-child(2) { transition-delay: 0.1s; }
.products-list-grid .product-card:nth-child(3) { transition-delay: 0.15s; }
.products-list-grid .product-card:nth-child(4) { transition-delay: 0.2s; }
.products-list-grid .product-card:nth-child(5) { transition-delay: 0.25s; }
.products-list-grid .product-card:nth-child(6) { transition-delay: 0.3s; }
.products-list-grid .product-card:nth-child(7) { transition-delay: 0.35s; }
.products-list-grid .product-card:nth-child(8) { transition-delay: 0.4s; }
.products-list-grid .product-card:nth-child(9) { transition-delay: 0.45s; }

.about-grid img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* 分类卡片图标弹跳 */
.category-card:hover .category-icon {
  animation: iconBounce 0.5s ease;
}

.category-icon {
  transition: transform 0.3s ease;
}

/* 按钮交互 */
.btn {
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary:hover {
  animation: pulseGlow 2s ease infinite;
}

/* 购物车角标弹出 */
.cart-badge.pop {
  animation: cartPop 0.4s ease;
}

/* 图片加载 */
.product-image img,
.main-image img,
.hero-card img,
.about-grid img {
  opacity: 1;
  transition: opacity 0.5s ease, transform 0.4s ease;
}

.product-image img:not(.loaded),
.main-image img:not(.loaded),
.hero-card img:not(.loaded),
.about-grid img:not(.loaded) {
  opacity: 0;
}

.img-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.product-image,
.main-image,
.hero-card {
  position: relative;
}

/* Tab 面板切换 */
.tab-panel {
  animation: none;
}

.tab-panel.active {
  animation: fadeIn 0.35s ease;
}

/* 特色图标悬停 */
.feature-item:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  transition: transform 0.3s ease;
}

.feature-icon {
  transition: transform 0.3s ease;
}

/* 统计数字 */
.stat-item h3 {
  transition: color 0.3s ease;
}

.stat-item:hover h3 {
  color: var(--accent);
  transform: scale(1.05);
  transition: all 0.3s ease;
}

/* 导航链接下划线 */
.nav a {
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

/* 滚动时导航栏阴影 */
.header.scrolled {
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

/* 缩略图变体色调 */
.thumbnail img.variant-2 { filter: hue-rotate(60deg); }
.thumbnail img.variant-3 { filter: hue-rotate(120deg); }
.thumbnail img.variant-4 { filter: hue-rotate(200deg); }

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}
