/* 子如玉网站 - 主样式文件 */

/* ===== 子如玉品牌颜色主题 - 淡粉色系列 ===== */
:root {
    /* 主色调 - 淡粉色系 */
    --primary: #f472b6;        /* pink-400 - 主色 */
    --primary-light: #f9a8d4;  /* pink-300 - 次色 */
    --primary-lighter: #fbcfe8; /* pink-200 - 浅色 */
    --primary-dark: #ec4899;    /* pink-500 - 深色 */

    /* 中性色 - 保持灰色系，确保对比度 */
    --text-primary: #1f2937;   /* gray-800 - 主要文字，更深色 */
    --text-secondary: #4b5563; /* gray-600 - 次要文字，更深色 */
    --text-light: #6b7280;     /* gray-500 - 浅色文字 */

    /* 背景色 */
    --bg-primary: #ffffff;     /* 主背景 */
    --bg-secondary: #fdf2f8;  /* pink-50 - 次背景 */
    --bg-tertiary: #fce7f3;    /* pink-100 - 三级背景 */

    /* 功能色 - 淡粉色系 */
    --success: #f472b6;        /* pink-400 */
    --warning: #f59e0b;        /* amber-500 */
    --error: #ef4444;          /* red-500 */
    --info: #f472b6;          /* pink-400 */

    /* 边框色 */
    --border-light: #fce7f3;   /* pink-100 */
    --border-medium: #f9a8d4;  /* pink-300 */
    --border-dark: #f472b6;    /* pink-400 */
}

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

body {
    font-family: 'PingFang SC', 'Helvetica Neue', 'Arial', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', 'SimSun', 'sans-serif';
    -webkit-font-smoothing: antialiased;
    overflow-x: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* 主要内容区域 */
main {
    flex: 1;
}

/* ===== 导航栏样式 - 借鉴factiv风格 ===== */
.nav-link {
    position: relative;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    color: var(--text-primary);
}

.nav-link:hover {
    /* background: linear-gradient(135deg, #fce7f3 0%, #f9a8d4 100%); */
    color: var(--primary);
    transform: translateY(-1px);
    /* box-shadow: 0 4px 12px rgba(244, 114, 182, 0.15); */
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: linear-gradient(135deg, #fce7f3 0%, #f9a8d4 100%); */
    /* border-radius: 6px; */
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before {
    opacity: 1;
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.1);
    border-color: var(--primary);
}

/* ===== 新导航栏布局样式 ===== */
/* Logo区域样式 */
.nav-logo-container {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.nav-logo-container img {
    height: 5rem;
    width: auto;
    transition: transform 0.3s ease;
}

.nav-logo-container img:hover {
    transform: scale(1.05);
}

/* 菜单和搜索区域样式 */
.nav-menu-search-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-top: 1px solid #f3f4f6;
}

/* 移动端菜单和搜索区域调整 */
@media (max-width: 768px) {
    .nav-menu-search-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .nav-menu-search-container .flex.items-center {
        width: 100%;
        justify-content: center;
    }

    .nav-menu-search-container form {
        width: 100%;
        max-width: 400px;
    }

    .nav-menu-search-container .relative {
        width: 100%;
    }

    .nav-menu-search-container input {
        width: 100%;
    }
}

/* ===== 渐变背景 - 淡粉色主题 ===== */
.gradient-bg {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    position: relative;
}

.gradient-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.gradient-bg > * {
    position: relative;
    z-index: 2;
}

/* ===== 文本截断样式 ===== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 卡片悬停效果 - 借鉴factiv风格 ===== */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    position: relative;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.05) 0%, rgba(249, 168, 212, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(244, 114, 182, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.card-hover:hover::before {
    opacity: 1;
}

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

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

.card-hover:hover .btn-detail {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(244, 114, 182, 0.3);
}

/* ===== 首页样式 ===== */
.hero-section {
    padding: 80px 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.hero-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.hero-button-primary {
    padding: 0.75rem 2rem;
    background: white;
    color: var(--primary);
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(244, 114, 182, 0.3);
}

.hero-button-primary:hover {
    background-color: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(244, 114, 182, 0.4);
}

.hero-button-secondary {
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-button-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* 产品展示卡片 */
.product-showcase-card {
    text-align: center;
    background: white;
    border-radius: 16px;
    padding: 32px 24px;
    border: 1px solid #e5e7eb;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.product-showcase-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    border-radius: 16px;
}

.product-showcase-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(244, 114, 182, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
}

.product-showcase-card:hover::before {
    opacity: 1;
}

.product-showcase-icon {
    width: 5rem;
    height: 5rem;
    background: linear-gradient(135deg, #fce7f3 0%, #f9a8d4 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    border: 2px solid rgba(244, 114, 182, 0.2);
}

.product-showcase-card:hover .product-showcase-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(244, 114, 182, 0.3);
}

.product-showcase-icon svg {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--primary);
    transition: color 0.3s ease;
}

.product-showcase-card:hover .product-showcase-icon svg {
    color: white;
}

.product-showcase-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
    position: relative;
    z-index: 2;
}

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

.product-showcase-description {
    color: #6b7280;
    transition: color 0.3s ease;
    position: relative;
    z-index: 2;
}

/* ===== 产品页面样式 - 借鉴factiv风格 ===== */
/* 注意：产品页面现在主要使用Tailwind CSS类，这里只保留必要的自定义样式 */

/* 产品卡片悬停效果增强 */
.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(244, 114, 182, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

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

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.05) 0%, rgba(249, 168, 212, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
    border-radius: 8px;
}

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

/* 筛选侧边栏样式 */
.filter-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

/* 产品网格响应式 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* ===== 产品详情页面样式 ===== */
.product-detail-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.product-detail {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.product-image-section {
    position: relative;
}

.product-main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    background: #f9fafb;
}

.product-info-section {
    padding: 20px 0;
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    line-height: 1.3;
}

.product-description-detail {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.product-features-detail {
    margin-bottom: 30px;
}

.product-features-detail h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    padding: 8px 0;
    color: #6b7280;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    margin-right: 8px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.back-button:hover {
    color: var(--primary);
}

.back-button svg {
    margin-right: 8px;
}

/* ===== 企业文化页面样式 ===== */
.cultural-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.cultural-content {
    background: white;
    border-radius: 16px;
    padding: 48px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.cultural-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary);
}

.cultural-content h4 {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
    margin-top: 32px;
    padding-left: 16px;
    border-left: 4px solid var(--primary);
}

.cultural-content p {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 16px;
}

/* ===== 联系我们页面样式 ===== */
.contact-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-content {
    background: white;
    border-radius: 16px;
    padding: 48px;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.contact-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary);
}

.contact-info {
    list-style: none;
    padding: 0;
}

.contact-item {
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 16px 24px;
    /* background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--primary-lighter) 100%); */
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 16px rgba(244, 114, 182, 0.15);
}

/* 留言表单样式 */
.contact-form-container {
    background: white;
    border-radius: 16px;
    padding: 48px;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.contact-form-container h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary);
}

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

