/* ===== 全局样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f5f5; color: #333; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }

/* ===== 顶部快捷栏 ===== */
.top-bar { background: #f7f7f7; font-size: 12px; color: #999; height: 32px; line-height: 32px; border-bottom: 1px solid #eee; }
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; }
.top-left span { color: #ff4757; }
.top-right a { color: #666; margin: 0 6px; transition: color .2s; }
.top-right a:hover { color: #ff4757; }
#logoutLink { color: #d98c8c; font-weight: 500; }
#logoutLink:hover { color: #c47676; }
.divider { color: #ddd; }

/* ===== 主导航（白底横向菜单式） ===== */
.site-header { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.05); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; height: 88px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo { width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; }
.brand-name { display: flex; flex-direction: column; line-height: 1.25; }
.brand-cn { font-size: 26px; font-weight: 800; color: #222; letter-spacing: 2px; }
.brand-en { font-size: 11px; color: #a0a0a0; letter-spacing: 3px; margin-top: 3px; font-weight: 500; }

.main-menu { display: flex; align-items: center; gap: 44px; margin-left: 44px; flex: 1; }
.menu-item { position: relative; font-size: 18px; color: #888; padding: 8px 2px; transition: color .2s; white-space: nowrap; }
.menu-item:hover, .menu-item.active { color: #ff4757; }
.menu-item.active { font-weight: 600; }
.menu-caret { font-size: 12px; margin-left: 2px; display: inline-block; transition: transform .25s; }
.cat-dropdown.open .menu-caret { transform: rotate(180deg); }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.icon-btn { position: relative; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #555; background: none; transition: all .2s; cursor: pointer; }
.icon-btn:hover { color: #ff4757; background: #fff5f5; }
.cart-badge { position: absolute; top: 1px; right: 1px; background: #ff4757; color: #fff; font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid #fff; box-sizing: content-box; }

/* 展开式搜索条 */
.header-search { max-height: 0; overflow: hidden; background: #fff; border-top: 1px solid #f0f0f0; transition: max-height .3s ease; }
.header-search.open { max-height: 90px; }
.header-search .container { padding-top: 14px; padding-bottom: 14px; }
.header-search .search-box { max-width: 720px; margin: 0 auto; }
.search-box { display: flex; height: 42px; border: 2px solid #ff4757; border-radius: 6px; overflow: hidden; }
.search-box input { flex: 1; border: none; outline: none; padding: 0 14px; font-size: 14px; min-width: 0; }
.search-box button { background: #ff4757; color: #fff; padding: 0 32px; font-size: 15px; font-weight: 500; transition: background .2s; }
.search-box button:hover { background: #e84118; }

/* ===== 产品展示下拉菜单 ===== */
.cat-dropdown { position: relative; }
.cat-dropdown-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(-6px);
  min-width: 200px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
  padding: 6px 0;
  opacity: 0; visibility: hidden;
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 500;
}
.cat-dropdown:hover .cat-dropdown-menu,
.cat-dropdown.open .cat-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.cat-dropdown-menu a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; color: #333; font-size: 14px;
  transition: all .15s;
}
.cat-dropdown-menu a .dm-icon { font-size: 18px; width: 22px; text-align: center; }
.cat-dropdown-menu a:hover { background: #fff5f5; color: #ff4757; }
.cat-dropdown-menu a.active { color: #ff4757; font-weight: 600; background: #fff5f5; }
.cat-dropdown-menu a.active::after { content: "✓"; margin-left: auto; color: #ff4757; font-size: 13px; }

/* ===== 轮播图 ===== */
.banner { position: relative; height: 460px; overflow: hidden; background: #222; }
.slides { display: flex; height: 100%; transition: transform .5s ease; }
.slide { min-width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; background-size: cover; background-position: center; }
.slide-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.slide-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,0,0,.55), rgba(30,30,60,.45)); }
.slide-content { position: relative; z-index: 1; text-align: center; color: #fff; padding: 0 20px; }
.slide--left { justify-content: flex-start; }
.slide--left .slide-content { text-align: left; margin-left: 7%; max-width: 46%; }
.slide--left .slide-overlay { background: linear-gradient(90deg, rgba(5,7,18,.88) 0%, rgba(5,7,18,.55) 38%, rgba(5,7,18,.08) 62%, rgba(5,7,18,0) 100%); }
.slide-content h2 { font-size: 38px; margin-bottom: 16px; text-shadow: 0 2px 10px rgba(0,0,0,.2); }
.slide-content p { font-size: 18px; margin-bottom: 28px; opacity: .95; }
.btn-primary { background: #ff4757; color: #fff; padding: 12px 36px; border-radius: 30px; font-size: 16px; font-weight: 500; transition: all .25s; box-shadow: 0 4px 14px rgba(255,71,87,.4); }
.btn-primary:hover { background: #e84118; transform: translateY(-2px); }
.slide-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 60px; background: rgba(0,0,0,.25); color: #fff; font-size: 30px; border-radius: 6px; transition: background .2s; z-index: 20; }
.slide-btn:hover { background: rgba(0,0,0,.5); }
.prev { left: 20px; }
.next { right: 20px; }
.dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; transition: all .2s; }
.dot.active { background: #fff; width: 28px; border-radius: 5px; }

/* ===== 分类入口 ===== */
.category-entry { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin: 30px auto; }
.entry-item { background: #fff; padding: 20px 10px; border-radius: 10px; text-align: center; cursor: pointer; transition: all .25s; }
.entry-item:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.entry-icon { font-size: 36px; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; min-height: 36px; }
.entry-icon img { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; }
.dm-icon img { width: 20px; height: 20px; object-fit: contain; border-radius: 4px; vertical-align: middle; }
.entry-item span { font-size: 13px; color: #555; }

/* ===== 商品区 ===== */
.products-section { margin: 40px auto; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.section-header h3 { font-size: 22px; color: #222; }
.sort-bar { display: flex; gap: 8px; }
.sort-btn { background: #fff; padding: 8px 18px; border-radius: 20px; font-size: 13px; color: #666; transition: all .2s; }
.sort-btn:hover { color: #ff4757; }
.sort-btn.active { background: #ff4757; color: #fff; }

/* 商品网格：手机2列 / 平板3列 / 电脑4列 / 宽屏5列，保证始终一行多件 */
.product-grid, .products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .product-grid, .products-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 960px) { .product-grid, .products-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
@media (min-width: 1280px) { .product-grid, .products-grid { grid-template-columns: repeat(5, 1fr); gap: 18px; } }
.product-card { position: relative; background: #fff; border-radius: 14px; transition: transform .25s ease, box-shadow .25s ease; border: 1px solid #f0f0f0; box-shadow: 0 2px 10px rgba(0,0,0,.04); overflow: visible; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(255,71,87,.12), 0 4px 12px rgba(0,0,0,.06); z-index: 20; border-color: #ffd9dc; }
/* 商品图：无图时 emoji 浮在柔和圆垫上；有图时铺满 */
.product-img { width: 100%; height: 200px; display: flex; align-items: center; justify-content: center; font-size: 78px; background: radial-gradient(circle at 50% 46%, #ffffff 0%, #ffffff 36%, #f5f6f8 72%, #eef0f3 100%); position: relative; border-radius: 14px 14px 0 0; overflow: hidden; transition: font-size .25s ease; }
.product-card:hover .product-img { font-size: 86px; }
.product-img > img { transition: transform .35s ease; }
.product-card:hover .product-img > img { transform: scale(1.06); }
.hot-badge { position: absolute; top: 10px; left: 10px; background: linear-gradient(135deg,#ff9a44,#ff4757); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; box-shadow: 0 4px 10px rgba(255,71,87,.4); pointer-events: none; z-index: 3; }
/* 多图画廊 */
.p-gallery { position: absolute; inset: 0; }
.p-gallery img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s, transform .35s ease; cursor: pointer; }
.p-gallery img.active { opacity: 1; }
.product-card:hover .p-gallery img { transform: scale(1.06); }
.p-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; z-index: 2; }
.p-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.75); box-shadow: 0 0 0 1px rgba(0,0,0,.18); cursor: pointer; transition: all .2s; }
.p-dots span.active { background: #ff4757; width: 16px; border-radius: 4px; }
.product-info { padding: 14px 14px 16px; border-radius: 0 0 14px 14px; background: #fff; }
.product-title { font-size: 14px; color: #222; font-weight: 600; height: 40px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 8px; line-height: 1.45; }
.product-desc { position: relative; font-size: 12px; color: #999; line-height: 1.5; margin-bottom: 10px; min-height: 36px; cursor: default; }
.product-desc .desc-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 悬停显示完整介绍 */
.product-desc[data-full]::after {
  content: attr(data-full);
  position: absolute; bottom: calc(100% + 9px); left: 50%;
  transform: translateX(-50%);
  width: max-content; max-width: 260px;
  max-height: 70vh; overflow-y: auto;
  background: rgba(34,34,34,.96); color: #fff;
  font-size: 12px; font-weight: 400; line-height: 1.6;
  padding: 9px 12px; border-radius: 8px;
  white-space: pre-wrap; word-break: break-word;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
  opacity: 0; visibility: hidden; pointer-events: auto; z-index: 50;
  transition: opacity .15s ease;
}
.product-desc[data-full]::before {
  content: ""; position: absolute; bottom: calc(100% + 3px); left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: rgba(34,34,34,.96);
  opacity: 0; visibility: hidden; pointer-events: none; z-index: 50;
}
.product-desc[data-full]:hover::after,
.product-desc[data-full]:hover::before { opacity: 1; visibility: visible; }
/* 上方空间不足（靠近吸顶导航）时，改为向下弹出 */
.product-desc.tip-below::after { bottom: auto; top: calc(100% + 9px); }
.product-desc.tip-below::before { bottom: auto; top: calc(100% + 3px); border-top-color: transparent; border-bottom-color: rgba(34,34,34,.96); }
.product-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.product-price { font-size: 21px; color: #ff4757; font-weight: 700; letter-spacing: -.3px; line-height: 1; }
.product-price::before { content: "¥"; font-size: 13px; font-weight: 600; margin-right: 1px; }
.product-sales { font-size: 12px; color: #aaa; }
.add-cart-btn { width: 100%; background: linear-gradient(135deg,#ff7a7a,#ff4757); color: #fff; padding: 10px; border-radius: 9px; font-size: 14px; font-weight: 600; letter-spacing: 1px; transition: all .2s; border: none; cursor: pointer; box-shadow: 0 4px 12px rgba(255,71,87,.25); }
.add-cart-btn::before { content: "🛒 "; font-size: 13px; }
.add-cart-btn:hover { box-shadow: 0 6px 16px rgba(255,71,87,.4); filter: brightness(1.04); transform: translateY(-1px); }
.add-cart-btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(255,71,87,.3); }
.empty-tip { text-align: center; padding: 60px; color: #999; font-size: 16px; }

/* ===== 服务保障 ===== */
.service-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 40px auto; background: #fff; padding: 24px; border-radius: 10px; }
.service-item { display: flex; align-items: center; gap: 12px; }
.service-icon { font-size: 32px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; }
.service-icon img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; }
.service-item h4 { font-size: 15px; color: #222; margin-bottom: 2px; }
.service-item p { font-size: 12px; color: #999; }

/* ===== 页脚 ===== */
.footer { background: #2c2c2c; color: #ccc; margin-top: 40px; padding-top: 40px; }
.footer-inner { display: grid; grid-template-columns: repeat(5, 1fr); gap: 30px; padding-bottom: 30px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-col a { display: block; color: #999; font-size: 13px; margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: #ff4757; }
.qr-code { width: 90px; height: 90px; background: #fff; color: #333; display: flex; align-items: center; justify-content: center; font-weight: bold; border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.qr-code img { width: 100%; height: 100%; object-fit: cover; display: block; }
.footer-col a.footer-link { cursor: pointer; }
.qr-col p { font-size: 12px; color: #999; }
.copyright { border-top: 1px solid #444; padding: 16px 0; text-align: center; font-size: 13px; color: #aaa; }
.copyright a { color: #c9b0b0; text-decoration: none; }
.copyright a:hover { color: #e8c4c4; text-decoration: underline; }

/* 页脚链接内容弹窗 */
.page-info-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 400; display: none; align-items: center; justify-content: center; padding: 20px; }
.page-info-overlay.active { display: flex; }
.page-info-box { background: #fff; border-radius: 14px; width: 560px; max-width: 100%; max-height: 80vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.page-info-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid #f0f0f0; }
.page-info-head h3 { font-size: 17px; color: #222; }
.page-info-close { background: none; border: none; font-size: 26px; line-height: 1; color: #999; cursor: pointer; padding: 0 4px; }
.page-info-close:hover { color: #ff4757; }
.page-info-body { padding: 20px 22px; overflow-y: auto; font-size: 14px; color: #555; line-height: 1.9; white-space: pre-wrap; word-break: break-word; }

/* ===== 购物车侧边栏 ===== */
:root {
  --cart-width: 420px;
  --cart-primary: #d98c8c;        /* 柔和豆沙红 - 主色 */
  --cart-primary-dark: #c47676;   /* 深一级 - hover态 */
  --cart-primary-light: #faf3f3;  /* 极浅背景 */
  --cart-primary-border: #eed9d9; /* 浅边框 */
  --cart-gradient: linear-gradient(135deg,#d99a9a,#e8b0b0); /* 按钮渐变 */
  --cart-shadow: rgba(217,140,140,.28);
  --cart-shadow-soft: rgba(217,140,140,.1);
}
.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); backdrop-filter: blur(2px); z-index: 200; opacity: 0; visibility: hidden; transition: all .3s; }
.cart-overlay.active { opacity: 1; visibility: visible; }
.cart-drawer { position: fixed; top: 0; right: 0; width: var(--cart-width); max-width: 92vw; height: 100vh; background: #fdfbfb; z-index: 201; transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; border-radius: 16px 0 0 16px; box-shadow: -8px 0 30px rgba(0,0,0,.1); }
.cart-drawer.active { transform: translateX(0); }

/* 头部 */
.cart-header { padding: 18px 20px; border-bottom: 1px solid #f0eaea; display: flex; justify-content: space-between; align-items: center; background: #fff; }
.cart-header-left { display: flex; align-items: center; gap: 10px; }
.cart-header h3 { font-size: 18px; color: #5a4a4a; font-weight: 600; }
.cart-count-badge { background: var(--cart-primary); color: #fff; font-size: 12px; min-width: 22px; height: 22px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; padding: 0 7px; font-weight: 500; }
.cart-header-right { display: flex; align-items: center; gap: 8px; }
.clear-cart-btn { background: none; color: #a89a9a; font-size: 13px; padding: 6px 12px; border-radius: 16px; transition: all .2s; display: flex; align-items: center; gap: 4px; }
.clear-cart-btn:hover { background: var(--cart-primary-light); color: var(--cart-primary-dark); }
.icon-btn { background: none; color: #b0a0a0; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.icon-btn:hover { background: #f5f0f0; color: var(--cart-primary-dark); }

/* 列表区 */
.cart-body { flex: 1; overflow-y: auto; padding: 14px 16px; background: #fdfbfb; }
.cart-body::-webkit-scrollbar { width: 6px; }
.cart-body::-webkit-scrollbar-thumb { background: #e8dddd; border-radius: 3px; }
.cart-body::-webkit-scrollbar-track { background: transparent; }

/* 空状态 */
.cart-empty { text-align: center; padding: 70px 24px; color: #b0a0a0; display: flex; flex-direction: column; align-items: center; }
.empty-icon { width: 96px; height: 96px; border-radius: 50%; background: linear-gradient(135deg,var(--cart-primary-light),#f5e0e0); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.empty-icon svg { color: var(--cart-primary); opacity: .7; }
.cart-empty p { font-size: 14px; margin-bottom: 20px; }
.go-shop-btn { background: var(--cart-primary); color: #fff; padding: 10px 28px; border-radius: 22px; font-size: 14px; font-weight: 500; transition: all .2s; }
.go-shop-btn:hover { background: var(--cart-primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px var(--cart-shadow); }

/* 商品卡片 */
.cart-item { display: flex; gap: 14px; padding: 14px; margin-bottom: 10px; background: #fff; border: 1px solid #f0eaea; border-radius: 12px; transition: all .25s; animation: itemIn .3s ease; }
@keyframes itemIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.cart-item:hover { border-color: var(--cart-primary-border); box-shadow: 0 4px 14px var(--cart-shadow-soft); }
.cart-item-img { width: 72px; height: 72px; background: linear-gradient(135deg,#faf5f5,#f0e8e8); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 36px; flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cart-item-title { font-size: 14px; color: #5a4a4a; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; min-height: 39px; }
.cart-item-price { color: var(--cart-primary-dark); font-size: 16px; font-weight: bold; margin-bottom: 10px; }
.cart-item-bottom { display: flex; align-items: center; justify-content: space-between; }
.cart-item-controls { display: flex; align-items: center; background: #f5f0f0; border-radius: 16px; padding: 2px; }
.qty-btn { width: 28px; height: 28px; background: transparent; border-radius: 14px; font-size: 15px; color: #9a8a8a; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.qty-btn:hover { background: var(--cart-primary); color: #fff; }
.qty-num { min-width: 34px; text-align: center; font-size: 14px; font-weight: 500; color: #6a5a5a; }
.remove-btn { background: none; color: #c8baba; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.remove-btn:hover { background: var(--cart-primary-light); color: var(--cart-primary-dark); }

/* 底部结算 */
.cart-footer { padding: 16px 20px; border-top: 1px solid #f0eaea; background: #fff; box-shadow: 0 -4px 16px rgba(0,0,0,.03); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.cart-total .label { font-size: 14px; color: #9a8a8a; }
.cart-total .total-price { font-size: 26px; color: var(--cart-primary-dark); font-weight: bold; }
.cart-total .total-price::before { content: "¥"; font-size: 16px; margin-right: 2px; }
.checkout-btn { width: 100%; background: var(--cart-gradient); color: #fff; padding: 14px; border-radius: 26px; font-size: 16px; font-weight: 500; transition: all .25s; box-shadow: 0 4px 14px var(--cart-shadow); }
.checkout-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--cart-shadow); filter: brightness(1.03); }
.checkout-btn:active { transform: translateY(0); }

/* ===== 弹窗 ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 300; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal { background: #fdfbfb; border-radius: 12px; width: 100%; max-width: 520px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; animation: modalIn .3s ease; }
@keyframes modalIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { padding: 18px 20px; border-bottom: 1px solid #f0eaea; display: flex; justify-content: space-between; align-items: center; background: #fff; }
.modal-header h3 { font-size: 18px; color: #5a4a4a; }
.close-modal { background: none; font-size: 18px; color: #b0a0a0; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.info-row { margin-bottom: 14px; }
.info-row label { display: block; font-size: 13px; color: #9a8a8a; margin-bottom: 6px; }
.info-row input { width: 100%; padding: 10px 12px; border: 1px solid #e8dddd; border-radius: 6px; font-size: 14px; outline: none; transition: border-color .2s; color: #5a4a4a; }
.info-row input:focus { border-color: var(--cart-primary); }
.order-summary { margin-top: 18px; padding-top: 16px; border-top: 1px dashed #eed9d9; }
.order-summary h4 { font-size: 15px; margin-bottom: 12px; color: #6a5a5a; }
#orderList .order-item { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: #8a7a7a; }
.order-total { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid #f0eaea; font-size: 16px; font-weight: 500; color: #6a5a5a; }
.order-total .total-price { color: var(--cart-primary-dark); font-size: 22px; font-weight: bold; }
/* 新人优惠券（结算弹窗） */
.coupon-box { margin-top: 12px; border: 1px dashed #e0a3a3; background: linear-gradient(135deg,#fff6f2,#fff); border-radius: 10px; padding: 10px 12px; }
.coupon-use-row { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.coupon-use-row input { width: 16px; height: 16px; accent-color: var(--cart-primary); flex: none; }
.coupon-tag { background: linear-gradient(135deg,#e8705a,#d98c8c); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 5px; white-space: nowrap; }
.coupon-name { color: #8a5a5a; }
.coupon-hint { font-size: 12px; color: #b08a8a; margin-top: 6px; padding-left: 24px; }
.order-subtotal-row, .order-discount-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 14px; color: #8a7a7a; }
.order-discount-row .discount-amount { color: #e8705a; font-weight: 600; }
/* 已保存地址选择（结算弹窗） */
.addr-pick { margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.addr-option { display: flex; align-items: flex-start; gap: 10px; border: 1.5px solid #f0e2e2; border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: all .15s; }
.addr-option:hover { border-color: #e8b8b8; }
.addr-option.selected { border-color: #d98c8c; background: linear-gradient(135deg,#fdf5f4,#fff); }
.addr-option input[type="radio"] { margin-top: 3px; accent-color: #d98c8c; flex: none; }
.addr-option .ao-main { flex: 1; min-width: 0; }
.addr-option .ao-line1 { font-size: 14px; color: #333; margin-bottom: 3px; }
.addr-option .ao-line1 b { font-weight: 600; margin-right: 10px; }
.addr-option .ao-line1 .ao-phone { color: #777; font-weight: normal; }
.addr-option .ao-detail { font-size: 13px; color: #999; line-height: 1.5; }
.addr-option .ao-default { font-size: 11px; color: #fff; background: linear-gradient(135deg,#e8705a,#d98c8c); padding: 1px 7px; border-radius: 4px; margin-left: 8px; vertical-align: 1px; }
.addr-option-new { border-style: dashed; color: #a07878; justify-content: flex-start; font-size: 14px; }
.addr-option-new span { margin-top: 1px; }
.save-addr-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: #8a7a7a; cursor: pointer; }
.save-addr-row input { width: 15px; height: 15px; accent-color: #d98c8c; }
.manage-addr-link { display: inline-block; font-size: 13px; color: #b07f7f; text-decoration: none; margin: 2px 0 4px; }
.manage-addr-link:hover { color: #d98c8c; }
.modal-footer { padding: 16px 20px; border-top: 1px solid #f0eaea; display: flex; gap: 12px; justify-content: flex-end; background: #fff; }
.btn-secondary { background: #f5f0f0; color: #8a7a7a; padding: 10px 24px; border-radius: 6px; font-size: 14px; transition: all .2s; }
.btn-secondary:hover { background: #ebe3e3; }
.modal-footer .btn-primary { padding: 10px 24px; border-radius: 6px; font-size: 14px; box-shadow: none; background: var(--cart-gradient); }
.modal-footer .btn-primary:hover { filter: brightness(1.05); }

/* ===== Toast 提示 ===== */
.toast { position: fixed; top: 30px; left: 50%; transform: translateX(-50%) translateY(-100px); background: rgba(0,0,0,.8); color: #fff; padding: 12px 24px; border-radius: 6px; font-size: 14px; z-index: 999; opacity: 0; transition: all .3s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 登录弹窗 ===== */
.login-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: none; align-items: center; justify-content: center; animation: fadeIn .2s; }
.login-modal-overlay.active { display: flex; }
.login-modal { background: #fff; border-radius: 14px; padding: 36px 32px 28px; width: 100%; max-width: 380px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.15); animation: slideUp .3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.login-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 24px; color: #999; cursor: pointer; line-height: 1; }
.login-close:hover { color: #d98c8c; }
.login-modal h3 { font-size: 20px; font-weight: 600; color: #3a3a3a; margin-bottom: 6px; }
.login-sub { font-size: 13px; color: #999; margin-bottom: 22px; }
.login-field { margin-bottom: 14px; }
.login-field input { width: 100%; padding: 11px 14px; border: 1px solid #e8e8e8; border-radius: 8px; font-size: 14px; outline: none; transition: all .2s; }
.login-field input:focus { border-color: #d98c8c; box-shadow: 0 0 0 3px rgba(217,140,140,.1); }
.captcha-field { display: flex; gap: 10px; align-items: center; }
.captcha-field input { flex: 1; }
.captcha-box { width: 120px; height: 44px; border-radius: 6px; cursor: pointer; border: 1px solid #e8e8e8; background: #faf3f3; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.captcha-box svg { width: 100%; height: 100%; display: block; }
.captcha-box:hover { opacity: .85; }
.login-submit { width: 100%; padding: 12px; background: linear-gradient(135deg, #d98c8c, #c47676); color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 500; cursor: pointer; transition: all .2s; margin-top: 6px; }
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(217,140,140,.4); }
.login-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.login-error { color: #ff4d4f; font-size: 13px; margin-top: 12px; text-align: center; min-height: 18px; }

/* ===== 信息弹窗 ===== */
.info-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: none; align-items: center; justify-content: center; animation: fadeIn .2s; }
.info-modal-overlay.active { display: flex; }
.info-modal { background: #fff; border-radius: 14px; padding: 32px 28px 24px; width: 100%; max-width: 380px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.15); animation: slideUp .3s ease; }
.info-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 24px; color: #999; cursor: pointer; line-height: 1; }
.info-close:hover { color: #d98c8c; }
.info-modal h3 { font-size: 18px; font-weight: 600; color: #3a3a3a; margin-bottom: 16px; padding-right: 30px; }
.info-content { font-size: 14px; color: #666; line-height: 1.8; margin-bottom: 22px; }
.info-content p { margin-bottom: 8px; }
.info-content .highlight { color: #d98c8c; font-weight: 600; }
.info-ok { width: 100%; padding: 11px; background: linear-gradient(135deg, #d98c8c, #c47676); color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all .2s; }
.info-ok:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(217,140,140,.4); }

/* ===== 订单弹窗 ===== */
.order-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: none; align-items: center; justify-content: center; animation: fadeIn .2s; }
.order-modal-overlay.active { display: flex; }
.order-modal { background: #fff; border-radius: 14px; padding: 28px; width: 100%; max-width: 560px; max-height: 80vh; overflow-y: auto; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.15); animation: slideUp .3s ease; }
.order-modal h3 { font-size: 18px; font-weight: 600; color: #3a3a3a; margin-bottom: 18px; padding-right: 30px; }
.order-empty { text-align: center; color: #999; padding: 40px 0; font-size: 14px; }
.order-card { border: 1px solid #eef0f4; border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; background: #fafbff; }
.order-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px dashed #e8e8e8; }
.order-id { font-size: 13px; color: #999; font-family: monospace; }
.order-status { font-size: 12px; padding: 3px 10px; border-radius: 12px; background: #fff3e0; color: #e67e22; font-weight: 500; }
.order-status.paid { background: #e8f5e9; color: #4caf50; }
.order-item { display: flex; justify-content: space-between; font-size: 13px; color: #666; padding: 3px 0; }
.order-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 8px; border-top: 1px dashed #e8e8e8; }
.order-time { font-size: 12px; color: #999; }
.order-total { font-size: 15px; font-weight: 600; color: #d98c8c; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .category-entry { grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 20px auto; }
  .entry-item { padding: 14px 4px; }
  .entry-icon { font-size: 28px; margin-bottom: 6px; }
  .entry-icon img { width: 40px; height: 40px; }
  .entry-item span { font-size: 12px; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
  .service-bar { grid-template-columns: repeat(2, 1fr); }
  .header-inner { height: 68px; gap: 12px; }
  .brand-logo { width: 44px; height: 44px; }
  .brand-logo svg { width: 44px; height: 44px; }
  .brand-cn { font-size: 21px; }
  .brand-en { display: none; }
  .main-menu { gap: 22px; margin-left: 12px; }
  .menu-item { font-size: 15px; }
  .banner { height: 340px; }
  .slide--left .slide-content { margin-left: 5%; }
}
@media (max-width: 600px) {
  .top-bar { display: none; }
  .category-entry { grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 16px auto; }
  .entry-item { padding: 10px 2px; border-radius: 8px; }
  .entry-icon { font-size: 24px; margin-bottom: 4px; min-height: 24px; }
  .entry-icon img { width: 32px; height: 32px; }
  .entry-item span { font-size: 11px; }
  .banner { height: 240px; }
  .slide--left .slide-content { margin-left: 20px; }
  .slide-content h2 { font-size: 22px; }
  .slide-content p { font-size: 14px; }
  .product-grid, .products-grid { gap: 10px; }
  .product-img { height: 150px; font-size: 56px; }
  .product-card:hover .product-img { font-size: 60px; }
  .section-header h3 { font-size: 18px; }
  .footer-inner { grid-template-columns: 1fr; }
  .service-bar { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; }
  .service-item { gap: 8px; }
  .service-icon { width: 36px; height: 36px; font-size: 26px; }
  .service-icon img { width: 36px; height: 36px; }
  .main-menu { gap: 14px; }
  .menu-item { font-size: 14px; }
  #aboutLink, #helpLink { display: none; }
  .cat-dropdown-menu { min-width: 180px; }
}
