/* 全局样式 */
body {
    font-family: "Microsoft YaHei", sans-serif;
    color: #333;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
}

/* 轮播图样式 */
.carousel {
    margin-bottom: 30px;
}

.carousel-item {
    height: 500px;
    background-color: #f8f9fa;
}

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

.carousel-caption {
    background: rgba(0,0,0,0.5);
    padding: 20px;
    border-radius: 10px;
}

/* 内容区域样式 */
section {
    padding: 40px 0;
}

.card {
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card:hover {
    transform: translateY(-5px);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* 按钮样式 */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* 页脚样式 */
.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* 热门商品展示样式 */
.featured-products {
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

.product-item {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-img {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.product-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.product-item:hover .product-overlay {
    opacity: 1;
}

.product-item h5 {
    font-size: 1rem;
    margin: 10px 0 5px;
    color: #333;
}

.product-item .price {
    font-size: 1.1rem;
}

/* 产品展示样式 */
.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-link:hover {
    text-decoration: none;
    color: inherit;
}

.product-link .card {
    transition: all 0.3s ease;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

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

/* 正方形图片容器 */
.square-img-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 宽高比 */
    overflow: hidden;
    background: #f5f5f5;
}

.square-img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.product-link .card-body {
    padding: 8px;
    background: #fff;
}

.product-link .card-title {
    font-size: 0.9rem;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    text-align: left;
}

/* 5列布局 */
.col-md-2-4 {
    width: 20%;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .col-md-2-4 {
        width: 33.333%;
    }
    
    .product-link .card-title {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .col-md-2-4 {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .carousel-item {
        height: 300px;
    }

    section {
        padding: 20px 0;
    }

    .product-link .card-img-top {
        height: 150px;
    }
}

/* 分类导航样式 */
.category-nav {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.category-header {
    margin-bottom: 15px;
}

.category-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    position: relative;
    padding-left: 15px;
}

.category-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: #ff0036;
}

.total-count {
    color: #999;
    font-size: 14px;
}

.category-list {
    line-height: 32px;
}

.category-list .label {
    color: #666;
    font-size: 14px;
}

.category-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-item {
    color: #666;
    text-decoration: none;
    padding: 0 15px;
    font-size: 14px;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.category-item:hover {
    color: #ff0036;
    background: #fff1f1;
}

.category-item.active {
    color: #fff;
    background: #007bff;
}

.more-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.more-link:hover {
    color: #ff0036;
} 