/* ============================================
   吉林省鸿业传承科技有限公司 - 电子产品商城 全局样式
   ============================================ */

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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --accent: #06b6d4;
  --accent-light: #22d3ee;

  --bg: #f8fafc;
  --bg-dark: #0f172a;
  --bg-dark-light: #1e293b;
  --bg-card: #ffffff;

  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-on-dark: #e2e8f0;
  --text-white: #ffffff;

  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --transition: all 0.3s ease;
  --transition-fast: all 0.15s ease;

  --container: 1200px;
  --nav-height: 64px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  outline: none;
}

ul,
ol {
  list-style: none;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.main-content {
  flex: 1;
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.02em;
}

.nav-logo svg {
  width: 32px;
  height: 32px;
}

.nav-logo span {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition-fast);
  position: relative;
}

.nav-links a:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-links a.active {
  color: var(--accent-light);
  background: rgba(6, 182, 212, 0.1);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-cart {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.cart-badge:empty {
  display: none;
}

/* ---------- Hero Banner ---------- */
.hero {
  margin-top: var(--nav-height);
  position: relative;
  height: 420px;
  overflow: hidden;
  background: var(--bg-dark);
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide-content {
  text-align: center;
  z-index: 2;
  padding: 0 20px;
}

.hero-slide-content h2 {
  font-size: 40px;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero-slide-content p {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 28px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide-bg.bg-1 {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
}

.hero-slide-bg.bg-2 {
  background: linear-gradient(135deg, #0f172a 0%, #1a365d 40%, #1e293b 100%);
}

.hero-slide-bg.bg-3 {
  background: linear-gradient(135deg, #0f172a 0%, #164e63 50%, #0f172a 100%);
}

.hero-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: var(--transition);
}

.hero-dot.active {
  background: var(--accent-light);
  width: 28px;
  border-radius: 5px;
}

/* ---------- Section ---------- */
.section {
  padding: 60px 0;
}

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

.section-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 16px;
  color: var(--text-muted);
}

.section-header .accent-line {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  margin: 16px auto 0;
}

/* ---------- Product Card ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

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

/* 手机号隐藏/显示 */
.phone-hidden {
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.phone-revealed {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 2px;
}

/* 联系方式弹窗 */
.contact-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.contact-modal-content {
  background: #fff;
  border-radius: 12px;
  width: 420px;
  max-width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: contactModalIn 0.25s ease;
}

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

.contact-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}

.contact-modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}

.contact-modal-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: var(--transition);
}

.contact-modal-close:hover {
  color: #fff;
}

.contact-modal-body {
  padding: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-label {
  width: 80px;
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.contact-value {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 500;
}

.contact-phone {
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
}

.contact-modal-tip {
  padding: 16px 24px;
  background: #f0f9ff;
  color: var(--primary);
  font-size: 13px;
  text-align: center;
  border-top: 1px solid var(--border);
}

/* 查看联系方式按钮样式 */
.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

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

.product-card-image .product-visual {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: var(--transition);
}

.product-card-image .product-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-visual img {
  transform: scale(1.05);
}

.product-card-image .product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.75);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.product-card-info {
  padding: 16px;
}

.product-card-info h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card-info .merchant {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.product-card-info .price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.product-card-info .price {
  font-size: 20px;
  font-weight: 700;
  color: var(--danger);
}

.product-card-info .price-symbol {
  font-size: 14px;
  font-weight: 600;
}

.product-card-info .original-price {
  font-size: 13px;
  color: var(--text-light);
  text-decoration: line-through;
}

.product-card-info .sales {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ---------- Product List Page ---------- */
.page-banner {
  margin-top: var(--nav-height);
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-light) 100%);
  padding: 48px 0;
  text-align: center;
}

.page-banner h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 8px;
}

.page-banner p {
  color: var(--text-light);
  font-size: 16px;
}

.product-list-section {
  padding: 40px 0 60px;
}

/* ---------- Product Detail ---------- */
.detail-section {
  margin-top: var(--nav-height);
  padding: 40px 0 60px;
}

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

.detail-gallery {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.detail-main-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}

.detail-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-thumbnails {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.detail-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-fast);
  background: var(--bg);
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-thumb:hover,
.detail-thumb.active {
  border-color: var(--primary);
}

.detail-info h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 8px;
}

.detail-info .detail-merchant {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.detail-info .detail-merchant span {
  color: var(--primary);
  font-weight: 500;
}

.detail-price-box {
  background: linear-gradient(135deg, #fef2f2, #fff1f2);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.detail-price-box .current-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--danger);
}

.detail-price-box .current-price .symbol {
  font-size: 18px;
}

.detail-price-box .original-price {
  font-size: 16px;
  color: var(--text-light);
  text-decoration: line-through;
  margin-left: 12px;
}

.detail-price-box .discount-tag {
  display: inline-block;
  margin-left: 12px;
  padding: 2px 8px;
  background: var(--danger);
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  font-size: 14px;
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-meta-item .label {
  color: var(--text-muted);
  min-width: 80px;
}

.detail-meta-item .value {
  color: var(--text);
  font-weight: 500;
}

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

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

.detail-features ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-features li {
  padding: 6px 14px;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text);
  border: 1px solid var(--border);
}

.detail-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.detail-quantity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.detail-quantity .label {
  font-size: 14px;
  color: var(--text-muted);
  min-width: 80px;
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.quantity-control button {
  width: 36px;
  height: 36px;
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  border: none;
}

.quantity-control button:hover {
  background: var(--border);
}

.quantity-control input {
  width: 50px;
  height: 36px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* Detail description tabs */
.detail-tabs {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.detail-tabs .tab-nav {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.detail-tabs .tab-btn {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.detail-tabs .tab-btn:hover {
  color: var(--text);
}

.detail-tabs .tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.detail-tabs .tab-content {
  display: none;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}

.detail-tabs .tab-content.active {
  display: block;
}

.detail-desc-text {
  padding: 20px;
  background: var(--bg);
  border-radius: var(--radius-lg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: var(--transition);
  border: none;
  cursor: pointer;
  line-height: 1.4;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #0891b2);
  color: white;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-accent:hover {
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
}

.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

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

.btn-lg {
  padding: 14px 36px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ---------- Forms ---------- */
.form-container {
  max-width: 480px;
  margin: 0 auto;
}

.form-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.form-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
  color: var(--text);
}

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

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

.form-group label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-card);
  transition: var(--transition-fast);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-input.error {
  border-color: var(--danger);
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  display: none;
}

.form-input.error + .form-error {
  display: block;
}

textarea.form-input {
  height: auto;
  min-height: 100px;
  padding: 10px 14px;
  resize: vertical;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-muted);
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.form-check a {
  color: var(--primary);
  font-weight: 500;
}

.form-check a:hover {
  text-decoration: underline;
}

.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.form-footer a {
  color: var(--primary);
  font-weight: 600;
}

.form-footer a:hover {
  text-decoration: underline;
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-light);
  font-size: 13px;
}

.form-divider::before,
.form-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- Cart ---------- */
.cart-section {
  margin-top: var(--nav-height);
  padding: 40px 0 60px;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

.cart-items {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition-fast);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item:hover {
  background: var(--bg);
}

.cart-item-image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.cart-item-info .cart-item-merchant {
  font-size: 12px;
  color: var(--text-muted);
}

.cart-item-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--danger);
  white-space: nowrap;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
}

.cart-item-quantity .quantity-control {
  /* inherits from detail quantity */
}

.cart-item-delete {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 18px;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  cursor: pointer;
}

.cart-item-delete:hover {
  color: var(--danger);
  background: #fef2f2;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
}

.cart-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.cart-empty h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.cart-empty p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Cart summary */
.cart-summary {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.cart-summary h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
}

.cart-summary-row .label {
  color: var(--text-muted);
}

.cart-summary-row .value {
  font-weight: 600;
  color: var(--text);
}

.cart-summary-row.total {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 18px;
}

.cart-summary-row.total .value {
  color: var(--danger);
  font-size: 22px;
  font-weight: 800;
}

.cart-summary .btn {
  margin-top: 20px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

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

.footer-brand h3 span {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
}

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

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 10px;
  transition: var(--transition-fast);
}

.footer-col a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
}

/* ---------- Merchant Agreement ---------- */
.agreement-box {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-height: 240px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-muted);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.agreement-box h4 {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 12px;
  font-weight: 600;
}

.agreement-box p {
  margin-bottom: 10px;
}

/* ---------- Utilities ---------- */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary);
}

.text-danger {
  color: var(--danger);
}

.mt-4 {
  margin-top: 16px;
}

.mt-8 {
  margin-top: 32px;
}

.mb-4 {
  margin-bottom: 16px;
}

.mb-8 {
  margin-bottom: 32px;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-fadeIn {
  animation: fadeIn 0.4s ease forwards;
}

/* ---------- Toast / Alert ---------- */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-success {
  background: var(--success);
  color: white;
}

.toast-error {
  background: var(--danger);
  color: white;
}

.toast-warning {
  background: var(--warning);
  color: white;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static;
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .hero-slide-content h2 {
    font-size: 28px;
  }

  .hero-slide-content p {
    font-size: 14px;
  }

  .nav-links a {
    padding: 8px 10px;
    font-size: 13px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cart-item {
    grid-template-columns: 80px 1fr;
    gap: 12px;
  }

  .cart-item-price,
  .cart-item-quantity,
  .cart-item-delete {
    grid-column: 2;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    height: 320px;
  }
}

/* ---------- 二手商品卡片 ---------- */
.used-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.used-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.used-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--bg);
}

.used-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.used-card:hover .used-card-image img {
  transform: scale(1.05);
}

.used-card-image .condition-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.9);
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.used-card-image .category-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.75);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.used-card-info {
  padding: 16px;
}

.used-card-info h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.used-card-info .price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.used-card-info .price {
  font-size: 20px;
  font-weight: 700;
  color: var(--danger);
}

.used-card-info .price-symbol {
  font-size: 14px;
}

.used-card-info .original-price {
  font-size: 13px;
  color: var(--text-light);
  text-decoration: line-through;
}

.used-card-info .seller-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.used-card-info .seller-row .location {
  margin-left: auto;
}

/* ---------- 二手商品详情 ---------- */
.used-detail-condition {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #065f46;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.used-detail-seller {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.used-detail-seller h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.used-detail-seller .seller-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.used-detail-seller .seller-info-row:last-child {
  margin-bottom: 0;
}

.used-detail-seller .seller-info-row .label {
  min-width: 80px;
  color: var(--text-muted);
}

.used-detail-seller .seller-info-row .value {
  color: var(--text);
  font-weight: 500;
}

/* ---------- 发布信息页面 ---------- */
.publish-section {
  margin-top: var(--nav-height);
  padding: 40px 0 60px;
}

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

.publish-form-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.publish-form-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
}

.publish-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.published-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.published-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.published-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.published-item:last-child {
  border-bottom: none;
}

.published-item-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.published-item-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.published-item-info .published-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--danger);
  margin-top: 4px;
}

.published-item .btn-delete-published {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 14px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.published-item .btn-delete-published:hover {
  color: var(--danger);
  background: #fef2f2;
}

.published-empty {
  text-align: center;
  padding: 20px 0;
  font-size: 14px;
  color: var(--text-light);
}

.publish-tips {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
}

.publish-tips h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.publish-tips ul {
  list-style: none;
  padding: 0;
}

.publish-tips li {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
  padding-left: 16px;
  position: relative;
}

.publish-tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- 导航栏优化（更多项目） ---------- */
@media (max-width: 1100px) {
  .nav-links a {
    padding: 8px 10px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .publish-layout {
    grid-template-columns: 1fr;
  }

  .publish-sidebar {
    position: static;
  }
}
