/* 移动优先的基础设置 */
:root {
    --primary-color: #e1251b;
    --secondary-color: #f10215;
    --accent-color: #c81623;
    --background-color: #f0f3f5;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    --header-height: 60px;
    --section-spacing: 15px;
    --container-padding: 15px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 100%;
    padding: 0 var(--container-padding);
    margin: 0 auto;
}

/* 移动端导航 */
.top-bar {
    display: none;
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-header .container {
    display: flex;
    flex-direction: column;
    padding: 10px var(--container-padding);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo-sub {
    display: none;
}

.mobile-nav-toggle {
    font-size: 1.5rem;
    color: var(--text-color);
    background: none;
    border: none;
    cursor: pointer;
}

.search-bar {
    width: 100%;
    display: flex;
    margin: 5px 0;
}

.search-bar input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 0.9rem;
}

.search-bar button {
    width: 50px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 0 4px 4px 0;
    color: var(--white);
}

/* 移动端菜单 */
.category-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 80%;
    height: calc(100vh - var(--header-height));
    background-color: var(--white);
    transition: left 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.category-menu.active {
    left: 0;
}

.category-menu ul {
    list-style: none;
}

.category-menu li {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 主要内容区域 */
.main-content {
    margin-top: calc(var(--header-height) + 10px);
    padding-bottom: 60px;
}

/* Banner区域 */
.banner-slider {
    height: 200px;
    margin-bottom: 15px;
}

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

/* 服务卡片 */
.service-card {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background-color: var(--white);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.service-item {
    text-align: center;
}

.service-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.service-item span {
    font-size: 0.8rem;
    display: block;
    margin-top: 5px;
}

/* 商品展示 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 var(--container-padding);
}

.product-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-info {
    padding: 10px;
}

.product-title {
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: bold;
}

/* 底部导航 */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.8rem;
}

.nav-item i {
    font-size: 1.2rem;
}

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

/* 聊天机器人 */
.chatbot-wrapper {
    position: fixed;
    bottom: 70px;
    right: 15px;
    z-index: 1001;
}

.chat-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border: none;
}

.chat-toggle i {
    font-size: 1.5rem;
}

.chat-label {
    display: none;
}

.chat-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 1002;
    display: none;
}

.chat-container.active {
    display: block;
}

/* 平板端样式 */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .main-header .container {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }
    
    .search-bar {
        max-width: 400px;
        margin: 0;
    }
    
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

/* 桌面端样式 */
@media (min-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .top-bar {
        display: block;
    }
    
    .mobile-nav-toggle {
        display: none;
    }
    
    .category-menu {
        position: static;
        width: 200px;
        height: auto;
    }
    
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .mobile-bottom-nav {
        display: none;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
} 