/* === 二次元风 · 彩虹发卡网 === */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
  --pink: #f8a4c8;
  --pink-light: #fce4ec;
  --pink-dark: #ec7ba6;
  --purple: #c4b5fd;
  --purple-light: #ede9fe;
  --blue: #a5d8ff;
  --blue-light: #e7f5ff;
  --mint: #96e6b3;
  --mint-light: #e6f9ec;
  --yellow: #fde68a;
  --yellow-light: #fffcf0;
  --bg: #faf8fc;
  --card: #ffffff;
  --text: #4a4a6a;
  --text-light: #9898b0;
  --text-dark: #2d2d4a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 16px rgba(200,180,220,0.15);
  --shadow-hover: 0 8px 32px rgba(200,180,220,0.25);
}

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

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  background-image: 
    radial-gradient(ellipse at 20% 20%, rgba(248,164,200,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(165,216,255,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(196,181,253,0.05) 0%, transparent 60%);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

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

a { color: var(--pink-dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: #d45d8a; }

/* === Header === */
.header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(200,180,220,0.2);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--pink-dark) !important;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--text-light);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.25s;
}
.nav a:hover { 
  background: var(--pink-light); 
  color: var(--pink-dark);
}

/* === Main === */
.main-content { padding: 32px 20px 48px; min-height: calc(100vh - 120px); }

/* === Hero === */
.hero {
  text-align: center;
  padding: 48px 0 32px;
}
.hero h1 { 
  font-size: 32px; 
  font-weight: 700;
  background: linear-gradient(135deg, #f8a4c8 0%, #c4b5fd 50%, #a5d8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.hero p { 
  color: var(--text-light); 
  font-size: 14px;
  font-weight: 300;
}

/* === Notice === */
.notice-bar {
  background: linear-gradient(135deg, #fffcf0, #fef9e7);
  border: 1px solid rgba(253,230,138,0.5);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  margin-bottom: 24px;
  font-size: 13px;
  color: #8b7a2e;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === Category Tabs === */
.category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.cat-btn {
  padding: 7px 20px;
  border: 1.5px solid var(--purple-light);
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  transition: all 0.25s;
}
.cat-btn.active, .cat-btn:hover {
  background: linear-gradient(135deg, var(--pink-light), var(--purple-light));
  color: var(--pink-dark);
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(248,164,200,0.2);
}

/* === Product Grid === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(220,210,240,0.4);
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--pink);
}
.product-image {
  height: 180px;
  background: linear-gradient(135deg, #fce4ec, #e8f0fe);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-img-placeholder {
  font-size: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}
.product-info { padding: 16px; }
.product-name { 
  font-size: 15px; 
  font-weight: 600; 
  margin-bottom: 4px; 
  color: var(--text-dark);
}
.product-desc { 
  font-size: 12px; 
  color: var(--text-light); 
  margin-bottom: 12px;
  line-height: 1.5;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.product-price { 
  font-size: 22px; 
  font-weight: 700; 
  background: linear-gradient(135deg, #f8a4c8, #ec7ba6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.product-stock { 
  font-size: 11px; 
  color: var(--text-light);
  background: var(--purple-light);
  padding: 3px 10px;
  border-radius: 12px;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  letter-spacing: 0.3px;
}
.btn-primary { 
  background: linear-gradient(135deg, #f8a4c8, #c4b5fd); 
  color: #fff; 
  box-shadow: 0 4px 16px rgba(200,160,220,0.3);
}
.btn-primary:hover { 
  opacity: 0.92; 
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(200,160,220,0.4);
  color: #fff;
}
.btn-success { 
  background: linear-gradient(135deg, #96e6b3, #6dd5a8); 
  color: #fff; 
  box-shadow: 0 4px 16px rgba(150,230,179,0.3);
}
.btn-success:hover { transform: translateY(-1px); opacity: 0.92; }
.btn-danger { background: #f9a8a8; color: #fff; }
.btn-outline { 
  background: #fff; 
  border: 1.5px solid var(--purple-light); 
  color: var(--text-light);
}
.btn-outline:hover { border-color: var(--pink); color: var(--pink-dark); }
.btn-sm { padding: 5px 14px; font-size: 12px; }
.btn-lg { padding: 12px 32px; font-size: 16px; border-radius: 28px; }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* === Breadcrumb === */
.breadcrumb {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--pink-dark); }

/* === Product Detail === */
.product-detail {
  display: flex;
  gap: 32px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid rgba(220,210,240,0.4);
  box-shadow: var(--shadow);
}
.product-detail-left {
  width: 360px;
  min-width: 280px;
  height: 320px;
  background: linear-gradient(135deg, #fce4ec, #e8f0fe);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-detail-left img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-placeholder { font-size: 80px; opacity: 0.4; }
.product-detail-right { flex: 1; }
.product-detail-right h1 { 
  font-size: 22px; 
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-dark);
}
.product-detail-price { 
  font-size: 36px; 
  font-weight: 700;
  background: linear-gradient(135deg, #f8a4c8, #ec7ba6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.product-detail-stock { 
  font-size: 13px; 
  color: var(--text-light); 
  margin-bottom: 20px;
}
.product-detail-stock strong { color: var(--pink-dark); }
.product-detail-desc { 
  background: var(--purple-light);
  border-radius: var(--radius-sm); 
  padding: 16px; 
  margin-bottom: 20px;
  border: 1px solid rgba(196,181,253,0.3);
}
.product-detail-desc h4 { 
  font-size: 13px; 
  margin-bottom: 6px; 
  color: var(--text-dark);
}
.product-detail-desc p { font-size: 13px; color: var(--text); line-height: 1.7; }

/* === Form === */
.form-group { margin-bottom: 16px; }
.form-group label { 
  display: block; 
  font-size: 13px; 
  font-weight: 500; 
  color: var(--text-dark); 
  margin-bottom: 6px;
}
.form-group label small { font-weight: 400; color: var(--text-light); }
.form-group input, 
.form-group textarea, 
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid rgba(200,180,220,0.4);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.25s;
  background: #fff;
  color: var(--text);
}
.form-group input:focus, 
.form-group textarea:focus, 
.form-group select:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(248,164,200,0.12);
}
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }

.quantity-input {
  display: flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  border: 1.5px solid rgba(200,180,220,0.4);
  border-radius: 25px;
  overflow: hidden;
}
.quantity-input input {
  width: 56px;
  text-align: center;
  border: none !important;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  background: transparent;
}
.qty-btn {
  width: 38px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
  color: var(--pink-dark);
  transition: background 0.2s;
}
.qty-btn:hover { background: var(--pink-light); }

.payment-methods { display: flex; gap: 12px; }
.payment-option {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid rgba(220,210,240,0.5);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all 0.25s;
  font-size: 14px;
  font-weight: 500;
  background: #fff;
}
.payment-option:has(input:checked) { 
  border-color: var(--pink); 
  background: var(--pink-light);
}
.payment-option input { display: none; }

.order-total {
  background: linear-gradient(135deg, #fce4ec, #fdf2f8);
  border: 1px solid rgba(248,164,200,0.3);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  margin-bottom: 18px;
  font-size: 16px;
  font-weight: 500;
  color: var(--pink-dark);
}

/* === Pay Page === */
.pay-page { max-width: 560px; margin: 0 auto; }
.pay-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid rgba(220,210,240,0.4);
  box-shadow: var(--shadow);
}
.pay-header { text-align: center; margin-bottom: 24px; }
.pay-header h2 { 
  font-size: 20px; 
  margin-bottom: 6px;
  color: var(--text-dark);
  font-weight: 700;
}
.pay-header p { color: var(--text-light); font-size: 13px; }
.pay-info { 
  background: linear-gradient(135deg, #faf8fc, #f5f0fa);
  border-radius: var(--radius-sm); 
  padding: 16px; 
  margin-bottom: 24px;
}
.pay-row { 
  display: flex; 
  justify-content: space-between; 
  padding: 7px 0; 
  font-size: 14px;
}
.pay-label { color: var(--text-light); }
.pay-value { font-weight: 500; color: var(--text-dark); }
.order-no { 
  font-family: 'SF Mono', 'Consolas', monospace; 
  font-size: 12px; 
  background: var(--purple-light); 
  padding: 3px 8px; 
  border-radius: 6px;
}
.pay-total { 
  font-weight: 700; 
  font-size: 20px;
  background: linear-gradient(135deg, #f8a4c8, #ec7ba6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pay-qrcode-section { text-align: center; margin: 24px 0; }
.pay-qrcode-section h3 { 
  font-size: 15px; 
  margin-bottom: 14px; 
  color: var(--text-light);
  font-weight: 500;
}
.pay-qrcode-img { 
  max-width: 200px; 
  border: 2px solid var(--purple-light); 
  border-radius: var(--radius-sm);
}
.pay-qrcode-placeholder {
  width: 200px; height: 200px; margin: 0 auto;
  background: linear-gradient(135deg, #faf8fc, #f0ebf8);
  border: 2px dashed var(--purple);
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 14px; color: var(--text-light);
}
.pay-qrcode-placeholder p:first-child { font-size: 36px; margin-bottom: 8px; }
.pay-tips { 
  font-size: 13px; 
  color: var(--text-light); 
  margin-bottom: 20px;
  background: var(--blue-light);
  padding: 14px;
  border-radius: var(--radius-sm);
  line-height: 1.8;
}
.pay-tips p { margin-bottom: 2px; }
.pay-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.pay-result { margin-top: 20px; padding: 16px; border-radius: var(--radius-sm); }
.pay-result.success { 
  background: var(--mint-light); 
  border: 1px solid var(--mint);
}
.pay-result.success h3 { color: #2d8a4e; margin-bottom: 8px; }
.pay-result.success pre { 
  background: #fff; 
  padding: 12px; 
  border-radius: var(--radius-sm); 
  font-size: 13px; 
  margin-top: 8px; 
  white-space: pre-wrap;
  font-family: 'SF Mono', 'Consolas', monospace;
  color: var(--text-dark);
}
.pay-result.error { 
  background: #fef2f2; 
  border: 1px solid #f9a8a8; 
  color: #c53030;
}

/* === Lookup === */
.lookup-page { max-width: 560px; margin: 0 auto; }
.lookup-desc { text-align: center; color: var(--text-light); margin-bottom: 20px; font-size: 14px; }
.lookup-card { 
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid rgba(220,210,240,0.4);
  box-shadow: var(--shadow);
}
.lookup-divider { 
  text-align: center; 
  margin: 18px 0; 
  position: relative;
}
.lookup-divider span { 
  background: #fff; 
  padding: 0 14px; 
  color: var(--text-light); 
  font-size: 12px; 
  position: relative; 
  z-index: 1;
  font-weight: 300;
}
.lookup-divider::before { 
  content:''; 
  position: absolute; 
  top: 50%; 
  left: 0; 
  right: 0; 
  border-top: 1px solid rgba(200,180,220,0.3);
}
.lookup-error { 
  background: #fef2f2; 
  border: 1px solid #f9a8a8; 
  border-radius: var(--radius-sm); 
  padding: 12px 16px; 
  margin-top: 16px; 
  color: #c53030; 
  font-size: 13px;
}

.order-table { 
  width: 100%; 
  border-collapse: collapse; 
  margin: 20px 0;
}
.order-table td { 
  padding: 10px 14px; 
  border-bottom: 1px solid rgba(220,210,240,0.2); 
  font-size: 14px;
}
.order-table td:first-child { color: var(--text-light); width: 100px; }
.badge { 
  padding: 3px 12px; 
  border-radius: 14px; 
  font-size: 12px; 
  font-weight: 500;
}
.badge-warning { background: var(--yellow-light); color: #8b7a2e; }
.badge-success { background: var(--mint-light); color: #2d8a4e; }
.badge-danger { background: #fef2f2; color: #c53030; }
.card-info-box {
  background: var(--mint-light); 
  border: 1px solid var(--mint); 
  border-radius: var(--radius-sm); 
  padding: 16px; 
  margin-top: 20px;
}
.card-info-box h4 { margin-bottom: 8px; color: #2d8a4e; }
.card-info-box pre { 
  background: #fff; 
  padding: 12px; 
  border-radius: var(--radius-sm); 
  font-size: 13px; 
  white-space: pre-wrap; 
  margin-bottom: 12px;
  font-family: 'SF Mono', 'Consolas', monospace;
}

/* === Empty State === */
.empty-state { 
  text-align: center; 
  padding: 80px 20px; 
  color: var(--text-light);
}
.empty-icon { font-size: 72px; margin-bottom: 16px; opacity: 0.6; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; color: var(--text); font-weight: 600; }
.empty-state p { font-size: 14px; }

/* === Footer === */
.footer { 
  text-align: center; 
  padding: 24px; 
  color: var(--text-light); 
  font-size: 12px; 
  border-top: 1px solid rgba(200,180,220,0.15);
  background: rgba(255,255,255,0.5);
}

/* === Responsive === */
@media (max-width: 768px) {
  .hero h1 { font-size: 24px; }
  .product-detail { flex-direction: column; }
  .product-detail-left { width: 100%; height: 220px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .form-row { flex-direction: column; }
  .product-price { font-size: 18px; }
}
