/* ==================== QNS Industrial - 全局样式 ==================== */
:root {
  --primary: #0052CC;        /* 主色调 - 深蓝 */
  --primary-light: #E3F0FF;
  --primary-dark: #003D99;
  --secondary: #F97316;      /* 强调色 - 橙 */
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  color: var(--gray-800); background: var(--gray-50);
  line-height: 1.6; font-size: 15px; -webkit-font-smoothing: antialiased;
}

/* ==================== 导航栏 ==================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200); height: 60px;
}
.navbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; height: 100%; }
.navbar-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.navbar-logo img { height: 36px; }
.navbar-logo-text { font-size: 22px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.navbar-logo-text span { display: none; }

.navbar-menu { display: flex; gap: 4px; list-style: none; }
.navbar-menu a {
  padding: 8px 18px; text-decoration: none; color: var(--gray-600);
  border-radius: var(--radius-sm); font-weight: 500; transition: all .2s;
}
.navbar-menu a:hover, .navbar-menu a.active { color: var(--primary); background: var(--primary-light); }

.navbar-right { display: flex; align-items: center; gap: 12px; }
.btn-login { padding: 7px 18px; background: var(--primary); color: #fff !important; border-radius: var(--radius-sm); text-decoration: none; font-size: 14px; font-weight: 500; transition: all .2s; }
.btn-login:hover { background: var(--primary-dark); transform: translateY(-1px); }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; cursor: pointer; }

/* ==================== 页面容器 ==================== */
.page-container { max-width: 1200px; margin: 0 auto; padding: 80px 20px 100px; min-height: calc(100vh - 200px); }