.contact-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: var(--bg-primary);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* 短信验证码组 */
.sms-group {
    display: flex;
    gap: 10px;
}

.sms-group input {
    flex: 1;
}

.btn-sms {
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.btn-sms:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-sms:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

/* 图片验证码组 */
.captcha-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-group input {
    flex: 1;
}

.captcha-group img {
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid var(--border-light);
}

/* 提交按钮 */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

/* 提示消息 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px auto;
        padding: 0 15px;
    }

    .contact-content,
    .contact-form-container {
        padding: 20px;
    }

    .sms-group,
    .captcha-group {
        flex-direction: column;
    }

    .btn-sms {
        width: 100%;
    }
}

/* ===== 关于我们页面样式 ===== */
.master-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 20px;
    background-color: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.master-container h3 {
    font-size: 28px;
    color: #1f2937;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary);
}

.master-container p {
    text-indent: 2em;
    font-size: 16px;
    color: #6b7280;
    text-align: justify;
    line-height: 1.8;
    margin: 16px 0;
}

/* ===== 404页面样式 ===== */
.error-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #bae6fd 100%);
}

.error-content {
    max-width: 28rem;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    padding: 0 1rem;
}

.error-logo {
    margin-bottom: 2rem;
}

.error-logo-icon {
    width: 6rem;
    height: 6rem;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.error-logo-icon span {
    color: white;
    font-weight: bold;
    font-size: 2.25rem;
}

.error-code {
    font-size: 3.75rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

.error-description {
    color: #6b7280;
    margin-bottom: 2rem;
}

.error-search {
    margin-bottom: 2rem;
}

.error-search-form {
    display: flex;
}

.error-search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem 0 0 0.5rem;
    outline: none;
}

.error-search-input:focus {
    ring: 2px;
    ring-color: var(--primary);
    border-color: transparent;
}

.error-search-button {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 0 0.5rem 0.5rem 0;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.error-search-button:hover {
    background: var(--primary-light);
}

.error-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.error-nav-item {
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
}

.error-nav-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.error-nav-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
}

.error-nav-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.error-nav-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.error-back-button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.error-back-button:hover {
    background: var(--primary-light);
}

.error-back-button svg {
    margin-right: 0.5rem;
}

/* ===== 响应式设计 ===== */
@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }

    .error-nav {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .products-container {
        flex-direction: column;
    }

    .categories-sidebar {
        width: 100%;
        position: static;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .product-detail-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .product-main-image {
        height: 300px;
    }

    .product-title {
        font-size: 24px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-description {
        font-size: 1rem;
    }
}
