/* ============================================================
   多商户H5商城 - 全局样式
   ============================================================ */

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

/* ============================================================
   皮肤1（默认蓝色） — 蓝橙风格
   ============================================================ */
:root {
    --primary: #4A7AF0;
    --primary-light: #EEF3FE;
    --primary-grad-start: #4A7AF0;
    --primary-grad-end: #6B9CFF;
    --accent: #FF6B00;
    --accent-light: #FFF0E6;
    --danger: #FF4D4F;
    --success: #52C41A;
    --warning: #FAAD14;
    --text-main: #1a1a1a;
    --text-secondary: #666;
    --text-hint: #999;
    --bg-page: #f5f6fa;
    --bg-card: #fff;
    --border: #eee;
    --nav-grad-start: #667eea;
    --nav-grad-end: #764ba2;
    --tab-active: #667eea;
    --header-bg-start: #1a1a2e;
    --header-bg-mid: #16213e;
    --header-bg-end: #0f3460;
    --notice-bg: #FFFBF0;
    --notice-border: #FFE7BA;
    --notice-text: #996600;
    --merchant-header-bg: linear-gradient(180deg, #DCE8FD 0%, #EEF3FE 60%, #f5f6fa 100%);
    --btn-add-cart-bg: #FF9800;
    --btn-buy-now-bg: #4A6BA8;
    --shop-banner-grad: linear-gradient(135deg, #FF6B00 0%, #FF8C42 30%, #FF9D5C 60%, #FFB74D 100%);
    --goods-price: #e03e3e;
    --hot-badge-bg: #FFF1ED;
    --hot-badge-text: #FF4444;
    --hot-section-bg: #FFF8F5;
    --hot-item-border: #FFE8DF;
    --recommend-bg: linear-gradient(180deg, #FFF5F0 0%, #FFF8F5 100%);
}

/* ============================================================
   皮肤2（红色节庆风）— 烟花爆竹喜庆主题
   深红主色 + 金橙强调 + 暗红渐变导航
   ============================================================ */
body.skin-red {
    --primary: #C0392B;
    --primary-light: #FDECEA;
    --primary-grad-start: #C0392B;
    --primary-grad-end: #E74C3C;
    --accent: #E67E22;
    --accent-light: #FEF3E2;
    --danger: #E53935;
    --text-main: #1a0a08;
    --text-secondary: #5a3030;
    --text-hint: #9e7070;
    --bg-page: #FDF5F3;
    --bg-card: #fff;
    --border: #F5E0DC;
    --nav-grad-start: #8B0000;
    --nav-grad-end: #C0392B;
    --tab-active: #C0392B;
    --header-bg-start: #2C0707;
    --header-bg-mid: #5C0E0E;
    --header-bg-end: #8B1A1A;
    --notice-bg: #FFF8E1;
    --notice-border: #F9A825;
    --notice-text: #7B4600;
    --merchant-header-bg: linear-gradient(180deg, #FDECEA 0%, #FEF3F2 60%, #FDF5F3 100%);
    --btn-add-cart-bg: #E67E22;
    --btn-buy-now-bg: #C0392B;
    --shop-banner-grad: linear-gradient(135deg, #8B0000 0%, #C0392B 30%, #E74C3C 60%, #FF6B47 100%);
    --goods-price: #E74C3C;
    --hot-badge-bg: #FDECEA;
    --hot-badge-text: #C0392B;
    --hot-section-bg: #FEF5F3;
    --hot-item-border: #F5E0DC;
    --recommend-bg: linear-gradient(180deg, #FDECEA 0%, #FEF5F3 100%);
}

/* ============================================================
   皮肤3（深色夜间风）— 深色科技主题
   深灰底 + 青蓝主色 + 高对比白文字
   ============================================================ */
body.skin-dark {
    --primary: #4ECDC4;
    --primary-light: rgba(78,205,196,0.15);
    --primary-grad-start: #4ECDC4;
    --primary-grad-end: #44A8A0;
    --accent: #FFD166;
    --accent-light: rgba(255,209,102,0.15);
    --danger: #FF6B6B;
    --success: #6BCB77;
    --warning: #FFD166;
    --text-main: #E8EDF5;
    --text-secondary: #A0ABBE;
    --text-hint: #6B7589;
    --bg-page: #141820;
    --bg-card: #1E2433;
    --border: #2E3650;
    --nav-grad-start: #1A2035;
    --nav-grad-end: #0F1423;
    --tab-active: #4ECDC4;
    --header-bg-start: #0A0D14;
    --header-bg-mid: #0D1220;
    --header-bg-end: #111827;
    --notice-bg: rgba(255,209,102,0.1);
    --notice-border: rgba(255,209,102,0.3);
    --notice-text: #FFD166;
    --merchant-header-bg: linear-gradient(180deg, #1A2A3A 0%, #1E2433 60%, #141820 100%);
    --btn-add-cart-bg: #FFD166;
    --btn-buy-now-bg: #4ECDC4;
    --shop-banner-grad: linear-gradient(135deg, #0D1220 0%, #1A2035 30%, #1E3A4A 60%, #2C4A5A 100%);
    --goods-price: #FFD166;
    --hot-badge-bg: rgba(255,107,107,0.15);
    --hot-badge-text: #FF6B6B;
    --hot-section-bg: rgba(255,107,107,0.06);
    --hot-item-border: #2E3650;
    --recommend-bg: linear-gradient(180deg, rgba(78,205,196,0.08) 0%, rgba(255,107,107,0.04) 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-page);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:active { opacity: 0.7; }

.hidden { display: none !important; }

.app-container {
    max-width: 750px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-page);
}

/* ============ 顶部导航 ============ */
.nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    background: linear-gradient(135deg, var(--nav-grad-start) 0%, var(--nav-grad-end) 100%);
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    color: #fff;
}

.nav-back {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
}

.nav-title {
    font-size: 17px;
    font-weight: 500;
}

.nav-right {
    width: 32px;
}

/* ============ 底部导航 ============ */
.tab-bar {
    display: flex;
    background: #fff;
    border-top: 1px solid var(--border);
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 0 6px;
    color: var(--text-hint);
    font-size: 11px;
    text-decoration: none;
}

.tab-item.active {
    color: var(--primary);
}

.tab-item svg {
    flex-shrink: 0;
}

/* ============ 页面内容 ============ */
.page-content {
    flex: 1;
    overflow-y: auto;
}

/* ============ 认证页面 ============ */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 32px;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg-page) 40%);
}

.auth-logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    width: 72px;
    height: 72px;
    background: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.auth-logo h2 {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-form {
    background: #fff;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.login-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.login-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 15px;
    color: var(--text-hint);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.login-tab.active {
    color: var(--primary);
    font-weight: 500;
}

.login-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

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

.input-wrap {
    display: flex;
    align-items: center;
    background: #f5f6fa;
    border-radius: 10px;
    padding: 0 14px;
    height: 48px;
    border: 1.5px solid transparent;
    transition: border-color 0.2s;
}

.input-wrap:focus-within {
    border-color: var(--primary);
    background: #fff;
}

.input-icon {
    flex-shrink: 0;
    margin-right: 10px;
}

.input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    color: var(--text-main);
    height: 100%;
}

.input-wrap input::placeholder {
    color: var(--text-hint);
}

.sms-btn {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 13px;
    padding: 4px 8px;
    cursor: pointer;
    white-space: nowrap;
}

.sms-btn:disabled {
    color: var(--text-hint);
    cursor: not-allowed;
}

.auth-btn {
    width: 100%;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    display: inline-block;
    text-align: center;
    line-height: 48px;
}

.auth-btn:active {
    opacity: 0.85;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-link a {
    color: var(--primary);
    margin-left: 4px;
}

/* ============ 首页占位 ============ */
.home-banner {
    background: linear-gradient(135deg, var(--primary-grad-start) 0%, var(--primary-grad-end) 100%);
    color: #fff;
    padding: 40px 24px;
    text-align: center;
}

.home-banner h2 {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 8px;
}

.home-banner p {
    font-size: 13px;
    opacity: 0.9;
}

.home-section {
    margin: 16px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
}

.home-section h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
}

.status-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    flex-shrink: 0;
}

.status-dot.active {
    background: var(--success);
}

.user-info-card {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-avatar img,
.avatar-default {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-default {
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 500;
}

.user-meta {
    flex: 1;
}

.user-nickname {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.user-mobile {
    font-size: 13px;
    color: var(--text-hint);
}

.logout-btn {
    font-size: 13px;
    color: var(--danger);
    padding: 6px 14px;
    border: 1px solid var(--danger);
    border-radius: 6px;
}

.auth-prompt {
    text-align: center;
    padding: 20px 0;
}

.auth-prompt p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.auth-prompt .auth-btn {
    width: 200px;
}

/* ============ Toast 提示 ============ */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    max-width: 80%;
    text-align: center;
}

.toast.show {
    opacity: 1;
}

/* ============ 个人中心 ============ */
.profile-page {
    min-height: 100%;
}

.profile-header {
    background: linear-gradient(135deg, var(--primary-grad-start) 0%, var(--primary-grad-end) 100%);
    color: #fff;
    padding: 36px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

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

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 4px;
}

.profile-mobile {
    font-size: 13px;
    opacity: 0.85;
}

.menu-list {
    margin: 16px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    color: var(--text-main);
    font-size: 15px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
}

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

.menu-item:active {
    background: #f5f6fa;
}

.menu-item-logout {
    color: var(--danger);
    justify-content: center;
    margin-top: 24px;
    border-radius: 12px;
    border-bottom: none;
}

.profile-guest {
    text-align: center;
    padding: 80px 32px 40px;
}

.guest-icon {
    color: var(--text-hint);
    margin-bottom: 16px;
}

.guest-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.guest-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    display: inline-block;
    height: 44px;
    line-height: 44px;
    padding: 0 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    border: none;
    transition: opacity 0.2s;
}

.btn:active {
    opacity: 0.85;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

/* ============================================================
   M2 总商城首页 - 介绍页
   ============================================================ */
.mall-home {
    min-height: 100%;
    padding-bottom: 20px;
}

.mall-header {
    background: linear-gradient(135deg, var(--header-bg-start) 0%, var(--header-bg-mid) 50%, var(--header-bg-end) 100%);
    color: #fff;
    padding: 48px 24px 36px;
    text-align: center;
}

.mall-logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 12px;
}

.mall-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 2px;
}

.mall-subtitle {
    font-size: 13px;
    opacity: 0.7;
    letter-spacing: 4px;
}

.intro-section {
    padding: 24px 16px 0;
}

.intro-card {
    background: linear-gradient(135deg, var(--bg-page) 0%, var(--primary-light) 100%);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.intro-card.intro-highlight {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-light) 100%);
    border-left: 4px solid var(--primary);
}

.intro-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.intro-text h3 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 8px;
}

.intro-text p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.intro-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guide-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    position: relative;
}

.guide-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #f5f6fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-card h4 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 3px;
}

