/* ============================================================
   智康安商城 H5 — 小米商城式布局 × 2024+ 现代电商视觉
   PC + 移动端响应式（断点 768px），原生 flex/grid
   ============================================================ */

:root {
    /* 品牌色板 */
    --brand: #ff6700;
    --brand-2: #ff7a1a;
    --brand-dark: #f15600;
    --brand-grad: linear-gradient(135deg, #ff7a1a 0%, #ff6700 100%);
    --brand-soft: #fff3eb;
    --brand-soft-2: #ffe8d9;

    /* 中性色 */
    --bg: #f5f6f8;
    --card-bg: #ffffff;
    --text-1: #333333;
    --text-2: #666666;
    --text-3: #b0b0b0;
    --line: #ececec;
    --success: #22c55e;
    --danger: #ef4444;

    /* 圆角体系 */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 18px;
    --r-xl: 20px;
    --r-pill: 999px;

    /* 柔和多层弥散阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 12px rgba(0, 0, 0, .06);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .10);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, .06), 0 16px 40px rgba(0, 0, 0, .12);
    --shadow-bar: 0 -4px 20px rgba(0, 0, 0, .06);

    --header-h: 72px;
    --tabbar-h: 54px;
    --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-style: normal; /* 禁止中文斜体 */
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-1);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 40px; /* 页脚移除后的底部留白（PC） */
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    border: 0;
    vertical-align: middle;
}

ul, ol {
    list-style: none;
}

button {
    font-family: var(--font);
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: var(--font);
    font-size: 14px;
    outline: none;
}

.container {
    max-width: 1226px;
    margin: 0 auto;
    padding: 0 14px;
}

/* ============ 价格 ============ */
.price {
    color: var(--brand);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.price .yen {
    font-size: .68em;
    margin-right: 1px;
    font-weight: 600;
}

.price-del {
    color: var(--text-3);
    text-decoration: line-through;
    font-weight: 400;
    font-size: 12px;
}

/* ============ PC 顶部导航（毛玻璃 sticky） ============ */
.site-header {
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(12px) saturate(1.6);
    -webkit-backdrop-filter: blur(12px) saturate(1.6);
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 12px rgba(0, 0, 0, .04);
}

.header-inner {
    display: flex;
    align-items: center;
    height: var(--header-h);
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo .logo-img {
    height: 30px;
    width: auto;
    display: block;
}

.logo .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-1);
}

.logo .logo-text span {
    color: var(--brand);
}

.search-box {
    flex: 1;
    max-width: 480px;
    display: flex;
    align-items: center;
    background: #f4f4f5;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    overflow: hidden;
    transition: all .2s;
}

.search-box:focus-within {
    background: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.search-box input {
    flex: 1;
    height: 42px;
    padding: 0 18px;
    border: none;
    background: transparent;
}

.search-box button {
    width: 52px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-pill);
    transition: background .2s;
}

.search-box button:hover {
    background: var(--brand-grad);
}

.search-box button:hover svg {
    stroke: #fff;
}

.search-box svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-2);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-shrink: 0;
    margin-left: auto;
}

.header-nav a {
    color: var(--text-2);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color .2s;
    position: relative;
}

.header-nav a:hover {
    color: var(--brand);
}

.header-nav svg {
    width: 20px;
    height: 20px;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -14px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--r-pill);
    background: var(--brand-grad);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(255, 103, 0, .4);
}

/* ============ 移动端顶栏 ============ */
.m-topbar {
    display: none;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 14px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
}

.m-topbar-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.m-topbar .m-logo {
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 700;
}

.m-topbar .m-logo .m-logo-img {
    height: 24px;
    width: auto;
    display: block;
}

.m-topbar .m-logo span span {
    color: var(--brand);
}

.m-search {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f2f3f5;
    border-radius: var(--r-pill);
    height: 36px;
    padding: 0 14px;
    gap: 6px;
    transition: all .2s;
}

.m-search:focus-within {
    background: #fff;
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.m-search svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-3);
    flex-shrink: 0;
}

.m-search input {
    flex: 1;
    border: none;
    background: transparent;
    height: 36px;
    font-size: 13px;
}

/* ============ 移动端底部 TabBar ============ */
.tabbar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, .06);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .06);
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom);
}

.tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-3);
    font-size: 11px;
    position: relative;
    transition: color .2s;
}

.tabbar a svg {
    width: 22px;
    height: 22px;
}

.tabbar a.active {
    color: var(--brand);
    font-weight: 600;
}

.tabbar .t-badge {
    position: absolute;
    top: 4px;
    left: calc(50% + 6px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: var(--r-pill);
    background: var(--brand-grad);
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
}

/* ============ 页脚 ============ */
.site-footer {
    margin-top: 40px;
    padding: 30px 0 76px;
    text-align: center;
    color: var(--text-3);
    font-size: 12px;
    background: transparent;
}

/* ============ 首页 Hero（分类 + banner） ============ */
.hero {
    margin-top: 16px;
    display: flex;
    gap: 16px;
}

.hero-cats {
    width: 234px;
    flex-shrink: 0;
    padding: 12px 8px;
    background: #fff;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.hero-cats a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    margin: 2px 0;
    color: var(--text-1);
    font-size: 14px;
    border-radius: var(--r-sm);
    transition: all .18s;
}

.hero-cats a:hover {
    background: var(--brand-grad);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 103, 0, .3);
}

