/*
Theme Name: Meichuang OEM Solutions
Theme URI: https://example.com/
Author: Your Name
Author URI: https://example.com/
Description: Professional WordPress theme for cosmetics, daily necessities and health products OEM companies.
Version: 1.0
Text Domain: meichuang
*/

/* 变量定义 */
:root {
    --primary: #8e44ad;
    --secondary: #9b59b6;
    --accent: #e84393;
    --light: #f8f9fa;
    --dark: #2c3e50;
    --gray: #7f8c8d;
    --text: #34495e;
    --success: #27ae60;
    --transition: all 0.3s ease;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

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

/* 语言切换器 */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.language-switcher button {
    background: none;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.language-switcher button.active {
    background: var(--primary);
    color: white;
}

/* 头部导航 */
header {
    background-color: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary);
    font-weight: 700;
}

.logo span {
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    padding: 5px 0;
    position: relative;
    transition: var(--transition);
}

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

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

nav ul li a:hover::after {
    width: 100%;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(rgba(142, 68, 173, 0.8), rgba(155, 89, 182, 0.8)), url('https://images.unsplash.com/photo-1526947425960-945c6e72858f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
    margin-top: 90px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.3s both;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    animation: fadeIn 1s ease 0.6s both;
}

.btn:hover {
    background: #d63077;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 服务部分 */
.services {
    padding: 100px 0;
    background: white;
}

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

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.section-title p {
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
}

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

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

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-img {
    height: 200px;
    overflow: hidden;
}

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

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

.service-content {
    padding: 25px;
}

.service-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.service-content p {
    color: var(--gray);
    margin-bottom: 20px;
}

/* 产品展示 */
.products {
    padding: 100px 0;
    background: #f5f7fa;
}

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

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

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-img {
    height: 250px;
    overflow: hidden;
    position: relative;
}

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(142, 68, 173, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-overlay a {
    color: white;
    font-size: 2rem;
    margin: 0 10px;
    transition: var(--transition);
}

.product-overlay a:hover {
    transform: scale(1.2);
}

.product-content {
    padding: 20px;
}

.product-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.product-content p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* 联系表单 */
.contact {
    padding: 100px 0;
    background: white;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.contact-info p {
    margin-bottom: 30px;
    color: var(--gray);
}

.contact-detail {
    display: flex;
    margin-bottom: 20px;
}

.contact-detail i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-right: 15px;
    min-width: 30px;
}

.contact-form {
    background: #f5f7fa;
    padding: 30px;
    border-radius: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.2);
}

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

.btn-block {
    display: block;
    width: 100%;
}

/* 页脚 */
footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--accent);
}

.footer-column p {
    color: #bdc3c7;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 10px;
    list-style: none;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* 响应式设计 */
@media (max-width: 992px) {
    .hero h2 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 20px;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .hero {
        margin-top: 150px;
        height: auto;
        padding: 60px 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .language-switcher {
        top: 10px;
        right: 10px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}