/* ==================== 首页Banner轮播 ==================== */
.hero-banner { position: relative; border-radius: 16px; overflow: hidden; height: 420px; background: linear-gradient(135deg,var(--primary),#003D99); margin-bottom: 36px; box-shadow: 0 4px 24px rgba(37,99,235,.12); }
.banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease, transform .6s ease; transform: scale(1.02); text-decoration: none; display: block; }
.banner-slide.active { opacity: 1; transform: scale(1); z-index: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 36px 28px; background: linear-gradient(to top,rgba(0,0,0,.72) 0%,rgba(0,0,0,.2) 60%,transparent 100%); color: #fff; }
.banner-caption h2 { font-size: 26px; font-weight: 700; margin: 0 0 8px; text-shadow: 0 1px 4px rgba(0,0,0,.5); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.banner-link-hint { font-size: 13px; color: rgba(255,255,255,.85); display: inline-flex; align-items: center; gap: 4px; transition: gap .2s; }
.banner-slide.active:hover .banner-link-hint { gap: 10px; }

/* 轮播指示器 */
.banner-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.banner-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.45); border: none; cursor: pointer; transition: all .3s; padding: 0; outline: none; }
.banner-dot.active { background: #fff; width: 28px; border-radius: 5px; }
.banner-dot:hover { background: rgba(255,255,255,.75); }

/* 左右箭头 */
.banner-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(0,0,0,.35); color: #fff; border: none; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; line-height: 38px; text-align: center; cursor: pointer; transition: all .25s; opacity: 0; padding: 0; }
.banner-arrow:hover { background: rgba(0,0,0,.65); opacity: 1 !important; }
.banner-prev { left: 14px; }
.banner-next { right: 14px; }
.hero-banner:hover .banner-arrow { opacity: .7; }

/* 占位Banner */
.banner-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; }
.banner-placeholder h1 { font-size: 42px; font-weight: 800; margin-bottom: 12px; text-shadow: 0 2px 10px rgba(0,0,0,.3); letter-spacing: -1px; }
.banner-placeholder p { font-size: 18px; opacity: .9; margin-bottom: 24px; }

/* ==================== 分类导航 ==================== */
.category-nav { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 48px; }
.cat-card { background: #fff; border-radius: var(--radius); padding: 28px 20px; text-align: center; text-decoration: none; transition: all .3s; border: 1px solid var(--gray-200); cursor: pointer; }
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.cat-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.cat-icon.clean { background: #EFF6FF; }
.cat-icon.hotel { background: #FFF7ED; }
.cat-icon.uniform { background: #F0FDF4; }
.cat-icon.system { background: #FEF3C7; }
.cat-card h3 { font-size: 17px; color: var(--gray-800); margin-bottom: 4px; }
.cat-card p { font-size: 13px; color: var(--gray-400); }

/* ==================== 产品网格（外卖风格）==================== */
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-title h2 { font-size: 24px; font-weight: 700; color: var(--gray-900); position: relative; padding-left: 16px; }
.section-title h2::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; border-radius: 2px; background: var(--primary); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 20px; }
.product-card { background: #fff; border-radius: var(--radius); overflow: hidden; transition: all .3s; border: 1px solid var(--gray-200); cursor: pointer; position: relative; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card-img { width: 100%; height: 200px; background: var(--gray-100); display: flex; align-items: center; justify-content: center; color: var(--gray-300); overflow: hidden; }
.product-card-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.product-card-body { padding: 16px; }
.product-card-name { font-size: 15px; font-weight: 600; color: var(--gray-800); margin-bottom: 6px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-desc { font-size: 13px; color: var(--gray-400); margin-bottom: 10px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-size: 20px; font-weight: 700; color: var(--danger); }
.product-price span { font-size: 12px; font-weight: 400; color: var(--gray-400); }
.btn-add-cart { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; border: none; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.btn-add-cart:hover { background: var(--primary-dark); transform: scale(1.1); }

/* ==================== 购物车 & 结算页 ==================== */
.cart-page { display: flex; gap: 28px; }
.cart-main { flex: 1; }
.cart-sidebar { width: 340px; flex-shrink: 0; }
.cart-item { display: flex; gap: 16px; background: #fff; border-radius: var(--radius); padding: 20px; margin-bottom: 12px; border: 1px solid var(--gray-200); }
.cart-item-img { width: 90px; height: 90px; border-radius: var(--radius-sm); object-fit: cover; background: var(--gray-100); }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.cart-item-price { color: var(--danger); font-weight: 600; }
.quantity-control { display: inline-flex; align-items: center; border: 1px solid var(--gray-300); border-radius: 20px; overflow: hidden; margin-top: 8px; }
.qty-btn { width: 28px; height: 28px; border: none; background: var(--gray-100); cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.qty-btn:hover { background: var(--gray-200); }
.qty-num { width: 38px; text-align: center; border: none; font-weight: 600; font-size: 14px; outline: none; }
.summary-card { background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid var(--gray-200); position: sticky; top: 80px; }
.summary-card h3 { font-size: 18px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--gray-200); }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 14px; }
.summary-total { display: flex; justify-content: space-between; padding-top: 14px; border-top: 2px solid var(--gray-200); margin-top: 12px; font-size: 20px; font-weight: 700; }
.total-amount { color: var(--danger); }
.btn-submit-order { width: 100%; padding: 14px; background: var(--primary); color: #fff; border: none; border-radius: 25px; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 16px; transition: all .2s; }
.btn-submit-order:hover { background: var(--primary-dark); }
.remark-input { width: 100%; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; resize: vertical; min-height: 70px; margin-top: 12px; outline: none; transition: border-color .2s; }
.remark-input:focus { border-color: var(--primary); }

/* ==================== 订单状态标签 ==================== */
.status-tag { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-0 { background: #FEF3C7; color: #92400E; } /* 待处理 */
.status-1 { background: #DBEAFE; color: #1E40AF; } /* 已确认 */
.status-2 { background: #E0E7FF; color: #3730A3; } /* 已发货 */
.status-3 { background: #D1FAE5; color: #065F46; } /* 已完成 */
.status-4 { background: #FEE2E2; color: #991B1B; } /* 已取消 */

/* ==================== 订单卡片/列表 ==================== */
.order-card { background: #fff; border-radius: var(--radius); padding: 20px; margin-bottom: 16px; border: 1px solid var(--gray-200); }
.order-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--gray-100); }
.order-no { font-size: 13px; color: var(--gray-400); }
.order-date { font-size: 13px; color: var(--gray-400); }
.order-products { display: flex; gap: 12px; flex-wrap: wrap; }
.order-prod-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-600); }
.order-prod-thumb { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; background: var(--gray-100); }
.order-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--gray-100); }
.order-total { font-size: 18px; font-weight: 700; color: var(--danger); }
.order-actions { display: flex; gap: 8px; }
.btn-outline { padding: 6px 16px; border: 1px solid var(--gray-300); background: transparent; border-radius: 20px; cursor: pointer; font-size: 13px; color: var(--gray-600); transition: all .2s; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger-outline { padding: 6px 16px; border: 1px solid var(--danger); background: transparent; border-radius: 20px; cursor: pointer; font-size: 13px; color: var(--danger); }
.btn-danger-outline:hover { background: var(--danger); color: #fff; }

/* ==================== 个人中心 ==================== */
.profile-card { background: #fff; border-radius: var(--radius); padding: 32px; border: 1px solid var(--gray-200); margin-bottom: 24px; }
.profile-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg,var(--primary),var(--secondary)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; }
.profile-name { font-size: 22px; font-weight: 700; }
.profile-company { font-size: 14px; color: var(--gray-400); margin-top: 2px; }
.menu-list { list-style: none; }
.menu-item { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--gray-100); text-decoration: none; color: var(--gray-700); transition: color .2s; }
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { color: var(--primary); }
.menu-item-arrow { color: var(--gray-300); }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-input { width: 100%; padding: 11px 14px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-size: 14px; outline: none; transition: border-color .2s,box-shadow .2s; background: #fff; }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,82,204,.1); }
.btn-block { width: 100%; padding: 12px; border-radius: 25px; font-size: 16px; font-weight: 600; cursor: pointer; border: none; transition: all .2s; }

/* ==================== 页脚 ==================== */
.site-footer { background: var(--gray-900); color: #fff; padding: 56px 0 28px; margin-top: 60px; }
.footer-grid { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: repeat(4,1fr); gap: 40px; }
.footer-col h4 { font-size: 16px; margin-bottom: 20px; color: #fff; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content:''; position:absolute; bottom:0; left:0; width:30px; height:2px; background:var(--secondary); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--gray-400); text-decoration: none; font-size: 14px; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { max-width: 1200px; margin: 32px auto 0; padding: 20px 20px 0; border-top: 1px solid rgba(255,255,255,.1); text-align: center; font-size: 13px; color: var(--gray-500); }

/* ==================== 登录页面 ==================== */
.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#f0f7ff 0%,#e8effe 100%); padding: 20px; }
.login-card { background: #fff; border-radius: var(--radius); padding: 48px 40px; width: 420px; box-shadow: var(--shadow-lg); }
.login-card h2 { text-align: center; font-size: 26px; margin-bottom: 8px; color: var(--gray-900); }
.login-subtitle { text-align: center; color: var(--gray-400); margin-bottom: 32px; font-size: 14px; }

/* ==================== 底部Tab栏（移动端）==================== */
.tab-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--gray-200); padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); z-index: 999; justify-content: space-around; }
.tab-item { display: flex; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--gray-400); padding: 6px 14px; border-radius: 10px; transition: all .2s ease; font-family: -apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 0.5px; }
.tab-item span { line-height: 1.2; }
.tab-item i { font-size: 20px; }
.tab-item.active { color: var(--primary); background: rgba(37,99,235,0.06); font-weight: 600; }
.cart-badge { position: absolute; top: 2px; right: 2px; background: #EF4444; color: #fff; font-size: 10px; font-weight: 700; border-radius: 10px; padding: 1px 5px; min-width: 16px; text-align: center; line-height: 1.5; }

/* ==================== 工具类 ==================== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-32 { margin-top: 32px; }
.mb-20 { margin-bottom: 20px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-400); }
.empty-state i { font-size: 64px; margin-bottom: 16px; display: block; }
.empty-state p { font-size: 16px; }

/* ==================== 响应式 ==================== */
@media(max-width: 768px) {
  .category-nav { grid-template-columns: repeat(2,1fr); }
  .cart-page { flex-direction: column; }
  .cart-sidebar { width: 100%; }
  .footer-grid { grid-template-columns: repeat(2,1fr); gap: 24px; }
  .tab-bar { display: flex; }
  .page-container { padding: 70px 16px 80px; }
  .hero-banner { height: 240px; border-radius: 12px; margin-bottom: 24px; }
  .banner-caption { padding: 20px 16px 16px; }
  .banner-caption h2 { font-size: 16px; -webkit-line-clamp: 1; }
  .banner-link-hint { font-size: 11px; }
  .banner-arrow { width: 30px; height: 30px; font-size: 18px; line-height: 28px; }
  .banner-prev { left: 8px; }
  .banner-next { right: 8px; }
  .banner-dot.active { width: 22px; }
  .banner-placeholder h1 { font-size: 26px; }
  /* 移动端：隐藏导航菜单（底部tab已替代），保留登录按钮 */
  .navbar-menu { display: none; }
  .navbar-right { display: flex; }
  .btn-login { padding: 6px 14px; font-size: 13px; }
  /* 登录卡片移动端适配 */
  .login-card { width: 100%; max-width: 420px; padding: 32px 24px; }
}
