/* ==========================================================================
   chenrise辰光启瑞商城 - 前台样式（仿淘宝电脑版）
   ========================================================================== */
:root {
    --tb-orange: #ff5000;
    --tb-orange-dark: #e64600;
    --tb-orange-light: #fff3ed;
    --tb-text: #3c3c3c;
    --tb-text-sub: #666;
    --tb-gray: #999;
    --tb-border: #ebebeb;
    --tb-bg: #f4f4f4;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 12px;
    color: var(--tb-text);
    background: var(--tb-bg);
    line-height: 1.5;
}

a { color: var(--tb-text); text-decoration: none; transition: color .15s; }
a:hover { color: var(--tb-orange); }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
em, i { font-style: normal; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; outline: none; }

.container { width: 1190px; margin: 0 auto; }
.tb-sep { color: #ddd; margin: 0 6px; }

/* ---------- 顶部工具条 ---------- */
.tb-topbar { background: #f7f7f7; border-bottom: 1px solid var(--tb-border); height: 34px; }
.tb-topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.tb-topbar a { margin-left: 12px; color: var(--tb-text-sub); }
.tb-topbar a:first-child { margin-left: 0; }
.tb-topbar-left { display: flex; align-items: center; }
.tb-loc { color: var(--tb-text-sub); padding-right: 12px; }
.tb-loc::after { content: " ∨"; color: var(--tb-gray); }
.tb-greet { color: var(--tb-orange); margin-right: 12px; }
.tb-topbar-right { display: flex; align-items: center; }
.tb-topbar-right a:first-child { color: var(--tb-orange); }

/* ---------- 头部（logo/搜索/购物车） ---------- */
.tb-header { background: #fff; padding: 18px 0; }
.tb-header-inner { display: flex; align-items: center; }

.tb-logo {
    font-size: 30px; font-weight: 700; color: var(--tb-orange);
    letter-spacing: -1px; width: 300px; line-height: 1; flex: none;
    white-space: nowrap;
}
.tb-logo em { font-size: 15px; font-weight: 500; margin-left: 4px; color: #ff7b3d; }
.tb-logo:hover { color: var(--tb-orange-dark); }

.tb-search { flex: 1; padding: 0 40px; }
.tb-search-box { display: flex; border: 3px solid var(--tb-orange); border-radius: 20px; overflow: hidden; height: 38px; background: #fff; }
.tb-search-box input { flex: 1; border: 0; padding: 0 16px; font-size: 13px; color: var(--tb-text); background: transparent; }
.tb-search-box button {
    width: 96px; border: 0; background: var(--tb-orange); color: #fff;
    font-size: 15px; font-weight: 700; letter-spacing: 2px; border-radius: 0 17px 17px 0;
}
.tb-search-box button:hover { background: var(--tb-orange-dark); }
.tb-search-hot { margin-top: 8px; padding-left: 4px; color: var(--tb-gray); }
.tb-search-hot a { margin-right: 14px; color: var(--tb-gray); }

.tb-cart {
    position: relative; width: 150px; height: 40px; line-height: 40px; text-align: center;
    border: 1px solid var(--tb-border); background: #fafafa; border-radius: 20px;
    color: var(--tb-text-sub); font-size: 13px;
}
.tb-cart:hover { color: var(--tb-orange); }
.tb-cart-ico { margin-right: 6px; }
.tb-cart-num {
    position: absolute; top: -6px; right: 12px; min-width: 18px; height: 18px; line-height: 18px;
    background: var(--tb-orange); color: #fff; border-radius: 9px; font-size: 11px; padding: 0 5px;
}

/* ---------- 主导航 ---------- */
.tb-nav { background: var(--tb-orange); }
.tb-nav-inner { display: flex; align-items: center; height: 40px; }
.tb-nav-inner > a {
    color: #fff; font-size: 15px; font-weight: 700; padding: 0 22px; line-height: 40px;
}
.tb-nav-inner > a:hover, .tb-nav-inner > a.active { background: rgba(0,0,0,.14); color: #fff; }
.tb-nav-right { margin-left: auto; color: rgba(255,255,255,.85); padding-right: 6px; }

/* ---------- 首页首屏（分类 + banner） ---------- */
.tb-hero { display: flex; gap: 12px; margin-top: 12px; }
.tb-cate { width: 220px; background: #fff; border: 1px solid var(--tb-border); }
.tb-cate h3 { font-size: 14px; padding: 12px 16px; border-bottom: 1px solid var(--tb-border); color: var(--tb-text); }
.tb-cate li a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 16px; font-size: 13px; border-bottom: 1px dashed #f2f2f2;
}
.tb-cate li a:hover { background: var(--tb-orange-light); color: var(--tb-orange); padding-left: 20px; }
.tb-cate li a span { color: #ccc; }

.tb-banner { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.tb-banner-main {
    flex: 1; min-height: 190px; border-radius: 6px; padding: 40px 44px; color: #fff;
    background: linear-gradient(115deg, #ff6a00 0%, #ff3d00 55%, #ff9500 100%);
    position: relative; overflow: hidden;
}
.tb-banner-main::after {
    content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px;
    border-radius: 50%; background: rgba(255,255,255,.13);
}
.tb-banner-main::before {
    content: ""; position: absolute; right: 80px; bottom: -90px; width: 200px; height: 200px;
    border-radius: 50%; background: rgba(255,255,255,.1);
}
.tb-banner-main h2 { font-size: 32px; letter-spacing: 2px; margin-bottom: 10px; }
.tb-banner-main p { font-size: 14px; opacity: .92; margin-bottom: 22px; }
.tb-banner-btn {
    display: inline-block; background: #fff; color: var(--tb-orange);
    padding: 9px 26px; border-radius: 20px; font-size: 14px; font-weight: 700;
}
.tb-banner-btn:hover { color: var(--tb-orange-dark); }
.tb-banner-sub { display: flex; gap: 12px; }
.tb-banner-sub > div {
    flex: 1; background: #fff; border: 1px solid var(--tb-border); border-radius: 6px;
    padding: 14px 20px; display: flex; align-items: baseline; gap: 8px;
}
.tb-banner-sub strong { font-size: 24px; color: var(--tb-orange); }
.tb-banner-sub span { color: var(--tb-gray); font-size: 13px; }

/* ---------- 通用区块 ---------- */
.tb-section { margin-top: 26px; }
.tb-section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    border-bottom: 2px solid var(--tb-orange); padding-bottom: 8px; margin-bottom: 14px;
}
.tb-section-head h2 { font-size: 18px; font-weight: 700; }
.tb-section-head h2::before {
    content: ""; display: inline-block; width: 4px; height: 16px; background: var(--tb-orange);
    margin-right: 8px; vertical-align: -2px; border-radius: 2px;
}
.tb-section-tip { color: var(--tb-gray); font-size: 12px; }

/* ---------- 店铺卡片 ---------- */
.tb-shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tb-shop-card {
    background: #fff; border: 1px solid var(--tb-border); border-radius: 6px;
    padding: 20px 16px 14px; text-align: center; transition: all .18s;
}
.tb-shop-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.09); border-color: #ffd4bd; }
.tb-shop-avatar {
    width: 62px; height: 62px; margin: 0 auto 12px; border-radius: 50%;
    background: linear-gradient(135deg, #ff7a2d, #ff3d00); color: #fff;
    font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.tb-shop-name { font-size: 15px; font-weight: 700; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-shop-notice {
    color: var(--tb-gray); font-size: 12px; height: 34px; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 10px;
}
.tb-shop-meta {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px dashed var(--tb-border); padding-top: 10px; color: var(--tb-gray); font-size: 12px;
}
.tb-shop-meta b { color: var(--tb-orange); }
.tb-shop-enter { color: var(--tb-orange); font-weight: 700; }

/* ---------- 商品卡片 ---------- */
.tb-product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tb-product-grid-4 { grid-template-columns: repeat(4, 1fr); }
.tb-product-card {
    background: #fff; border: 1px solid #fff; border-radius: 6px; overflow: hidden;
    transition: all .18s; display: block;
}
.tb-product-card:hover { border-color: var(--tb-orange); box-shadow: 0 6px 18px rgba(255,80,0,.14); }
.tb-product-img { background: #fff; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; padding: 8px; }
.tb-product-img img { width: 100%; height: 100%; object-fit: contain; }
.tb-product-title {
    font-size: 13px; line-height: 20px; height: 40px; padding: 0 10px; color: var(--tb-text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tb-product-bottom { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 10px 4px; }
.tb-product-sale { color: var(--tb-gray); font-size: 12px; }
.tb-product-shop { padding: 0 10px 10px; color: var(--tb-gray); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-product-foot {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 10px 10px; color: var(--tb-gray); font-size: 12px;
}
.tb-product-buy { color: var(--tb-orange); font-weight: 700; }

.tb-price { color: var(--tb-orange); font-size: 18px; font-weight: 700; }
.tb-price em { font-size: 12px; margin-right: 1px; }
.tb-price-xl { font-size: 30px; }
.tb-price-xl em { font-size: 16px; }

/* ---------- 面包屑 ---------- */
.tb-crumb { padding: 14px 0 4px; color: var(--tb-gray); font-size: 12px; }
.tb-crumb a { color: var(--tb-gray); }
.tb-crumb a:hover { color: var(--tb-orange); }
.tb-crumb span { margin: 0 6px; }
.tb-crumb em { color: var(--tb-text); }

/* ---------- 店铺头部 ---------- */
.tb-shophead {
    display: flex; align-items: center; gap: 20px; background: #fff;
    border: 1px solid var(--tb-border); border-radius: 6px; padding: 22px 26px; margin-top: 8px;
}
.tb-shophead-avatar {
    width: 86px; height: 86px; border-radius: 50%; flex: none;
    background: linear-gradient(135deg, #ff7a2d, #ff3d00); color: #fff;
    font-size: 34px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.tb-shophead-info { flex: 1; }
.tb-shophead-info h1 { font-size: 22px; margin-bottom: 6px; }
.tb-shophead-notice { color: var(--tb-gray); margin-bottom: 10px; }
.tb-shophead-stats { display: flex; gap: 26px; color: var(--tb-gray); }
.tb-shophead-stats b { color: var(--tb-orange); margin-left: 4px; }
.tb-shophead-actions { display: flex; gap: 10px; }

/* ---------- 筛选条 ---------- */
.tb-filter {
    display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--tb-border);
    border-radius: 6px; margin: 14px 0; padding: 0 6px; height: 44px;
}
.tb-filter a { padding: 0 18px; line-height: 44px; color: var(--tb-text-sub); font-size: 13px; }
.tb-filter a.active { color: var(--tb-orange); font-weight: 700; }
.tb-filter-right { margin-left: auto; color: var(--tb-gray); padding-right: 12px; }
.tb-filter-right b { color: var(--tb-orange); }

/* ---------- 商品详情 ---------- */
.tb-detail { display: flex; gap: 30px; background: #fff; border: 1px solid var(--tb-border); border-radius: 6px; padding: 24px; }
.tb-detail-gallery { width: 400px; flex: none; }
.tb-gallery-main { width: 400px; height: 400px; border: 1px solid var(--tb-border); display: flex; align-items: center; justify-content: center; padding: 10px; }
.tb-gallery-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tb-gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.tb-gallery-thumbs span { width: 58px; height: 58px; border: 2px solid var(--tb-border); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tb-gallery-thumbs span.active { border-color: var(--tb-orange); }
.tb-gallery-thumbs img { max-width: 100%; max-height: 100%; object-fit: contain; }

.tb-detail-main { flex: 1; min-width: 0; }
.tb-detail-title { font-size: 20px; line-height: 30px; font-weight: 700; }
.tb-detail-sub { color: var(--tb-gray); margin: 6px 0 16px; }

.tb-detail-pricebox { background: var(--tb-orange-light); border-radius: 6px; padding: 16px 20px; }
.tb-detail-price { display: flex; align-items: center; gap: 14px; }
.tb-detail-price-label { color: var(--tb-gray); }
.tb-detail-extra { display: flex; gap: 30px; margin-top: 12px; color: var(--tb-gray); }
.tb-detail-extra b { color: var(--tb-text); margin-left: 4px; }

.tb-detail-attrs { margin: 18px 0; }
.tb-detail-attrs li { display: flex; align-items: center; margin-bottom: 12px; }
.tb-attr-label { width: 70px; color: var(--tb-gray); flex: none; }
.tb-attr-shop { color: var(--tb-orange); font-weight: 700; }
.tb-attr-warn { color: #e64600; }
.tb-attr-warn::before { content: "●"; font-size: 8px; margin-right: 5px; }

.tb-detail-qty { display: flex; align-items: center; margin-bottom: 20px; }
.tb-qty { display: flex; border: 1px solid var(--tb-border); height: 32px; }
.tb-qty button { width: 32px; border: 0; background: #fafafa; font-size: 16px; color: var(--tb-text-sub); }
.tb-qty button:hover { color: var(--tb-orange); }
.tb-qty input { width: 54px; border: 0; border-left: 1px solid var(--tb-border); border-right: 1px solid var(--tb-border); text-align: center; font-size: 14px; }
.tb-stock-tip { margin-left: 12px; color: var(--tb-gray); }

.tb-buy-actions { display: flex; gap: 12px; }

.tb-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 42px; padding: 0 30px; border: 0; border-radius: 22px;
    font-size: 16px; font-weight: 700; transition: all .15s;
}
.tb-btn-buy { background: var(--tb-orange); color: #fff; min-width: 150px; box-shadow: 0 4px 12px rgba(255,80,0,.35); }
.tb-btn-buy:hover { background: var(--tb-orange-dark); }
.tb-btn-cart { background: #ffedd8; color: #c94100; }
.tb-btn-cart:hover { background: #ffe1c0; }
.tb-btn-plain { background: #fff; border: 1px solid var(--tb-border); color: var(--tb-text-sub); font-weight: 500; font-size: 14px; }
.tb-btn-plain:hover { border-color: var(--tb-orange); color: var(--tb-orange); }
.tb-btn-orange { background: var(--tb-orange); color: #fff; }
.tb-btn-orange:hover { background: var(--tb-orange-dark); color: #fff; }

/* ---------- 详情选项卡 ---------- */
.tb-tabs { background: #fff; border: 1px solid var(--tb-border); border-radius: 6px; margin-top: 16px; }
.tb-tabs-head { display: flex; border-bottom: 1px solid var(--tb-border); padding-left: 10px; }
.tb-tabs-head a {
    padding: 0 24px; line-height: 46px; font-size: 14px; color: var(--tb-text-sub); position: relative;
}
.tb-tabs-head a.active { color: var(--tb-orange); font-weight: 700; }
.tb-tabs-head a.active::after {
    content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 3px; background: var(--tb-orange);
}
.tb-tabs-body { padding: 26px; }
.tb-desc h3 { font-size: 15px; margin-bottom: 10px; }
.tb-desc p { color: var(--tb-text-sub); line-height: 24px; margin-bottom: 10px; }
.tb-desc ul { margin: 12px 0; padding-left: 18px; }
.tb-desc li { color: var(--tb-text-sub); line-height: 26px; list-style: disc; }
.tb-desc-img { margin-top: 16px; width: 520px; }
.tb-desc-img img { width: 100%; border: 1px solid var(--tb-border); }

/* ---------- 空状态 ---------- */
.tb-empty { background: #fff; border: 1px solid var(--tb-border); border-radius: 6px; padding: 50px 0; text-align: center; }
.tb-empty p { font-size: 16px; color: var(--tb-text-sub); margin-bottom: 8px; }
.tb-empty-tip { font-size: 13px; color: var(--tb-gray); }
.tb-empty-page { margin-top: 14px; }

/* ---------- 页脚 ---------- */
.tb-footer { margin-top: 40px; background: #fff; border-top: 1px solid var(--tb-border); padding: 26px 0; text-align: center; }
.tb-footer-links { color: var(--tb-gray); margin-bottom: 10px; }
.tb-footer-links a { color: var(--tb-text-sub); }
.tb-footer-copy { color: var(--tb-gray); }
.tb-footer-copy p { line-height: 22px; }
.tb-footer-beian { margin-top: 4px; }
.tb-footer-beian a { color: var(--tb-gray); margin: 0 7px; }
.tb-footer-beian a:hover { color: var(--tb-orange); }

/* ---------- 弹窗 ---------- */
.tb-modal-mask {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none;
    align-items: center; justify-content: center; z-index: 999;
}
.tb-modal-mask.is-open { display: flex; }
.tb-modal {
    width: 420px; background: #fff; border-radius: 8px; overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,.24); animation: tbPop .18s ease-out;
}
@keyframes tbPop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.tb-modal-head {
    height: 46px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; border-bottom: 1px solid var(--tb-border); font-size: 15px; font-weight: 700;
}
.tb-modal-close { font-size: 20px; color: var(--tb-gray); line-height: 1; }
.tb-modal-close:hover { color: var(--tb-orange); }
.tb-modal-body { padding: 30px 24px; text-align: center; }
.tb-modal-ico {
    width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%;
    background: var(--tb-orange-light); color: var(--tb-orange);
    font-size: 30px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.tb-modal-body p { font-size: 16px; color: var(--tb-text); }
.tb-modal-foot { padding: 0 24px 22px; display: flex; gap: 10px; justify-content: center; }

/* ---------- 轻提示 ---------- */
.tb-toast {
    position: fixed; left: 50%; top: 80px; transform: translateX(-50%);
    background: rgba(0,0,0,.78); color: #fff; padding: 10px 22px; border-radius: 20px;
    font-size: 14px; z-index: 1000; opacity: 0; transition: opacity .2s;
}
.tb-toast.is-show { opacity: 1; }
