/* 模板23 · 购物车选购视图 —— 抽自新财务 site.css */
:root {
    /* ★ 第 65 轮（前台模板）：主色由站务设置「外观」控制——site.js 运行时注入覆盖这几项；
       此处为内置兜底（默认参考站同款蓝 #0052d9） */
    --brand: #0052d9;
    --brand-dark: #003eb3;
    --brand-deep: #00235e;      /* 深色顶栏 / 页脚底色 */
    --brand-soft: rgba(0, 82, 217, .09);
    /* ★ 毛玻璃（第 65 轮补丁）：主题色半透明版由 JS 注入；以下为兜底 */
    --brand-glass: rgba(0, 82, 217, .78);
    --brand-glass-strong: rgba(0, 82, 217, .82);
    --glass-white: rgba(255, 255, 255, .62);        /* 浅背景上的白玻璃（卡片/弹窗） */
    --glass-white-strong: rgba(255, 255, 255, .78); /* 弹窗级 */
    --glass-line: rgba(255, 255, 255, .75);         /* 玻璃高光描边 */
    --glass-shadow: 0 10px 30px rgba(15, 40, 90, .10);
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f7f8fa;
    --card: #ffffff;
    --danger: #dc2626;
    --success: #059669;
    --radius: 10px;
}

:root{
    --ink-1:#0d1526; --ink-2:#344054; --ink-3:#667085; --ink-4:#98a2b3;
    --line-1:#e9ecf2; --line-2:#d6dbe4;
    --r-sm:6px; --r-md:8px; --r-lg:10px; --r-xl:14px;
    --sh-sm:0 1px 3px rgba(16,24,40,.08); --sh-md:0 8px 24px -12px rgba(16,24,40,.16);
}

/* 选购视图 */
/* =========================================================================
 * ★ 第 67 轮：购物车选购视图（双视图①——左分类树 + 商品卡网格；对齐参考站 /cart）
 * ========================================================================= */
.cart-tabs { display: flex; gap: 8px; }
.cart-tabs button {
    border: 1px solid var(--border); background: rgba(255, 255, 255, .72);
    color: var(--text); padding: 7px 16px; border-radius: 8px; cursor: pointer; font-size: 14px;
    transition: background .15s, border-color .15s, color .15s;
}
.cart-tabs button:hover { border-color: var(--brand); color: var(--brand); }
.cart-tabs button.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.store-wrap { display: flex; gap: 16px; align-items: flex-start; }
.store-side {
    width: var(--cart-nav-w, 236px); flex: none; position: sticky; top: 76px;
    background: var(--glass-white);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    border: 1px solid var(--glass-line); border-radius: var(--radius);
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, .6);
    padding: 12px; max-height: calc(100vh - 100px); overflow-y: auto;
}
.store-search { margin-bottom: 10px; }
.store-search .input { font-size: 13px; padding: 7px 10px; }
.store-all { padding: 8px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.store-all:hover { background: rgba(0, 82, 217, .06); }
.store-all.active { background: var(--brand); color: #fff; }
.store-first { margin-top: 6px; }
.store-first-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 10px; border-radius: 8px; font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.store-first-head.open .buy-side-caret { transform: rotate(180deg); border-top-color: var(--brand); }
.store-first-head:hover { background: rgba(0, 82, 217, .06); }
.store-first-head.active { color: var(--brand); }
.store-groups { padding: 2px 0 2px 6px; }
/* ★ 第 128 轮：地区行 = 名称 + 右侧小红标（后台「站点设置 → 地区角标」） */
.store-group-item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.store-group-item .sg-name { flex: 1; min-width: 0; display: block; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-badge { flex: none; background: #f04438; color: #fff; font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 2px; white-space: nowrap; }
.store-group-item small {
    display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 1px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px;
}
.store-group-item:hover { background: rgba(0, 82, 217, .06); }
.store-group-item.active { background: rgba(0, 82, 217, .1); box-shadow: inset 3px 0 0 var(--brand); }
.store-group-item.active .sg-name { color: var(--brand); font-weight: 600; }

.store-main { flex: 1; min-width: 0; }
.store-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.store-head b { font-size: 17px; }
.store-head .muted { font-size: 12.5px; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--cart-card-min, 250px), 1fr)); gap: 14px; }
.store-card {
    background: var(--glass-white);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    border: 1px solid var(--glass-line); border-radius: 10px; padding: 14px 16px;
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, .6);
    display: flex; flex-direction: column;
}
.store-card.sold-out { opacity: .72; }
.store-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.store-card-name { font-weight: 700; font-size: 14.5px; }
.store-stock { font-size: 11.5px; flex: none; }
.store-specs {
    list-style: none; margin: 0 0 10px; padding: 10px 0;
    border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border);
    font-size: 12.5px;
}
.store-specs li { display: flex; justify-content: space-between; padding: 2.5px 0; }
.store-specs li span:first-child { color: var(--text-muted); }
.store-price { font-size: 19px; font-weight: 700; color: var(--danger); margin: auto 0 10px; }
.store-price small { font-size: 12px; color: var(--text-muted); font-weight: 400; }
/* 未登录提示 / 卡片描述 / 底部提示 */

