/* CRMEB商城PC端模板样式 */

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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* 顶部导航栏 */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-bar {
    background: #f8f8f8;
    border-bottom: 1px solid #e5e5e5;
    padding: 8px 0;
    font-size: 12px;
}

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

.top-left span {
    color: #666;
    margin-right: 15px;
}

.top-left a {
    margin-right: 15px;
    color: #666;
    transition: color 0.3s;
}

.top-left a:hover {
    color: #e74c3c;
}

.top-left .login-link {
    color: #e74c3c;
}

.top-right a {
    margin-left: 20px;
    color: #666;
    transition: color 0.3s;
}

.top-right a:hover {
    color: #e74c3c;
}

.top-right i {
    margin-right: 5px;
}

/* 头部主体 */
.header-main {
    padding: 20px 0;
}

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

.logo h1 {
    font-size: 28px;
    color: #e74c3c;
    font-weight: bold;
}

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

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

.search-btn {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #c0392b;
}

.cart-box {
    position: relative;
}

.cart-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    transition: all 0.3s;
}

.cart-link:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

.cart-link i {
    font-size: 18px;
    margin-right: 8px;
}

.cart-count {
    background: #e74c3c;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

.cart-link:hover .cart-count {
    background: #fff;
    color: #e74c3c;
}

/* 主导航 */
.main-nav {
    background: #333;
}

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

.category-menu {
    position: relative;
    width: 200px;
}

.category-title {
    display: block;
    padding: 15px 20px;
    background: #e74c3c;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.category-title i {
    margin-right: 10px;
}

.category-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 100;
}

.category-list li {
    border-bottom: 1px solid #f0f0f0;
}

.category-list a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    transition: all 0.3s;
}

.category-list a:hover {
    background: #e74c3c;
    color: #fff;
}

.category-list i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

.nav-list {
    display: flex;
    margin-left: 20px;
}

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

.nav-list a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    font-size: 15px;
    transition: background 0.3s;
}

.nav-list a:hover,
.nav-list a.active {
    background: #e74c3c;
}

/* 轮播图区域 */
.banner-section {
    padding: 20px 0;
}

.banner-slider {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
}

.banner-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.banner-item.active {
    opacity: 1;
}

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

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: #e74c3c;
}

/* 快捷入口 */
.quick-entry {
    padding: 30px 0;
    background: #fff;
    margin-bottom: 20px;
}

.entry-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 20px;
}

.entry-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.entry-item:hover {
    background: #f8f8f8;
    transform: translateY(-5px);
}

.entry-item i {
    font-size: 32px;
    color: #e74c3c;
    margin-bottom: 10px;
}

.entry-item span {
    font-size: 14px;
    color: #666;
}

/* 通用区块样式 */
section {
    margin-bottom: 20px;
}

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

.section-title {
    font-size: 20px;
    color: #333;
    display: flex;
    align-items: center;
}

.section-title i {
    color: #e74c3c;
    margin-right: 10px;
}

.countdown {
    margin-left: 20px;
    font-size: 16px;
    font-weight: normal;
}

.countdown .time {
    display: inline-block;
    background: #333;
    color: #fff;
    padding: 5px 8px;
    border-radius: 4px;
    margin: 0 2px;
}

.view-more {
    color: #666;
    font-size: 14px;
    transition: color 0.3s;
}

.view-more:hover {
    color: #e74c3c;
}

/* 限时秒杀 */
.seckill-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
}

.seckill-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.seckill-item {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.seckill-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.seckill-item .product-img {
    position: relative;
    padding: 15px;
    background: #f8f8f8;
}

.seckill-item .product-img img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
}

.seckill-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

.seckill-item .product-info {
    padding: 15px;
}

.seckill-item .product-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.price-box {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.seckill-price {
    font-size: 18px;
    color: #e74c3c;
    font-weight: bold;
    margin-right: 10px;
}

.original-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.progress-bar {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.progress-bar .progress {
    height: 6px;
    background: #e74c3c;
    border-radius: 3px;
    margin-right: 8px;
    flex: 1;
}

/* 商品卡片通用样式 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid #e5e5e5;
}

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

.product-card .product-img {
    position: relative;
    padding: 15px;
    background: #f8f8f8;
}

.product-card .product-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 4px;
}

.new-tag,
.hot-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #27ae60;
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

.hot-tag {
    background: #e74c3c;
}

.product-card .product-info {
    padding: 15px;
}

.product-card .product-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card .product-desc {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card .current-price {
    font-size: 18px;
    color: #e74c3c;
    font-weight: bold;
}

.product-card .sales {
    font-size: 12px;
    color: #999;
    margin-left: 10px;
}

/* 首发新品和爆款热卖区块 */
.new-arrival,
.hot-products {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
}

/* 分类推荐 */
.category-recommend {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
}

.category-block {
    margin-bottom: 30px;
}

.category-block:last-child {
    margin-bottom: 0;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.category-header h3 {
    font-size: 18px;
    color: #333;
}

.category-header h3 i {
    color: #e74c3c;
    margin-right: 8px;
}

.category-header a {
    color: #666;
    font-size: 14px;
    transition: color 0.3s;
}

.category-header a:hover {
    color: #e74c3c;
}

.category-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-products .product-card {
    border: 1px solid #e5e5e5;
}

.category-products .product-img img {
    height: 180px;
}

.category-products .product-name {
    font-size: 14px;
}

/* 服务特色 */
.service-features {
    background: #fff;
    padding: 40px 0;
}

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

.feature-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.feature-item i {
    font-size: 40px;
    color: #e74c3c;
    margin-right: 15px;
}

.feature-item span {
    font-size: 18px;
    color: #333;
    font-weight: bold;
}

/* 页脚 */
.footer {
    background: #333;
    color: #fff;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

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

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

.footer-section ul li a {
    color: #ccc;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #e74c3c;
}

.footer-section.contact p {
    margin-bottom: 10px;
    color: #ccc;
    font-size: 14px;
}

.footer-section.contact i {
    margin-right: 8px;
    color: #e74c3c;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #999;
    font-size: 14px;
}

/* 悬浮工具栏 */
.float-tools {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1000;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
    color: #666;
}

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

.tool-item:hover {
    background: #e74c3c;
    color: #fff;
}

.tool-item i {
    font-size: 20px;
    margin-bottom: 5px;
}

.tool-item span {
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        padding: 0 10px;
    }
    
    .seckill-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .entry-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .category-products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .header-main .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
        max-width: 500px;
    }
    
    .seckill-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-products {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .main-nav .container {
        flex-direction: column;
    }
    
    .category-menu {
        width: 100%;
    }
    
    .nav-list {
        margin-left: 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .seckill-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .entry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .float-tools {
        display: none;
    }
}

@media (max-width: 480px) {
    .seckill-grid,
    .product-grid,
    .category-products {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
}