.guide-card p {
    font-size: 12px;
    color: var(--text-hint);
    flex: 1;
}

.guide-tag {
    font-size: 11px;
    color: var(--warning);
    background: #FFF7E6;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* 流程说明 */
.process-section {
    padding: 24px 16px 0;
}

.section-title {
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 16px;
    padding-left: 8px;
    border-left: 3px solid var(--primary);
}

.process-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 10px 16px;
    border-radius: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.step-num {
    width: 22px;
    height: 22px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-label {
    font-size: 13px;
    white-space: nowrap;
}

.step-arrow {
    color: #ccc;
    flex-shrink: 0;
}

/* 商家入驻 */
.action-section {
    padding: 24px 16px 0;
}

.action-card {
    background: linear-gradient(135deg, var(--primary-grad-start) 0%, var(--primary-grad-end) 100%);
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    color: #fff;
}

.action-card h3 {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 10px;
}

.action-card p {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn-mall-action {
    display: inline-block;
    background: #fff;
    color: var(--primary);
    padding: 12px 36px;
    border-radius: 22px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

.btn-mall-action:active { opacity: 0.85; }

/* 三栏快捷入口 */
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 4px 0;
}
.action-grid .action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px 16px;
    text-decoration: none;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    transition: transform 0.15s;
}
.action-grid .action-card:active { transform: scale(0.97); }
.action-card .action-icon {
    font-size: 36px;
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,.25);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.action-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: inherit;
    text-align: center;
}
.action-card p {
    font-size: 11px;
    opacity: .8;
    margin-bottom: 10px;
    line-height: 1.35;
    color: inherit;
    text-align: center;
}
.action-card .action-btn {
    font-size: 12px;
    padding: 6px 18px;
    border-radius: 14px;
    background: rgba(255,255,255,.3);
    white-space: nowrap;
}
.action-apply { background: linear-gradient(135deg, var(--primary-grad-start), var(--primary-grad-end)); color: #fff; }
.action-login { background: linear-gradient(135deg, #27AE60, #2ECC71); color: #fff; }
.action-demo { background: linear-gradient(135deg, var(--accent), #ff8533); color: #fff; }

.mall-footer-info {
    text-align: center;
    padding: 40px 16px 20px;
    color: var(--text-hint);
    font-size: 12px;
}

/* ============================================================
   M2 商户首页 - 商品列表
   ============================================================ */
.shop-page {
    min-height: 100%;
    background: var(--bg-page);
}

/* 顶部商户栏 */
.shop-header {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.shop-info {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    flex: 1;
    min-width: 0;
}

.shop-logo {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f6fa;
}

.shop-logo img { width: 100%; height: 100%; object-fit: cover; }

.shop-name {
    font-size: 15px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-contact {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #EEF3FE;
    border-radius: 8px;
    flex-shrink: 0;
    text-decoration: none;
}

/* 公告栏 */
.shop-notice-bar {
    background: var(--notice-bg);
    display: flex;
    align-items: center;
    padding: 8px 16px;
    gap: 8px;
    border-bottom: 1px solid var(--notice-border);
}

.notice-scroll-wrap {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.notice-text {
    display: inline-block;
    animation: scrollText 12s linear infinite;
    font-size: 13px;
    color: var(--notice-text);
}

@keyframes scrollText {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* 筛选栏 */
.filter-bar {
    background: #fff;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: sticky;
    top: 62px; /* shop-header height + border */
    z-index: 80;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-item {
    flex-shrink: 0;
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

.filter-search {
    flex-shrink: 0;
    width: 34px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-hint);
    text-decoration: none;
}

/* 搜索框 */
.search-input {
    background: #fff;
    padding: 8px 16px;
    display: none;
    border-bottom: 1px solid var(--border);
}

.search-input.show { display: block; }
.search-input input {
    width: 100%;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
}
.search-input input:focus { border-color: var(--primary); }

/* 商品网格 - 双列 */
.goods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
}

.goods-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
}

.goods-img {
    position: relative;
    aspect-ratio: 1;
    background: #f5f6fa;
    overflow: hidden;
}

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

.goods-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.goods-tag-new {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #FF6B00;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}

.goods-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.goods-name {
    font-size: 13px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-main);
    font-weight: 400;
}

.goods-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-hint);
}

.goods-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.goods-price {
    color: #E74C3C;
    font-size: 16px;
    font-weight: 600;
}

.goods-add-btn {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.goods-add-btn:active { opacity: 0.75; }

.empty-goods {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-hint);
}

.empty-goods p { margin-top: 12px; }

.load-more-hint {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: var(--text-hint);
}

/* ============================================================
   M2 商户详情页
   ============================================================ */
.merchant-detail {
    min-height: 100%;
    background: var(--bg-page);
}

.merchant-header-bg {
    background: var(--merchant-header-bg);
    padding: 30px 20px 24px;
}

.mh-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mh-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mh-logo img { width: 100%; height: 100%; object-fit: cover; }

.mh-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.mh-name {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mh-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 4px;
    background: #fff;
    flex-shrink: 0;
}

.md-info-list {
    background: #fff;
    margin: 12px 16px;
    border-radius: 12px;
    overflow: hidden;
}

.md-item {
    display: flex;
    align-items: center;
    padding: 16px 16px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

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

.md-item > label {
    width: 72px;
    font-size: 14px;
    color: var(--text-hint);
    flex-shrink: 0;
}

.md-item > value {
    flex: 1;
    font-size: 14px;
    color: var(--text-main);
}

.md-item-address value {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
}

.md-item-clickable { position: relative; }

.md-action-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.md-wx-value { font-family: monospace; font-size: 15px; }

.md-copy-btn {
    flex-shrink: 0;
    padding: 4px 12px;
    font-size: 12px;
    color: var(--primary);
    background: var(--primary-light);
    border: none;
    border-radius: 12px;
    cursor: pointer;
}

.md-notice-box {
    background: #fff;
    margin: 12px 16px;
    border-radius: 12px;
    padding: 16px;
}

.md-notice-box label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 8px;
}

.md-notice-box p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.md-actions {
    display: flex;
    gap: 12px;
    padding: 24px 16px;
}

.btn-md-primary,
.btn-md-outline {
    flex: 1;
    height: 46px;
    line-height: 46px;
    text-align: center;
    border-radius: 23px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    display: block;
}

.btn-md-primary {
    background: var(--primary);
    color: #fff;
}

.btn-md-outline {
    background: #fff;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

/* 空状态页 */
.empty-page {
    text-align: center;
    padding: 120px 32px 60px;
}

.empty-icon { margin-bottom: 16px; color: #ddd; }

.empty-page p {
    font-size: 15px;
    color: var(--text-hint);
}

/* ============================================================
   M3 商品详情页
   ============================================================ */
.goods-detail { min-height: 100%; background: var(--bg-page); }

/* 商品不存在提示 */
.detail-error {
    text-align: center; padding: 100px 32px; color: var(--text-hint);
}
.detail-error .error-icon { font-size: 48px; margin-bottom: 16px; }
.detail-error p { font-size: 15px; margin-bottom: 24px; }
.btn-back {
    display: inline-block; padding: 10px 28px; background: var(--primary); color: #fff;
    border-radius: 20px; text-decoration: none; font-size: 14px;
}
.btn-back:active { opacity: 0.85; }

/* 图片轮播 */
.gd-swiper {
    position: relative; width: 100%; aspect-ratio: 1 / 1; background: #000; overflow: hidden;
}
.swiper-container {
    width: 100%; height: 100%; display: flex; transition: transform 0.3s ease;
}
.swiper-slide {
    min-width: 100%; height: 100%; display: none; align-items: center; justify-content: center;
}
.swiper-slide.active { display: flex; }
.swiper-img {
    width: 100%; height: 100%; object-fit: contain; cursor: pointer;
}
.swiper-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: #1a1a2e; color: #555; font-size: 14px;
}
/* 圆点指示器 */
.swiper-dots {
    position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 5;
}
.dot {
    width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.45);
    transition: all 0.25s; cursor: pointer;
}
.dot.active { width: 18px; border-radius: 4px; background: #fff; }
/* 轮播计数 */
.swiper-count {
    position: absolute; top: 12px; right: 12px; z-index: 5;
    background: rgba(0,0,0,0.45); color: #fff; font-size: 11px;
    padding: 3px 8px; border-radius: 10px;
}

/* 价格栏 */
.gd-price-bar {
    background: #fff; padding: 14px 16px 12px;
}
.price-row {
    display: flex; align-items: baseline; gap: 2px; margin-bottom: 8px;
}
.price-symbol {
    font-size: 20px; color: #E74C3C; font-weight: 600;
}
.price-num {
    font-size: 30px; color: #E74C3C; font-weight: 700; line-height: 1.1;
}
.goods-name {
    font-size: 15px; color: var(--text-main); line-height: 1.4;
}

/* 信息栏 - 含量/规格/库存/销量/数量 */
.gd-info-bar {
    background: #fff; margin-top: 1px; padding: 14px 16px;
}
.info-spec { margin-bottom: 12px; }
.spec-item {
    display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-main); margin-bottom: 6px;
}
.spec-item:last-child { margin-bottom: 0; }
.spec-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #36A3F5; flex-shrink: 0; display: inline-block;
}
.info-stock-row {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
}
.stock-item {
    font-size: 13px; color: var(--text-secondary);
}
.stock-item strong { color: var(--text-main); font-weight: 500; }
/* 数量选择器 */
.quantity-selector {
    display: flex; align-items: center; gap: 6px; margin-left: auto;
}
.qty-label { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.qty-box {
    display: flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
}
.qty-btn {
    width: 30px; height: 30px; border: none; background: #f8f9fa; color: var(--text-main);
    font-size: 17px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.qty-btn:active { background: #e8eaed; }
.qty-input {
    width: 42px; height: 30px; text-align: center; border: none; border-left: 1px solid var(--border);
    border-right: 1px solid var(--border); font-size: 14px; outline: none; color: var(--text-main);
    -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* 效果视频 + 二维码区域 */
.gd-media-section {
    background: #fff; margin-top: 10px; padding: 14px 16px;
}
.media-row {
    display: flex; gap: 12px; margin-top: 10px;
}
/* 视频播放框 */
.video-box {
    flex: 1; min-width: 0; aspect-ratio: 4/3; max-width: 220px;
    background: #111; border-radius: 8px; overflow: hidden; position: relative;
}
.video-player {
    width: 100%; height: 100%; object-fit: cover; display: none; /* 默认隐藏，点击后显示 */
}
.video-play-btn {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 8px; cursor: pointer; z-index: 3;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.35) 100%);
    color: rgba(255,255,255,0.85); transition: opacity 0.2s;
}
.video-play-btn span { font-size: 11px; letter-spacing: 1px; }
.video-play-btn:hover { opacity: 0.8; }
/* 视频为空时 */
.video-empty {
    width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center;
    justify-content: center; background: #1a1a2e; color: #555; gap: 6px;
}
.video-empty-text { font-size: 12px; text-align: center; line-height: 1.5; }
.video-empty-hint { font-size: 11px; opacity: 0.55; }

/* 二维码区域 */
.qrcode-box {
    width: 110px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.qrcode-img {
    width: 90px; height: 90px; border: 1px solid var(--border); border-radius: 6px;
    object-fit: cover; cursor: pointer; padding: 3px; background: #fff;
}
.qrcode-img:active { transform: scale(1.05); }
.qrcode-link-img {
    width: 90px; height: 90px; border: 1px solid var(--border); border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    background: #f8f9fa; text-decoration: none;
}
.qrcode-url-text {
    font-size: 12px; color: var(--primary); text-align: center; line-height: 1.3;
}
.qrcode-empty {
    width: 90px; height: 90px; border: 1px dashed #ddd; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: #ccc;
}
.qrcode-hint { font-size: 11px; color: var(--text-hint); }
.qrcode-view-btn {
    display: inline-block; padding: 3px 12px; font-size: 11px;
    background: var(--primary-light); color: var(--primary); border-radius: 10px;
    text-decoration: none; white-space: nowrap;
}
.qrcode-view-btn:active { opacity: 0.75; }

/* 商品简介 */
.gd-content-section {
    background: #fff; margin-top: 10px; padding: 14px 16px;
}
.content-body {
    font-size: 13px; color: var(--text-secondary); line-height: 1.75;
    min-height: 60px;
}
.content-empty { color: #ccc; font-size: 13px; }

/* 底部占位 */
.bottom-space { height: 64px; }

/* 底部操作栏（固定） */
.gd-bottom-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: #fff; display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}
.bottom-nav { display: flex; gap: 4px; }
.nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 10px; text-decoration: none; color: var(--text-hint); font-size: 10px;
    min-width: 52px; transition: color 0.15s;
}
.nav-item:active { color: var(--primary); }
.bottom-actions { display: flex; gap: 10px; }
.btn-add-cart {
    padding: 0 20px; height: 40px; line-height: 40px; border-radius: 20px;
    background: var(--btn-add-cart-bg); color: #fff; border: none; font-size: 14px; font-weight: 500;
    cursor: pointer; white-space: nowrap;
}
.btn-add-cart:active { opacity: 0.8; }
.btn-buy-now {
    padding: 0 20px; height: 40px; line-height: 40px; border-radius: 20px;
    background: var(--btn-buy-now-bg); color: #fff; border: none; font-size: 14px; font-weight: 500;
    cursor: pointer; white-space: nowrap;
}
.btn-buy-now:active { opacity: 0.8; }

/* 图片预览弹窗 */
.image-preview-overlay {
    position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.92);
    display: flex; align-items: center; justify-content: center;
}
.image-preview-overlay img {
    max-width: 95%; max-height: 95vh; object-fit: contain;
}
.qrcode-preview-inner {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.qrcode-preview-inner img {
    max-width: 280px; max-height: 280px; border: 4px solid #fff; border-radius: 8px;
}
.qrcode-preview-tip {
    color: rgba(255,255,255,0.65); font-size: 12px; text-align: center;
}

/* ============================================================
   深色皮肤（skin-dark）专用覆盖
   将大量硬编码 #fff / #f5f6fa 等浅色改为深色
   ============================================================ */
body.skin-dark .auth-form,
body.skin-dark .home-section,
body.skin-dark .menu-list,
body.skin-dark .goods-card,
body.skin-dark .md-info-list,
body.skin-dark .md-notice-box,
body.skin-dark .gd-price-bar,
body.skin-dark .gd-info-bar,
body.skin-dark .gd-media-section,
body.skin-dark .gd-content-section,
body.skin-dark .gd-bottom-bar,
body.skin-dark .shop-header,
body.skin-dark .filter-bar,
body.skin-dark .step-item {
    background: var(--bg-card);
    color: var(--text-main);
}
body.skin-dark .input-wrap {
    background: #252D40;
    border-color: var(--border);
}
body.skin-dark .input-wrap:focus-within {
    background: #2A3450;
    border-color: var(--primary);
}
body.skin-dark .input-wrap input {
    color: var(--text-main);
}
body.skin-dark .auth-form {
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}
body.skin-dark .search-input {
    background: var(--bg-card);
}
body.skin-dark .search-input input {
    background: #252D40;
    border-color: var(--border);
    color: var(--text-main);
}
body.skin-dark .goods-img {
    background: #252D40;
}
body.skin-dark .goods-no-img svg { stroke: #4A5568; }
body.skin-dark .shop-contact {
    background: var(--primary-light);
}
body.skin-dark .qty-btn {
    background: #252D40;
    color: var(--text-main);
}
body.skin-dark .qty-btn:active { background: #2A3450; }
body.skin-dark .qty-input {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text-main);
}
body.skin-dark .video-empty,
body.skin-dark .swiper-placeholder {
    background: #0D1220;
}
body.skin-dark .qrcode-link-img {
    background: #252D40;
}
body.skin-dark .tab-bar-new {
    background: var(--bg-card);
    border-top-color: var(--border);
}
body.skin-dark .filter-item.active {
    background: var(--primary-light);
    color: var(--primary);
}
body.skin-dark .btn-add-cart { color: #1a1a1a; }
body.skin-dark .btn-buy-now { color: #1a1a1a; }

/* ============================================================
   红色皮肤（skin-red）专用覆盖
   ============================================================ */
body.skin-red .intro-card {
    background: linear-gradient(135deg, #FFF9F8 0%, #FDECEA 100%);
}
body.skin-red .goods-add-btn {
    background: var(--primary);
}
body.skin-red .btn-buy-now {
    background: linear-gradient(135deg, #8B0000, #C0392B);
}