.hero-cats a .arrow {
    color: var(--text-3);
    font-size: 12px;
}

.hero-cats a:hover .arrow {
    color: #fff;
}

.hero-banner {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.banner-track {
    display: flex;
    height: 100%;
    transition: transform .5s cubic-bezier(.22, .8, .3, 1);
}

.banner-slide {
    min-width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fff3e8, #ffe0c7);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-dots {
    position: absolute;
    bottom: 14px;
    right: 20px;
    display: flex;
    gap: 6px;
    z-index: 5;
}

.banner-dots i {
    width: 8px;
    height: 8px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .55);
    cursor: pointer;
    transition: all .3s;
}

.banner-dots i.on {
    width: 22px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 56px;
    background: rgba(255, 255, 255, .25);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background .2s;
}

.banner-arrow:hover {
    background: rgba(0, 0, 0, .25);
}

.banner-arrow.prev { left: 0; border-radius: 0 var(--r-md) var(--r-md) 0; }
.banner-arrow.next { right: 0; border-radius: var(--r-md) 0 0 var(--r-md); }

/* 移动端分类横滑 */
.m-cat-scroll {
    display: none;
    padding: 12px 14px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.m-cat-scroll::-webkit-scrollbar {
    display: none;
}

.m-cat-scroll a {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    margin-right: 8px;
    background: #fff;
    border-radius: var(--r-pill);
    font-size: 13px;
    color: var(--text-2);
    box-shadow: var(--shadow-sm);
    transition: all .18s;
}

.m-cat-scroll a.active {
    background: var(--brand-grad);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(255, 103, 0, .3);
}

/* ============ 版块标题 ============ */
.section {
    margin-top: 28px;
}

.section-title {
    font-size: 21px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 14px;
    position: relative;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    border-radius: 2px;
    background: var(--brand-grad);
}

.section-title .more {
    font-size: 13px;
    color: var(--text-3);
    font-weight: 400;
    transition: color .2s;
}

.section-title .more:hover {
    color: var(--brand);
}

/* ============ 商品网格 / 卡片 ============ */
.goods-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.goods-card {
    background: var(--card-bg);
    display: block;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .28s cubic-bezier(.22, .8, .3, 1), box-shadow .28s;
}

@media (hover: hover) {
    .goods-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }
}

.goods-card .thumb {
    width: calc(100% - 16px);
    margin: 8px;
    padding-top: calc(100% - 16px);
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f4f4f5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23d4d4d8' stroke-width='3'%3E%3Crect x='10' y='20' width='44' height='34' rx='4'/%3E%3Cpath d='M24 20v-6a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v6'/%3E%3Cpath d='M32 30v14M25 37h14'/%3E%3C/g%3E%3C/svg%3E") center/64px 64px no-repeat;
}

.goods-card .thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s cubic-bezier(.22, .8, .3, 1);
}

@media (hover: hover) {
    .goods-card:hover .thumb img {
        transform: scale(1.03);
    }
}

img.img-hide {
    display: none;
}

.goods-card .info {
    padding: 6px 14px 16px;
    text-align: center;
}

.goods-card .name {
    font-size: 14px;
    color: var(--text-1);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.45;
    min-height: 40px;
}

.goods-card .spec {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.goods-card .price-row {
    margin-top: 8px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.goods-card .price {
    font-size: 19px;
}

/* ============ 商品列表页 ============ */
.glist-layout {
    display: flex;
    gap: 18px;
    margin-top: 20px;
    align-items: flex-start;
}

.glist-side {
    width: 200px;
    flex-shrink: 0;
    background: #fff;
    padding: 12px 8px;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: calc(var(--header-h) + 12px);
}

.glist-side h3 {
    font-size: 15px;
    padding: 8px 14px 12px;
    font-weight: 700;
}

.glist-side a {
    display: block;
    padding: 9px 14px;
    margin: 2px 0;
    color: var(--text-2);
    font-size: 13px;
    border-radius: var(--r-sm);
    transition: all .18s;
}

.glist-side a:hover {
    color: var(--brand);
    background: var(--brand-soft);
}

.glist-side a.active {
    color: #fff;
    background: var(--brand-grad);
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(255, 103, 0, .28);
}

.glist-main {
    flex: 1;
    min-width: 0;
}

.sort-bar {
    background: #fff;
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 50px;
    margin-bottom: 16px;
    gap: 4px;
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-sm);
}

.sort-bar a {
    padding: 7px 16px;
    font-size: 13px;
    color: var(--text-2);
    border-radius: var(--r-pill);
    transition: all .18s;
    display: flex;
    align-items: center;
    gap: 3px;
}

.sort-bar a:hover {
    color: var(--brand);
}

.sort-bar a.active {
    background: var(--brand-grad);
    color: #fff;
    font-weight: 600;
}

.sort-bar .total-hint {
    margin-left: auto;
    color: var(--text-3);
    font-size: 12px;
    padding-right: 8px;
}

/* 分页 */
.pager {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0 10px;
}

.pager a, .pager span {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: var(--r-sm);
    color: var(--text-2);
    font-size: 13px;
    box-shadow: var(--shadow-sm);
    transition: all .18s;
}

.pager a:hover {
    color: var(--brand);
    transform: translateY(-1px);
}

.pager .cur {
    background: var(--brand-grad);
    color: #fff;
    font-weight: 600;
}

.pager .disabled {
    color: var(--text-3);
    background: #fafafa;
    box-shadow: none;
    pointer-events: none;
}

/* ============ 空状态 ============ */
.empty-state {
    text-align: center;
    padding: 70px 20px;
    background: #fff;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.empty-state svg {
    width: 90px;
    height: 90px;
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--text-3);
    font-size: 14px;
    margin-bottom: 18px;
}

