/* ============================================================
   中赛照明 - 统一基础样式
   包含：变量定义、字体、重置、通用组件、Hero样式
   ============================================================ */

/* ===================== 字体声明 ===================== */
@font-face {
    font-family: 'Inter';
    font-weight: 300;
    font-style: normal;
    src: url('../fonts/Inter-Light.woff2') format('woff2'), local('Segoe UI');
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    font-weight: 400;
    font-style: normal;
    src: url('../fonts/Inter-Regular.woff2') format('woff2'), local('Segoe UI');
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    font-weight: 700;
    font-style: normal;
    src: url('../fonts/Inter-Bold.woff2') format('woff2'), local('Segoe UI');
    font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Space+Grotesk:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* ===================== CSS变量 ===================== */
:root {
    /* 主色调 - 基于Logo #009380 青绿色 */
    --primary: #009380;
    --primary-light: #26A69A;
    --primary-lighter: #4DB6AC;
    --primary-lightest: #80CBC4;
    --primary-dark: #006B5C;
    --primary-darker: #004D40;
    --primary-muted: rgba(0, 147, 128, 0.08);
    --primary-muted-2: rgba(0, 147, 128, 0.12);
    --primary-muted-3: rgba(0, 147, 128, 0.2);
    --primary-glow: rgba(0, 147, 128, 0.3);
    
    /* 背景色 - 白色渐变系 */
    --bg-primary: #FAFBFC;
    --bg-secondary: #F0F4F5;
    --bg-card: #FFFFFF;
    --bg-warm: #F5F7F8;
    --bg-card-hover: #FFFFFF;
    --bg-gradient: linear-gradient(180deg, #FFFFFF 0%, #F8FAFA 50%, #F0F4F5 100%);
    
    /* 文字颜色 - 深色系（适配白色背景） */
    --text-primary: #1a1a1a;
    --text-secondary: #5a6a7a;
    --text-warm: #3a4a5a;
    --text-muted: #8a9aaa;
    
    /* 青绿色系 - 与主色保持一致 */
    --gold: var(--primary);
    --gold-light: var(--primary-light);
    --gold-lighter: var(--primary-lighter);
    --gold-dark: var(--primary-dark);
    --gold-darker: var(--primary-darker);
    --gold-muted: var(--primary-muted-2);
    --gold-glow: var(--primary-glow);
    
    /* 边框 */
    --border: rgba(0, 147, 128, 0.12);
    --border-light: rgba(0, 147, 128, 0.18);
    
    /* 渐变 */
    --gradient-gold: linear-gradient(135deg, #26A69A 0%, #009380 50%, #006B5C 100%);
    --gradient-warm: linear-gradient(135deg, #F0F4F5 0%, #FAFBFC 100%);
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 4px 20px rgba(0, 147, 128, 0.2);
    
    /* 间距系统 */
    --section-padding: 100px;
    --section-padding-md: 70px;
    --section-padding-sm: 50px;
    
    /* 间距 */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    
    /* 字体大小 */
    --font-xs: 0.75rem;
    --font-sm: 0.85rem;
    --font-base: 0.95rem;
    --font-md: 1rem;
    --font-lg: 1.2rem;
    --font-xl: 1.5rem;
    --font-2xl: 2rem;
    --font-3xl: 2.5rem;
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* 头部高度 */
    --header-height: 80px;
    
    /* 过渡 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 移动端CSS变量覆盖 */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
}

/* ===================== 重置样式 ===================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-overflow-scrolling: touch;
}

::selection {
    background: rgba(0, 147, 128, 0.2);
    color: var(--primary-dark);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--primary); opacity: 0.4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); opacity: 0.8; }

/* ===================== 宽屏容器 ===================== */
.container-fluid {
    width: 100%;
    padding-left: 60px;
    padding-right: 60px;
    max-width: 100%;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 60px);
}

@media (max-width: 992px) {
    .container-fluid {
        padding-left: 30px;
        padding-right: 30px;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ===================== 通用Hero样式（所有页面复用） ===================== */
.page-hero {
    padding: 120px 0 60px;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    text-align: center;
    position: relative;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(0, 147, 128, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.page-hero .page-hero-content {
    position: relative;
    z-index: 1;
}

.page-hero .page-title {
    font-family: 'Noto Serif SC', 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: 0.05em;
}

.page-hero .page-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* ===================== 通用区块样式 ===================== */
section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-eyebrow {
    font-family: 'Space Grotesk', 'Segoe UI', 'Microsoft YaHei', monospace;
    font-size: var(--font-xs);
    letter-spacing: 0.3em;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
}

.section-title {
    font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    letter-spacing: 0.02em;
}

.section-title em {
    font-style: italic;
    font-weight: 400;
    color: var(--primary);
}

.section-desc {
    font-size: var(--font-base);
    color: var(--text-warm);
    line-height: 1.8;
    max-width: 580px;
    margin: 0 auto;
}

.divider-line {
    width: 50px;
    height: 2px;
    background: var(--gradient-gold);
    margin: 0 auto var(--spacing-md);
}

.section-footer {
    display: flex;
    justify-content: center;
    padding-top: var(--spacing-lg);
}

/* ===================== 页面标题 ===================== */
.page-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 20px;
}

.page-title em {
    font-style: italic;
    font-weight: 400;
    color: var(--primary);
}

.page-desc {
    font-size: 1.05rem;
    color: var(--text-warm);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===================== 通用卡片样式 ===================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

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

.card-content {
    padding: 24px;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.card:hover .card-title {
    color: var(--primary);
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===================== 通用按钮样式 ===================== */
.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--primary);
    border: none;
    color: #ffffff;
    font-size: var(--font-sm);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.btn-primary-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    /* background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); */
    transition: left 0.5s ease;
}

.btn-primary-custom:hover::before {
    left: 100%;
}

.btn-primary-custom:hover {
    /* background: var(--primary-dark);
    box-shadow: var(--shadow-glow); */
    color: #fff;
    transform: translateY(-2px);
}

.btn-primary-custom:active {
    transform: translateY(0);
}

.btn-primary-custom i {
    font-size: var(--font-sm);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: var(--font-sm);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    border-radius: var(--radius-sm);
}

.btn-ghost:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-ghost:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-ghost i {
    font-size: var(--font-sm);
    transition: transform var(--transition-normal);
}

.btn-ghost:hover i {
    transform: translateX(3px);
}

/* ===================== 通用图标样式 ===================== */
.icon-circle {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: var(--gold-muted);
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    font-size: 1.4rem;
}

/* ===================== 通用表单样式 ===================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-warm);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ===================== 通用筛选样式 ===================== */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-btn,
.filter-tab {
    padding: 12px 28px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.filter-btn:hover,
.filter-tab:hover,
.filter-btn.active,
.filter-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes skeletonShine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===================== 滚动动画类 ===================== */
.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-animate.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================== 焦点样式 ===================== */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===================== 响应式基础 ===================== */
@media (max-width: 992px) {
    :root {
        --section-padding: var(--section-padding-md);
        --header-height: 70px;
    }

    section {
        padding: var(--section-padding) 0;
    }

    .page-hero,
    .about-hero,
    .scene-hero,
    .gallery-hero,
    .dealers-hero,
    .guide-hero,
    .contact-hero {
        padding: 140px 0 80px;
        min-height: auto;
    }

    .section-header {
        margin-bottom: var(--spacing-md);
    }
}

@media (max-width: 576px) {
    :root {
        --section-padding: var(--section-padding-sm);
    }

    section {
        padding: var(--section-padding) 0;
    }

    .section-title {
        font-size: clamp(1.6rem, 6vw, 2rem);
    }

    .section-eyebrow {
        font-size: 0.65rem;
        letter-spacing: 0.25em;
    }

    .section-desc {
        font-size: var(--font-sm);
    }

    .btn-primary-custom,
    .btn-ghost {
        padding: 12px 24px;
        font-size: var(--font-sm);
    }
}

/* ===================== 移动端优化 ===================== */

/* iOS安全区域适配 */
@supports (padding: env(safe-area-inset-top)) {
    .main-header {
        padding-top: calc(24px + env(safe-area-inset-top));
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }

    .main-header.scrolled {
        padding-top: calc(16px + env(safe-area-inset-top));
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .fullscreen-menu .menu-container {
        padding-top: calc(env(safe-area-inset-top) + 20px);
        padding-bottom: calc(env(safe-area-inset-bottom) + 20px);
    }

    .cart-panel {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* 移动端触摸优化 */
@media (hover: none) and (pointer: coarse) {
    body {
        -webkit-tap-highlight-color: rgba(0, 147, 128, 0.2);
    }

    /* 触摸友好的交互 */
    .btn-primary-custom:active,
    .btn-ghost:active,
    .filter-btn:active,
    .filter-tab:active {
        transform: scale(0.97);
        opacity: 0.9;
    }

    /* 卡片触摸效果 */
    .card:active,
    .product-card:active,
    .scene-card:active {
        transform: scale(0.99);
    }

    /* 禁用炫光效果提升性能 */
    .cursor-glow {
        display: none !important;
    }

    /* 滚动优化 */
    * {
        -webkit-overflow-scrolling: touch;
    }
}

/* 响应式基础增强 */
@media (max-width: 992px) {
    section {
        padding: 70px 0;
    }

    .page-hero,
    .about-hero,
    .scene-hero,
    .gallery-hero,
    .dealers-hero,
    .guide-hero,
    .contact-hero {
        padding: 140px 0 80px;
        min-height: auto;
    }

    .container {
        max-width: 720px;
    }

    .container-fluid {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
}

@media (max-width: 768px) {
    section {
        padding: 50px 0;
    }

    .page-hero,
    .about-hero,
    .scene-hero,
    .gallery-hero,
    .dealers-hero,
    .guide-hero,
    .contact-hero {
        padding: 120px 0 60px;
        min-height: auto;
    }

    .btn-primary-custom,
    .btn-ghost {
        padding: 12px 24px;
        font-size: 0.85rem;
    }

    .container {
        max-width: 100%;
        padding: 0 16px;
    }

    .container-fluid {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

@media (max-width: 576px) {
    section {
        padding: 40px 0;
    }

    .btn-primary-custom,
    .btn-ghost {
        padding: 14px 24px;
        font-size: 0.9rem;
    }
}
