/* 虚拟商品销售系统 - 主样式 */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 40px -10px rgba(0,0,0,.2);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: .2s ease;
}
html { margin: 0; padding: 0; height: 100%; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { margin: 0; padding: 0; min-height: 100%; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 14px; color: var(--gray-900); background: var(--gray-50); line-height: 1.6; }
.page-wrap { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; overflow-x: hidden; }
/* 头部 */
.page-wrap > .site-header { flex-shrink: 0; }
.site-header { background: #fff; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 24px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 40px; }
.logo-text { font-size: 20px; font-weight: 700; color: var(--gray-900); }
.nav-menu { display: flex; gap: 8px; align-items: center; }
.nav-menu a { padding: 8px 16px; border-radius: var(--radius-sm); color: var(--gray-700); font-weight: 500; }
.nav-menu a i { margin-right: 6px; opacity: .8; }
.nav-menu a:hover { background: var(--gray-100); color: var(--primary); }
.header-search { flex: 1; max-width: 400px; }
.header-search form { display: flex; }
.header-search input { flex: 1; padding: 10px 16px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm) 0 0 var(--radius-sm); outline: none; }
.header-search button { padding: 10px 20px; background: var(--primary); color: #fff; border: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; cursor: pointer; font-weight: 500; }
.header-search button:hover { background: var(--primary-dark); }
.main-content { flex: 1 0 auto; padding: 32px 0 0px; }
/* 公告模块 */
.announcement-box { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; padding: 20px 24px; border-radius: var(--radius); margin-bottom: 24px; }
.announcement-box h3 { font-size: 16px; margin-bottom: 12px; opacity: .9; }
.announcement-box .content { font-size: 14px; line-height: 1.7; opacity: .95; }
.announcement-box .content img { max-width: 100%; }
/* 分类模块 */
.categories-section { margin-bottom: 32px; }
.section-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; color: var(--gray-900); }
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.cat-item { background: #fff; padding: 16px; border-radius: var(--radius); text-align: center; cursor: pointer; border: 2px solid transparent; transition: var(--transition); box-shadow: var(--shadow); }
.cat-item:hover, .cat-item.active { border-color: var(--primary); color: var(--primary); }
.cat-item img { width: 40px; height: 40px; margin-bottom: 8px; object-fit: contain; }
.cat-item span { font-size: 14px; font-weight: 500; }
.categories-section { overflow-x: auto; }
.categories-pills { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px 12px; align-items: start; }
.cat-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: #fff; border: 1px solid #d0d0d0; border-radius: 20px; font-size: 14px; color: #333; text-decoration: none; transition: var(--transition); justify-self: start; }
.cat-pill:hover { border-color: #b0b0b0; background: #f8f8f8; }
.cat-pill.active { border-color: var(--primary); color: var(--primary); background: #f8fafc; }
.cat-pill-icon { height: 24px; width: auto; max-width: 40px; object-fit: contain; flex-shrink: 0; }
.cat-pill-all { background: #e0e0e0 !important; color: #fff !important; border-color: #e0e0e0 !important; }
.cat-pill-all:hover { background: #d0d0d0 !important; border-color: #d0d0d0 !important; color: #fff !important; }
.cat-pill-all.active { background: #e0e0e0 !important; color: #fff !important; border-color: #e0e0e0 !important; }
.reg-agree-row { display: flex; align-items: center; justify-content: center; margin-bottom: 16px; flex-wrap: nowrap; }
.reg-agree-row .reg-agree-label { display: inline-flex !important; align-items: center; gap: 8px; margin: 0 !important; cursor: pointer; font-weight: 500; color: var(--gray-700); }
.reg-agree-row .reg-agree-label input[type="checkbox"] { width: auto !important; flex-shrink: 0; margin: 0; }
.reg-btn-wrap { display: flex; justify-content: center; margin-top: 16px; }
.reg-submit-btn { width: 100%; max-width: 400px; padding: 14px; font-size: 16px; border-radius: 10px; background: linear-gradient(135deg, #7c3aed, #6d28d9) !important; border: none; }
/* 商品模块 */
.products-section .section-title { margin-bottom: 20px; }
.products-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
@media (max-width: 1200px) { .products-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 992px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .products-grid { grid-template-columns: 1fr; } }
.product-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); position: relative; max-width: 100%; }
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.product-card .img-wrap { position: relative; padding-top: 100%; background: var(--gray-100); }
.product-card .img-wrap img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.product-card .badge { position: absolute; top: 8px; left: 8px; padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; color: #fff; z-index: 2; }
.product-card .badge.auto { background: #02b875; }
.product-card .badge.manual { background: #ed5565; }
.product-card .info { padding: 16px; }
.product-card .title { font-size: 14px; font-weight: 600; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .meta { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; color: var(--gray-500); }
.product-price-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; margin-bottom: 8px;}
.product-card .price { font-size: 24px; font-weight: 700; color: var(--danger); flex-shrink: 0; }
.product-card .btn-buy { display: block; width: 100%; padding: 10px; background: var(--primary); color: #fff; text-align: center; border-radius: var(--radius-sm); font-weight: 600; border: none; cursor: pointer; transition: var(--transition); }
.product-card .btn-buy:hover { background: var(--primary-dark); color: #fff; }
.product-card .btn-buy-sm { display: inline-flex; align-items: center; justify-content: center; width: auto; height: 36px; min-height: 36px; padding: 0 16px; font-size: 13px; flex-shrink: 0; box-sizing: border-box; }
/* 底部 */
.site-footer { flex-shrink: 0; color: #fff; padding: 40px 0 24px; margin-top: 48px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; margin-bottom: 24px; }
.footer-links a { color: rgba(255,255,255,.8); margin-right: 16px; }
.footer-links a:hover { color: #fff; }
.footer-line { height: 1px; background: rgba(0,0,0,.1); }
.footer-bottom { padding-top: 24px; font-size: 13px; color: rgba(0, 0, 0, 0.6); text-align: center; }
/* 按钮 */
.btn { display: inline-block; padding: 10px 20px; border-radius: var(--radius-sm); font-weight: 500; cursor: pointer; border: none; transition: var(--transition); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 500; color: var(--gray-700); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 14px; }
.form-group input:focus { outline: none; border-color: var(--primary); }
/* 卡片 */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px; }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--gray-200); }
table th { background: var(--gray-50); font-weight: 600; }
table tr:hover { background: var(--gray-50); }
.status-done-auto { color: #1c84c6; }
.status-done-manual { color: #008000; }
.status-pending { color: #ed5565; }
.status-refund { color: #BEBEBE; }
/* 消息闪烁 */
.blink { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.5; } }
/* 订单详情 */
.order-detail-card { background: #fff; border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.cards-box { background: var(--gray-50); padding: 16px; border-radius: var(--radius-sm); margin-top: 16px; }
.cards-box .card-item { padding: 8px 0; border-bottom: 1px dashed var(--gray-200); }
.cards-box .card-item:last-child { border-bottom: none; }
/* 空状态 */
.empty-state { text-align: center; padding: 48px 20px; color: var(--gray-500); }
.empty-state .icon { font-size: 48px; margin-bottom: 16px; opacity: .5; }
