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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #60a5fa;
  --secondary: #0ea5e9;
  --accent: #7c3aed;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --dark-3: #334155;
  --gray: #64748b;
  --gray-light: #94a3b8;
  --gray-lighter: #cbd5e1;
  --light: #f1f5f9;
  --lighter: #f8fafc;
  --white: #ffffff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --font: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-xl: 0 8px 24px rgba(0,0,0,0.1);
  --radius: 3px;
  --radius-lg: 3px;
  --radius-xl: 3px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--dark-2);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 700;
}

.nav { display: flex; gap: 8px; align-items: center; }

.nav-link {
  padding: 8px 16px;
  border-radius: 6px;
  color: var(--gray);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
  font-family: var(--font);
}

.nav-link:hover, .nav-link.active { color: var(--primary); background: rgba(37,99,235,0.06); }

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  background: none;
  border: none;
}

.mobile-menu-btn span {
  width: 22px;
  height: 2px;
  background: var(--dark-3);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  background: var(--white);
  padding: 100px 0 96px;
  color: var(--dark);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--light);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40%;
  background: var(--lighter);
}

.hero::after { display: none; }

.hero-content { position: relative; z-index: 1; max-width: 640px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37,99,235,0.06);
  border: 1px solid rgba(37,99,235,0.12);
  padding: 6px 16px;
  border-radius: 3px;
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 28px;
  letter-spacing: 1px;
}

.hero-badge svg {
  flex-shrink: 0;
}

.hero h1 {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 20px;
  letter-spacing: -1px;
  color: var(--dark);
}

.hero h1 span {
  color: var(--primary);
  -webkit-text-fill-color: var(--primary);
}

.hero p {
  font-size: 16px;
  color: var(--gray);
  margin-bottom: 40px;
  line-height: 1.8;
  max-width: 520px;
}

.hero-stats {
  display: flex;
  gap: 56px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--light);
}

.hero-stat-item { text-align: left; }
.hero-stat-num { font-size: 32px; font-weight: 800; color: var(--dark); letter-spacing: -0.5px; }
.hero-stat-label { font-size: 13px; color: var(--gray-light); margin-top: 4px; letter-spacing: 0.5px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: var(--font);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--dark-3);
  border: 1.5px solid var(--gray-lighter);
}

.btn-outline:hover { background: var(--lighter); border-color: var(--gray-light); }
.btn-lg { padding: 14px 36px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== Section ===== */
.section { padding: 88px 0; background: var(--white); }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: 34px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.section-header p {
  font-size: 16px;
  color: var(--gray);
  max-width: 520px;
  margin: 0 auto;
}

/* ===== Products Grid ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--light);
}

.product-card:hover {
  border-color: var(--gray-lighter);
}

.product-thumb {
  height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-thumb svg {
  width: 44px;
  height: 44px;
  opacity: 0.7;
}

.product-body { padding: 20px; }

.product-category {
  display: inline-block;
  padding: 3px 8px;
  background: rgba(37,99,235,0.06);
  color: var(--primary);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.product-desc {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--light);
}

.product-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--danger);
}

.product-price span {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray);
}

.product-action {
  padding: 7px 16px;
  background: var(--white);
  color: var(--primary);
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}

.product-action:hover { background: var(--primary); color: var(--white); }

/* ===== Features Grid ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  text-align: center;
  padding: 36px 24px;
  background: var(--lighter);
  border-radius: var(--radius);
  border: none;
  transition: var(--transition);
}

.feature-card:hover { background: var(--light); }

.feature-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 20px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.feature-card h3 { font-size: 15px; font-weight: 700; color: var(--dark); margin-bottom: 10px; }
.feature-card p { font-size: 13px; color: var(--gray); line-height: 1.7; }

/* ===== Detail View ===== */
.detail-view { padding: 32px 0 72px; }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gray);
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 24px;
  padding: 8px 0;
  border: none;
  background: none;
  font-family: var(--font);
  transition: var(--transition);
}

.back-btn:hover { color: var(--primary); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.detail-image {
  border-radius: var(--radius-lg);
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.detail-image svg {
  width: 96px;
  height: 96px;
  opacity: 0.7;
}

.detail-info h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
}

.detail-category {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(37,99,235,0.06);
  color: var(--primary);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.detail-desc {
  font-size: 15px;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 24px;
}

.detail-features { margin-bottom: 28px; }

.detail-features h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}

.detail-features ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.detail-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--dark-3);
}

