/* ============================================
   Docare 纸尿裤公司官网 - 主样式
   参考 everylife.com 设计风格
   ============================================ */

/* CSS 变量 */
:root {
    /* 配色 */
    --color-primary: #6B5B7A;
    --color-primary-light: #8B7B9A;
    --color-primary-dark: #4B3B5A;
    --color-accent: #E8B4B8;
    --color-accent-light: #F5D4D8;
    --color-bg: #FDFBFA;
    --color-bg-alt: #F5F3F0;
    --color-text: #2D2D2D;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-border: #E8E4E0;
    --color-white: #FFFFFF;

    /* 字体 */
    --font-heading: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
    --font-body: 'Figtree', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;

    /* 尺寸 */
    --container-width: 1200px;
    --header-height: 90px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    /* 保持胶囊按钮，适合母婴品牌 */

    /* 间距 */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 40px;
    --space-xl: 80px;

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);

    /* 动画 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 重置样式 */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 链接 */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

/* 图片 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 容器 */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-wide {
    max-width: 1400px;
}

.container-narrow {
    max-width: 800px;
}

/* ============================================
   头部导航
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.header.transparent {
    background: transparent;
    box-shadow: none;
}

.header.transparent .nav-link {
    color: var(--color-white);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.02em;
}

/* 导航 */
.nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    padding: var(--space-xs) 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* ============================================
   Hero 区域
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(107, 91, 122, 0.7) 0%, rgba(75, 59, 90, 0.5) 100%);
}

.hero-content {
    text-align: center;
    color: var(--color-white);
    max-width: 800px;
    padding: var(--space-xl) var(--space-md);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.8s ease forwards;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.9;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

/* ============================================
   按钮
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-outline-white {
    background: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-outline-white:hover {
    background: var(--color-white);
    color: var(--color-primary);
}

/* ============================================
   区块通用样式
   ============================================ */
.section {
    padding: var(--space-xl) 0;
}

.section-alt {
    background: var(--color-bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   产品卡片
   ============================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.product-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-card-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.product-card-image img {
    position: absolute;
    inset: 10%;
    width: 80%;
    height: 80%;
    object-fit: contain;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-content {
    padding: var(--space-md);
}

.product-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.product-card-desc {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   新闻卡片
   ============================================ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-md);
}

.news-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.news-card-image {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    background: #f5f5f5;
}

.news-card-image img {
    position: absolute;
    inset: 8%;
    width: 84%;
    height: 84%;
    object-fit: contain;
}

.news-card-content {
    padding: var(--space-md);
}

.news-card-date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.news-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   图库/证书网格
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-sm);
}

.gallery-item {
    position: relative;
    padding-top: 75%;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: var(--space-md);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-title {
    color: var(--color-white);
    font-weight: 500;
}

/* ============================================
   特性展示
   ============================================ */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.feature-item {
    text-align: center;
    padding: var(--space-md);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent-light);
    border-radius: 50%;
    color: var(--color-primary);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.feature-desc {
    font-size: 0.95rem;
    color: var(--color-text-light);
}

/* ============================================
   底部
   ============================================ */
.footer {
    background: var(--color-primary-dark);
    color: var(--color-white);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo-text {
    color: var(--color-white);
    margin-bottom: var(--space-sm);
}

.footer-desc {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.6;
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-xs);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.footer-copyright {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ============================================
   表单
   ============================================ */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(107, 91, 122, 0.15);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* ============================================
   分页
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-lg);
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.pagination a {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.pagination a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pagination .active {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
}

/* ============================================
   面包屑
   ============================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.breadcrumb a {
    color: var(--color-text-light);
}

.breadcrumb a:hover {
    color: var(--color-primary);
}

.breadcrumb-separator {
    opacity: 0.5;
}

/* ============================================
   详情页
   ============================================ */
.detail-header {
    padding: calc(var(--header-height) + var(--space-lg)) 0 var(--space-lg);
    background: var(--color-bg-alt);
}

.detail-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.detail-meta {
    display: flex;
    gap: var(--space-md);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.detail-content {
    padding: var(--space-lg) 0;
}

.detail-content img {
    border-radius: var(--radius-md);
    margin: var(--space-md) 0;
}

.detail-content p {
    margin-bottom: var(--space-sm);
}

.detail-content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin: var(--space-lg) 0 var(--space-sm);
}

/* ============================================
   动画
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
        --space-xl: 60px;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--color-white);
        padding: var(--space-md);
        box-shadow: var(--shadow-md);
        gap: 0;
    }

    .nav.active {
        display: flex;
    }

    .nav-link {
        padding: var(--space-sm) 0;
        border-bottom: 1px solid var(--color-border);
    }

    .menu-toggle {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        max-width: none;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}