/* ==========================================================================
   Shopify.Web — Tomawro 龍貓五金網購平台 复刻样式
   所有数值取自 tomawro.com 真实 CSS（.j-goodsItem2 / .pc-* / .page-index / .j-price 等）
   ------------------------------------------------------------------
   --primary      #1b7cf3  主色（链接 / 强调 / 选中）
   --primary-dark #1b318f  深蓝（顶栏 / 搜索框边框 / hover 边框 / 服务保障条）
   --price        #f96400  商品卡价格橙（.j-price-value）
   --price-2      #f08300  通用强调橙（.f-text-primary）
   --red          #f01811  折扣角标 / 警示
   ========================================================================== */

:root {
    --primary: #1b7cf3;
    --primary-dark: #1b318f;
    --primary-light: #f1f6ff;
    --price: #f96400;
    --price-2: #f08300;
    --price-light: #ffede1;
    --red: #f01811;
    --text: #000;
    --text-2: #26292e;
    --muted: #777;
    --muted-2: #b5b5b5;
    --border: #e1e1e1;
    --border-2: #c9cdd4;
    --bg: #f5f5f5;
    --radius: 4px;
    --radius-lg: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "Segoe UI", "Microsoft JhengHei", "PingFang HK", -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }

.container { max-width: 1220px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.page { padding: 16px 16px 40px; min-height: 60vh; }
.page-title { font-size: 22px; margin: 8px 0 16px; }
.page-desc { color: var(--muted); margin: -8px 0 20px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: var(--radius); background: var(--primary-light); color: var(--primary-dark); font-size: 12px; }

/* 价格：复刻 .j-price-value */
.j-price { display: inline-flex; align-items: baseline; flex-wrap: wrap; }
.j-price-value { color: var(--price); font-size: 18px; font-weight: 500; }
.j-price-old { margin-left: 8px; text-decoration: line-through; font-size: 16px; color: var(--muted-2); }
.j-price-unit { margin-left: 4px; font-size: 12px; color: var(--muted); }
.price { color: var(--price); font-weight: 500; font-size: 18px; }
.price-old { color: var(--muted-2); text-decoration: line-through; font-size: 13px; margin-left: 6px; }

/* 折扣角标：复刻 .j-discount */
.j-discount { display: flex; flex-wrap: wrap; min-height: 24px; gap: 8px; padding-top: 6px; }
.j-discount span {
    color: #fff; padding: 0 8px; height: 24px; line-height: 24px;
    border-radius: var(--radius); background: var(--red); font-size: 14px; font-weight: 500;
}

/* ============================ 顶部 ============================ */
.site-header { background: #fff; position: sticky; top: 0; z-index: 200; }

.topbar { background: var(--primary-dark); color: #fff; font-size: 13px; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; height: 42px; gap: 20px; }
.topbar-links { display: flex; gap: 20px; flex: 1; margin-left: 18px; }
.topbar-links a, .topbar-user a { color: rgba(255, 255, 255, .9); }
.topbar-links a:hover, .topbar-user a:hover { color: #fff; text-decoration: underline; }
.topbar-user { display: flex; align-items: center; gap: 16px; }
.inline-form { display: inline; }
.link-btn { background: none; border: none; color: rgba(255, 255, 255, .9); cursor: pointer; font-size: 13px; padding: 0; }
.link-btn:hover { color: #fff; }

.logo { display: flex; align-items: center; gap: 8px; }
.logo-mark { color: var(--primary); font-size: 26px; line-height: 1; }
.logo-text { font-size: 21px; font-weight: 800; color: #fff; line-height: 1.1; }
.logo-sub { display: block; font-size: 11px; color: rgba(255, 255, 255, .72); font-weight: 400; }

.header-main { display: flex; align-items: center; gap: 16px; padding: 16px; }
.search-box { flex: 1; max-width: 660px; display: flex; border: 2px solid var(--primary-dark); border-radius: var(--radius); overflow: hidden; height: 44px; }
.search-box input { flex: 1; border: none; outline: none; padding: 0 16px; font-size: 14px; }
.search-box input::placeholder { color: #8e8e8e; }
.search-box button { background: var(--primary-dark); color: #fff; border: none; padding: 0 24px; cursor: pointer; font-size: 14px; }
.search-box button:hover { background: var(--primary); }

.header-delivery { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.header-delivery-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--price-light); color: var(--price-2); display: flex; align-items: center; justify-content: center; }

.header-actions { display: flex; gap: 8px; margin-left: auto; }
.action-chip { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-2); font-size: 13px; white-space: nowrap; }
.action-chip:hover { border-color: var(--primary); color: var(--primary); }
.cart-chip { color: var(--primary); border-color: var(--primary); background: var(--primary-light); position: relative; }

/* ===== 加入购物车：飞入购物车动画 ===== */
.fly-img {
    position: fixed; z-index: 9999;
    object-fit: cover; border-radius: 50%;
    background: #fff; pointer-events: none;
    box-shadow: 0 4px 14px rgba(16, 24, 40, .3);
}
.cart-chip.bump { animation: cart-bump .38s ease; }
@keyframes cart-bump {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.22); }
    70%  { transform: scale(.96); }
    100% { transform: scale(1); }
}
.cart-plus-one {
    position: absolute; right: -2px; top: -12px;
    color: var(--red); font-size: 13px; font-weight: 700;
    animation: cart-plus .85s ease forwards; pointer-events: none;
}
@keyframes cart-plus {
    0%   { opacity: 0; transform: translateY(8px) scale(.8); }
    25%  { opacity: 1; transform: translateY(0) scale(1.1); }
    100% { opacity: 0; transform: translateY(-14px) scale(1); }
}
#shopify-toast {
    position: fixed; left: 50%; top: 50%; z-index: 10000;
    transform: translate(-50%, -50%) scale(.92);
    background: rgba(0, 0, 0, .78); color: #fff;
    padding: 10px 22px; border-radius: var(--radius); font-size: 14px;
    opacity: 0; pointer-events: none; white-space: nowrap;
    transition: opacity .2s, transform .2s;
}
#shopify-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ===== 类目树大菜单：复刻 .pc-tree ===== */
.cat-dropdown { position: relative; }
.cat-dropdown-btn { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px; background: var(--primary-dark); color: #fff; font-size: 14px; border: none; border-radius: var(--radius); cursor: pointer; font-weight: 600; white-space: nowrap; }
.cat-dropdown:hover .cat-dropdown-btn { background: var(--primary); }
.pc-tree-wrapper {
    display: none;
    position: absolute; top: 48px; left: 0; z-index: 300;
    padding: 12px 0; background: #fff;
    grid-template-columns: repeat(2, 1fr);
    border-radius: var(--radius);
    border: 1px solid #eee;
    box-shadow: 0 6px 12px rgba(25, 27, 33, .2);
}
.cat-dropdown:hover .pc-tree-wrapper { display: grid; }
.pc-tree-item { position: relative; }
.pc-tree-item > a { display: flex; align-items: center; width: 200px; padding: 12px 24px; height: 50px; color: #000; }
.pc-tree-item > a:hover { color: var(--primary-dark); font-weight: 500; }
.pc-tree-img { flex: 0 0 30px; width: 30px; height: 30px; object-fit: cover; border-radius: 2px; }
.pc-tree-img-ph { display: flex; align-items: center; justify-content: center; font-size: 18px; }
.pc-tree-label { flex: 1; white-space: nowrap; margin: 0 10px; font-size: 13px; }
.pc-tree-arrow { color: var(--muted-2); }
.pc-tree-panel {
    display: none; position: absolute; top: 0; left: 100%; z-index: 10;
    flex-direction: column; width: 800px; max-height: 100%; overflow: auto;
    background: #fff; border-radius: var(--radius);
    border: 1px solid #eee; box-shadow: 0 6px 12px rgba(25, 27, 33, .2);
    padding-bottom: 12px;
}
.pc-tree-item:hover > .pc-tree-panel { display: flex; }
.pc-tree-header { display: flex; padding: 12px 24px; align-items: center; border-bottom: 1px solid #eee; }
.pc-tree-header strong { color: var(--primary-dark); }
.pc-tree-ul { padding: 12px 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 0; }
.pc-tree-ul a { color: #000; padding: 7px 0; font-size: 13px; }
.pc-tree-ul a:hover { color: var(--primary-dark); font-weight: 500; }

.ship-banner { background: var(--primary-light); color: var(--primary-dark); text-align: center; padding: 7px; font-size: 12px; }

/* 全站提示条：淡黄底 + 红字，通栏居中，高 38px */
.site-notice {
    width: 100%;
    height: 38px;
    line-height: 38px;
    padding: 0 16px;
    text-align: center;
    background: #fff9e0;
    color: #f01811;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================ 首页 ============================ */
/* 主视觉：复刻 .page-index-banner
   左列占约 5/7（轮播 + 下方 3 张活动图，同宽横向摆放）
   右列占约 2/7（个人信息模块），高度与左列完全一致
   等高原理：右列内容绝对定位(inset:0) ⇒ 行高完全由左列决定 ⇒ 图片无需拉伸即等高 */
.page-index-banner { display: flex; gap: 20px; align-items: stretch; margin: 16px 0 40px; }
.page-index-banner-left { flex: 2.5 1 0; min-width: 0; display: flex; flex-direction: column; }

/* 轮播：复刻 .pc-slides（站内 banner 实为 4250x1417 ≈ 3:1） */
.banner-carousel { position: relative; overflow: hidden; border-radius: var(--radius); background: #eef2f8; }
.carousel-track { display: flex; transition: transform .5s ease; }
.carousel-slide { flex: 0 0 100%; display: block; }
.carousel-slide img { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
.carousel-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 7px; }
.carousel-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .55); cursor: pointer; padding: 0; }
.carousel-dot.active { background: #fff; width: 20px; border-radius: 4px; }

/* 活动图：复刻 .pc-images（与轮播图同宽，3 等分横向，保持原始 2.5:1 不拉伸变形） */
.pc-images { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pc-images-item { display: block; border-radius: var(--radius); overflow: hidden; background: #eef2f8; }
.pc-images-item img { display: block; width: 100%; aspect-ratio: 2.5 / 1; object-fit: cover; transition: transform .3s; }
.pc-images-item:hover img { transform: scale(1.04); }

/* 用户面板：复刻 .pc-user（占约 2/7，内容绝对定位 ⇒ 高度恒等于左列，内部紧凑不出现滚动条） */
.page-index-user { position: relative; flex: 1 1 0; min-width: 0; background: #fff; border-radius: var(--radius); overflow: hidden; }
.pc-user-content {
    position: absolute; inset: 0; overflow: hidden;
    display: flex; flex-direction: column; gap: 10px; padding: 14px 12px;
}
.pc-user-header { display: flex; align-items: center; gap: 10px; flex: none; }
.pc-user-avatar {
    width: 44px; height: 44px; border-radius: 50%; flex: none;
    background: #d6e5ff; color: var(--primary-dark);
    display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 700;
}
.pc-user-header-right { min-width: 0; }
.pc-user-name { font-size: 16px; font-weight: 500; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-user-login { font-size: 12px; color: var(--primary-dark); }
.pc-user-login:hover { text-decoration: underline; }
.pc-user-login-sub { font-size: 12px; color: var(--muted); }

.pc-user-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; flex: none; }
.pc-user-nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; border-radius: 6px; font-size: 12px; color: var(--text-2); }
.pc-user-nav-item:hover { background: var(--primary-light); color: var(--primary-dark); }
.pc-user-nav-item span { font-size: 16px; line-height: 1.2; }

.pc-user-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.pc-user-actions-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; background: #f7f8fa; font-size: 13px; color: var(--text-2); }
.pc-user-actions-item:hover { background: var(--primary-light); color: var(--primary-dark); }
.pc-user-actions-item i { margin-left: auto; font-style: normal; color: var(--muted-2); }

.pc-user-service { display: flex; align-items: center; gap: 8px; background: var(--primary-light); border-radius: 6px; padding: 8px 10px; flex: none; }
.pcs-icon { font-size: 16px; }
.pcs-title { font-size: 12px; font-weight: 600; color: var(--primary-dark); }
.pcs-sub { font-size: 11px; color: var(--muted); }

.pc-user-footer { margin-top: auto; display: flex; flex-direction: column; gap: 8px; flex: none; }
.pc-user-footer .btn { width: 100%; padding: 8px 16px; font-size: 13px; }

/* 区块标题：复刻 .page-index-header + 圆形"更多"按钮 */
.section { margin: 24px 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; }
.section-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.section-head a { font-size: 13px; color: var(--muted); }
.header-more {
    width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
    border-radius: 100px; border: 1px solid #c7cdd1; color: var(--text-2) !important;
}
.header-more:hover { border-color: var(--primary-dark); color: var(--primary-dark) !important; }

/* 熱門類目：复刻 .pc-hot-categorize */
.cate-section { background: #f5f5f5; border-radius: var(--radius); padding-bottom: 20px; margin: 24px 0; }
.cate-section .section-head { padding: 24px 32px; }
.cate-row {
    background: #fff; padding: 24px 0; margin: 0 32px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px 0; border-radius: var(--radius);
}
.cate-card { display: flex; flex-direction: column; align-items: center; }
.cate-img { width: 110px; height: 110px; overflow: hidden; }
.cate-img img { width: 100%; height: 100%; object-fit: cover; }
.cate-img-ph { display: flex; align-items: center; justify-content: center; width: 110px; height: 110px; font-size: 40px; }
.cate-card p { margin: 8px 0 0; text-align: center; font-size: 14px; }
.cate-card:hover p { text-decoration: underline; color: var(--primary-dark); }

/* 品牌：复刻 .pc-brands */
.brand-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(254px, 1fr)); gap: 24px; }
.brand-logo-card {
    position: relative; overflow: hidden; border-radius: var(--radius);
    border: 1px solid var(--border); padding: 24px 16px 16px;
    display: flex; flex-direction: column; align-items: center; transition: all .3s ease;
}
.brand-logo-card:hover { border-color: var(--primary-dark); }
.brand-logo-card:hover p { text-decoration: underline; color: var(--primary-dark); }
.brand-logo-card img { width: 222px; max-width: 100%; height: 92px; object-fit: contain; }
.brand-logo-card p { margin: 8px 0 0; font-size: 13px; }
.brand-tag {
    position: absolute; left: 0; top: 0; z-index: 2; height: 20px; line-height: 20px;
    max-width: 80%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: var(--red); color: #fff; padding: 0 6px; font-size: 14px;
    border-bottom-right-radius: var(--radius);
}

/* 服务保障：复刻 .pc-description（深蓝条 + 白色方形图标） */
.service-strip {
    display: flex; flex-wrap: wrap; padding: 0 16px;
    border-radius: var(--radius-lg); background: var(--primary-dark); color: #fff;
    box-shadow: 0 4px 12px rgba(12, 24, 74, .2); margin-top: 24px;
}
.service-item { flex: 1; display: flex; align-items: center; padding: 24px 32px; white-space: nowrap; }
.service-icon {
    width: 40px; height: 40px; border-radius: 6px; background: #fff; color: var(--primary-dark);
    font-size: 22px; margin-right: 16px; display: flex; align-items: center; justify-content: center; flex: none;
}
.service-title { font-size: 18px; }
.service-small { font-size: 14px; color: rgba(255, 255, 255, .7); }

/* 楼层 Tab：复刻 .pc-special .q-tab（胶囊） */
.floor-body { background: #fff; border-radius: var(--radius); padding: 16px; }
.floor-tabs { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.floor-tab {
    min-height: 34px; height: 34px; padding: 0 24px; border-radius: 100px;
    border: 1px solid var(--border); background: #fff; color: var(--text-2);
    font-size: 14px; cursor: pointer; transition: .2s;
}
.floor-tab:hover { border-color: var(--primary-dark); color: var(--primary-dark); }
.floor-tab.active { border: 1px solid var(--primary-dark); background: var(--primary-dark); color: #fff; }
.floor-panel { display: none; }
.floor-panel.active { display: block; }

/* ============================ 商品卡：复刻 .j-goodsItem2 ============================ */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.product-card {
    background: #fff; display: flex; flex-direction: column;
    padding: 16px; border-radius: var(--radius);
    border: 1px solid var(--border); transition: all .2s;
}
.product-card:hover { border-color: var(--primary-dark); color: #000; }
.product-img {
    width: 90%; max-width: 120px; max-height: 120px; aspect-ratio: 1;
    margin: 0 auto 12px; align-self: center;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-img-ph { font-size: 44px; color: #d0d0d0; }
.product-body { display: flex; flex-direction: column; flex: 1; }
.product-name {
    height: 50px; overflow: hidden; word-break: break-all;
    font-size: 14px; line-height: 1.75; color: #000;
}
.product-meta { font-size: 12px; color: var(--muted); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-footer { margin-top: auto; padding-top: 12px; display: flex; align-items: center; gap: 8px; }
.product-footer form { flex: 1; display: flex; }
.product-footer form .btn { width: 100%; }

/* ============================ 按钮 ============================ */
.btn { display: inline-block; border: none; border-radius: var(--radius); cursor: pointer; padding: 9px 16px; font-size: 14px; transition: .15s; text-align: center; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #1466d6; color: #fff; }
.btn-dark { background: var(--primary-dark); color: #fff; }
.btn-dark:hover { background: var(--primary); color: #fff; }
.btn-outline { background: #fff; border: 1px solid var(--border-2); color: var(--text-2); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #fff; border: 1px solid var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .5); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .26); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; }

/* ============================ 表单 ============================ */
.field { display: flex; flex-direction: column; gap: 4px; }
.field label, .form-label { font-size: 13px; color: var(--muted); }
.field input, .field textarea, .field select,
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="date"], select, textarea {
    border: 1px solid var(--border-2); border-radius: var(--radius); padding: 9px 10px; font-size: 14px; outline: none; width: 100%; color: var(--text);
}
.field input:focus, select:focus, textarea:focus, input:focus { border-color: var(--primary); }
.checkbox { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.checkbox input { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid > div:last-child { grid-column: span 2; }
.qty-input { width: 76px !important; }
.radio-group { display: flex; flex-wrap: wrap; gap: 12px; }
.radio-group label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.radio-group input { width: auto; }

/* ============================ 面包屑 / 筛选 / 分页 ============================ */
.crumbs { color: var(--muted); margin-bottom: 14px; font-size: 13px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.filter-bar { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 16px; border-radius: var(--radius); margin-bottom: 16px; }
.filter-form { display: flex; gap: 8px; align-items: center; }
.filter-form input, .filter-form select { width: auto; }
.filter-total { color: var(--muted); }
.pagination { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 24px 0; }
.pagination a { border: 1px solid var(--border); padding: 6px 14px; border-radius: var(--radius); background: #fff; }
.pagination a:hover { border-color: var(--primary-dark); color: var(--primary-dark); }

/* ============================ 商品详情 ============================ */
.detail { display: grid; grid-template-columns: 440px 1fr; gap: 28px; background: #fff; border-radius: var(--radius); padding: 20px; }
.detail-img { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 12px; min-height: 400px; }
.detail-img img { max-height: 400px; width: auto; object-fit: contain; }
.detail-img-ph { display: flex; align-items: center; justify-content: center; min-height: 380px; font-size: 90px; }
.detail-info h1 { margin: 0 0 8px; font-size: 20px; line-height: 1.45; }
.detail-brand { color: var(--muted); margin-bottom: 12px; font-size: 13px; }
.detail-price-box { background: #f5f5f5; border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.detail-price .j-price-value { font-size: 28px; }
.price-unit { color: var(--muted); font-size: 13px; }
.detail-price-hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.detail-meta { margin-bottom: 16px; display: flex; flex-direction: column; gap: 5px; color: var(--text-2); font-size: 13px; }
.buy-form { margin-bottom: 12px; }
.sku-group { margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.sku-option { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 7px 10px; border: 1px solid var(--border-2); border-radius: var(--radius); }
.sku-option:hover { border-color: var(--primary-dark); }
.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.detail-actions.secondary { margin-top: 10px; }
.tabs { background: #fff; border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.tabs h2 { margin: 0 0 12px; font-size: 17px; color: var(--primary-dark); }
.review-item { border-bottom: 1px solid var(--border); padding: 10px 0; }
.review-head { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.stars { color: var(--price-2); }
.review-user, .review-date { color: var(--muted); font-size: 12px; }

/* ============================ 购物车 ============================ */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.cart-item { display: grid; grid-template-columns: 80px 1fr auto auto auto; gap: 14px; align-items: center; background: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 10px; }
.cart-item-img { width: 80px; height: 80px; border: 1px solid var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 4px; }
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; }
.cart-item-img .product-img-ph { font-size: 28px; }
.cart-item-name { color: var(--text); }
.cart-item-qty { display: flex; gap: 6px; align-items: center; }
.cart-item-subtotal { font-weight: 500; color: var(--price); font-size: 16px; }
.cart-summary { background: #fff; border-radius: var(--radius); padding: 20px; position: sticky; top: 180px; display: flex; flex-direction: column; gap: 10px; }
.cart-summary h3 { margin: 0 0 8px; }
.summary-row { display: flex; justify-content: space-between; color: var(--text-2); }
.summary-row.total { border-top: 1px solid var(--border); padding-top: 10px; font-weight: 700; color: var(--text); }

/* ============================ 结算 ============================ */
.checkout { display: flex; flex-direction: column; gap: 16px; }
.checkout-block { background: #fff; border-radius: var(--radius); padding: 20px; }
.checkout-block h2 { margin: 0 0 16px; font-size: 16px; color: var(--primary-dark); }
.address-list { display: flex; flex-direction: column; gap: 14px; }
/* 地址卡：复刻 .address-item */
.address-card {
    display: flex; justify-content: space-between; align-items: center;
    border: 1px solid #ccc; border-radius: var(--radius-lg); padding: 16px;
    position: relative; cursor: pointer;
}
.address-card:hover { border-color: var(--primary-dark); }
.address-card input { width: auto; margin-right: 8px; }
.address-actions { display: flex; gap: 8px; }
.pay-group label { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.pay-group label:hover { border-color: var(--primary-dark); }
.order-total { text-align: right; margin-top: 12px; color: var(--text-2); }
.order-total .total { font-size: 18px; font-weight: 700; margin-top: 6px; color: var(--text); }
.order-total .total .j-price-value { font-size: 22px; }
.checkout-submit { display: flex; gap: 12px; }
.alert { padding: 12px; border-radius: var(--radius); background: var(--primary-light); border: 1px solid #cfe0fb; color: var(--primary-dark); }
.alert.success { background: #eefbf1; border-color: #c3ecc9; color: #1c7c2f; }
.error { padding: 10px; border-radius: var(--radius); background: #fef0ef; border: 1px solid #f9c9c6; color: var(--red); margin-bottom: 12px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ============================ 订单 ============================ */
.order-tabs { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.order-tabs a {
    display: inline-flex; align-items: center; height: 34px; padding: 0 24px;
    border-radius: 100px; border: 1px solid var(--border); background: #fff;
    font-size: 14px; color: var(--text-2);
}
.order-tabs a:hover { border-color: var(--primary-dark); color: var(--primary-dark); }
.order-tabs a.active { border-color: var(--primary-dark); background: var(--primary-dark); color: #fff; }
.order-card { background: #fff; border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.order-card-head { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); background: #fafafa; font-size: 13px; }
.order-no { font-weight: 600; margin-right: 12px; }
.order-status { color: var(--primary); font-weight: 700; }
.order-card-body { display: flex; justify-content: space-between; padding: 16px; }
.order-card-summary { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); }
.order-item-mini { font-size: 13px; }
.order-card-actions { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); justify-content: flex-end; }
.order-detail-head { display: flex; justify-content: space-between; align-items: center; }
.order-detail-actions { display: flex; gap: 10px; margin: 16px 0; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.info-grid label { color: var(--muted); display: block; font-size: 12px; }
.admin-panel { border: 1px dashed var(--primary); }
.admin-panel .inline-form { display: flex; gap: 8px; }
.admin-panel .inline-form input { width: auto; }

/* ============================ 表格 ============================ */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.table th { color: var(--muted); font-weight: 600; background: #fafafa; }

/* ============================ 用户中心 ============================ */
.user-grid { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: start; }
.user-nav { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; }
.user-nav a { padding: 14px 16px; font-size: 14px; color: var(--text-2); border-bottom: 1px solid var(--border); }
.user-nav a:hover { background: var(--primary-light); color: var(--primary-dark); }
.user-nav a.active { background: var(--primary-dark); color: #fff; }
.user-content { display: flex; flex-direction: column; gap: 16px; }

/* ============================ 品牌 / 供应商 / 优惠券 ============================ */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(254px, 1fr)); gap: 24px; }
.brand-card {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 24px 16px 16px;
}
.brand-card:hover { border-color: var(--primary-dark); }
.brand-logo-ph { width: 48px; height: 48px; border-radius: 50%; background: var(--primary-light); color: var(--primary-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; }
.brand-card img { height: 92px; object-fit: contain; }
.supplier-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.supplier-card { background: #fff; border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); }
.supplier-card h3 { margin: 0 0 4px; color: var(--primary-dark); }
.coupon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.coupon-card { background: #fff; border: 1px dashed var(--primary); border-radius: var(--radius); padding: 20px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.coupon-name { font-weight: 700; color: var(--primary-dark); }

.message-item { background: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 10px; }
.message-item.unread { border-left: 3px solid var(--primary); }
.message-head { display: flex; justify-content: space-between; }

.help-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.help-col { background: #fff; border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.help-col h3 { margin: 0 0 6px; color: var(--primary-dark); }
.article { background: #fff; border-radius: var(--radius); padding: 20px; line-height: 1.9; }

/* ============================ 登录 / 注册 ============================ */
.auth-layout { min-height: 100vh; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); display: flex; flex-direction: column; padding: 0; }
.auth-layout .site-notice { flex: none; }
.auth-layout .auth-panel { margin: auto; }
.auth-panel { width: 420px; max-width: calc(100% - 40px); background: #fff; border-radius: var(--radius-lg); padding: 32px; box-shadow: 0 16px 48px rgba(0, 0, 0, .2); }
.auth-brand { text-align: center; font-size: 20px; font-weight: 800; margin-bottom: 16px; color: var(--primary-dark); }
.auth-brand .logo-mark { font-size: 24px; color: var(--primary); }
.auth-card h2 { margin: 0 0 4px; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.auth-links { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-back { text-align: center; margin-top: 14px; font-size: 13px; }

/* ============================ 右侧悬浮栏 ============================ */
.right-bar { position: fixed; right: 14px; bottom: 110px; z-index: 150; display: flex; flex-direction: column; gap: 8px; }
.right-bar a {
    width: 54px; height: 54px; border-radius: var(--radius); background: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: 11px; color: var(--text-2); gap: 2px;
    border: 1px solid var(--border);
}
.right-bar a:hover { background: var(--primary-dark); color: #fff; border-color: var(--primary-dark); }
.rb-icon { font-size: 17px; line-height: 1; }

/* ============================ 页脚 ============================ */
.site-footer { background: #0b1220; color: #98a2b3; margin-top: 36px; }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 36px 16px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 { color: #fff; margin: 0 0 6px; font-size: 15px; }
.footer-col a { color: #98a2b3; font-size: 13px; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid #1e293b; padding: 16px; text-align: center; font-size: 12px; color: #64748b; }
.footer-bottom p { margin: 2px 0; }

/* ============================ 响应式 ============================ */
@media (max-width: 1100px) {
    .pc-tree-ul { grid-template-columns: repeat(3, 1fr); }
    .pc-tree-panel { width: 560px; }
    /* 窗口变窄时左列变矮，隐藏客服块以保证面板内容依然完整不滚动 */
    .pc-user-service { display: none; }
}
@media (max-width: 960px) {
    /* 进一步压缩：快捷入口改为 2 列，减小间距 */
    .pc-user-content { gap: 8px; padding: 12px 10px; }
    .pc-user-nav { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .site-notice { font-size: 13px; padding: 0 8px; }
    .page-index-banner { flex-direction: column; }
    .page-index-user { flex: 1 1 auto; min-height: 340px; }
    .pc-user-content { position: static; inset: auto; }
    .carousel-slide img { aspect-ratio: 2 / 1; }
    .cate-row { grid-template-columns: repeat(3, 1fr); margin: 0 16px; }
    .cate-section .section-head { padding: 16px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .detail { grid-template-columns: 1fr; }
    .cart-layout { grid-template-columns: 1fr; }
    .user-grid { grid-template-columns: 1fr; }
    .brand-grid, .brand-row { grid-template-columns: repeat(2, 1fr); }
    .brand-logo-card img { width: 100%; height: 64px; }
    .help-grid { grid-template-columns: repeat(2, 1fr); }
    .supplier-grid, .coupon-grid { grid-template-columns: 1fr; }
    .service-strip { flex-direction: column; padding: 8px 16px; }
    .service-item { padding: 12px 0; }
    .pc-images { grid-template-columns: 1fr; }
    .pc-images-item img { aspect-ratio: 2.5 / 1; }
    .right-bar { display: none; }
    .pc-tree-wrapper { grid-template-columns: 1fr; }
    .pc-tree-panel { position: static; width: auto; box-shadow: none; border: none; }
}