/* ============ 按钮（胶囊 + 渐变） ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    padding: 0 30px;
    background: var(--brand-grad);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--r-pill);
    box-shadow: 0 4px 12px rgba(255, 103, 0, .3);
    transition: all .2s;
}

.btn:hover {
    box-shadow: 0 6px 18px rgba(255, 103, 0, .42);
    transform: translateY(-1px);
}

.btn:active {
    transform: scale(.97);
    box-shadow: 0 2px 8px rgba(255, 103, 0, .3);
}

.btn:disabled, .btn.disabled {
    background: #d4d4d8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

.btn-line {
    background: var(--brand-soft);
    color: var(--brand);
    border: none;
    box-shadow: none;
}

.btn-line:hover {
    background: var(--brand-soft-2);
    box-shadow: none;
}

.btn-gray {
    background: #f0f0f2;
    color: var(--text-2);
    box-shadow: none;
}

.btn-gray:hover {
    background: #e6e6e9;
    box-shadow: none;
}

.btn-lg {
    height: 50px;
    font-size: 16px;
    padding: 0 44px;
}

.btn-block {
    width: 100%;
}

/* ============ 商品详情页 ============ */
.detail-layout {
    display: flex;
    gap: 32px;
    background: #fff;
    padding: 28px;
    margin-top: 20px;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm);
}

.detail-gallery {
    width: 460px;
    flex-shrink: 0;
}

.detail-gallery .main-img {
    width: 100%;
    padding-top: 100%;
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: #f4f4f5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23d4d4d8' stroke-width='3'%3E%3Crect x='10' y='20' width='44' height='34' rx='4'/%3E%3Cpath d='M24 20v-6a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v6'/%3E%3Cpath d='M32 30v14M25 37h14'/%3E%3C/g%3E%3C/svg%3E") center/72px 72px no-repeat;
}

.detail-gallery .main-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
}

.gallery-thumbs .t {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border: 2px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer;
    background: #f8f8f9 center/cover no-repeat;
    transition: all .18s;
}

.gallery-thumbs .t.on, .gallery-thumbs .t:hover {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.detail-info {
    flex: 1;
    min-width: 0;
}

.detail-info h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-1);
    line-height: 1.4;
}

.detail-info .sub {
    color: var(--text-3);
    font-size: 13px;
    margin-top: 8px;
}

.detail-price-box {
    background: linear-gradient(135deg, #fff6f0, #fff3eb);
    border-radius: var(--r-md);
    padding: 18px 20px;
    margin-top: 18px;
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.detail-price-box .price {
    font-size: 32px;
}

.detail-price-box .tag {
    background: var(--brand-grad);
    color: #fff;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: var(--r-pill);
}

.detail-row {
    display: flex;
    padding: 14px 0;
    border-bottom: 1px solid #f3f3f4;
    font-size: 14px;
}

.detail-row .label {
    width: 80px;
    color: var(--text-3);
    flex-shrink: 0;
}

.detail-row .value {
    color: var(--text-1);
}

.stock-ok {
    color: var(--success);
}

/* 数量步进器 */
.stepper {
    display: inline-flex;
    align-items: center;
    background: #f4f4f5;
    border-radius: var(--r-pill);
    padding: 2px;
}

.stepper button {
    width: 34px;
    height: 34px;
    font-size: 17px;
    color: var(--text-2);
    background: #fff;
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-sm);
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stepper button:hover {
    color: var(--brand);
}

.stepper button:active {
    transform: scale(.92);
}

.stepper button.disabled {
    color: var(--text-3);
    box-shadow: none;
    background: transparent;
    cursor: not-allowed;
}

.stepper input {
    width: 52px;
    height: 34px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
}

.detail-actions {
    display: flex;
    gap: 14px;
    margin-top: 26px;
}

.detail-actions .btn {
    height: 50px;
    font-size: 16px;
    padding: 0 46px;
}

/* 移动端底部操作栏（小米式） */
.detail-bar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, .05);
    box-shadow: var(--shadow-bar);
    z-index: 210;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}

