/* ============================================================
   Lumishop storefront design tokens + global styles（阶段 3.1）
   配色/字体/圆角/阴影取自方案文档 03（清新风格）
   ============================================================ */
:root {
    /* 色彩 */
    --brand: #0F6E56;
    --brand-deep: #085041;
    --brand-text: #083A2E;
    --brand-body: #3E5C52;
    --brand-muted: #6B8A80;
    --brand-soft: #E9F7F1;
    --brand-soft-border: #9FE1CB;
    --accent: #BA7517;
    --accent-soft: #FAEEDA;
    --page-bg: #F7F8F7;
    --card-border: #E6EAF1;

    /* 圆角与阴影 */
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-card: 0 8px 24px rgba(8, 58, 46, 0.06);
    --shadow-float: 0 4px 12px rgba(8, 58, 46, 0.10);
}

body.store {
    font-family: "Plus Jakarta Sans", "Inter", -apple-system, "Segoe UI", sans-serif;
    background: var(--page-bg);
    color: var(--brand-body);
}

h1, h2, h3, .store-brand { color: var(--brand-text); font-weight: 600; }
a { color: var(--brand); }

/* ---------- 导航栏 ---------- */
.store-nav {
    position: sticky; top: 0; z-index: 1030;
    background: #fff; border-bottom: 0.5px solid var(--card-border);
}
.store-nav .inner { display: flex; align-items: center; gap: 20px; padding: 12px 0; }
.store-brand { display: flex; align-items: center; gap: 8px; font-size: 18px; text-decoration: none; }
.brand-dot {
    width: 26px; height: 26px; border-radius: 8px; background: var(--brand);
    display: inline-flex; align-items: center; justify-content: center;
}
.store-nav .nav-link {
    color: var(--brand-body); font-size: 14px; padding: 6px 10px; border-radius: 8px;
}
.store-nav .nav-link:hover { background: var(--brand-soft); color: var(--brand-deep); }
.store-nav .nav-link.active { color: var(--brand); font-weight: 600; }
.store-search {
    display: flex; align-items: center; gap: 8px; flex: 1; max-width: 240px;
    background: var(--page-bg); border: 1px solid var(--card-border);
    border-radius: 99px; padding: 7px 14px; margin-left: auto;
}
.store-search input {
    border: 0; outline: 0; background: transparent; font-size: 13px; width: 100%;
    color: var(--brand-text);
}
.store-cart { position: relative; display: inline-flex; padding: 8px; border-radius: 10px; color: var(--brand-text); }
.store-cart:hover { background: var(--brand-soft); }
.cart-badge {
    position: absolute; top: 0; right: -2px; background: var(--accent); color: #fff;
    font-size: 10px; border-radius: 99px; padding: 1px 5px; line-height: 1.4;
}

/* ---------- 首屏 Hero ---------- */
.store-hero {
    background: var(--brand-soft); border-radius: var(--radius-lg);
    display: flex; gap: 16px; padding: 48px; margin: 24px 0;
}
.hero-badge {
    display: inline-block; background: #fff; color: var(--brand);
    border: 0.5px solid var(--brand-soft-border); border-radius: 99px;
    padding: 4px 14px; font-size: 12px;
}
.store-hero h1 { font-size: 40px; line-height: 1.2; letter-spacing: -0.5px; margin: 14px 0; }
.hero-sub { font-size: 15px; line-height: 1.6; max-width: 480px; }
.btn-brand {
    background: var(--brand); color: #fff; border-radius: 99px;
    padding: 10px 24px; font-size: 14px; font-weight: 500; border: 0;
}
.btn-brand:hover { background: var(--brand-deep); color: #fff; }
.btn-ghost {
    background: #fff; color: var(--brand-deep); border-radius: 99px;
    padding: 10px 20px; font-size: 14px; font-weight: 500;
    border: 0.5px solid var(--brand-soft-border);
}
.hero-note { font-size: 12px; color: var(--brand-muted); }
.hero-trust { display: flex; gap: 18px; font-size: 12px; color: var(--brand-deep); margin-top: 6px; }
.hero-visual { flex: 1; position: relative; min-height: 260px; }
.hero-blob { position: absolute; right: 10px; top: 0; width: 180px; height: 180px; border-radius: 50%; background: var(--accent-soft); }
.hero-card {
    position: absolute; background: #fff; border: 0.5px solid var(--card-border);
    border-radius: var(--radius); padding: 10px; width: 150px; box-shadow: var(--shadow-card);
}
.hero-card .ph { height: 84px; border-radius: 8px; }
.hero-card .name { font-size: 12px; font-weight: 500; margin: 6px 0 2px; color: var(--brand-text); }
.hero-card .price { font-size: 12px; font-weight: 500; color: var(--accent); }
.hero-chip {
    position: absolute; left: 24px; bottom: 8px; background: #fff;
    border: 0.5px solid var(--brand-soft-border); color: var(--brand-deep);
    font-size: 11px; border-radius: 99px; padding: 4px 10px; box-shadow: var(--shadow-float);
}

/* ---------- 通用区块 ---------- */
.store-section { padding: 40px 0; }
.section-title { font-size: 20px; margin-bottom: 18px; }
.trust-row { display: flex; gap: 10px; flex-wrap: wrap; }
.trust-item {
    flex: 1 1 200px; background: #fff; border: 0.5px solid var(--card-border);
    border-radius: var(--radius); padding: 18px; text-align: center;
}
.trust-item .t { font-weight: 600; color: var(--brand-text); font-size: 14px; margin: 6px 0 2px; }
.trust-item .d { font-size: 12.5px; color: var(--brand-muted); }

/* ---------- 静态页 / 表单 ---------- */
.static-card {
    background: #fff; border: 0.5px solid var(--card-border);
    border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-card);
}
.static-card p { margin-bottom: 1rem; line-height: 1.7; }
.form-label { color: var(--brand-text); }
.form-control:focus, .form-select:focus { border-color: var(--brand-soft-border); box-shadow: 0 0 0 3px rgba(15, 110, 86, 0.12); }

