/**
 * YMY Theme - Homepage Styles
 * Premium minimalist design for theme marketplace
 *
 * @package YMY
 * @since 1.0.0
 */

/* ==========================================================================
   1. Hero Section
   ========================================================================== */

.ymy-hero {
    background: var(--ymy-bg-hero);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.ymy-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.ymy-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.ymy-hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.ymy-hero-title {
    font-size: var(--ymy-font-size-4xl);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: var(--ymy-spacing-md);
}

.ymy-hero-desc {
    font-size: var(--ymy-font-size-xl);
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin-bottom: var(--ymy-spacing-xl);
}

.ymy-hero-actions {
    display: flex;
    gap: var(--ymy-spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.ymy-hero-actions .ymy-btn-primary {
    background: #fff;
    color: var(--ymy-accent);
    border-color: #fff;
    font-weight: 600;
}

.ymy-hero-actions .ymy-btn-primary:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.ymy-hero-actions .ymy-btn-outline {
    color: #fff;
    border-color: rgba(255,255,255,0.5);
    background: transparent;
}

.ymy-hero-actions .ymy-btn-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    color: #fff;
}

.ymy-hero-stats {
    display: flex;
    gap: var(--ymy-spacing-2xl);
    justify-content: center;
    margin-top: 56px;
}

.ymy-hero-stat-item {
    text-align: center;
}

.ymy-hero-stat-number {
    display: block;
    font-size: 2.2em;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.ymy-hero-stat-label {
    display: block;
    font-size: var(--ymy-font-size-sm);
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}

/* Hero 入场动画（页面加载时依次淡入上移） */
@keyframes ymyFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ymy-hero-title,
.ymy-hero-desc,
.ymy-hero-actions,
.ymy-hero-stats {
    animation: ymyFadeUp 0.7s ease both;
}

.ymy-hero-desc { animation-delay: 0.15s; }
.ymy-hero-actions { animation-delay: 0.3s; }
.ymy-hero-stats { animation-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
    .ymy-hero-title,
    .ymy-hero-desc,
    .ymy-hero-actions,
    .ymy-hero-stats {
        animation: none;
    }
}

/* ==========================================================================
   2. Section Common
   ========================================================================== */

.ymy-section {
    padding: var(--ymy-spacing-4xl) 0;
}

.ymy-section-header {
    text-align: center;
    margin-bottom: var(--ymy-spacing-2xl);
}

.ymy-section-title {
    font-size: var(--ymy-font-size-3xl);
    font-weight: 700;
    color: var(--ymy-text-primary);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.ymy-section-desc {
    font-size: var(--ymy-font-size-base);
    color: var(--ymy-text-muted);
    margin-top: var(--ymy-spacing-sm);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.ymy-section-more {
    margin-top: var(--ymy-spacing-xl);
    text-align: center;
}

/* ==========================================================================
   3. Featured Products Grid (2 columns, larger cards)
   ========================================================================== */

.ymy-product-grid-featured {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--ymy-spacing-lg);
}

.ymy-product-card {
    background: var(--ymy-bg-card);
    border-radius: var(--ymy-radius-lg);
    overflow: hidden;
    border: 1px solid var(--ymy-border-light);
    transition: all var(--ymy-transition);
}

.ymy-product-card:hover {
    border-color: var(--ymy-border-color);
    box-shadow: var(--ymy-shadow-card-hover);
    transform: translateY(-4px);
}

.ymy-product-card-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--ymy-bg-elevated);
    position: relative;
}

.ymy-product-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--ymy-transition-slow);
}

.ymy-product-card:hover .ymy-product-card-thumb img {
    transform: scale(1.03);
}

.ymy-product-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--ymy-text-muted);
}

.ymy-product-card-body {
    padding: var(--ymy-spacing-lg);
}

.ymy-product-card-title {
    font-size: var(--ymy-font-size-lg);
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.ymy-product-card-title a {
    color: var(--ymy-text-primary);
    text-decoration: none;
}

.ymy-product-card-title a:hover { color: var(--ymy-accent); }

.ymy-product-card-desc {
    font-size: var(--ymy-font-size-sm);
    color: var(--ymy-text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ymy-product-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--ymy-spacing-md);
}

.ymy-price {
    font-size: var(--ymy-font-size-xl);
    font-weight: 700;
    color: #e53e3e;
}

.ymy-price-free {
    font-size: var(--ymy-font-size-xl);
    font-weight: 700;
    color: var(--ymy-accent-secondary);
}

/* ==========================================================================
   4. Features Section (Why Choose Us)
   ========================================================================== */

.ymy-features-section {
    background: var(--ymy-bg-body);
}

.ymy-features-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--ymy-spacing-lg);
}

.ymy-feature-card {
    text-align: center;
    padding: var(--ymy-spacing-2xl) var(--ymy-spacing-lg);
    background: var(--ymy-bg-page);
    border-radius: var(--ymy-radius-lg);
    border: 1px solid var(--ymy-border-light);
    transition: all var(--ymy-transition);
}

.ymy-feature-card:hover {
    border-color: var(--ymy-accent);
    box-shadow: 0 8px 30px rgba(90, 103, 216, 0.08);
    transform: translateY(-2px);
}

.ymy-feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--ymy-spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ymy-accent-light);
    border-radius: var(--ymy-radius-md);
    font-size: 24px;
}

.ymy-feature-card h3 {
    font-size: var(--ymy-font-size-lg);
    font-weight: 600;
    color: var(--ymy-text-primary);
    margin-bottom: var(--ymy-spacing-sm);
}

.ymy-feature-card p {
    font-size: var(--ymy-font-size-sm);
    color: var(--ymy-text-muted);
    line-height: 1.7;
}

/* ==========================================================================
   5. Stats Bar
   ========================================================================== */

.ymy-stats-section {
    background: var(--ymy-bg-body);
    border-top: 1px solid var(--ymy-border-light);
    border-bottom: 1px solid var(--ymy-border-light);
    padding: var(--ymy-spacing-2xl) 0;
}

.ymy-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--ymy-spacing-lg);
}

.ymy-stats-item {
    text-align: center;
}

.ymy-stats-number {
    font-size: 2em;
    font-weight: 800;
    color: var(--ymy-accent);
    line-height: 1.2;
}

.ymy-stats-label {
    font-size: var(--ymy-font-size-sm);
    color: var(--ymy-text-muted);
    margin-top: 4px;
}

/* ==========================================================================
   6. Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .ymy-hero { padding: 72px 0 60px; }
    .ymy-hero-title { font-size: 2.2em; }
    .ymy-product-grid-featured { grid-template-columns: repeat(2, 1fr); }
    .ymy-features-grid-3col { grid-template-columns: repeat(2, 1fr); }
    .ymy-stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--ymy-spacing-xl); }
}

@media (max-width: 768px) {
    .ymy-hero { padding: 56px 0 48px; }
    .ymy-hero-title { font-size: 1.75em; }
    .ymy-hero-desc { font-size: var(--ymy-font-size-base); }

    .ymy-hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .ymy-hero-actions .ymy-btn { width: 100%; max-width: 280px; }

    .ymy-hero-stats { gap: var(--ymy-spacing-xl); }
    .ymy-hero-stat-number { font-size: 1.6em; }

    .ymy-section { padding: var(--ymy-spacing-2xl) 0; }
    .ymy-section-title { font-size: var(--ymy-font-size-2xl); }

    .ymy-product-grid-featured { grid-template-columns: 1fr; }
    .ymy-features-grid-3col { grid-template-columns: 1fr; }
    .ymy-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
