/* 首页样式 */

/* 首屏 */

.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;
}

/* 入场动画 */
@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;
    }
}

/* 区块通用 */

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

/* 特色产品 */

.ymy-product-grid-featured {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 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);
    min-width: 0;
    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);
}

/* 首页两栏 */

.ymy-home-main-inner {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.ymy-home-content {
    flex: 1;
    min-width: 0;
}

.ymy-home-sidebar {
    width: 310px;
    flex-shrink: 0;
    padding-top: var(--ymy-spacing-2xl);
}

/* 广告模块 */

.ymy-home-ad-module {
    padding-top: var(--ymy-spacing-2xl);
}

.ymy-home-ad-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.ymy-home-ad-card {
    background: var(--ymy-bg-card);
    border: 1px solid var(--ymy-border-light);
    border-radius: var(--ymy-radius-lg);
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    transition: all var(--ymy-transition);
}

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

.ymy-home-ad-hot {
    display: inline-block;
    line-height: 1;
    margin-bottom: var(--ymy-spacing-sm);
}

.ymy-home-ad-hot-icon {
    display: block;
    width: 28px;
    height: 28px;
}

.ymy-home-ad-name {
    font-size: var(--ymy-font-size-base);
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 var(--ymy-spacing-sm);
    align-self: stretch;
    overflow-wrap: anywhere;
}

.ymy-home-ad-name a {
    color: var(--ymy-text-primary);
    text-decoration: none;
}

.ymy-home-ad-name a:hover { color: var(--ymy-accent); }

.ymy-home-ad-excerpt {
    font-size: var(--ymy-font-size-sm);
    color: var(--ymy-text-muted);
    line-height: 1.6;
    margin: 0 0 var(--ymy-spacing-md);
    align-self: stretch;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ymy-home-ad-price {
    font-size: var(--ymy-font-size-lg);
    font-weight: 700;
    color: #e53e3e;
    margin-top: auto;
}

/* 最新动态 */

.ymy-latest-news-module {
    padding-top: var(--ymy-spacing-xl);
}

.ymy-latest-news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.ymy-latest-news-panel {
    min-width: 0;
    background: var(--ymy-bg-card);
    border: 1px solid var(--ymy-border-light);
    border-radius: var(--ymy-radius-lg);
    padding: 20px;
}

.ymy-latest-news-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--ymy-spacing-sm);
    margin-bottom: var(--ymy-spacing-sm);
    border-bottom: 1px solid var(--ymy-border-light);
}

.ymy-latest-news-title {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.4;
    color: var(--ymy-text-primary);
    margin: 0;
}

.ymy-latest-news-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1em;
    margin-right: var(--ymy-spacing-sm);
    background: var(--ymy-accent);
    border-radius: 2px;
    vertical-align: -0.1em;
}

.ymy-latest-news-all {
    display: inline-flex;
    align-items: center;
    font-size: var(--ymy-font-size-sm);
    color: var(--ymy-text-muted);
    text-decoration: none;
}

.ymy-latest-news-arrow {
    width: 1em;
    height: 1em;
    margin-left: 4px;
    fill: currentColor;
}

.ymy-latest-news-all:hover { color: var(--ymy-accent); }

.ymy-latest-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ymy-latest-news-item {
    display: flex;
    gap: var(--ymy-spacing-md);
    padding: var(--ymy-spacing-sm) 0;
}

.ymy-latest-news-item + .ymy-latest-news-item {
    border-top: 1px solid var(--ymy-border-light);
}

.ymy-latest-news-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 68px;
    border-radius: var(--ymy-radius-md);
    overflow: hidden;
    background: var(--ymy-bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ymy-latest-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ymy-latest-news-placeholder {
    font-size: 22px;
    color: var(--ymy-text-muted);
}

.ymy-latest-news-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ymy-latest-news-post-title {
    font-size: var(--ymy-font-size-base);
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ymy-latest-news-post-title a {
    color: var(--ymy-text-primary);
    text-decoration: none;
}

.ymy-latest-news-post-title a:hover { color: var(--ymy-accent); }

.ymy-latest-news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ymy-spacing-sm);
    margin-top: auto;
}