/* ---------- 页脚 ---------- */
.store-footer { background: #fff; border-top: 0.5px solid var(--card-border); margin-top: 48px; padding: 36px 0 24px; }
.store-footer h6 { color: var(--brand-text); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.store-footer a { color: var(--brand-body); text-decoration: none; font-size: 13.5px; display: block; padding: 3px 0; }
.store-footer a:hover { color: var(--brand); }
.footer-note {
    background: var(--brand-soft); border-radius: var(--radius);
    padding: 10px 16px; font-size: 12.5px; color: var(--brand-deep);
}
.footer-copy { font-size: 12px; color: var(--brand-muted); margin-top: 20px; }

/* ---------- 响应式 ---------- */
@media (max-width: 991.98px) {
    .store-hero { flex-direction: column; padding: 28px; }
    .store-hero h1 { font-size: 30px; }
    .hero-visual { min-height: 220px; }
    .store-search { display: none; }
}
@media (max-width: 575.98px) {
    .store-hero h1 { font-size: 26px; }
    .hero-visual { display: none; }
}

/* ============================================================
   阶段 4：商品卡片 / 列表 / 详情
   ============================================================ */
.product-card {
    display: block; background: #fff; border: 0.5px solid var(--card-border);
    border-radius: var(--radius); overflow: hidden; text-decoration: none;
    height: 100%; transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.product-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #F0F2F7; }
.pc-body { padding: 10px 12px 12px; }
.pc-cat { font-size: 11px; color: var(--brand-muted); }
.pc-name { font-size: 14px; font-weight: 500; color: var(--brand-text); margin: 2px 0 4px; }
.pc-price { font-size: 14px; font-weight: 600; color: var(--accent); }
.pc-price del { font-weight: 400; color: var(--brand-muted); margin-left: 6px; font-size: 12px; }
.pc-soldout {
    position: absolute; top: 8px; left: 8px; background: rgba(8, 58, 46, 0.75);
    color: #fff; font-size: 11px; border-radius: 99px; padding: 2px 10px;
}
.product-card { position: relative; }

/* 列表布局 */
.shop-layout { display: flex; gap: 24px; }
.shop-filters {
    flex: 0 0 220px; background: #fff; border: 0.5px solid var(--card-border);
    border-radius: var(--radius); padding: 18px; align-self: flex-start;
    position: sticky; top: 76px;
}
.filter-title { font-size: 13px; font-weight: 600; color: var(--brand-text); margin-bottom: 10px; }
.filter-cat {
    display: flex; justify-content: space-between; font-size: 13px;
    padding: 5px 8px; border-radius: 8px; color: var(--brand-body); text-decoration: none;
}
.filter-cat:hover { background: var(--brand-soft); }
.filter-cat.on { background: var(--brand); color: #fff; font-weight: 500; }
.filter-cat .n { color: inherit; opacity: .7; }
.shop-results { flex: 1; }
.shop-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px; font-size: 13px; color: var(--brand-muted); flex-wrap: wrap; gap: 8px;
}
.shop-toolbar select { font-size: 13px; border-radius: 8px; border: 1px solid var(--card-border); padding: 5px 8px; }
.price-inputs { display: flex; gap: 8px; align-items: center; }
.price-inputs input { width: 90px; font-size: 13px; padding: 5px 8px; border: 1px solid var(--card-border); border-radius: 8px; }

/* 分页 */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pager a, .pager span {
    padding: 6px 12px; border-radius: 8px; font-size: 13px;
    border: 0.5px solid var(--card-border); background: #fff; color: var(--brand-body); text-decoration: none;
}
.pager .on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager .disabled { opacity: .45; pointer-events: none; }

/* 详情页 */
.detail-layout { display: flex; gap: 28px; background: #fff; border: 0.5px solid var(--card-border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-card); }
.detail-gallery { flex: 1; }
.detail-gallery .main-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); border: 0.5px solid var(--card-border); background: #F0F2F7; }
.detail-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.detail-thumbs img {
    width: 64px; height: 52px; object-fit: cover; border-radius: 8px; cursor: pointer;
    border: 2px solid transparent; background: #F0F2F7;
}
.detail-thumbs img.on { border-color: var(--brand); }
.detail-info { flex: 1; }
.detail-info h1 { font-size: 26px; line-height: 1.25; }
.detail-price { font-size: 26px; font-weight: 600; color: var(--accent); }
.detail-price del { font-size: 16px; font-weight: 400; color: var(--brand-muted); margin-left: 8px; }
.detail-meta { font-size: 13px; color: var(--brand-muted); margin: 8px 0; }
.agent-links { border-top: 0.5px solid var(--card-border); margin-top: 18px; padding-top: 16px; }
.agent-link-row {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    border: 0.5px solid var(--card-border); border-radius: var(--radius); margin-bottom: 8px;
}
.agent-link-row img, .agent-link-row .p-avatar { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; }
.agent-link-row .p-avatar { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 500; font-size: 14px; }
.agent-link-row .u { font-size: 12px; color: var(--brand-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.btn-buy {
    margin-left: auto; background: var(--brand); color: #fff; border-radius: 99px;
    padding: 7px 16px; font-size: 13px; text-decoration: none; white-space: nowrap;
}
.btn-buy:hover { background: var(--brand-deep); color: #fff; }
@media (max-width: 991.98px) {
    .shop-layout { flex-direction: column; }
    .shop-filters { position: static; flex: none; }
    .detail-layout { flex-direction: column; }
    .agent-link-row .u { max-width: 140px; }
}

/* ============================================================
   导航栏分类下拉（一级分类 → 悬停品牌面板；More 收纳剩余分类）
   ============================================================ */
.store-menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0 0 0 8px; padding: 0; }
.store-menu > li { position: relative; }
.menu-link {
    display: flex; align-items: center; gap: 4px;
    padding: 8px 12px; border-radius: 8px; font-size: 14px;
    color: var(--brand-body); text-decoration: none; white-space: nowrap;
}
.menu-link:hover, .menu-link.on { background: var(--brand-soft); color: var(--brand-deep); }
.menu-link svg { transition: transform .2s ease; }
.nav-cat:hover > .menu-link { background: var(--brand-soft); color: var(--brand-deep); }
.nav-cat:hover > .menu-link svg { transform: rotate(180deg); }

/* 品牌面板（一级分类下方 / More 内分类右侧） */
.cat-panel {
    display: none; position: absolute; top: 100%; left: 0; z-index: 1060;
    background: #fff; border: 0.5px solid var(--card-border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card); padding: 16px 18px; min-width: 380px;
}
.nav-cat:hover > .cat-panel,
.more-cat:hover > .cat-panel { display: block; }
.panel-grid { display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)); gap: 2px 10px; }
.panel-grid a {
    font-size: 13px; color: var(--brand-body); text-decoration: none;
    padding: 6px 8px; border-radius: 6px; white-space: nowrap;
}
.panel-grid a:hover { background: var(--brand-soft); color: var(--brand-deep); }
.panel-all {
    display: block; margin-top: 10px; padding-top: 10px; border-top: 0.5px solid var(--card-border);
    font-size: 13px; color: var(--brand); text-decoration: none;
}
.panel-all:hover { color: var(--brand-deep); }

/* More 菜单：列出剩余分类，悬停分类在右侧展开品牌面板 */
.more-menu {
    display: none; position: absolute; top: 100%; left: 0; z-index: 1060;
    background: #fff; border: 0.5px solid var(--card-border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card); padding: 8px; min-width: 230px;
}
.nav-cat:hover > .more-menu { display: block; }
.more-cat { position: relative; }
.more-cat > a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; border-radius: 8px; font-size: 14px;
    color: var(--brand-body); text-decoration: none;
}
.more-cat > a:hover { background: var(--brand-soft); color: var(--brand-deep); }
.more-cat .cat-panel { top: -8px; left: 100%; margin-left: 6px; min-width: 360px; }

/* 首页分类/品牌胶囊行（导航栏已有同功能入口，首页保留作快捷入口） */
.chip {
    display: inline-flex; align-items: center; gap: 4px;
    border: 0.5px solid var(--card-border); background: #fff;
    padding: 6px 14px; border-radius: 99px; font-size: 13px;
    color: var(--brand-body); text-decoration: none;
}
.chip:hover { background: var(--brand-soft); color: var(--brand-deep); }
.chip .n { color: var(--brand-muted); font-size: 12px; }

@media (max-width: 991.98px) {
    /* 移动端收起面板：分类直接以链接形式跳转商品页 */
    .cat-panel, .more-menu { display: none !important; }
    .store-menu { flex-direction: column; align-items: stretch; margin-left: 0; }
}

/* ============================================================
   首页"按大类展示商品"：左分类卡 + 右商品横向卡片带
   ============================================================ */
.cat-section { padding-top: 8px; }
.cat-row {
    display: flex; gap: 20px; align-items: stretch;
    background: #fff; border: 0.5px solid var(--card-border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
    padding: 20px; margin-bottom: 18px;
}
.cat-side {
    flex: 0 0 190px; display: flex; flex-direction: column;
    align-items: center; text-align: center; gap: 10px;
    border-right: 0.5px solid var(--card-border); padding-right: 20px;
}
.cat-side-name {
    font-family: var(--font-head); font-size: 16px; font-weight: 600;
    color: var(--brand-text); line-height: 1.3;
}
.cat-side-img img {
    width: 140px; height: 110px; object-fit: cover;
    border-radius: var(--radius); border: 0.5px solid var(--card-border);
    background: #F0F2F7; display: block;
}
.cat-side-count { font-size: 12px; color: var(--brand-muted); }
.btn-viewall {
    padding: 6px 22px; border-radius: 99px; font-size: 13px;
    border: 1px solid var(--brand); color: var(--brand); background: var(--brand-soft);
}
.btn-viewall:hover { background: var(--brand); color: #fff; }

/* 商品横向卡片带：一行约 4 张，超出横向滚动（对齐参考站的轮播布局） */
.cat-strip {
    flex: 1; display: flex; gap: 14px; overflow-x: auto;
    padding-bottom: 6px; scroll-snap-type: x mandatory;
}
.cat-strip::-webkit-scrollbar { height: 6px; }
.cat-strip::-webkit-scrollbar-thumb { background: #DCE3EE; border-radius: 99px; }
.cat-strip::-webkit-scrollbar-track { background: transparent; }
.strip-card {
    flex: 0 0 168px; scroll-snap-align: start;
    background: #fff; border: 0.5px solid var(--card-border);
    border-radius: var(--radius); overflow: hidden; text-decoration: none;
    display: flex; flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}
.strip-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.strip-img-wrap { position: relative; display: block; }
.strip-card img {
    width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #F0F2F7;
}
.strip-badge {
    position: absolute; top: 8px; right: 8px;
    background: var(--brand-soft); color: var(--brand-deep);
    font-size: 10px; font-weight: 600; border-radius: 99px; padding: 2px 8px;
}
.strip-badge.out { background: #F4E8E8; color: #A04545; }
.strip-name {
    font-size: 13px; color: var(--brand-text); padding: 8px 10px 2px;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
    -webkit-line-clamp: 1; -webkit-box-orient: vertical;
}
.strip-price { font-size: 13px; font-weight: 600; color: var(--accent); padding: 0 10px; }
.strip-price del { font-weight: 400; font-size: 11px; color: var(--brand-muted); margin-left: 4px; }
.strip-buy {
    margin: 8px 10px 10px; text-align: center;
    background: var(--brand); color: #fff; font-size: 12px; font-weight: 500;
    border-radius: 99px; padding: 6px 0;
}
.strip-card:hover .strip-buy { background: var(--brand-deep); }

@media (max-width: 767.98px) {
    .cat-row { flex-direction: column; }
    .cat-side { flex: none; border-right: 0; border-bottom: 0.5px solid var(--card-border); padding: 0 0 14px; }
    .cat-strip { flex: none; }
    .strip-card { flex-basis: 150px; }
}

/* ============================================================
   商品详情富文本（后台 TinyMCE 图文混排）
   ============================================================ */
.rich-text { line-height: 1.75; font-size: 14px; color: var(--brand-body); }
.rich-text p { margin: 0 0 10px; }
.rich-text img {
    max-width: 100%; height: auto; border-radius: var(--radius);
    border: 0.5px solid var(--card-border); margin: 8px 0; display: block;
}
.rich-text ul, .rich-text ol { padding-left: 22px; margin: 0 0 10px; }
.rich-text table { border-collapse: collapse; margin: 10px 0; max-width: 100%; }
.rich-text td, .rich-text th { border: 0.5px solid var(--card-border); padding: 6px 10px; }
.rich-text a { color: var(--brand); }