.detail-bar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-bar .bar-icon {
    width: 52px;
    height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-2);
    gap: 1px;
    position: relative;
}

.detail-bar .bar-icon svg {
    width: 20px;
    height: 20px;
}

.detail-bar .bar-btn {
    flex: 1;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    transition: transform .15s;
}

.detail-bar .bar-btn:active {
    transform: scale(.97);
}

.detail-bar .bar-cart {
    background: linear-gradient(135deg, #ffb020, #ff9500);
    border-radius: var(--r-pill) 0 0 var(--r-pill);
}

.detail-bar .bar-buy {
    background: var(--brand-grad);
    border-radius: 0 var(--r-pill) var(--r-pill) 0;
}

/* 详情 tab */
.detail-tabs {
    margin-top: 20px;
    background: #fff;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.detail-tabs .tab-head {
    display: flex;
    border-bottom: 1px solid #f3f3f4;
    padding: 0 12px;
}

.detail-tabs .tab-head button {
    padding: 15px 24px;
    font-size: 15px;
    color: var(--text-2);
    border-bottom: 2px solid transparent;
    transition: all .18s;
}

.detail-tabs .tab-head button.on {
    color: var(--brand);
    border-bottom-color: var(--brand);
    font-weight: 600;
}

.detail-tabs .tab-body {
    padding: 24px;
}

.rich-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: var(--r-sm);
}

.inst-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
}

.inst-table th, .inst-table td {
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
}

.inst-table tr:last-child th, .inst-table tr:last-child td {
    border-bottom: none;
}

.inst-table th {
    width: 130px;
    background: #fafafa;
    color: var(--text-2);
    font-weight: 500;
    white-space: nowrap;
    border-right: 1px solid var(--line);
}

/* ============ 购物车 ============ */
.cart-wrap {
    margin-top: 20px;
}

.cart-head, .cart-item {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 14px 18px;
}

.cart-head {
    color: var(--text-3);
    font-size: 13px;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    box-shadow: var(--shadow-sm);
}

.cart-item {
    border-bottom: 1px solid #f4f4f5;
}

.cart-item:last-of-type {
    border-bottom: none;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
}

#cartList {
    box-shadow: var(--shadow-sm);
    border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.col-check {
    width: 40px;
    flex-shrink: 0;
}

.col-goods {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.col-price { width: 110px; text-align: center; flex-shrink: 0; }
.col-qty   { width: 140px; text-align: center; flex-shrink: 0; }
.col-sub   { width: 110px; text-align: center; flex-shrink: 0; }
.col-op    { width: 70px;  text-align: center; flex-shrink: 0; }

.checkbox {
    width: 20px;
    height: 20px;
    border: 1.5px solid #d4d4d8;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .18s;
    background: #fff;
}

.checkbox.on {
    background: var(--brand-grad);
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(255, 103, 0, .35);
}

.checkbox svg {
    width: 12px;
    height: 12px;
    stroke: #fff;
    opacity: 0;
    transition: opacity .15s;
}

.checkbox.on svg {
    opacity: 1;
}

.cart-item .g-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: var(--r-sm);
    background: #f4f4f5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23d4d4d8' stroke-width='3'%3E%3Crect x='10' y='20' width='44' height='34' rx='4'/%3E%3Cpath d='M24 20v-6a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v6'/%3E%3Cpath d='M32 30v14M25 37h14'/%3E%3C/g%3E%3C/svg%3E") center/40px 40px no-repeat;
    overflow: hidden;
}

.cart-item .g-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item .g-name {
    font-size: 14px;
    color: var(--text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item .g-spec {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
}

.cart-item.invalid .g-name, .cart-item.invalid .col-price, .cart-item.invalid .col-sub {
    color: var(--text-3);
}

.invalid-tag {
    display: inline-block;
    background: #f4f4f5;
    color: var(--text-3);
    font-size: 11px;
    padding: 2px 10px;
    border-radius: var(--r-pill);
    margin-left: 6px;
}

.del-btn {
    color: var(--text-3);
    font-size: 13px;
    transition: color .15s;
}

.del-btn:hover {
    color: var(--danger);
}

/* 结算栏 */
.cart-bar {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 0 18px;
    height: 62px;
    margin-top: 16px;
    position: sticky;
    bottom: 12px;
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-md);
    z-index: 90;
}

.cart-bar .check-all {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-2);
    cursor: pointer;
}

.cart-bar .bar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-bar .sum {
    font-size: 14px;
    color: var(--text-2);
}

.cart-bar .sum .price {
    font-size: 23px;
}

/* ============ 地址 ============ */
.addr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.addr-card {
    background: #fff;
    padding: 20px;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: all .22s;
    cursor: default;
}

@media (hover: hover) {
    .addr-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }
}

.addr-card.selectable {
    cursor: pointer;
}

.addr-card .a-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.addr-card .a-name {
    font-size: 16px;
    font-weight: 700;
}