.ymy-latest-news-meta-left {
    display: flex;
    align-items: center;
    gap: var(--ymy-spacing-sm);
    font-size: var(--ymy-font-size-xs);
    color: var(--ymy-text-muted);
}

.ymy-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--ymy-border-light);
    background: var(--ymy-bg-page);
    color: var(--ymy-text-muted);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: var(--ymy-font-size-xs);
    line-height: 1.6;
    cursor: pointer;
    transition: all var(--ymy-transition);
}

.ymy-like-btn:hover {
    border-color: var(--ymy-accent);
    color: var(--ymy-accent);
}

.ymy-like-btn.is-liked,
.ymy-like-btn.is-liked:hover {
    border-color: var(--ymy-accent);
    background: var(--ymy-accent-light);
    color: var(--ymy-accent);
    cursor: default;
}

.ymy-like-btn.is-liked svg { fill: currentColor; }

.ymy-latest-news-empty {
    font-size: var(--ymy-font-size-sm);
    color: var(--ymy-text-muted);
    margin: var(--ymy-spacing-sm) 0 0;
}

/* 定制工单 */

.ymy-custom-ticket-module {
    padding-top: var(--ymy-spacing-xl);
}

.ymy-custom-ticket-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.ymy-custom-ticket-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--ymy-bg-card);
    border: 1px solid var(--ymy-border-light);
    border-radius: var(--ymy-radius-lg);
    padding: 20px;
}

.ymy-custom-ticket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ymy-spacing-sm);
    padding-bottom: var(--ymy-spacing-sm);
    margin-bottom: var(--ymy-spacing-md);
}

.ymy-custom-ticket-title {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.4;
    color: var(--ymy-text-primary);
    margin: 0;
}

.ymy-custom-ticket-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1em;
    margin-right: var(--ymy-spacing-sm);
    background: var(--ymy-accent);
    border-radius: 2px;
    vertical-align: -0.1em;
}

.ymy-custom-ticket-submit {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    font-size: var(--ymy-font-size-sm);
    color: var(--ymy-text-muted);
    text-decoration: none;
    white-space: nowrap;
}

.ymy-custom-ticket-submit-arrow {
    width: 1em;
    height: 1em;
    margin-left: 4px;
    fill: currentColor;
}

.ymy-custom-ticket-submit:hover { color: var(--ymy-accent); }

.ymy-custom-ticket-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--ymy-spacing-md);
}

.ymy-custom-ticket-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--ymy-bg-elevated);
    border-radius: var(--ymy-radius-md);
    color: var(--ymy-accent);
}

.ymy-custom-ticket-icon-svg {
    display: block;
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.ymy-custom-ticket-content {
    width: 100%;
    min-width: 0;
    font-size: var(--ymy-font-size-sm);
    line-height: 1.8;
    color: var(--ymy-text-muted);
    overflow-wrap: anywhere;
}

.ymy-custom-ticket-content p {
    margin: 0 0 var(--ymy-spacing-sm);
}

.ymy-custom-ticket-content p:last-child {
    margin-bottom: 0;
}

.ymy-custom-ticket-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    margin-bottom: 40px;
    padding: 10px 28px;
    border-radius: 999px;
    background: var(--ymy-accent);
    color: #fff;
    font-size: var(--ymy-font-size-sm);
    font-weight: 600;
    text-decoration: none;
    transition: transform var(--ymy-transition), box-shadow var(--ymy-transition), background-color var(--ymy-transition);
}

.ymy-custom-ticket-btn:hover {
    background: var(--ymy-accent-hover);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(90, 103, 216, 0.35);
}

.ymy-custom-ticket-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 103, 216, 0.25);
}

/* 评论轮播 */
.ymy-home-comments-module {
    padding-top: var(--ymy-spacing-xl);
}

.ymy-home-comments-header {
    margin-bottom: var(--ymy-spacing-md);
}

