/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 基础颜色定义 */
:root {
    --primary-color: #8B4513; /* 大地棕 */
    --secondary-color: #1E90FF; /* 科技蓝 */
    --light-color: #f4f4f4;
    --dark-color: #333;
    --success-color: #28a745;
    --error-color: #dc3545;
}

/* 图片加载失败占位符 */
img {
    display: block;
    width: 100%;
    height: auto;
}

img::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-size: 14px;
}

/* 导航栏样式 */
.navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar.scrolled {
    background-color: rgba(139, 69, 19, 0.9);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo .logo-img {
    max-height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
}



/* 按钮样式 */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: scale(1.05);
    background-color: #6b3b13;
}

.btn:active {
    transform: scale(0.98);
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #0c7bd4;
}

/* 按钮点击波纹效果 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: rippleEffect 0.6s linear;
}

@keyframes rippleEffect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.7;
    }
    100% {
        width: 500px;
        height: 500px;
        opacity: 0;
    }
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Banner轮播图样式 */
.banner {
    position: relative;
    height: 500px;
    overflow: hidden;
    margin-top: 70px;
    cursor: pointer;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.banner-dot.active {
    background-color: white;
}

/* 快捷入口样式 */
.quick-links {
    padding: 3rem 0;
    background-color: var(--light-color);
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.quick-link {
    text-align: center;
    padding: 2rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.quick-link:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.quick-link i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.quick-link h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.quick-link p {
    color: #666;
}



/* 页脚样式 */
.footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* 图片懒加载样式 */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.lazy.loaded {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        width: 90%;
        padding: 0 1rem;
    }
    
    .navbar .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-links.active {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }
    
    .nav-links li {
        margin: 0.5rem 0;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
        padding: 0.5rem 0;
    }
    
    .nav-links li:last-child {
        border-bottom: none;
    }
    
    /* 移动端导航切换按钮样式 */
    .nav-toggle {
        display: flex; /* 在移动端显示 */
        font-size: 1.8rem;
        color: white;
        cursor: pointer;
        position: absolute;
        right: 1rem;
        top: 1.2rem;
        z-index: 1001;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }
    
    .nav-toggle:hover {
        background-color: rgba(255, 255, 255, 0.3);
        transform: scale(1.1);
    }
    
    .nav-toggle:active {
        transform: scale(0.95);
    }
    
    /* 汉堡菜单图标动画 */
    .nav-toggle i {
        transition: all 0.3s ease;
    }
    
    .nav-toggle.active i:before {
        content: "\eb99"; /* 使用remix图标中的关闭图标 */
    }
    
    .quick-links-grid {
        grid-template-columns: 1fr;
    }
    
    .banner {
        height: 300px;
        padding: 2rem 1rem;
    }
    
    
}

@media (max-width: 480px) {
    .banner {
        height: 250px;
    }
}

/* 产品展示区域样式 */
.product-showcase {
    padding: 3rem 0;
    background-color: var(--light-color);
}

.product-showcase .section-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.product-category {
    margin-bottom: 3rem;
}

.product-category:last-child {
    margin-bottom: 0;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.category-header h3 {
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scroll-controls {
    display: flex;
    gap: 0.5rem;
}

.scroll-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.scroll-btn:hover {
    background-color: #6b3b13;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.scroll-btn:active {
    transform: scale(0.95);
    background-color: #5a3210;
}

.scroll-btn:disabled {
    background-color: #b8b8b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.scroll-btn i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.scroll-btn:hover i {
    transform: translateX(2px);
}

.scroll-btn.prev-btn:hover i {
    transform: translateX(-2px);
}

/* 按钮焦点状态（键盘导航） */
.scroll-btn:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* 产品轮播图样式 */
.product-carousel {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 1.5rem;
    padding: 0.5rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}

.product-carousel::-webkit-scrollbar {
    display: none; /* Chrome Safari */
}

/* 产品卡片样式 */
.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-width: 250px;
    flex-shrink: 0;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* 产品图片样式 */
.product-image {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* 产品信息样式 */
.product-info {
    padding: 1.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-showcase {
        padding: 2rem 0;
    }
    
    .product-showcase .section-title {
        font-size: 1.5rem;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .scroll-controls {
        align-self: flex-end;
    }
    
    .product-card {
        min-width: 200px;
    }
    
    .product-image {
        height: 150px;
    }
    
    .scroll-btn {
        width: 36px;
        height: 36px;
    }
    
    .scroll-btn i {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .product-card {
        min-width: 250px;
    }
    
    .scroll-btn {
        width: 32px;
        height: 32px;
    }
    
    .scroll-btn i {
        font-size: 12px;
    }
}

/* 小屏幕设备优化 */
@media (max-width: 480px) {
    .navbar .logo h1 {
        font-size: 1.2rem;
    }
    
    .banner {
        height: 250px;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .product-card {
        min-width: 250px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .footer {
        padding: 1rem 0;
        font-size: 0.9rem;
    }
}