/* 主样式表 - 基于reset.css */

/* 网站特定颜色变量 */
:root {
    --primary-color: #dc2626;
    --primary-dark: #b91c1c;
    --secondary-color: #ef4444;
    --secondary-dark: #dc2626;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --border-color: #e9ecef;
    --background-light: #fef2f2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --shadow: 0 5px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* 悬浮联系标签样式 */
.floating-contact {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    background: var(--primary-color);
    border-radius: 30px 0 0 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.floating-contact:hover {
    background: var(--primary-dark);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
    transform: translateY(-50%) translateX(-5px);
}

.floating-contact-trigger {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.floating-contact-trigger:hover {
    color: white;
}

.floating-contact-popup {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 25px;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.floating-contact:hover .floating-contact-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-10px);
}

.contact-popup-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    transition: var(--transition);
}

.contact-item:hover {
    background: var(--background-light);
}

.contact-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    border-radius: 50%;
    color: white;
    font-size: 12px;
}

.contact-text {
    flex: 1;
}

.contact-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.contact-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.contact-value a {
    color: var(--text-color);
    text-decoration: none;
}

.contact-value a:hover {
    color: var(--primary-color);
}

.qr-code {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.qr-code img {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.qr-code-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .floating-contact {
        right: 20px;
    }
    
    .floating-contact-trigger {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .floating-contact-popup {
        min-width: 240px;
        padding: 20px;
    }
}

/* 头部样式 */
.header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 a {
    font-size: 28px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.logo p {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 5px;
}

.nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav ul li {
    margin: 0 20px;
    position: relative;
}

.nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 10px 0;
}

.nav ul li a:hover,
.nav ul li a.active {
    color: var(--primary-color);
}

/* 下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    display: block !important;
    animation: fadeInDown 0.3s ease;
}

.dropdown-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: var(--shadow);
    border-radius: 8px;
    min-width: 220px;
    z-index: 1001;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.dropdown-menu li {
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu li a {
    padding: 12px 20px;
    display: block;
    color: var(--text-color);
    font-size: 14px;
    transition: var(--transition);
}

.dropdown-menu li a:hover {
    background-color: var(--background-light);
    color: var(--primary-color);
    transform: translateX(5px);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background-color: var(--background-light);
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* 菜单按钮动画 */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 主要内容区域 */
main {
    padding-top: 0;
}

/* 主页轮播图区域 */
.hero-slider {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* 轮播控制按钮 */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 30px;
}

.slider-btn.next {
    right: 30px;
}

/* 轮播指示器 */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 3;
}

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

.dot.active {
    background: white;
    transform: scale(1.3);
}

/* 产品概览 */
.products-overview {
    padding: 80px 0;
    background: #f8f9fa;
}

.products-overview h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* 首页产品分类网格 - 2行5列布局 */
.product-category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 50px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.category-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.category-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.category-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-item:hover img {
    transform: scale(1.05);
}

.category-item h3 {
    padding: 15px 10px;
    margin: 0;
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 600;
}

.category-item h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.category-item:hover h3 a {
    color: var(--secondary-color);
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    padding: 20px 20px 10px;
    color: var(--primary-color);
}

.product-card h3 a {
    text-decoration: none;
    color: inherit;
}

.product-card p {
    padding: 0 20px 10px;
    color: #666;
    font-size: 14px;
}

.product-card ul {
    padding: 0 20px 20px;
    list-style: none;
}

.product-card ul li {
    font-size: 13px;
    color: #888;
    margin-bottom: 5px;
    padding-left: 15px;
    position: relative;
}

.product-card ul li:before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.text-center {
    text-align: center;
}

/* 优势区域 */
.advantages {
    padding: 80px 0;
    background: white;
}

.advantages h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.advantage-item {
    text-align: center;
    padding: 30px 20px;
}

.advantage-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.advantage-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.advantage-item p {
    color: #666;
    line-height: 1.6;
}

/* 应用领域 */
.applications {
    padding: 80px 0;
    background: #f8f9fa;
}

.applications h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.app-item {
    background: white;
    padding: 30px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.app-item:hover {
    transform: translateY(-3px);
}

.app-item h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.app-item p {
    color: #666;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: #ecf0f1;
}

.footer-section p {
    color: #bdc3c7;
    margin-bottom: 10px;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    color: #bdc3c7;
}

.footer-bottom p {
    margin-bottom: 8px;
}

.footer-bottom a {
    color: #bdc3c7;
    text-decoration: none;
}

.icp-info {
    margin-top: 10px;
    font-size: 13px;
}

.icp-info a {
    color: #95a5a6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.icp-info a:hover {
    color: #bdc3c7;
    text-decoration: underline;
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* 动画效果 */
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    /* 中等屏幕 - 产品分类网格调整为4列 */
    .product-category-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: auto;
        gap: 18px;
    }
    
    .category-item img {
        height: 140px;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
        position: relative;
    }
    
    .nav {
        display: none;
        width: 100%;
        order: 3;
        background: #fff;
        border-top: 1px solid var(--border-color);
        margin-top: 15px;
        animation: slideDown 0.3s ease;
    }
    
    .nav.active {
        display: block;
    }
    
    .nav ul {
        flex-direction: column;
        padding: 20px 0;
    }
    
    .nav ul li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav ul li:last-child {
        border-bottom: none;
    }
    
    .nav ul li a {
        padding: 15px 20px;
        display: block;
        border-left: 3px solid transparent;
        transition: var(--transition);
    }
    
    .nav ul li a:hover,
    .nav ul li a.active {
        background-color: var(--background-light);
        border-left-color: var(--primary-color);
    }
    
    /* 移动端下拉菜单 */
    .dropdown-menu {
        position: static;
        display: none !important;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: var(--background-light);
        margin: 0;
    }
    
    .dropdown.active .dropdown-menu {
        display: block !important;
        animation: none;
    }
    
    .dropdown-menu li a {
        padding: 12px 40px;
        font-size: 13px;
        border-left: 3px solid transparent;
    }
    
    .dropdown-menu li a:hover {
        background-color: #e9ecef;
        transform: none;
        border-left-color: var(--secondary-color);
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .hero-slider {
        height: 400px;
    }
    
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .slider-btn.prev {
        left: 15px;
    }
    
    .slider-btn.next {
        right: 15px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    /* 平板端产品分类网格 - 2行3列 */
    .product-category-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto;
        gap: 15px;
    }
    
    .category-item img {
        height: 120px;
    }
    
    .category-item h3 {
        font-size: 14px;
        padding: 12px 8px;
    }
    
    .advantage-grid {
        grid-template-columns: 1fr;
    }
    
    .app-grid {
        grid-template-columns: 1fr;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: left;
    }
    
    .footer-section {
        text-align: left;
    }
    
    .footer-section h3 {
        margin-bottom: 15px;
        font-size: 16px;
        border-bottom: 1px solid #34495e;
        padding-bottom: 8px;
    }
    
    .footer-section p,
    .footer-section ul li {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .footer-section ul li {
        margin-bottom: 6px;
    }
    
    .footer-bottom {
        margin-top: 20px;
        padding-top: 15px;
        font-size: 12px;
    }
    
    .icp-info {
        font-size: 11px;
        margin-top: 8px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        padding: 10px 15px;
    }
    
    .logo h1 a {
        font-size: 24px;
    }
    
    .logo p {
        font-size: 12px;
    }
    
    .mobile-menu-btn {
        padding: 6px;
    }
    
    .mobile-menu-btn span {
        width: 20px;
        height: 2px;
    }
    
    .nav ul li a {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .dropdown-menu li a {
        padding: 10px 30px;
        font-size: 12px;
    }
    
    .hero-slider {
        height: 300px;
    }
    
    
    /* 手机端产品分类网格 - 2列布局 */
    .product-category-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        gap: 12px;
        margin-bottom: 30px;
    }
    
    .category-item img {
        height: 100px;
    }
    
    .category-item h3 {
        font-size: 13px;
        padding: 10px 5px;
    }
    
    .products-overview,
    .advantages,
    .applications {
        padding: 40px 0;
    }
    
    .products-overview h2,
    .advantages h2,
    .applications h2 {
        font-size: 28px;
    }
    
    /* 小屏幕footer进一步优化 */
    .footer {
        padding: 30px 0 15px;
    }
    
    .footer-content {
        gap: 25px;
    }
    
    .footer-section h3 {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .footer-section p,
    .footer-section ul li {
        font-size: 13px;
    }
    
    .footer-section ul li {
        margin-bottom: 5px;
    }
    
    .footer-bottom {
        margin-top: 15px;
        padding-top: 12px;
        font-size: 11px;
    }
    
    .icp-info {
        font-size: 10px;
        margin-top: 6px;
    }
    
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}