/* ============================================
   响应式现代化网站样式
   中国·5845cc威尼人(股份有限公司)-Official website
   ============================================ */

/* CSS变量 - 统一颜色管理 */
:root {
    --primary-color: #003237;
    --primary-light: #0294a1;
    --secondary-color: #ffa200;
    --text-dark: #333333;
    --text-gray: #737373;
    --text-light: #a0a0a0;
    --bg-light: #f8f9fa;
    --bg-gray: #f2f2f2;
    --border-color: #e5e5e5;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   顶部栏
   ============================================ */
.top-bar {
    background: var(--primary-color);
    color: #fff;
    padding: 12px 0;
    font-size: 14px;
}

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

.top-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-info i {
    margin-right: 8px;
}

.top-info .highlight {
    color: var(--secondary-color);
    font-size: 18px;
    font-weight: 700;
}

/* ============================================
   导航栏
   ============================================ */
.navbar {
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 5px;
    align-items: center;
}

.nav-menu li a {
    display: block;
    padding: 12px 12px;
    color: var(--text-dark);
    font-weight: 500;
    border-radius: 4px;
    position: relative;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: var(--primary-color);
    color: #fff;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
    width: 60%;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

.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);
}

/* ============================================
   页面Banner
   ============================================ */
.page-banner {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

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

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 50, 55, 0.85), rgba(2, 148, 161, 0.75));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.banner-overlay h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.banner-overlay p {
    font-size: 20px;
    opacity: 0.9;
}

/* ============================================
   主内容区
   ============================================ */
.main-content {
    padding: 50px 0;
    background: var(--bg-light);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* ============================================
   侧边栏
   ============================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-section {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.sidebar-title {
    background: var(--primary-color);
    color: #fff;
    padding: 18px 20px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-title i {
    font-size: 20px;
}

/* 产品分类 */
.product-category {
    padding: 15px;
}

.category-item {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.category-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.category-title {
    padding: 12px 15px;
    background: var(--bg-gray);
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-title:hover {
    background: var(--primary-color);
    color: #fff;
}

.category-title::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    transition: var(--transition);
}

.category-item.collapsed .category-title::after {
    transform: rotate(-90deg);
}

.category-list {
    padding: 10px 0;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.category-item.collapsed .category-list {
    max-height: 0;
    padding: 0;
}

.category-list li {
    padding: 8px 15px;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.category-list li:hover {
    background: var(--bg-light);
    border-left-color: var(--secondary-color);
}

.category-list li a {
    color: var(--text-gray);
    font-size: 14px;
}

.category-list li:hover a {
    color: var(--primary-color);
}

/* 联系方式卡片 */
.contact-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #fff;
    padding: 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
}

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

.contact-info span {
    display: block;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.contact-info p {
    font-size: 22px;
    font-weight: 700;
}

/* ============================================
   产品主内容
   ============================================ */
.content-main {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.product-section {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--primary-color);
}

.section-header h2 {
    font-size: 24px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: var(--secondary-color);
}

.view-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.view-more:hover {
    background: var(--secondary-color);
    transform: translateX(5px);
}

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
    border-color: var(--primary-light);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-gray);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-card h3 {
    padding: 15px;
    font-size: 16px;
    color: var(--text-dark);
    text-align: center;
    font-weight: 500;
    border-top: 1px solid var(--border-color);
}

.product-card:hover h3 {
    background: var(--primary-color);
    color: #fff;
    border-top-color: var(--primary-color);
}

/* ============================================
   页脚
   ============================================ */
.footer {
    background: var(--primary-color);
    color: #fff;
    padding: 50px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1.5fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
    display: inline-block;
}

.footer-logo img {
    max-width: 180px;
    margin-bottom: 15px;
}

.footer-contact li {
    padding: 8px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact li i {
    color: var(--secondary-color);
    width: 20px;
}

.footer-links li {
    padding: 6px 0;
}

.footer-links a {
    font-size: 14px;
    opacity: 0.9;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    padding-left: 10px;
    color: var(--secondary-color);
}

.footer-qrcodes {
    display: flex;
    gap: 15px;
}

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

.qrcode-item img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    background: #fff;
    padding: 5px;
}

.qrcode-item p {
    font-size: 12px;
    margin-top: 8px;
    opacity: 0.9;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    opacity: 0.8;
}

.footer-bottom a {
    color: var(--secondary-color);
}

/* ============================================
   浮动工具栏
   ============================================ */
.floating-tools {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tool-item {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow);
}

.tool-item:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

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

.tool-tooltip {
    position: absolute;
    right: 60px;
    background: var(--primary-color);
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.tool-item:hover .tool-tooltip {
    opacity: 1;
    visibility: visible;
    right: 65px;
}

#backToTop {
    opacity: 0;
    visibility: hidden;
}

/* ============================================
   响应式设计 - 平板设备
   ============================================ */
@media screen and (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 250px 1fr;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        gap: 10px;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 1;
    }
    
    .content-main {
        order: 2;
    }
    
    .product-category {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .category-item {
        margin-bottom: 0;
    }
    
    .banner-overlay h1 {
        font-size: 36px;
    }
    
    .banner-overlay p {
        font-size: 18px;
    }
}

/* ============================================
   响应式设计 - 移动设备
   ============================================ */
@media screen and (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .top-bar {
        padding: 10px 0;
    }
    
    .top-info {
        font-size: 13px;
    }
    
    .top-info .highlight {
        font-size: 16px;
    }
    
    .page-banner {
        height: 200px;
    }
    
    .banner-overlay h1 {
        font-size: 28px;
    }
    
    .banner-overlay p {
        font-size: 16px;
    }
    
    .main-content {
        padding: 30px 0;
    }
    
    .product-section {
        padding: 20px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .section-header h2 {
        font-size: 20px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-card h3 {
        padding: 12px;
        font-size: 14px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-contact li {
        justify-content: center;
    }
    
    .footer-qrcodes {
        justify-content: center;
    }
    
    .floating-tools {
        right: 10px;
    }
    
    .tool-item {
        width: 45px;
        height: 45px;
    }
    
    .tool-tooltip {
        display: none;
    }
    
    .contact-card {
        flex-direction: column;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .logo img {
        height: 40px;
    }
    
    .page-banner {
        height: 180px;
    }
    
    .banner-overlay h1 {
        font-size: 24px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-image {
        height: 120px;
    }
    
    .product-card h3 {
        padding: 10px;
        font-size: 13px;
    }
    
    .view-more {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ============================================
   动画效果
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.5s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

/* ============================================
   滚动条美化
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ============================================
   加载优化
   ============================================ */
img {
    loading: lazy;
}