/* ============================================
   EARTHING - Premium Grounding Products
   Warm & Cozy Home Style
   ============================================ */

/* CSS Variables */
:root {
    /* Color Palette - Warm & Natural */
    --color-primary: #2D5A3D;
    --color-primary-light: #3D7A52;
    --color-primary-dark: #1D3A2D;
    --color-secondary: #C4A77D;
    --color-secondary-light: #D4B78D;
    --color-accent: #8B7355;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-lighter: #999999;
    --color-bg: #FDFBF7;
    --color-bg-alt: #F7F4EF;
    --color-white: #FFFFFF;
    --color-border: #E8E4DE;
    --color-shadow: rgba(45, 90, 61, 0.1);
    
    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --section-padding: 100px;
    --container-max: 1200px;
    
    /* Transitions */
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 500;
    line-height: 1.2;
    color: var(--color-text);
    margin-bottom: 20px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 600px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--color-shadow);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

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

.btn-full {
    width: 100%;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

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

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    background: url('../images/products/04_bedsheet.jpg') center/cover;
    opacity: 0.15;
    mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}

.hero-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 120px 20px 80px;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-text {
    max-width: 650px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 500;
    line-height: 1.15;
    margin-bottom: 25px;
}

.title-line {
    display: block;
}

.title-line.highlight {
    color: var(--color-primary);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-light);
    margin-bottom: 35px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--color-text-lighter);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.scroll-arrow {
    width: 20px;
    height: 30px;
    border: 2px solid var(--color-text-lighter);
    border-radius: 10px;
    position: relative;
}

.scroll-arrow::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 2px;
    animation: scrollBounce 1.5s infinite;
}

@keyframes scrollBounce {
    0%, 100% { top: 6px; opacity: 1; }
    50% { top: 14px; opacity: 0.5; }
}

/* ============================================
   Brand Story Section
   ============================================ */
.brand-story {
    padding: var(--section-padding) 0;
    background: var(--color-white);
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.story-content {
    max-width: 540px;
}

.story-text {
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.story-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-lighter);
    margin-top: 5px;
}

.story-image {
    position: relative;
}

.image-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.image-frame::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--color-secondary);
    border-radius: 20px;
    z-index: -1;
}

.image-frame img {
    width: 100%;
    transition: transform 0.5s ease;
}

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

/* ============================================
   Video Section
   ============================================ */
.video-section {
    padding: var(--section-padding) 0;
    background: var(--color-bg-alt);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

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

.video-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--color-text);
}

.video-wrapper {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.video-wrapper video {
    width: 100%;
    display: block;
}

.video-desc {
    margin-top: 15px;
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* ============================================
   Products Section
   ============================================ */
.products {
    padding: var(--section-padding) 0;
    background: var(--color-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header .section-desc {
    margin: 0 auto;
}

.product-category {
    margin-bottom: 80px;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-border);
}

.category-icon {
    font-size: 1.5rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.products-grid-small {
    grid-template-columns: repeat(3, 1fr);
}

.product-card {
    background: var(--color-bg);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--color-bg-alt);
}

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

.product-info {
    padding: 25px;
}

.product-info h4 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.product-desc {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-features li {
    font-size: 0.8rem;
    color: var(--color-primary);
    background: rgba(45, 90, 61, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
}

.product-card-small {
    background: var(--color-bg);
    border-radius: 15px;
    overflow: hidden;
    text-align: center;
    transition: var(--transition);
}

.product-card-small:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.product-card-small img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.product-card-small h4 {
    padding: 20px;
    font-family: var(--font-display);
    font-size: 1.1rem;
}

/* 更多搭配区块 */
.more-pairings {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.pairings-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 25px;
    text-align: center;
}

.pairings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.pairing-card {
    background: var(--color-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.pairing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.pairing-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.pairing-card h4 {
    padding: 10px 6px;
    font-family: var(--font-display);
    font-size: 0.82rem;
    text-align: center;
    color: var(--color-text);
}

.catalog-cta {
    text-align: center;
    padding: 50px;
    background: var(--color-bg-alt);
    border-radius: 20px;
}

.catalog-cta p {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--color-text);
}

/* ============================================
   Technology Section
   ============================================ */
.technology {
    padding: var(--section-padding) 0;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.tech-card {
    background: var(--color-white);
    padding: 35px 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.tech-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.tech-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: rgba(45, 90, 61, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-icon svg {
    width: 35px;
    height: 35px;
    stroke: var(--color-primary);
}

.tech-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.tech-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

.certifications {
    text-align: center;
    padding: 50px;
    background: var(--color-white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.cert-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.cert-desc {
    color: var(--color-text-light);
    margin-bottom: 30px;
}

.cert-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cert-badge {
    padding: 12px 25px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
    letter-spacing: 1px;
}

/* ============================================
   OEM/ODM Section
   ============================================ */
.oem {
    padding: var(--section-padding) 0;
    background: var(--color-white);
}

.oem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.oem-content {
    max-width: 540px;
}

.oem-intro {
    color: var(--color-text-light);
    margin-bottom: 35px;
}

.oem-features {
    margin-bottom: 35px;
}

.oem-feature {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.feature-text h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.feature-text p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.oem-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.oem-image img {
    width: 100%;
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    padding: var(--section-padding) 0;
    background: var(--color-bg-alt);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-info {
    max-width: 500px;
}

.contact-intro {
    color: var(--color-text-light);
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    gap: 20px;
}

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

.contact-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-white);
}

.contact-text h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-text p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.contact-form-wrapper {
    background: var(--color-white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.contact-form h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-bg);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--color-primary-dark);
    color: var(--color-white);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-brand .footer-logo {
    height: 40px;
    filter: brightness(0) invert(1);
    margin-bottom: 15px;
}

.footer-brand p {
    font-size: 0.95rem;
    opacity: 0.8;
}

.footer-tagline {
    font-style: italic;
    margin-top: 10px;
    opacity: 0.6;
}

.footer-links h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .story-grid,
    .oem-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .story-image,
    .oem-image {
        order: -1;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 70px;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-white);
        flex-direction: column;
        padding: 100px 40px 40px;
        gap: 25px;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid-small {
        grid-template-columns: 1fr;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .story-stats {
        flex-direction: column;
        gap: 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand {
        margin-bottom: 30px;
    }
    
    .footer-links h4 {
        margin-bottom: 15px;
    }
}

/* ============================================
   Form Success/Error States
   ============================================ */
.form-success {
    background: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
}

.form-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
}

/* ============================================
   Carousel
   ============================================ */
.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.carousel-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.3s, transform 0.3s;
    backdrop-filter: blur(4px);
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.carousel-dots .dot.active {
    background: #fff;
    transform: scale(1.3);
}
