/* 小鹿灯商助手 — 共用样式 */
/* 星思鹿配色：#00a6aa 青绿 */

:root {
    --primary: #00a6aa;
    --primary-dark: #008a8e;
    --primary-light: #e0f7f7;
    --bg: #f5f5f5;
    --card: #ffffff;
    --text: #333333;
    --text-secondary: #666666;
    --border: #e0e0e0;
    --danger: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 顶部栏 */
.header {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header .back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    padding: 4px 8px;
    cursor: pointer;
    margin-left: -8px;
}

.header h1 {
    font-size: 17px;
    font-weight: 600;
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    margin: 0;
    pointer-events: none;
    z-index: 1;
}

.header {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}

.header .right-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
}

/* 卡片 */
.card {
    background: var(--card);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    width: 100%;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    background: #b0d4d5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.btn-danger {
    background: #fde8e8;
    color: var(--danger);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    width: auto;
}

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

/* 列表 */
.list-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

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

.list-item .title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}

.list-item .subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.list-item .price {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-dark);
}

.list-item .price .unit {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
}

/* 产品搜索结果 */
.product-card {
    background: var(--card);
    border-radius: 12px;
    padding: 14px 16px 8px;
    margin: 0 16px 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.product-card .name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.product-card .brand-model {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.product-card .specs {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 1px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    max-height: 38.4px;
    overflow: hidden;
    word-break: break-all;
}

.product-card .price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #f0f0f0;
    line-height: 1;
}

.product-card .channel-price {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-dark);
}

.product-card .cost-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}

.product-card .inquiry-btn {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: none;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 11px;
    cursor: pointer;
    line-height: 1.4;
}

/* 搜索框 */
.search-box {
    position: sticky;
    top: 48px;
    z-index: 99;
    background: var(--bg);
    padding: 12px 16px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    outline: none;
}

.search-box input:focus {
    box-shadow: 0 1px 8px rgba(0,166,170,0.2);
}

/* 分类标签 */
.cat-tags {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 16px;
    -webkit-overflow-scrolling: touch;
}

.cat-tag {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    background: white;
    border: 1px solid var(--border);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.cat-tag.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.status-badge.pending {
    background: #fef3cd;
    color: #856404;
}

.status-badge.replied {
    background: #d4edda;
    color: #155724;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.disabled {
    background: #f8d7da;
    color: #721c24;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 999;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; }
    100% { opacity: 0; }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 14px;
}

/* 首页轮播 */
.swiper-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin: 12px 16px;
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.swiper-wrapper {
    display: flex;
    flex-wrap: nowrap;
    transition: transform 0.4s ease;
}

.swiper-slide {
    min-width: 100%;
    padding: 24px 20px;
    text-align: center;
}

.swiper-slide .slide-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.swiper-slide .slide-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.swiper-slide .slide-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.swiper-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 0 0 16px;
}

.swiper-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s;
}

.swiper-dot.active {
    background: var(--primary);
    width: 20px;
    border-radius: 4px;
}

/* 首页功能入口 */
.func-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 8px 16px;
}

.func-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 4px 10px;
    text-decoration: none;
    color: var(--text);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.2s;
}

.func-item:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.func-item:active {
    background: #d4e8e8;
    transform: scale(0.96);
}

.func-item .func-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.func-item .func-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* 供应商/联系版块 */
.supplier-section {
    margin: 12px 16px;
}

.supplier-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.supplier-card .name {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 6px;
}

.supplier-card .s-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.contact-row {
    display: flex;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
}

.contact-item {
    flex: 1;
    text-align: center;
    padding: 16px 8px;
    text-decoration: none;
    color: var(--text);
    border-right: 1px solid var(--border);
}

.contact-item:last-child {
    border-right: none;
}

.contact-item:active {
    background: var(--primary-light);
}

.contact-item .c-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.contact-item .c-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 菜单列表（我的页） */

/* 加载 */
.loading {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
}

/* 底部导航（经销商端） */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    border-top: 1px solid var(--border);
    z-index: 100;
}

.bottom-nav a {
    flex: 1;
    text-align: center;
    padding: 8px 0 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
}

.bottom-nav a.active {
    color: var(--primary);
}

.bottom-nav a .nav-icon {
    font-size: 22px;
    display: block;
    margin-bottom: 1px;
}

/* 页面内容留出底部导航空间 */
.page-content {
    padding-bottom: 70px;
}

/* 管理后台表格 */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th, .table td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 12px;
}

/* 响应式 */
@media (min-width: 768px) {
    .container {
        max-width: 480px;
        margin: 0 auto;
    }
}