.addr-card .a-phone {
    color: var(--text-2);
}

.default-tag {
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: var(--r-pill);
}

.addr-card .a-addr {
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.7;
    min-height: 44px;
}

.addr-card .a-ops {
    display: flex;
    gap: 18px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f4f4f5;
}

.addr-card .a-ops button {
    font-size: 13px;
    color: var(--text-2);
    transition: color .15s;
}

.addr-card .a-ops button:hover {
    color: var(--brand);
}

.addr-card .a-ops .danger:hover {
    color: var(--danger);
}

.addr-add {
    background: #fff;
    border: 1.5px dashed #d4d4d8;
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-3);
    font-size: 14px;
    min-height: 162px;
    cursor: pointer;
    transition: all .2s;
}

.addr-add:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-soft);
}

.addr-add svg {
    width: 30px;
    height: 30px;
}

/* ============ 弹窗 ============ */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(2px);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-mask.show {
    display: flex;
    animation: maskIn .2s ease;
}

@keyframes maskIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box {
    background: #fff;
    width: 100%;
    max-width: 480px;
    max-height: 86vh;
    overflow-y: auto;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #f4f4f5;
    font-size: 16px;
    font-weight: 700;
}

.modal-close {
    font-size: 22px;
    color: var(--text-3);
    line-height: 1;
    transition: color .15s;
}

.modal-close:hover {
    color: var(--text-1);
}

.modal-body {
    padding: 22px;
}

.modal-foot {
    padding: 0 22px 22px;
    display: flex;
    gap: 12px;
}

.form-item {
    margin-bottom: 14px;
}

.form-item label {
    display: block;
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 6px;
}

.form-item input, .form-item textarea {
    width: 100%;
    height: 44px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    background: #fafafa;
    transition: all .18s;
}

.form-item textarea {
    height: 80px;
    padding: 10px 14px;
    resize: none;
}

.form-item input:focus, .form-item textarea:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row .form-item {
    flex: 1;
    min-width: 0;
}

.switch-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-2);
    cursor: pointer;
    user-select: none;
}

.switch-line .checkbox {
    border-radius: 6px;
}

/* ============ 确认订单 ============ */
.confirm-block {
    background: #fff;
    padding: 22px;
    margin-top: 16px;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.confirm-block h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f4f4f5;
}

.addr-pick {
    border: 1.5px dashed var(--brand);
    background: var(--brand-soft);
    border-radius: var(--r-md);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all .18s;
}

.addr-pick:hover {
    background: var(--brand-soft-2);
}

.addr-pick .loc svg {
    width: 26px;
    height: 26px;
    stroke: var(--brand);
}

.addr-pick .info {
    flex: 1;
    min-width: 0;
}

.addr-pick .line1 {
    font-size: 15px;
}

.addr-pick .line1 b {
    margin-right: 12px;
}

.addr-pick .line2 {
    color: var(--text-2);
    font-size: 13px;
    margin-top: 2px;
}

.addr-pick .no-addr {
    color: var(--text-3);
    font-size: 14px;
}

.addr-pick .go {
    color: var(--text-3);
}

.cf-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #f6f6f7;
}

.cf-item:last-child {
    border-bottom: none;
}

.cf-item .g-img {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--r-sm);
    background: #f4f4f5;
    overflow: hidden;
}

.cf-item .g-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cf-item .g-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
}

.cf-item .g-name .spec {
    color: var(--text-3);
    font-size: 12px;
}

.cf-item .g-qty {
    color: var(--text-2);
    width: 60px;
    text-align: center;
    flex-shrink: 0;
}

.cf-item .g-sub {
    width: 100px;
    text-align: right;
    flex-shrink: 0;
}

.amount-lines .row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-2);
}

.amount-lines .row .v {
    color: var(--text-1);
}

.amount-lines .row.free .v {
    color: var(--success);
}

.free-tip {
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 12px;
    padding: 9px 14px;
    border-radius: var(--r-sm);
    margin: 10px 0;
}

.submit-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    background: #fff;
    padding: 12px 18px;
    margin-top: 16px;
    position: sticky;
    bottom: 12px;
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-md);
    z-index: 90;
}

.submit-bar .final {
    font-size: 14px;
    color: var(--text-2);
}

.submit-bar .final .price {
    font-size: 27px;
}

/* ============ 收银台 ============ */
.pay-wrap {
    display: flex;
    justify-content: center;
    padding: 40px 14px;
}

.pay-card {
    background: #fff;
    width: 100%;
    max-width: 460px;
    text-align: center;
    padding: 38px 30px 30px;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-md);
}

.pay-card .pay-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-1);
}

.pay-card .pay-order {
    color: var(--text-3);
    font-size: 12px;
    margin-top: 6px;
}

.pay-card .pay-amount {
    font-size: 40px;
    margin: 18px 0 4px;
}

.qr-box {
    width: 240px;
    height: 240px;
    margin: 20px auto 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #fafafa;
    overflow: hidden;
}

.qr-box img {
    width: 100%;
    height: 100%;
}

