/* 响应式模板样式 - 紧凑型设计 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    background-color: #f5f5f5;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2px;
}

/* 顶部信息栏 */
.top-bar {
    background: #2c3e50;
    color: #fff;
    font-size: 12px;
    padding: 2px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-left {
    display: flex;
    gap: 2px;
}

.top-left a {
    color: #bdc3c7;
    text-decoration: none;
    padding: 2px 4px;
    transition: color 0.2s;
}

.top-left a:hover {
    color: #fff;
}

.top-right {
    display: flex;
    gap: 2px;
}

/* 搜索区域 */
.search-section {
    background: #fff;
    padding: 2px 0;
    border-bottom: 1px solid #e0e0e0;
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo {
    flex-shrink: 0;
    margin-right: 2px;
}

.logo img {
    height: 40px;
    width: auto;
}

.search-form {
    flex: 1;
    display: flex;
    gap: 2px;
    max-width: 600px;
}

.search-input {
    flex: 1;
    position: relative;
}

.search-input input {
    width: 100%;
    padding: 2px 8px;
    border: 2px solid #3498db;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input input:focus {
    border-color: #2980b9;
}

.search-module {
    position: relative;
    width: 120px;
}

.search-module input {
    width: 100%;
    padding: 2px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    background: #f8f9fa;
    cursor: pointer;
    text-align: center;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
}

.search-dropdown ul {
    list-style: none;
    padding: 2px 0;
}

.search-dropdown li {
    padding: 2px 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-dropdown li:hover {
    background: #f8f9fa;
}

.search-btn {
    flex-shrink: 0;
}

.search-btn input {
    padding: 2px 12px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.search-btn input:hover {
    background: #2980b9;
}

.search-advanced {
    flex-shrink: 0;
    padding: 2px 8px;
    background: #95a5a6;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.search-advanced:hover {
    background: #7f8c8d;
}

/* 导航菜单 */
.nav-section {
    background: #34495e;
    padding: 2px 0;
}

.nav-wrapper {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 2px 8px;
    color: #ecf0f1;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-radius: 4px;
}

.nav-link:hover,
.nav-item.active .nav-link {
    background: #2c3e50;
    color: #fff;
}

/* 主要内容区域 */
.main-content {
    padding: 2px 0;
}

/* 卡片组件 */
.card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2px;
    overflow: hidden;
}

.card-header {
    padding: 2px 8px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.card-body {
    padding: 2px 8px;
}

/* 分类网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2px;
}

.category-item {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 2px;
    transition: box-shadow 0.2s;
}

.category-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-main {
    margin-bottom: 2px;
}

.category-main a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.category-main a:hover {
    color: #3498db;
}

.category-sub {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2px;
}

.sub-category {
    padding: 2px;
}

.sub-title a {
    color: #34495e;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}

.sub-title a:hover {
    color: #3498db;
}

.sub-items {
    margin-top: 2px;
    font-size: 11px;
}

.sub-items a {
    color: #7f8c8d;
    text-decoration: none;
}

.sub-items a:hover {
    color: #3498db;
}

.separator {
    color: #bdc3c7;
    margin: 0 2px;
}

/* 轮播图区域 */
.banner-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2px;
}

.main-banner {
    height: 200px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.sub-banners {
    display: grid;
    grid-template-rows: repeat(5, 1fr);
    gap: 2px;
}

.sub-banner {
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

/* 用户信息区域 */
.user-section {
    background: #fff;
    border-radius: 4px;
    padding: 2px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 2px;
}

.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
}

.user-menu {
    flex: 1;
}

.user-item {
    margin-bottom: 2px;
}

.user-item a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 12px;
    margin-right: 2px;
}

.user-item a:hover {
    color: #3498db;
}

.user-links {
    display: flex;
    gap: 2px;
    margin-top: 2px;
}

.user-links a {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 11px;
    padding: 2px 4px;
    background: #f8f9fa;
    border-radius: 2px;
}

.user-links a:hover {
    background: #e9ecef;
    color: #495057;
}

/* 快速导航 */
.quick-nav {
    margin-bottom: 2px;
}

.nav-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 2px;
}

.nav-tab {
    flex: 1;
    text-align: center;
    padding: 2px 4px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-tab.active {
    border-bottom-color: #3498db;
    color: #3498db;
}

.nav-tab a {
    color: inherit;
    text-decoration: none;
    font-size: 12px;
}

.tab-content {
    display: none;
    font-size: 12px;
}

.tab-content.active {
    display: block;
}

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quick-links a {
    color: #7f8c8d;
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 2px;
    transition: background 0.2s;
}

.quick-links a:hover {
    background: #f8f9fa;
    color: #495057;
}

/* 服务网格 */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    background: #f8f9fa;
    border-radius: 4px;
    text-decoration: none;
    color: #2c3e50;
    transition: background 0.2s;
}

.service-item:hover {
    background: #e9ecef;
}

.service-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.service-text {
    flex: 1;
}

.service-count {
    font-size: 10px;
    color: #e74c3c;
    font-weight: 600;
}

.service-name {
    font-size: 11px;
    color: #7f8c8d;
}

/* 标签页 */
.tab-head {
    border-bottom: 1px solid #e0e0e0;
}

.tab-list {
    display: flex;
    list-style: none;
    gap: 2px;
}

.tab-item {
    padding: 2px 6px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-item.active {
    border-bottom-color: #3498db;
    color: #3498db;
}

.tab-item a {
    color: inherit;
    text-decoration: none;
    font-size: 13px;
}

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2px;
}

.product-item {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.product-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 2px 4px;
}

.product-title {
    margin-bottom: 2px;
}

.product-title a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a:hover {
    color: #3498db;
}

.product-price {
    margin-bottom: 2px;
}

.price-symbol {
    color: #e74c3c;
    font-size: 12px;
}

.price-value {
    color: #e74c3c;
    font-size: 14px;
    font-weight: 600;
}

.price-unit {
    color: #7f8c8d;
    font-size: 11px;
}

.price-negotiable {
    color: #7f8c8d;
    font-size: 12px;
}

.product-meta {
    font-size: 11px;
    color: #95a5a6;
}

/* 模块头部 */
.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-title {
    color: #2c3e50;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}

.module-title:hover {
    color: #3498db;
}

.module-cats {
    display: flex;
    gap: 2px;
}

.module-cats a {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 2px;
    transition: all 0.2s;
}

.module-cats a:hover {
    background: #3498db;
    color: #fff;
}

/* 市场区域 */
.market-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.market-links {
    font-size: 12px;
}

.market-links a {
    color: #7f8c8d;
    text-decoration: none;
}

.market-links a:hover {
    color: #3498db;
}

.market-title {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

/* 页脚样式 */
.footer {
    background: #2c3e50;
    color: #fff;
    padding: 2px 0;
    margin-top: 2px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2px;
    margin-bottom: 2px;
}

.footer-section h3 {
    margin-bottom: 2px;
    font-size: 14px;
    color: #ecf0f1;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 2px;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 2px;
    text-align: center;
    color: #bdc3c7;
    font-size: 11px;
}

.footer-bottom div {
    margin-bottom: 2px;
}

.footer-bottom a {
    color: #bdc3c7;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 2px;
    }
    
    .search-wrapper {
        flex-direction: column;
        gap: 2px;
    }
    
    .search-form {
        flex-direction: column;
        gap: 2px;
    }
    
    .nav-list {
        flex-wrap: wrap;
        gap: 1px;
    }
    
    .nav-link {
        padding: 2px 4px;
        font-size: 12px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .banner-section {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tab-list {
        flex-wrap: wrap;
    }
    
    .tab-item {
        padding: 2px 4px;
        font-size: 12px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

@media (max-width: 480px) {
    .top-bar-content {
        flex-direction: column;
        gap: 2px;
    }
    
    .search-module {
        width: 100%;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    .module-header {
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
    }
    
    .market-header {
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
    }
}

/* 工具类 */
.mb-2 { margin-bottom: 2px; }
.mb-4 { margin-bottom: 2px; }
.mb-8 { margin-bottom: 2px; }
.mb-12 { margin-bottom: 2px; }
.mb-16 { margin-bottom: 2px; }

.mt-2 { margin-top: 2px; }
.mt-4 { margin-top: 2px; }
.mt-8 { margin-top: 2px; }

.p-2 { padding: 2px; }
.p-4 { padding: 4px; }
.p-8 { padding: 8px; }
.p-12 { padding: 12px; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.rounded { border-radius: 4px; }
.rounded-sm { border-radius: 2px; }
.rounded-lg { border-radius: 8px; }

.shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

.transition { transition: all 0.2s; } 