/* ============================================
   千麦优选 — Warm Organic Editorial
   ============================================ */

:root {
  --color-primary: #C7853A;
  --color-primary-hover: #A66B2E;
  --color-primary-light: #FDF6EE;
  --color-accent: #C75B39;
  --color-bg: #F9F6F0;
  --color-surface: #FFFFFF;
  --color-text: #2D2924;
  --color-text-secondary: #8A8278;
  --color-text-muted: #B5AFA6;
  --color-border: #E8E3D9;
  --color-border-light: #F0EDE6;
  --color-success: #5B8C5A;
  --color-success-bg: #EDF5EC;
  --color-error: #C5554A;
  --color-error-bg: #FCF0EF;
  --color-footer: #2D2924;
  --shadow-sm: 0 1px 2px rgba(45,41,36,0.04);
  --shadow-md: 0 4px 16px rgba(45,41,36,0.08);
  --shadow-lg: 0 12px 32px rgba(45,41,36,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--color-primary); transition: color 0.2s; }
a:hover { color: var(--color-primary-hover); }

/* ---- Header ---- */
.header {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.logo small {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 400;
  letter-spacing: 0.05em;
}
.nav { display: flex; align-items: center; gap: 0; }
.nav a {
  margin-left: 24px;
  color: var(--color-text-secondary);
  font-size: 14px;
  transition: color 0.2s;
}
.nav a:hover { color: var(--color-primary); }
.nav .cart-count {
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  padding: 1px 6px;
  font-size: 11px;
  margin-left: 3px;
  font-weight: 600;
}

/* ---- Container ---- */
.container { max-width: 1200px; margin: 24px auto; padding: 0 20px; }

/* ---- Cards ---- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
  text-align: center;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  color: #fff;
}
.btn-outline {
  background: var(--color-surface);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}
.btn-outline:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}
.btn-danger { background: var(--color-error); color: #fff; }
.btn-danger:hover { background: #A8433A; }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 4px; }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--color-text-secondary); }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: var(--color-surface);
  transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--color-primary); }

/* ---- Alerts ---- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.alert-error { background: var(--color-error-bg); color: var(--color-error); border: 1px solid #F0D0CD; }
.alert-success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid #D0E5CF; }

/* ---- Category Tabs ---- */
.store-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.store-tab {
  padding: 8px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--color-text-secondary);
  transition: all 0.2s;
}
.store-tab.active,
.store-tab:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ---- Product Grid ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s ease;
  cursor: pointer;
  display: block;
  color: inherit;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: inherit;
}
.product-card .img-wrap {
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #F5F2EC;
}
.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover img { transform: scale(1.06); }
.product-card .info { padding: 14px; }
.product-card .name {
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--color-text);
}
.product-card .price {
  color: var(--color-accent);
  font-size: 18px;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: -0.02em;
}
.product-card .store {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ---- Product Detail ---- */
.product-detail { display: flex; gap: 32px; }
.product-detail .left { flex: 1; min-width: 0; }
.product-detail .right { width: 360px; flex-shrink: 0; }
.product-detail .right h1 {
  font-family: "Noto Serif SC", serif;
  font-size: 22px;
  line-height: 1.4;
  color: var(--color-text);
}
.product-detail .product-subtitle { font-size: 13px; color: var(--color-text-muted); margin: 6px 0 16px; }
.product-detail .price {
  color: var(--color-accent);
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
}
.product-detail .store-box {
  background: var(--color-primary-light);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid #F0E6D8;
}
.product-detail .store-box-header {
  display: flex; align-items: center; gap: 12px;
}
.product-detail .store-box h3 { font-size: 15px; margin-bottom: 10px; color: var(--color-text); }
.product-detail .desc {
  margin-top: 24px; padding-top: 24px;
  border-top: 1px solid var(--color-border);
  line-height: 1.9; color: var(--color-text-secondary);
}
.product-detail .desc h3 {
  font-family: "Noto Serif SC", serif; font-size: 16px;
  color: var(--color-text); margin-bottom: 12px;
}

/* Product Meta */
.product-meta { display: flex; gap: 16px; margin-bottom: 20px; }
.product-meta .meta-item { flex: 1; text-align: center; padding: 10px; background: var(--color-bg); border-radius: var(--radius-sm); }
.product-meta .meta-item span:first-child { display: block; font-size: 12px; color: var(--color-text-muted); }
.product-meta .meta-item span:last-child { display: block; font-size: 14px; color: var(--color-text); font-weight: 600; margin-top: 4px; }

/* Gallery */
.product-gallery { }
.gallery-main { border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: #FAF9F7; margin-bottom: 10px; }
.gallery-main img { width: 100%; max-height: 420px; object-fit: contain; display: block; }
.gallery-thumbs { display: flex; gap: 8px; }
.gallery-thumbs .thumb { width: 56px; height: 56px; border: 2px solid transparent; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; opacity: 0.6; transition: all 0.2s; }
.gallery-thumbs .thumb.active, .gallery-thumbs .thumb:hover { border-color: var(--color-primary); opacity: 1; }
.gallery-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Quantity */
.quantity-input { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 14px; }
.quantity-input label { color: var(--color-text-secondary); }
.qty-control { display: flex; align-items: center; }
.qty-control button {
  width: 36px; height: 36px; border: 1px solid var(--color-border);
  background: var(--color-surface); font-size: 18px; cursor: pointer;
  color: var(--color-text); transition: all 0.15s;
}
.qty-control button:hover { background: var(--color-primary-light); color: var(--color-primary); }
.qty-control button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.qty-control button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.qty-control input {
  width: 56px; height: 36px; text-align: center;
  border: 1px solid var(--color-border); border-left: none; border-right: none;
  font-size: 14px; font-family: inherit;
}
.product-actions { display: flex; gap: 10px; margin-top: 16px; }
.quantity-input span { color: var(--color-text-muted); font-size: 12px; margin-left: auto; }

/* Detail Tabs */
.detail-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--color-border); margin-bottom: 24px; }
.detail-tab {
  padding: 14px 24px; border: none; background: none;
  font-size: 15px; cursor: pointer; font-family: inherit;
  color: var(--color-text-secondary); position: relative;
  transition: color 0.2s;
}
.detail-tab.active { color: var(--color-primary); font-weight: 600; }
.detail-tab.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--color-primary);
}
.detail-tab:hover { color: var(--color-primary); }