.qr-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-2);
    font-size: 14px;
    margin-top: 8px;
}

.qr-tip svg {
    width: 22px;
    height: 22px;
}

.pay-goods {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f4f4f5;
    text-align: left;
    font-size: 13px;
    color: var(--text-2);
}

/* 支付成功动画 */
.pay-success {
    padding: 20px 0 6px;
}

.check-circle {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, #34d399, #22c55e);
    box-shadow: 0 8px 24px rgba(34, 197, 94, .35);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pop .45s cubic-bezier(.22, .8, .3, 1);
}

.check-circle svg {
    width: 44px;
    height: 44px;
    stroke: #fff;
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: draw .5s .3s ease forwards;
}

@keyframes pop {
    0% { transform: scale(.4); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes draw {
    to { stroke-dashoffset: 0; }
}

/* ============ 订单列表 ============ */
.order-tabs {
    background: #fff;
    display: flex;
    margin-top: 16px;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    scrollbar-width: none;
}

.order-tabs::-webkit-scrollbar {
    display: none;
}

.order-tabs a {
    flex: 1;
    min-width: 84px;
    text-align: center;
    padding: 15px 8px;
    font-size: 14px;
    color: var(--text-2);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    position: relative;
    transition: color .18s;
}

.order-tabs a.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
    font-weight: 600;
}

.order-tabs .cnt {
    display: inline-block;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    padding: 0 5px;
    border-radius: var(--r-pill);
    background: #f4f4f5;
    color: var(--text-2);
    font-size: 11px;
    margin-left: 2px;
}

.order-tabs a.active .cnt {
    background: var(--brand-soft);
    color: var(--brand);
}

.order-card {
    background: #fff;
    margin-top: 14px;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow .2s;
}

@media (hover: hover) {
    .order-card:hover {
        box-shadow: var(--shadow-md);
    }
}

.order-card .o-head {
    display: flex;
    align-items: center;
    padding: 13px 18px;
    border-bottom: 1px solid #f4f4f5;
    font-size: 13px;
    color: var(--text-2);
    gap: 16px;
    flex-wrap: wrap;
}

/* 状态徽标：柔和 pill */
.order-card .o-status {
    margin-left: auto;
    color: var(--brand);
    background: var(--brand-soft);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: var(--r-pill);
}

.order-card .o-body {
    display: flex;
    align-items: center;
    padding: 16px 18px;
    gap: 16px;
}

.order-card .o-imgs {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.order-card .o-imgs .im {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: var(--r-sm);
    background: #f4f4f5;
    overflow: hidden;
}

.order-card .o-imgs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-card .o-names {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-card .o-right {
    text-align: right;
    flex-shrink: 0;
}

.order-card .o-right .price {
    font-size: 19px;
}

.order-card .o-right .cnt-t {
    color: var(--text-3);
    font-size: 12px;
}

.order-card .o-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 18px;
    border-top: 1px solid #f6f6f7;
}

.o-btn {
    height: 32px;
    padding: 0 18px;
    font-size: 13px;
    border: none;
    color: var(--text-2);
    background: #f4f4f5;
    border-radius: var(--r-pill);
    transition: all .18s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.o-btn:hover {
    background: var(--brand-soft);
    color: var(--brand);
}

.o-btn:active {
    transform: scale(.96);
}

.o-btn.primary {
    background: var(--brand-grad);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(255, 103, 0, .3);
}

.o-btn.primary:hover {
    box-shadow: 0 5px 14px rgba(255, 103, 0, .4);
}

/* ============ 订单详情 ============ */
.od-banner {
    background: var(--brand-grad);
    color: #fff;
    padding: 36px 26px;
    margin-top: 16px;
    border-radius: var(--r-xl);
    box-shadow: 0 8px 24px rgba(255, 103, 0, .28);
}

.od-banner .st {
    font-size: 26px;
    font-weight: 700;
}

.od-banner .st-sub {
    margin-top: 6px;
    font-size: 13px;
    opacity: .92;
}

.od-block {
    background: #fff;
    padding: 22px;
    margin-top: 14px;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.od-block h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
}

.od-addr {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.od-addr svg {
    width: 22px;
    height: 22px;
    stroke: var(--brand);
    flex-shrink: 0;
    margin-top: 2px;
}

.od-express {
    border: 1px solid #f0f0f1;
    border-radius: var(--r-sm);
    padding: 12px 14px;
    margin-bottom: 10px;
    font-size: 13px;
    background: #fafafa;
}

.od-express .co {
    font-weight: 700;
    margin-right: 10px;
}

.od-express .tm {
    color: var(--text-3);
    font-size: 12px;
    margin-top: 4px;
}

.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 1px;
    background: #f0f0f1;
}

.timeline .tl-item {
    position: relative;
    padding: 6px 0 14px;
    font-size: 13px;
}

.timeline .tl-item::before {
    content: '';
    position: absolute;
    left: -19px;
    top: 12px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d4d4d8;
}

.timeline .tl-item:first-child::before {
    background: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.timeline .tl-act {
    color: var(--text-1);
    font-weight: 600;
}

.timeline .tl-rm {
    color: var(--text-2);
    margin-top: 2px;
}

.timeline .tl-tm {
    color: var(--text-3);
    font-size: 12px;
    margin-top: 2px;
}

.od-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #fff;
    padding: 12px 18px;
    margin-top: 14px;
    position: sticky;
    bottom: 12px;
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-md);
    z-index: 90;
}

/* ============ 登录页 ============ */
.login-wrap {
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 14px;
    background:
        radial-gradient(600px 300px at 15% 10%, rgba(255, 122, 26, .12), transparent 60%),
        radial-gradient(500px 280px at 85% 85%, rgba(255, 103, 0, .1), transparent 60%),
        linear-gradient(180deg, #fff8f2 0%, var(--bg) 65%);
}

.login-card {
    background: #fff;
    width: 100%;
    max-width: 400px;
    padding: 42px 38px;
    border-radius: var(--r-xl);
    box-shadow: 0 12px 48px rgba(255, 103, 0, .1), var(--shadow-md);
}

.login-card .l-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-card .l-logo .l-logo-img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(255, 103, 0, .3);
}

.login-card .l-logo svg {
    width: 52px;
    height: 52px;
}

.login-card .l-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .5px;
    margin-bottom: 4px;
}

.login-card .l-sub {
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
    margin-bottom: 28px;
}

.login-card .form-item input {
    height: 50px;
    font-size: 15px;
    border-radius: 12px;
}

.code-row {
    display: flex;
    gap: 10px;
}

.code-row input {
    flex: 1;
    min-width: 0;
}

.code-btn {
    width: 130px;
    flex-shrink: 0;
    height: 50px;
    border: none;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 13px;
    font-weight: 600;
    border-radius: 12px;
    transition: all .18s;
}

.code-btn:hover {
    background: var(--brand-soft-2);
}

.code-btn:active {
    transform: scale(.97);
}

.code-btn:disabled {
    background: #f4f4f5;
    color: var(--text-3);
    cursor: not-allowed;
    transform: none;
}

.login-tip {
    text-align: center;
    color: var(--text-3);
    font-size: 12px;
    margin-top: 16px;
}

/* ============ 个人中心 ============ */
.uc-card {
    background: var(--brand-grad);
    color: #fff;
    padding: 32px 26px;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 16px;
    border-radius: var(--r-xl);
    box-shadow: 0 8px 24px rgba(255, 103, 0, .28);
}

.uc-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .25);
    border: 2px solid rgba(255, 255, 255, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.uc-avatar svg {
    width: 40px;
    height: 40px;
    stroke: #fff;
}

.uc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uc-card .u-name {
    font-size: 20px;
    font-weight: 700;
}

.uc-card .u-mobile {
    font-size: 13px;
    opacity: .9;
    margin-top: 4px;
}

.uc-order-box {
    background: #fff;
    margin-top: 14px;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.uc-order-box .box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    border-bottom: 1px solid #f4f4f5;
    font-size: 15px;
    font-weight: 700;
}

.uc-order-box .box-head a {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 400;
}

.uc-order-entries {
    display: flex;
    padding: 20px 0;
}

.uc-order-entries a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-2);
    position: relative;
    transition: color .18s;
}

