/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== 顶部栏 ===== */
.top-bar {
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    padding: 6px 0;
    font-size: 12px;
    color: #666;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-left a,
.top-right a {
    color: #666;
    text-decoration: none;
    margin-left: 15px;
}

.top-left a:hover,
.top-right a:hover {
    color: #c90000;
}

.app-link {
    color: #c90000;
    font-weight: bold;
    margin-left: 15px;
}

/* ===== 头部搜索 ===== */
.main-header {
    background: white;
    padding: 20px 0;
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 55px;
}

.logo-img-wrap {
    width: 50px;
    height: 50px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.logo-text h1 {
    font-size: 20px;
    color: #c90000;
    font-weight: bold;
    line-height: 1.2;
}

.logo-text small {
    color: #999;
    font-size: 11px;
}

/* 搜索区 */
.search-area {
    flex: 1;
    max-width: 520px;
}

.search-box {
    display: flex;
    border: 2px solid #c90000;
    border-radius: 4px;
    overflow: hidden;
}

.search-type {
    padding: 10px 12px;
    border: none;
    border-right: 1px solid #ddd;
    background: #f8f8f8;
    font-size: 13px;
    color: #666;
    outline: none;
    cursor: pointer;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    font-size: 13px;
    outline: none;
}

.search-btn {
    width: 50px;
    background: #c90000;
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

.hot-keywords {
    margin-top: 5px;
    font-size: 11px;
    color: #999;
}

.hot-keywords a {
    color: #999;
    text-decoration: none;
    margin-left: 10px;
}

.hot-keywords a:hover {
    color: #c90000;
}

/* 头部操作按钮 */
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-bulk {
    padding: 10px 20px;
    background: #0056b3;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    font-weight: bold;
}

.btn-bulk:hover {
    background: #004494;
}

.cart-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: #ff9500;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
}

.cart-badge {
    background: white;
    color: #ff9500;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 11px;
}

/* 小程序码 */
.mini-program-qr {
    text-align: center;
    min-width: 70px;
}

.mini-program-qr img {
    width: 60px;
    height: 60px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.mini-program-qr span {
    display: block;
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}

/* ===== 主导航 ===== */
.main-nav {
    background: #2c3e50;
    color: white;
}

.main-nav .container {
    display: flex;
    align-items: center;
}

.category-trigger {
    background: #ffcc00;
    color: #333;
    padding: 14px 25px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 200px;
    font-size: 15px;
}

.nav-links {
    display: flex;
    list-style: none;
    margin-left: 10px;
}

.nav-links li {
    margin-right: 5px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 14px 18px;
    display: block;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255,255,255,0.1);
}

/* ===== 公告栏 ===== */
.notice-bar {
    background: #e8f4fd;
    border-bottom: 1px solid #d0e8f8;
    padding: 10px 0;
    font-size: 12px;
}

.notice-bar .container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notice-icon {
    font-size: 16px;
}

.notice-list {
    list-style: none;
    display: flex;
    gap: 20px;
    color: #0066cc;
}

.notice-list li {
    cursor: pointer;
}

.notice-list li:hover {
    text-decoration: underline;
}

/* ===== 主体内容 ===== */
.main-content {
    padding: 20px 0;
}

/* ===== Hero 三栏区 ===== */
.hero-section {
    display: grid;
    grid-template-columns: 200px 1fr 220px;
    gap: 15px;
    margin-bottom: 20px;
}

/* 左侧分类树 */
.category-sidebar {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

.category-list li {
    padding: 12px 15px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 13px;
}

.category-list li:hover {
    background: #fff8f0;
    color: #c90000;
}

.category-list .cat-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.category-list .arrow {
    margin-left: auto;
    color: #ccc;
    font-size: 14px;
}

/* 轮播区 */
.banner-slider {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    align-items: center;
}

.slide {
    display: none;
    padding: 40px;
    color: white;
    width: 100%;
}

.slide.active {
    display: block;
}

.slide-content h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #ffcc00;
}

.slide-content p {
    font-size: 14px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.slide-btn {
    margin-top: 15px;
    padding: 10px 25px;
    background: #ffcc00;
    color: #333;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}

.slide-btn:hover {
    background: #e6b800;
}

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.slider-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
}

.slider-dots span.active {
    background: #ffcc00;
}

/* 右侧功能区 */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-panel {
    background: white;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.user-avatar {
    font-size: 40px;
    margin-bottom: 8px;
}

.user-panel p {
    color: #666;
    margin-bottom: 12px;
    font-size: 13px;
}

.user-btns {
    display: flex;
    gap: 8px;
}

.btn-login,
.btn-register {
    flex: 1;
    padding: 8px 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    border: none;
}

.btn-register {
    background: #c90000;
    color: white;
}

.btn-login {
    background: white;
    border: 1px solid #ddd;
    color: #666;
}

.quick-quote-btn {
    padding: 12px;
    background: #ff9500;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: bold;
}

.quick-quote-btn.blue {
    background: #0056b3;
}

.quick-quote-btn:hover {
    opacity: 0.9;
}

.service-links {
    display: flex;
    gap: 8px;
}

.service-item {
    flex: 1;
    background: white;
    border-radius: 4px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-size: 12px;
}

.service-item span:first-child {
    font-size: 20px;
    display: block;
    margin-bottom: 4px;
}

/* ===== 快捷入口 ===== */
.quick-entry {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.entry-card {
    background: white;
    border-radius: 4px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.entry-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.entry-img {
    font-size: 32px;
}

.entry-info h3 {
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
}

.entry-info p {
    font-size: 12px;
    color: #999;
}

/* ===== 产品区域 ===== */
.product-section {
    background: white;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.section-tabs {
    display: flex;
    gap: 0;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -12px;
    transition: all 0.3s;
}

.tab.active {
    color: #c90000;
    border-bottom-color: #c90000;
    font-weight: bold;
}

.tab:hover {
    color: #c90000;
}

.more {
    color: #999;
    text-decoration: none;
    font-size: 13px;
}

.more:hover {
    color: #c90000;
}

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 15px;
}

.product-card {
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.product-img {
    height: 140px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 13px;
}

.product-info {
    padding: 12px;
}

.product-info h3 {
    font-size: 13px;
    margin-bottom: 5px;
    color: #333;
    line-height: 1.4;
    height: 36px;
    overflow: hidden;
}

.spec {
    font-size: 11px;
    color: #999;
    margin-bottom: 8px;
}

.product-tags {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.tag {
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 2px;
}

.tag.hot {
    background: #fff0f0;
    color: #c90000;
}

.tag.new {
    background: #f0f8ff;
    color: #0056b3;
}

.tag {
    background: #f5f5f5;
    color: #666;
}

.price {
    color: #c90000;
    font-size: 16px;
    font-weight: bold;
}

.price small {
    font-size: 11px;
    color: #999;
    font-weight: normal;
}

/* ===== 优势展示 ===== */
.advantage-section {
    background: white;
    border-radius: 4px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.advantage-item {
    padding: 20px;
}

.adv-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.advantage-item h3 {
    font-size: 15px;
    margin-bottom: 5px;
    color: #333;
}

.advantage-item p {
    font-size: 12px;
    color: #999;
}

/* ===== 右侧悬浮工具栏 ===== */
.float-toolbar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    border-radius: 4px 0 0 4px;
    z-index: 1000;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 11px;
    color: #666;
    transition: all 0.3s;
}

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

.tool-item:hover {
    background: #fff8f0;
    color: #c90000;
}

.tool-item span:first-child {
    font-size: 18px;
    margin-bottom: 2px;
}

/* ===== 页脚 ===== */
.main-footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 15px;
    margin-bottom: 15px;
    color: #fff;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 13px;
}

.footer-section a:hover {
    color: white;
}

.footer-section p {
    color: #bdc3c7;
    font-size: 13px;
    margin-bottom: 5px;
}

.mp-link {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.mp-link span {
    color: #ffcc00;
    font-weight: bold;
    font-size: 13px;
}

.mp-link small {
    display: block;
    color: #95a5a6;
    font-size: 11px;
    margin-top: 2px;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    color: #95a5a6;
    font-size: 12px;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
    }
    
    .category-sidebar,
    .right-sidebar,
    .mini-program-qr {
        display: none;
    }
    
    .quick-entry {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .advantage-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .float-toolbar {
        display: none;
    }
}

@media (max-width: 640px) {
    .main-header .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-area {
        width: 100%;
        max-width: none;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .nav-links {
        display: none;
    }
    
    .category-trigger {
        width: auto;
        padding: 14px 15px;
    }
    
    .quick-entry {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .advantage-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .notice-list {
        flex-direction: column;
        gap: 5px;
    }
}
