/* ============================================================
   home.css - 前台样式
   ============================================================ */

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --secondary: #3b82f6;
    --gold: #d4a853;
    --gold-light: #f5e6b0;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Playfair Display', serif;
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 12px 48px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-lg: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-family); color: var(--gray-900); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================================================
   Section
   ============================================================ */
.section { padding: 80px 0; }
.section.bg-light { background: var(--gray-50); }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}
.section-header.text-center {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.section-tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 8px;
}
.section-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.2;
    font-family: var(--font-serif);
}
.section-subtitle {
    font-size: 17px;
    color: var(--gray-500);
    margin-top: 4px;
}
.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
}
.view-all-link:hover { gap: 12px; }

/* ============================================================
   Hero - 深色背景 + 金色文字
   ============================================================ */
.hero {
    padding: 100px 0 80px;
    background: linear-gradient(135deg, #0a0f1a 0%, #0f172a 40%, #1a2332 70%, #0f172a 80%);
    overflow: hidden;
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212,168,83,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59,130,246,0.04) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero-content { max-width: 580px; }
.hero-badge { margin-bottom: 20px; }
.badge-pulse {
    display: inline-block;
    background: rgba(212,168,83,0.15);
    color: var(--gold-light);
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }
.hero-title {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 16px;
    font-family: var(--font-serif);
}
.hero-title .highlight {
    background: linear-gradient(135deg, var(--gold), #f5e6b0, var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 18px;
    color: #94a3b8;
    margin-bottom: 32px;
    line-height: 1.8;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}
.btn-hero-primary {
    background: var(--gold);
    color: #0f172a;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(212,168,83,0.3);
}
.btn-hero-primary:hover {
    background: #c49a3e;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212,168,83,0.4);
}
.btn-hero-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.2);
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}
.btn-hero-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.35);
    transform: translateY(-2px);
}
.hero-trust {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
.hero-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
}
.hero-trust-item i { color: var(--gold); font-size: 16px; }
.hero-image { display: flex; justify-content: center; }
.hero-image-placeholder {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1;
    background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
}
.hero-icon { font-size: 100px; opacity: 0.15; }
.hero-floating-card {
    position: absolute;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
}
.hero-floating-card i { color: var(--gold); }
.hero-floating-card.card-1 { top: 20px; right: 20px; animation: float 3s ease-in-out infinite; }
.hero-floating-card.card-2 { bottom: 20px; left: 20px; animation: float 3s ease-in-out infinite 1.5s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ============================================================
   Categories - 卡片底部对齐
   ============================================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: stretch;
}

.category-card {
    padding: 32px 20px 24px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: #fff;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 280px;
    height: 100%;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.15);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.category-card:hover::before {
    background: rgba(0,0,0,0.08);
}

/* 图标 - 固定高度 */
.category-card .cat-icon {
    font-size: 44px;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    height: 50px;
    line-height: 50px;
}

/* 标题 - 固定高度 */
.category-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    height: 28px;
    line-height: 28px;
}

/* ============================================================
   ✅ 描述区域 - 自动适配文字方向
   ============================================================ */
.category-card .cat-description {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    min-height: 60px;
    max-height: 80px;
    overflow: hidden;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    padding: 0 4px;
}

.category-card .cat-description p {
    font-size: 14px;
    opacity: 0.85;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    /* ✅ 根据内容自动判断方向 */
    unicode-bidi: plaintext;
    text-align: start;
}

/* ============================================================
   🌐 全局文字方向自动适配
   ============================================================ */
p, h1, h2, h3, h4, h5, h6,
.description, .product-title, .category-name,
.product-name, .section-title,
.product-description, .category-description,
.feature-card p, .process-card p,
.product-card .product-title,
.product-card .product-desc,
.specs-features li,
.feature-item, .highlight-item,
.description-content {
    unicode-bidi: plaintext;
    text-align: start;
}