.detail-panel { }
.detail-section { margin-bottom: 32px; }
.detail-section h3 {
  font-family: "Noto Serif SC", serif; font-size: 18px;
  margin-bottom: 16px; color: var(--color-text);
}

/* Feature Grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.feature-item { padding: 10px 14px; background: var(--color-bg); border-radius: var(--radius-sm); font-size: 14px; color: var(--color-text-secondary); }

/* Spec Table */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table td { padding: 12px 16px; border-bottom: 1px solid var(--color-border-light); font-size: 14px; }
.spec-table td:first-child { width: 150px; color: var(--color-text-muted); }

/* Service Cards */
.service-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.service-card-item { display: flex; gap: 14px; padding: 16px; background: var(--color-bg); border-radius: var(--radius-md); }
.service-icon { font-size: 28px; flex-shrink: 0; }
.service-info strong { display: block; margin-bottom: 6px; font-size: 14px; }
.service-info p { font-size: 13px; color: var(--color-text-secondary); line-height: 1.6; margin: 0; }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--color-text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }

/* ---- Cart ---- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--color-border); }
.cart-table th { font-weight: 500; color: var(--color-text-muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.cart-empty { text-align: center; padding: 60px 0; color: var(--color-text-muted); }
.cart-empty p { font-size: 18px; margin-bottom: 16px; }

/* ---- Auth ---- */
.auth-box { max-width: 420px; margin: 60px auto; }
.auth-box h2 {
  text-align: center;
  margin-bottom: 24px;
  font-family: "Noto Serif SC", serif;
  font-size: 24px;
  color: var(--color-text);
}

/* ---- Personal Center ---- */
.personal-grid { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
.sidebar { background: var(--color-surface); border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border-light); }
.sidebar h3 {
  font-family: "Noto Serif SC", serif;
  font-size: 15px;
  margin-bottom: 12px;
}
.sidebar a { display: block; padding: 10px 12px; color: var(--color-text); border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 4px; transition: all 0.15s; }
.sidebar a.active, .sidebar a:hover { background: var(--color-primary-light); color: var(--color-primary); }

/* ---- Payment ---- */
.qr-box { text-align: center; padding: 40px; }
.qr-box img { width: 256px; height: 256px; }
.qr-box p { margin-top: 16px; color: var(--color-text-secondary); }