/* ---------- 选购页：未登录提示 + 商品卡描述 + 底部提示条 ---------- */
.store-wrap { flex-wrap: wrap; }
.cart-login-notice {
    flex: 0 0 100%;
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
    border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px;
}
.cart-login-notice-link { color: #1d4ed8; font-weight: 600; white-space: nowrap; }
.store-desc {
    font-size: 12.5px; color: var(--text-muted); margin: -2px 0 10px; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* ★ 第 89 轮：优化描述（后台开关 → 单行省略，卡片更紧凑） */
.store-desc.store-desc-compact { -webkit-line-clamp: 1; }
.cart-footer-notice { position: relative; border-radius: 8px; padding: 12px 16px 12px 38px; font-size: 12px; line-height: 1.9; margin-top: 16px; }
.cart-footer-notice p { margin: 0 0 4px; }
.cart-footer-notice p:last-child { margin-bottom: 0; }
.cart-footer-red    { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.cart-footer-red::before {
    content: "!"; position: absolute; left: 14px; top: 14px;
    width: 16px; height: 16px; border-radius: 50%;
    background: #e60012; color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center;
}
.cart-footer-blue   { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.cart-footer-yellow { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* 顶部区域条 */
.store-topbar {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 14px; margin-bottom: 12px;
    background: #f4f7fb; border: 1px solid var(--line-1); border-radius: 6px;
    font-size: 13px;
}
.store-back { flex: none; color: var(--brand); font-size: 13px; }
.store-back:hover { text-decoration: underline; }
.store-region { flex: none; color: var(--brand); font-weight: 600; }
.store-topdesc {
    min-width: 0; color: var(--ink-3); font-size: 12.5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 620px) {
    .store-topbar { flex-wrap: wrap; gap: 6px 10px; }
    .store-topdesc { flex: 0 0 100%; white-space: normal; }
}
/* 旗标 */
.store-flag { flex: none; width: 18px; height: 12px; object-fit: cover; border-radius: 2px; }
.sg-flag { display: inline-block; width: 16px; height: 11px; object-fit: cover; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* 模板23 · 左树对齐运营站：更大行高、分组标题、地区红标 */
.store-first { margin-top: 8px; }
.store-first-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 10px; font-size: 14px; font-weight: 600; color: #344054;
    background: #f7f9fc; border-radius: 4px;
}
.store-first-head.active { color: #0052d9; }
.store-groups { padding: 4px 0 4px 2px; }
.store-group-item {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 10px; font-size: 13px; border-radius: 4px;
}
.store-group-item.active { background: #eaf2ff; color: #0052d9; box-shadow: inset 3px 0 0 #0052d9; font-weight: 600; }
.store-badge { background: #f04438; color: #fff; font-size: 10.5px; padding: 2px 5px; border-radius: 2px; }
.store-search .input { height: 36px; font-size: 13px; border: 1px solid #e4e8f0; border-radius: 4px; }
.store-topbar { background: transparent; border: none; border-bottom: 1px solid #eef1f6; border-radius: 0; }

/* 模板23 · 商品卡规格：8 行全量显示，标签/值两端对齐 */
.store-card .store-specs { margin: 8px 0 10px !important; padding: 0 !important; list-style: none !important; }
.store-card .store-specs li {
    display: flex !important; justify-content: space-between !important; align-items: baseline !important;
    font-size: 12.5px !important; line-height: 1.9 !important; color: #475467 !important;
    border-bottom: 1px dashed #f0f2f6 !important; padding: 2px 0 !important;
}
.store-card .store-specs li:last-child { border-bottom: none !important; }
.store-card .store-specs li span:first-child { color: #98a2b3 !important; flex: none !important; }
.store-card .store-specs li span:last-child { color: #101828 !important; font-weight: 500 !important; text-align: right !important; overflow-wrap: anywhere !important; }
.store-card .store-price { font-size: 20px !important; font-weight: 700 !important; color: #f04438 !important; }
.store-card .store-price small { font-size: 12px !important; font-weight: 400 !important; color: #98a2b3 !important; }
.store-stock { font-size: 12px !important; color: #12b76a !important; }