/* ============================================================
   Features
   ============================================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.feature-card {
    text-align: center;
    padding: 36px 24px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--gold);
}
.feature-card .icon { font-size: 48px; margin-bottom: 16px; display: block; }
.feature-card h3 { font-size: 18px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--gray-500); line-height: 1.7; }

/* ============================================================
   Products Grid
   ============================================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}
.product-card a { text-decoration: none; color: inherit; display: block; }
.product-image {
    position: relative;
    background: var(--gray-50);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-image .product-icon { font-size: 48px; opacity: 0.2; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.product-card:hover .product-image img { transform: scale(1.03); }
.product-badge {
    position: absolute;
    top: 12px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    left: 12px;
}
.badge-new { background: var(--success); color: #fff; }
.badge-featured { background: var(--gold); color: var(--white); }
.product-info { padding: 16px 20px 20px; }
.product-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
}
.product-price .price-current {
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
}
.product-actions { margin-top: 12px; }
.btn-primary-sm {
    display: inline-block;
    background: var(--gold);
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}
.btn-primary-sm:hover { background: #c49a3e; }

/* ============================================================
   Process
   ============================================================ */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.process-card {
    text-align: center;
    padding: 32px 20px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    position: relative;
    transition: var(--transition);
}
.process-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.process-number {
    position: absolute;
    top: -12px;
    right: 24px;
    font-size: 14px;
    font-weight: 800;
    color: var(--gray-400);
    background: var(--white);
    padding: 0 10px;
}
.process-icon { font-size: 40px; margin-bottom: 14px; display: block; }
.process-card h3 { font-size: 18px; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.process-card p { font-size: 14px; color: var(--gray-500); line-height: 1.7; }

/* ============================================================
   CTA
   ============================================================ */
.cta-section {
    padding: 70px 0;
    background: linear-gradient(135deg, var(--gray-900), #0f172a);
}
.cta-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}
.cta-text h2 {
    font-size: 34px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
    font-family: var(--font-serif);
}
.cta-text p {
    font-size: 17px;
    color: var(--gray-400);
}
.cta-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============================================================
   Features Section - Decorations
   ============================================================ */
.feature-section {
    position: relative;
    overflow: hidden;
}
.feature-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(212,168,83,0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(212,168,83,0.03) 0%, transparent 50%);
    pointer-events: none;
}
.feature-top-deco {
    text-align: center;
    font-size: 18px;
    letter-spacing: 20px;
    color: var(--gold);
    opacity: 0.3;
    margin-bottom: 4px;
}
.feature-bottom-deco {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
    justify-content: center;
}
.deco-line {
    flex: 1;
    max-width: 120px;
    height: 1.5px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.deco-icons {
    display: flex;
    gap: 14px;
    font-size: 22px;
    animation: float-icons 3s ease-in-out infinite;
}
@keyframes float-icons {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.feature-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 30px;
    flex-wrap: wrap;
}
.stat-item {
    text-align: center;
}
.stat-number {
    display: block;
    font-size: 30px;
    font-weight: 800;
    color: var(--gold);
    font-family: var(--font-serif);
}
.stat-label {
    font-size: 13px;
    color: var(--gray-500);
}

/* ============================================================
   Process Section - Decorations
   ============================================================ */
.process-section {
    background: linear-gradient(180deg, #f8fafc, #ffffff);
    position: relative;
    overflow: hidden;
}
.process-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--gold), #c49a3e, var(--gold), transparent);
    opacity: 0.2;
}
.process-top-deco {
    text-align: center;
    font-size: 16px;
    letter-spacing: 18px;
    color: var(--gold);
    opacity: 0.3;
    margin-bottom: 4px;
}
.process-bottom-deco {
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    border-top: 1px solid rgba(212,168,83,0.12);
}
.process-hint {
    color: var(--gray-400);
    font-size: 14px;
    margin-top: 10px;
}

/* ============================================================
   Empty State
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    color: var(--gray-500);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; display: block; opacity: 0.5; }
.empty-state h3 { font-size: 18px; color: var(--gray-900); margin-bottom: 4px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-title { font-size: 38px; }
}
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .category-card {
        min-height: 220px;
        padding: 20px 14px 16px;
    }
    .category-card .cat-icon {
        font-size: 32px;
        height: 40px;
        line-height: 40px;
        margin-bottom: 8px;
    }
    .category-card h3 {
        font-size: 15px;
        height: 24px;
        line-height: 24px;
        margin-bottom: 6px;
    }
    .category-card .cat-description {
        min-height: 40px;
        max-height: 60px;
    }
    .category-card .cat-description p {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }
    .category-card .btn-sm {
        font-size: 12px;
        padding: 6px 16px;
        min-height: 32px;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .category-card {
        min-height: 170px;
        padding: 14px 10px 12px;
    }
    .category-card .cat-icon {
        font-size: 24px;
        height: 32px;
        line-height: 32px;
        margin-bottom: 4px;
    }
    .category-card h3 {
        font-size: 12px;
        height: 20px;
        line-height: 20px;
        margin-bottom: 4px;
    }
    .category-card .cat-description {
        min-height: 30px;
        max-height: 40px;
        margin-bottom: 6px;
    }
    .category-card .cat-description p {
        font-size: 10px;
        -webkit-line-clamp: 2;
    }
    .category-card .btn-sm {
        font-size: 10px;
        padding: 4px 12px;
        min-height: 26px;
    }
}


/* ============================================================
   Footer
   ============================================================ */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 60px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.footer-logo .logo-icon { font-size: 28px; color: var(--gold); }
.footer-logo .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    font-family: var(--font-serif);
}
.footer-desc { font-size: 14px; line-height: 1.8; margin-bottom: 20px; max-width: 340px; color: #94a3b8; }
.footer-col h4 {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
    color: #94a3b8;
    font-size: 14px;
    transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--gold); padding-left: 4px; }
.contact-info li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.contact-info li span:first-child { color: var(--gold); margin-top: 4px; }
.contact-info li span:last-child { color: #94a3b8; font-size: 14px; }
.social-links {
    display: flex;
    gap: 10px;
}
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    color: #94a3b8;
    transition: var(--transition);
    font-size: 15px;
}
.social-links a:hover {
    background: var(--gold);
    color: var(--white);
    transform: translateY(-2px);
}
.footer-bottom {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
}
.footer-bottom .copyright { color: #64748b; }
.footer-links { display: flex; gap: 12px; align-items: center; }
.footer-links a { color: #64748b; transition: var(--transition); }
.footer-links a:hover { color: var(--gold); }
.footer-divider { color: rgba(255,255,255,0.1); }

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-desc { max-width: 100%; }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-links { flex-wrap: wrap; justify-content: center; }
}