.ymy-home-comments-title {
    font-size: var(--ymy-font-size-lg);
    font-weight: 700;
    color: var(--ymy-text-primary);
    margin: 0;
}

.ymy-home-comments-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1em;
    margin-right: var(--ymy-spacing-sm);
    background: var(--ymy-accent);
    border-radius: 2px;
    vertical-align: -0.1em;
}

.ymy-home-comments-carousel {
    position: relative;
    overflow: hidden;
}

.ymy-home-comments-track {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    transition: transform var(--ymy-transition);
}

.ymy-home-comment-card {
    flex: 0 0 33.3333%;
    box-sizing: border-box;
    padding: 10px;
}

.ymy-home-comment-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 24px 20px 20px;
    background: var(--ymy-bg-card);
    border: 1px solid var(--ymy-border-light);
    border-radius: var(--ymy-radius-lg);
    box-shadow: var(--ymy-shadow-card);
}

.ymy-home-comment-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: var(--ymy-bg-elevated);
}

.ymy-home-comment-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ymy-home-comment-avatar-fallback {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: var(--ymy-accent);
}

.ymy-home-comment-name {
    font-size: var(--ymy-font-size-base);
    font-weight: 600;
    color: var(--ymy-text-primary);
}

.ymy-home-comment-bubble {
    position: relative;
    width: 100%;
    padding: 14px 16px;
    background: var(--ymy-bg-elevated);
    border-radius: var(--ymy-radius-md);
    font-size: var(--ymy-font-size-sm);
    line-height: 1.8;
    color: var(--ymy-text-muted);
    text-align: left;
}

/* 气泡箭头 */
.ymy-home-comment-bubble::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--ymy-bg-elevated);
}

.ymy-home-comments-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: var(--ymy-spacing-md);
}

.ymy-home-comment-dot {
    width: 24px;
    height: 6px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: var(--ymy-border-light);
    cursor: pointer;
    transition: background-color var(--ymy-transition);
}

.ymy-home-comment-dot:hover {
    background: var(--ymy-accent);
    opacity: 0.7;
}

.ymy-home-comment-dot.is-active {
    background: var(--ymy-accent);
}

@media (max-width: 768px) {
    .ymy-home-comment-card { flex-basis: 100%; }
}

.ymy-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--ymy-spacing-lg);
}

.ymy-sidebar-widget {
    background: var(--ymy-bg-card);
    border: 1px solid var(--ymy-border-light);
    border-radius: var(--ymy-radius-lg);
    padding: var(--ymy-spacing-lg);
}

.ymy-widget-title {
    font-size: var(--ymy-font-size-base);
    font-weight: 600;
    color: var(--ymy-text-primary);
    margin: 0 0 var(--ymy-spacing-md);
    padding-bottom: var(--ymy-spacing-sm);
    border-bottom: 1px solid var(--ymy-border-light);
}

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

.ymy-widget-list li {
    margin-bottom: var(--ymy-spacing-sm);
}

.ymy-widget-list li:last-child { margin-bottom: 0; }

.ymy-widget-list a {
    color: var(--ymy-text-primary);
    text-decoration: none;
    font-size: var(--ymy-font-size-sm);
    line-height: 1.6;
}

.ymy-widget-list a:hover { color: var(--ymy-accent); }

/* 响应式 */

@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, minmax(0, 1fr)); }
    .ymy-home-main-inner { flex-direction: column; align-items: stretch; }
    .ymy-home-content { width: 100%; }
    .ymy-home-sidebar { width: 100%; }
}

@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-product-grid-featured { grid-template-columns: minmax(0, 1fr); }
    .ymy-home-ad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ymy-latest-news-grid { grid-template-columns: minmax(0, 1fr); }
    .ymy-custom-ticket-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
    .ymy-hero-stats { gap: var(--ymy-spacing-lg); flex-wrap: wrap; }
    .ymy-home-ad-grid { grid-template-columns: 1fr; }
}

/* 暗色模式 */

body.ymy-dark-mode .ymy-price {
    color: #f56565;
}