.detail-features li::before {
  content: '\2713';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(16,185,129,0.1);
  color: var(--success);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== Delivery Info ===== */
.delivery-info { margin-bottom: 28px; }
.delivery-info h3 { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 12px; }
.delivery-list { background: var(--lighter); border: 1px solid var(--light); border-radius: var(--radius); padding: 16px 20px; }
.delivery-item { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-size: 14px; color: var(--dark-3); line-height: 1.6; }
.delivery-item svg { flex-shrink: 0; margin-top: 3px; }

/* ===== Pricing Specs ===== */
.specs-section { margin-bottom: 28px; }
.specs-section h3 { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 12px; }
.spec-options { display: flex; flex-direction: column; gap: 10px; }

.spec-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 2px solid var(--light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.spec-option:hover { border-color: var(--primary-light); }
.spec-option.selected { border-color: var(--primary); background: rgba(37,99,235,0.04); }

.spec-option-info h4 { font-size: 15px; font-weight: 600; color: var(--dark); }
.spec-option-info p { font-size: 13px; color: var(--gray); margin-top: 2px; }

.spec-option-price { font-size: 20px; font-weight: 800; color: var(--danger); white-space: nowrap; }
.spec-option-price span { font-size: 12px; color: var(--gray); font-weight: 500; }

.detail-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid var(--light);
  margin-bottom: 20px;
}

.detail-total-label { font-size: 15px; color: var(--gray); }
.detail-total-price { font-size: 28px; font-weight: 800; color: var(--danger); }

/* ===== Order View ===== */
.order-view { padding: 32px 0 72px; }

.order-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

.order-form-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--light);
}

.order-form-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--light);
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-3);
  margin-bottom: 6px;
}

.form-group label .required { color: var(--danger); }

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-lighter);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  color: var(--dark);
  transition: var(--transition);
  outline: none;
}

.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.form-input::placeholder { color: var(--gray-light); }
textarea.form-input { resize: vertical; min-height: 80px; }

.order-summary {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--light);
  position: sticky;
  top: 88px;
}

.order-summary h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--light);
}

.order-product {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--light);
}

.order-product-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.order-product-thumb svg {
  width: 32px;
  height: 32px;
  opacity: 0.8;
}

.order-product-info h3 { font-size: 15px; font-weight: 600; color: var(--dark); }
.order-product-info p { font-size: 13px; color: var(--gray); margin-top: 4px; }
.order-product-info .price { font-size: 16px; font-weight: 700; color: var(--danger); margin-top: 8px; }

.order-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--gray);
}

.order-line span:last-child { color: var(--dark); font-weight: 500; }

.order-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  margin-top: 12px;
  border-top: 2px solid var(--light);
}

.order-total span:first-child { font-size: 15px; color: var(--dark); font-weight: 600; }
.order-total span:last-child { font-size: 24px; font-weight: 800; color: var(--danger); }

.agreement {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 20px 0;
  font-size: 13px;
  color: var(--gray);
}

.agreement input { margin-top: 3px; }
.agreement a { color: var(--primary); }

.pay-methods { display: flex; gap: 12px; margin-bottom: 20px; }

.pay-method {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 2px solid var(--light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-3);
}

.pay-method.selected { border-color: var(--success); background: rgba(16,185,129,0.04); color: var(--success); }

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-overlay.active { display: flex; }

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  border: 1px solid var(--light);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.modal-icon.success { background: rgba(16,185,129,0.1); color: var(--success); }
.modal-content h3 { font-size: 20px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.modal-content p { font-size: 14px; color: var(--gray); margin-bottom: 24px; line-height: 1.6; }

/* ===== About & Service Pages ===== */
.page-header {
  background: var(--dark);
  padding: 56px 0;
  color: white;
  text-align: center;
}

.page-header h1 { font-size: 30px; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.5px; }
.page-header p { font-size: 15px; color: rgba(255,255,255,0.55); }

.page-content { padding: 48px 0; }

.content-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--light);
  margin-bottom: 24px;
}

.content-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.content-card p, .content-card li {
  font-size: 15px;
  color: var(--dark-3);
  line-height: 1.8;
}

.content-card ul { list-style: none; padding: 0; }

.content-card ul li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
}

.content-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.contact-item {
  text-align: center;
  padding: 24px;
  background: var(--lighter);
  border-radius: var(--radius);
}

.contact-item .icon { margin-bottom: 12px; display: flex; justify-content: center; }
.contact-item h4 { font-size: 14px; font-weight: 600; color: var(--dark); margin-bottom: 4px; }
.contact-item p { font-size: 14px; color: var(--gray); }

/* ===== Footer ===== */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  padding: 72px 0 0;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand h3 {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.footer-brand p { font-size: 14px; line-height: 1.7; margin-bottom: 16px; }

.footer-col h4 {
  font-size: 15px;
  font-weight: 600;
  color: white;
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }

.footer-col li { padding: 5px 0; font-size: 14px; }

.footer-col li a {
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}

.footer-col li a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* ===== View Switching ===== */
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .order-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    gap: 4px;
  }
  .nav.open { display: flex; }
  .mobile-menu-btn { display: flex; }

  .hero { padding: 48px 0; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .hero-stat-num { font-size: 22px; }

  .section { padding: 48px 0; }
  .section-header h2 { font-size: 24px; }

  .products-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }

  .product-thumb { height: 150px; }

  .detail-image { height: 240px; }
  .detail-features ul { grid-template-columns: 1fr; }

  .order-form-section, .order-summary { padding: 20px; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .contact-grid { grid-template-columns: 1fr; }

  .pay-methods { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 24px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .features-grid { grid-template-columns: 1fr; }
}