.uc-order-entries a:hover {
    color: var(--brand);
}

.uc-order-entries svg {
    width: 26px;
    height: 26px;
}

.uc-order-entries .b {
    position: absolute;
    top: -6px;
    left: calc(50% + 8px);
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    padding: 0 4px;
    border-radius: var(--r-pill);
    background: var(--brand-grad);
    color: #fff;
    font-size: 11px;
    text-align: center;
}

.uc-menu {
    background: #fff;
    margin-top: 14px;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.uc-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #f6f6f7;
    font-size: 14px;
    transition: background .15s;
}

.uc-menu a:last-child {
    border-bottom: none;
}

.uc-menu a:hover {
    background: #fafafa;
}

.uc-menu a svg {
    width: 20px;
    height: 20px;
    stroke: var(--brand);
}

.uc-menu a .arrow {
    margin-left: auto;
    color: var(--text-3);
}

.uc-menu a .cnt-hint {
    margin-left: auto;
    color: var(--text-3);
    font-size: 12px;
}

.uc-menu a.logout {
    color: var(--danger);
    justify-content: center;
}

/* ============ toast / loading ============ */
.shop-toast {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 22, .82);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 13px 26px;
    border-radius: 16px;
    font-size: 14px;
    z-index: 1000;
    max-width: 80vw;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: toastIn .22s cubic-bezier(.22, .8, .3, 1);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(.96); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.shop-loading {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, .55);
    backdrop-filter: blur(2px);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-loading .spin {
    width: 36px;
    height: 36px;
    border: 3px solid var(--brand-soft-2);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 局部加载占位 */
.block-loading {
    text-align: center;
    padding: 50px 0;
    color: var(--text-3);
    font-size: 13px;
}

.block-loading .spin {
    display: inline-block;
    width: 26px;
    height: 26px;
    border: 3px solid var(--brand-soft-2);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

/* 商品详情-所属商家卡片 */
.merchant-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    padding: 16px 20px;
    margin-top: 16px;
}
.merchant-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
    background: #f7f7f8;
    flex: none;
}
.merchant-info { min-width: 0; }
.merchant-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.merchant-meta {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 4px;
}

