* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --orange: #ff6a00;
  --orange-hover: #e65c00;
  --text: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --border: #e8e8e8;
  --bg: #f5f5f5;
  --white: #fff;
  --alipay-blue: #1677ff;
  --success: #52c41a;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --max-width: 1200px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-width: 1280px;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #1677ff, #0958d9);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.search-box {
  flex: 1;
  display: flex;
  max-width: 520px;
}

.search-box input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid var(--primary);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 14px;
  outline: none;
}

.search-box button {
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.search-box button:hover {
  background: var(--primary-dark);
}

.header-actions {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.header-actions a:hover {
  color: var(--primary);
}

.nav-bar {
  background: var(--primary);
}

.nav-list {
  display: flex;
  gap: 0;
}

.nav-list a {
  display: block;
  padding: 12px 24px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  transition: background 0.2s;
}

.nav-list a:hover,
.nav-list a.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

/* Footer */
.site-footer {
  background: #2c2c2c;
  color: #aaa;
  margin-top: 40px;
  padding: 32px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 24px;
}

.footer-col h4 {
  color: white;
  font-size: 15px;
  margin-bottom: 12px;
}

.footer-col ul li {
  margin-bottom: 8px;
  font-size: 13px;
}

.footer-col ul li a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 16px;
  text-align: center;
  font-size: 12px;
  color: #777;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-orange {
  background: var(--orange);
  color: white;
}

.btn-orange:hover {
  background: var(--orange-hover);
}

.btn-outline {
  background: white;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background: #e6f4ff;
}

.btn-block {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
}

/* Home layout */
.home-layout {
  display: grid;
  grid-template-columns: 200px 1fr 220px;
  gap: 16px;
  padding: 20px 0;
}

.sidebar-categories {
  background: white;
  border-radius: var(--radius);
  padding: 16px 0;
  box-shadow: var(--shadow);
  height: fit-content;
}

.sidebar-categories h3 {
  padding: 0 16px 12px;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.sidebar-categories li a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.sidebar-categories li a:hover {
  background: #e6f4ff;
  color: var(--primary);
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.banner {
  background: linear-gradient(135deg, #1677ff 0%, #0958d9 50%, #003eb3 100%);
  border-radius: var(--radius);
  padding: 48px 40px;
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.banner::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.banner h1 {
  font-size: 32px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.banner p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.banner .btn {
  width: fit-content;
  position: relative;
  z-index: 1;
  background: white;
  color: var(--primary);
  font-weight: 600;
  padding: 10px 28px;
}

.banner .btn:hover {
  background: #f0f0f0;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.product-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.product-card-image {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f5ff, #e6f4ff);
}

.product-card-image svg {
  width: 80px;
  height: 80px;
}

.product-card-body {
  padding: 16px;
}

.product-card-body h3 {
  font-size: 15px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.product-card-body p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  height: 36px;
  overflow: hidden;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.price-current {
  font-size: 20px;
  font-weight: 700;
  color: var(--orange);
}

.price-current small {
  font-size: 14px;
}

.price-original {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card-actions {
  display: flex;
  gap: 8px;
}

.product-card-actions .btn {
  flex: 1;
  padding: 8px 0;
  font-size: 13px;
}

.sidebar-deals {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  height: fit-content;
}

.sidebar-deals h3 {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--orange);
}

.deal-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.deal-item:last-child {
  border-bottom: none;
}

.deal-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: #f0f5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.deal-info {
  flex: 1;
}

.deal-info h4 {
  font-size: 13px;
  margin-bottom: 4px;
}

.deal-info .price-current {
  font-size: 14px;
}

/* Products page */
.products-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding: 20px 0;
}

.filter-panel {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  height: fit-content;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group h4 {
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--text);
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tag {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tag:hover,
.filter-tag.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #e6f4ff;
}

.filter-bar {
  background: white;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.filter-bar label {
  color: var(--text-secondary);
}

.sort-options {
  display: flex;
  gap: 16px;
}

.sort-options a {
  color: var(--text-secondary);
  padding: 4px 0;
}

.sort-options a.active,
.sort-options a:hover {
  color: var(--primary);
  font-weight: 500;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.products-grid .product-card-image {
  height: 140px;
}

/* Checkout page */
.checkout-page {
  padding: 20px 0 40px;
}

.checkout-steps {
  background: white;
  border-radius: var(--radius);
  padding: 20px 32px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.step.active {
  color: var(--primary);
  font-weight: 600;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.step.active .step-num {
  background: var(--primary);
  color: white;
}

.step-line {
  width: 60px;
  height: 2px;
  background: var(--border);
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
}

.checkout-section {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.checkout-section h2 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
}

.digital-notice {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  color: #389e0d;
  margin-bottom: 16px;
}

.order-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.order-item:last-child {
  border-bottom: none;
}

.order-item-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f0f5ff, #e6f4ff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.order-item-image svg {
  width: 48px;
  height: 48px;
}

.order-item-info {
  flex: 1;
}

.order-item-info h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

.order-item-info p {
  font-size: 13px;
  color: var(--text-muted);
}

.order-item-price {
  text-align: right;
}

.order-item-price .price {
  font-size: 16px;
  font-weight: 600;
  color: var(--orange);
}

.order-item-price .qty {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Payment methods */
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.payment-option.selected {
  border-color: var(--alipay-blue);
  background: #e6f4ff;
}

.payment-option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--alipay-blue);
}

.payment-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.payment-name {
  font-size: 15px;
  font-weight: 500;
  flex: 1;
}

.payment-badge {
  background: var(--orange);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
}

.order-summary {
  position: sticky;
  top: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.summary-row.total {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.summary-row.total .amount {
  font-size: 24px;
  color: var(--orange);
}

.summary-row.discount {
  color: var(--success);
}

.checkout-submit {
  margin-top: 20px;
}

.payment-notice {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

.payment-notice img,
.payment-notice svg {
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}

.features-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.feature-item {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.feature-item h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.feature-item p {
  font-size: 12px;
  color: var(--text-muted);
}
