/* 基础样式 */
:root {
    --primary-color: #1a5276;
    --secondary-color: #2874a6;
    --accent-color: #f39c12;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 导航栏样式 */
.main-header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 50px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative;
    margin: 0 10px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 4px;
    transition: var(--transition);
    display: block;
}

.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.nav-indicator {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.main-nav li:hover .nav-indicator {
    width: 80%;
}

.main-nav li.active .nav-indicator {
    width: 100%;
}

.main-nav li.active a {
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.1);
}

/* 页脚样式 */
.main-footer {
    background-color: var(--dark-color);
    color: white;
    padding: 30px 0;
    text-align: center;
}

.footer-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 0 auto 20px;
    width: 80%;
}

.footer-row {
    margin: 10px 0;
}

.footer-row a {
    color: var(--accent-color);
    text-decoration: none;
}

/* 首页样式 */
.featured-products {
    position: relative;
    height: 500px;
    overflow: hidden;
    margin-bottom: 40px;
}

.carousel-container {
    position: relative;
    height: 100%;
}

.carousel-slides {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-slides .slide {
    min-width: 100%;
    position: relative;
}

.carousel-slides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 50px;
    left: 50px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    max-width: 500px;
    border-radius: 5px;
}

.slide-caption h3 {
    font-size: 2rem;
    margin: 0 0 10px;
    color: var(--accent-color);
}

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition);
}

.carousel-prev:hover, .carousel-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dots .dot.active {
    background-color: white;
    transform: scale(1.2);
}

.image-nav-blocks {
    display: grid;
    grid-template-columns: repeat(4, 300PX);
    gap: 10px;	
    justify-content: center;
    padding: 0 20px 20px;
}

.nav-block {
    position: relative;
    height: 200px;
	width:300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.nav-block:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.nav-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    color: white;
    text-align: center;
}

.nav-overlay h3 {
    margin: 0;
    font-size: 1.5rem;
}

/* 产品展示页面样式 */
.product-categories-nav {
    background-color: var(--light-color);
    padding: 30px 0;
    margin-bottom: 40px;
}

.category-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tab {
    padding: 10px 20px;
    background-color: white;
    border-radius: 30px;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: bold;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.category-tab:hover, .category-tab.active {
    background-color: var(--secondary-color);
    color: white;
}

.product-category-section {
    margin-bottom: 60px;
}

.category-description {
    color: #666;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h4 {
    margin: 15px;
    text-align: center;
    color: var(--dark-color);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    width: 80%;
    max-width: 900px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--dark-color);
}

.modal-body {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.modal-product-image {
    flex: 1;
    min-width: 300px;
}

.modal-product-image img {
    width: 100%;
    border-radius: 5px;
}

.modal-product-info {
    flex: 1;
    min-width: 300px;
}

.modal-product-info h2 {
    color: var(--primary-color);
    margin-top: 0;
}

.modal-product-info h3 {
    color: var(--secondary-color);
    margin: 20px 0 10px;
}

.modal-product-info ul {
    padding-left: 20px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .image-nav-blocks {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background-color: var(--secondary-color);
        padding: 20px;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav li {
        margin: 10px 0;
    }
    
    .mobile-menu-btn {
        display: block;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
    }
    
    .featured-products {
        height: 350px;
    }
    
    .slide-caption {
        bottom: 20px;
        left: 20px;
        max-width: 80%;
    }
    
    .modal-body {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .image-nav-blocks {
        grid-template-columns: 1fr;
    }
    
    .featured-products {
        height: 250px;
    }
    
    .slide-caption {
        padding: 10px;
    }
    
    .slide-caption h3 {
        font-size: 1.5rem;
    }
}