/* 商家资质查看按钮 + 弹层 */
.merchant-qual-btn {
    margin-left: auto;
    flex: none;
    border: 1px solid #ffd9c2;
    color: #ff6700;
    background: #fff7f0;
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 12px;
    cursor: pointer;
    transition: background .2s;
}
.merchant-qual-btn:hover { background: #ffead9; }
.qual-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qual-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}
.qual-panel {
    position: relative;
    background: #fff;
    border-radius: var(--r-lg);
    width: min(560px, 92vw);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.qual-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #f4f4f5;
    font-size: 16px;
    font-weight: 600;
    flex: none;
}
.qual-close {
    border: none;
    background: none;
    font-size: 26px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
}
.qual-body {
    padding: 16px 18px;
    overflow-y: auto;
}
.qual-body img {
    width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: 10px;
    margin-bottom: 12px;
    background: #f7f7f8;
}

/* ============ 响应式：移动端 <768px ============ */
@media (max-width: 767px) {
    body {
        padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
    }

    body.no-tabbar {
        padding-bottom: 24px;
    }

    .site-header { display: none; }
    .m-topbar { display: block; }
    .tabbar { display: flex; }
    .site-footer { padding-bottom: 100px; }

    .container { padding: 0 10px; }

    /* 首页 */
    .hero { flex-direction: column; margin-top: 10px; gap: 0; }
    .hero-cats { display: none; }
    .hero-banner { min-height: 0; height: 42vw; border-radius: var(--r-md); }
    .m-cat-scroll { display: block; }
    .section { margin-top: 18px; }
    .section-title { font-size: 18px; padding: 0 4px 0 14px; }

    .goods-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .goods-card { border-radius: var(--r-md); }
    .goods-card .info { padding: 4px 10px 12px; }
    .goods-card .name { font-size: 13px; min-height: 37px; }
    .goods-card .price { font-size: 17px; }

    /* 商品列表 */
    .glist-layout { flex-direction: column; gap: 0; margin-top: 0; }
    .glist-side { display: none; }
    .sort-bar { height: 46px; margin-bottom: 10px; position: sticky; top: 57px; z-index: 80; }

    /* 详情 */
    .detail-layout { flex-direction: column; padding: 0; gap: 0; margin-top: 0; background: transparent; box-shadow: none; }
    .detail-gallery { width: 100%; background: #fff; }
    .detail-gallery .main-img { border-radius: 0; }
    .detail-info { padding: 16px 14px; background: #fff; border-radius: var(--r-lg); margin-top: 10px; box-shadow: var(--shadow-sm); }
    .detail-info h1 { font-size: 19px; }
    .detail-actions { display: none; }
    .detail-bar { display: block; }
    .detail-tabs { margin-top: 10px; }
    .detail-tabs .tab-body { padding: 14px; }
    body.page-detail { padding-bottom: 72px; }

    /* 购物车 */
    .cart-head { display: none; }
    #cartList { border-radius: var(--r-lg); background: #fff; }
    .cart-item { flex-wrap: wrap; padding: 12px; }
    .cart-item:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }
    .cart-item .col-price { display: none; }
    .col-goods { width: calc(100% - 40px); }
    .cart-item .col-qty { width: auto; margin-left: 40px; }
    .cart-item .col-sub { width: auto; margin-left: auto; }
    .cart-item .col-op { width: auto; }
    .cart-bar {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px);
        margin-top: 0;
        height: 54px;
    }
    body.page-cart { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 62px); }

    /* 地址 */
    .addr-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }

    /* 确认订单 */
    .submit-bar { position: fixed; left: 8px; right: 8px; bottom: 8px; }
    body.page-confirm { padding-bottom: 84px; }
    .cf-item .g-sub { width: 76px; }

    /* 收银台 */
    .pay-wrap { padding: 16px 10px; }
    .pay-card { padding: 28px 18px; }

    /* 订单 */
    .od-banner { padding: 26px 18px; margin-top: 10px; }
    .od-actions { position: fixed; left: 8px; right: 8px; bottom: 8px; }
    body.page-order-detail { padding-bottom: 80px; }
    .order-card .o-body { flex-wrap: wrap; }
    .order-card .o-right { width: 100%; text-align: right; }

    /* 登录 */
    .login-wrap {
        min-height: 100vh;
        padding: 0;
        align-items: stretch;
        background: #fff;
    }
    .login-card {
        max-width: none;
        border-radius: 0;
        box-shadow: none;
        padding: 60px 30px;
    }
}

/* 详情页/收银台等隐藏 tabbar 时 */
body.no-tabbar .tabbar { display: none !important; }
body.no-tabbar { padding-bottom: 0; }