/* ---- Store Page Layout ---- */
.store-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.store-sidebar .store-info { padding: 24px; }
.store-sidebar .store-info h2 {
  font-family: "Noto Serif SC", serif;
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--color-text);
}
.store-sidebar .store-info .store-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}
.store-sidebar .store-stats {
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-muted);
}
.store-sidebar .store-stats strong {
  color: var(--color-primary);
  font-size: 16px;
}
.store-main { min-width: 0; }

/* ---- Pagination ---- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.page-btn {
  padding: 8px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: 13px;
  transition: all 0.15s;
}
.page-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.page-btn:hover:not(.active) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.page-info { font-size: 12px; color: var(--color-text-muted); margin-left: 12px; }

/* ---- Footer ---- */
.footer {
  text-align: center;
  padding: 32px 20px;
  font-size: 12px;
  border-top: 1px solid var(--color-border);
  margin-top: 48px;
  background: var(--color-footer);
  color: #9B948A;
}
.footer p { margin: 4px 0; }
.footer a { color: #C8BFB2; }
.footer a:hover { color: #E8E0D5; }

/* ---- Page Header ---- */
.page-header { text-align: center; padding: 32px 0 28px; }
.page-header h1 { font-family: "Noto Serif SC", serif; font-size: 26px; color: var(--color-text); margin-bottom: 8px; }
.page-header p { color: var(--color-text-muted); font-size: 14px; }

/* ---- Merchant Cards ---- */
.merchant-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.merchant-card { background: var(--color-surface); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border-light); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.merchant-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.merchant-cover { position: relative; height: 100px; display: flex; align-items: center; justify-content: center; }
.merchant-avatar { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,0.25); border: 3px solid rgba(255,255,255,0.5); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; color: #fff; font-family: "Noto Serif SC", serif; }
.merchant-badge { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,0.9); color: var(--color-primary); padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.merchant-body { padding: 20px; text-align: center; }
.merchant-name { font-family: "Noto Serif SC", serif; font-size: 18px; margin-bottom: 8px; color: var(--color-text); }
.merchant-desc { font-size: 13px; color: var(--color-text-secondary); line-height: 1.6; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.merchant-stats { font-size: 13px; color: var(--color-text-muted); }
.merchant-stats strong { color: var(--color-primary); font-size: 16px; }
.merchant-footer { padding: 14px 20px; border-top: 1px solid var(--color-border-light); background: var(--color-bg); }

/* ---- Sidebar refined ---- */
.sidebar h3 { font-family: "Noto Serif SC", serif; font-size: 15px; margin-bottom: 12px; color: var(--color-text); }
.sidebar hr { border: none; border-top: 1px solid var(--color-border-light); margin: 8px 0; }
.sidebar .logout-link { color: var(--color-error) !important; }
.sidebar .logout-link:hover { background: var(--color-error-bg) !important; color: var(--color-error) !important; }
.sidebar-badge { display: inline-block; background: var(--color-primary); color: #fff; border-radius: 10px; padding: 0 6px; font-size: 11px; margin-left: 4px; min-width: 18px; text-align: center; }

/* ---- Order Page ---- */
.order-main { min-width: 0; }
.order-page-header { margin-bottom: 4px; }
.order-page-header h2 { font-family: "Noto Serif SC", serif; font-size: 22px; color: var(--color-text); }
.order-page-header .subtitle { font-family: "PingFang SC", sans-serif; font-size: 15px; color: var(--color-text-muted); font-weight: 400; margin-left: 4px; }

/* Order Tabs */
.order-tabs { display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; padding: 4px; background: var(--color-bg); border-radius: var(--radius-md); }
.order-tab { padding: 10px 18px; color: var(--color-text-secondary); font-size: 14px; border-radius: calc(var(--radius-md) - 4px); transition: all 0.2s; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.order-tab:hover { color: var(--color-text); background: var(--color-surface); }
.order-tab.active { background: var(--color-surface); color: var(--color-text); font-weight: 600; box-shadow: var(--shadow-sm); }
.tab-count { background: var(--color-primary); color: #fff; border-radius: 10px; padding: 0 6px; font-size: 11px; font-weight: 600; min-width: 18px; text-align: center; line-height: 18px; }

/* Empty state */
.empty-orders { text-align: center; padding: 64px 20px; }
.empty-illustration { margin-bottom: 20px; color: var(--color-text-muted); opacity: 0.6; }
.empty-title { font-size: 17px; color: var(--color-text); margin-bottom: 8px; font-weight: 600; }
.empty-hint { font-size: 13px; color: var(--color-text-muted); margin-bottom: 20px; }

/* Order Cards */
.order-list { display: flex; flex-direction: column; gap: 16px; }
.order-card { background: var(--color-surface); border-radius: var(--radius-md); border: 1px solid var(--color-border-light); overflow: hidden; transition: box-shadow 0.25s ease; }
.order-card:hover { box-shadow: var(--shadow-md); }
.order-card-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: var(--color-bg); border-bottom: 1px solid var(--color-border-light); }
.order-card-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--color-text-secondary); }
.order-date-icon { font-size: 14px; }
.order-date-text { font-weight: 500; }
.order-dot { color: var(--color-text-muted); }
.order-no-text { color: var(--color-text-muted); font-size: 12px; }
.store-badge { display: inline-block; padding: 3px 10px; background: var(--color-primary-light); color: var(--color-primary); border-radius: 12px; font-size: 12px; font-weight: 500; }
.order-card-body { display: flex; align-items: center; gap: 20px; padding: 20px; flex-wrap: wrap; }
.order-product-image { width: 80px; height: 80px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-bg); border: 1px solid var(--color-border-light); }
.order-product-image img { width: 100%; height: 100%; object-fit: cover; }
.order-product-info { flex: 1; min-width: 200px; }
.order-product-name { color: var(--color-text); font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.order-product-name:hover { color: var(--color-primary); }
.order-price-row { display: flex; align-items: baseline; gap: 6px; margin-top: 10px; }
.order-product-price { font-size: 14px; color: var(--color-text-secondary); }
.order-multiply { font-size: 13px; color: var(--color-text-muted); }
.order-product-qty { font-size: 16px; font-weight: 600; color: var(--color-text); }
.order-card-amount { text-align: right; flex-shrink: 0; min-width: 120px; }
.amount-label { display: block; font-size: 12px; color: var(--color-text-muted); margin-bottom: 4px; }
.amount-value { display: block; font-size: 20px; font-weight: 700; color: var(--color-text); letter-spacing: -0.02em; }
.amount-shipping { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.order-card-status { flex-shrink: 0; min-width: 80px; text-align: center; }
.status-tag { display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; }
.status-pending { background: #FFF8F0; color: #D4791E; }
.status-pending .status-dot { background: #D4791E; }
.status-paid { background: #EDF4FC; color: #3B7EC7; }
.status-paid .status-dot { background: #3B7EC7; }
.status-shipped { background: #F4EDF8; color: #7B5EA7; }
.status-shipped .status-dot { background: #7B5EA7; }
.status-done { background: #EDF6EE; color: #4A8C4F; }
.status-done .status-dot { background: #4A8C4F; }
.order-card-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; min-width: 90px; }
.btn-pay { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; background: var(--color-primary); color: #fff; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; transition: all 0.2s; white-space: nowrap; }
.btn-pay:hover { background: var(--color-primary-hover); color: #fff; }
.btn-cancel { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 8px 14px; color: var(--color-text-muted); border-radius: var(--radius-sm); font-size: 13px; transition: all 0.15s; white-space: nowrap; }
.btn-cancel:hover { color: var(--color-error); background: var(--color-error-bg); }

@media (max-width: 640px) {
  .order-card-body { flex-direction: column; align-items: flex-start; gap: 14px; }
  .order-card-amount, .order-card-status, .order-card-actions { width: 100%; text-align: left; min-width: unset; }
  .order-card-actions { flex-direction: row; }
  .order-tabs { overflow-x: auto; flex-wrap: nowrap; }
}

/* ---- Agreement Page ---- */
.agreement-content { font-size: 14px; line-height: 1.9; color: var(--color-text); }
.agreement-content h1 { font-size: 22px; }
.agreement-content h2 { font-size: 20px; }
.agreement-content h3 { font-size: 16px; margin-top: 28px; margin-bottom: 12px; color: var(--color-text); }
.agreement-content h4 { font-size: 14px; margin-top: 20px; margin-bottom: 8px; }
.agreement-content p { margin-bottom: 12px; text-indent: 2em; }
.agreement-content hr { margin: 40px 0; border: none; border-top: 1px solid var(--color-border); }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail { flex-direction: column; }
  .product-detail .right { width: 100%; }
  .service-list { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .product-meta { gap: 8px; }
  .personal-grid { grid-template-columns: 1fr; }
  .store-layout { grid-template-columns: 1fr; }
  .merchant-grid { grid-template-columns: repeat(2, 1fr); }
}
