/* ========== 页面基础样式 ========== */
/* 主题变量已在theme.css中定义，这里只定义页面特定的变量 */
:root {
    /* 保留页面特定的颜色变量 */
    --secondary-green: #25D46E;
    --bg-green-light: #EBF6F0;
    --orange: #F97316;
}

/* ========== 主内容区样式 ========== */
.main-content {
    padding: 0 80px;
}

/* Hero 轮播图样式 */
.hero-section {
    max-width: 1200px;
    margin: 24px auto 0;
}

.hero-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.hero-carousel {
    position: relative;
    width: 100%;
    height: 498px;
}

.hero-images {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.hero-image.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-indicators {
    position: absolute;
    bottom: 40px;
    left: 24px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.hero-indicator {
    position: relative;
    width: 32px;
    height: 7px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    transition: width 0.3s ease;
}

.hero-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: #333333;
    border-radius: 14px;
    transition: width 0.1s linear;
    background-blend-mode: difference;
}

.hero-indicator.active {
    width: 48px;
}

.hero-indicator.active::before {
    animation: progressFill 5s linear forwards;
}

@keyframes progressFill {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

.hero-arrows{
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    z-index: 2;
}
.hero-arrow {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(51, 51, 51, 0.10);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background-color 0.3s ease;
}

.hero-arrow img {
    width: 20px;
    height: 20px;
}

.hero-cta {
    position: absolute;
    bottom: 160px;
    left: 120px;
    background-color: var(--orange);
    border: none;
    border-radius: 24px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary-inverse);
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
}

.hero-cta:hover {
    background-color: #EA580C;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.3);
}

/* ========== 产品展示区样式 ========== */
.products-section {
    max-width: 1200px;
    margin: 48px auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.view-all-link {
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease;

    display: flex;
    padding: 12px 20px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 24px;
    background: var(--bg-green-light);

    color: var(--primary-green);
    text-align: center;
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    letter-spacing: 0.28px;
}

[data-theme="dark"] .view-all-link {
    background: var(--bg-primary);
}

.view-all-link:hover {
    background-color: var(--primary-green);
    color: #ffffff;
}

.view-all-link img {
    width: 16px;
    height: 16px;
}

/* 分类标签 */
.category-scroll-nav {
    position: relative;
    margin-bottom: 32px;
}

.category-scroll-nav .category-tabs {
    min-width: 0;
    margin-bottom: 0;
}

.category-scroll-nav__btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    z-index: 1;
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.category-scroll-nav__btn--prev {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.category-scroll-nav__btn--next {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}


.category-scroll-nav__btn:hover {
    color: #fff;
    background-color: var(--secondary-green);
    border-color: var(--secondary-green);
}

.category-scroll-nav__btn:active {
    transform: translateY(-50%) scale(0.98);
}

.category-scroll-nav__btn.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
    /* overflow-x: auto; */
    padding-bottom: 4px;
}

/* 隐藏滚动条，同时启用原生平滑触摸滚动 */
.category-tabs {
    /* -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
    cursor: grab; */
}
.category-tabs::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

/* 拖拽时的样式提示 */
.category-tabs.dragging {
    cursor: grabbing;
    user-select: none;
}

.category-tab-wrapper {
    padding: 2px;
}
.category-tab-wrapper:has(.category-tab.active) {
    border: 2px solid var(--secondary-green);
    border-radius: 44px;
}

.category-tab {
    border: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-gray);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;

    display: flex;
    padding: 12px 24px;
    align-items: center;
    gap: 6px;
    border-radius: 44px;
    background-color: var(--card-bg);
    height: 100%;
}

.category-tab:hover {
    border-color: var(--secondary-green);
    color: var(--secondary-green);
}

.category-tab.active {
    background-color: var(--secondary-green);
    border-color: var(--secondary-green);
    color: #fff;
}

.category-tab img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.category-tab--skeleton {
    pointer-events: none;
}

.category-tab__skeleton-text {
    width: 88px;
    height: 14px;
    display: block;
}

/* ========== Join Us CTA 样式 ========== */
.join-section {
    margin: 48px 0;
}

.join-container {
    position: relative;
    background: linear-gradient(135deg, #21BD62 0%, #1DA854 100%);
    border-radius: 16px;
    padding: 48px 64px;
    overflow: hidden;
}

.join-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.join-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary-inverse);
    margin-bottom: 24px;
}

.join-features {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.join-features span {
    font-size: 16px;
    color: var(--text-primary-inverse);
}

.join-divider {
    width: 1px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.5);
}

.join-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: var(--text-primary-inverse);
    border: none;
    border-radius: 24px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-green);
    cursor: pointer;
    transition: all 0.3s ease;
}

.join-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.join-button img {
    width: 20px;
    height: 20px;
}

.join-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}


/* ===== 商家入驻横幅 ===== */
.merchant-banner {
    position: relative;
    max-width: 1200px;
    margin: 48px auto 0;
    padding: 16px 0 0;
    text-align: center;
    overflow: hidden;
}

.merchant-banner__image{
    display: block;
    position: relative;
    width: 100%;
    margin-top: 24px;
    object-fit: contain;
}

.merchant-banner__content{
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    width: 100%;
    max-width: 800px;
    margin: 0;
}

.merchant-banner__title {
    font-family: 'Roboto', sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.merchant-banner__features {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
}

.merchant-banner__feature {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: var(--text-primary);
}

.merchant-banner__divider {
    width: 1px;
    height: 14px;
    background: rgba(51, 51, 51, 0.14);
}

.merchant-banner__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: #333;
    color: #fff;
    border-radius: 50px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.merchant-banner__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.merchant-commercials {
    display: none;
    max-width: 1200px;
    margin: 24px auto 48px;
    padding: 0;
}

.merchant-commercials__grid {
    display: grid;
    grid-template-columns: repeat(3, 384px);
    gap: 24px;
    justify-content: center;
}

.merchant-commercials__item {
    display: block;
    width: 384px;
    height: 193px;
    overflow: hidden;
    border-radius: 16px;
    background: #f4f4f4;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.merchant-commercials__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.12);
}

.merchant-commercials__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========== 响应式设计 ========== */

/* 平板设备 */
@media (max-width: 1024px) {
    .main-content,
    .footer {
        padding-left: 40px;
        padding-right: 40px;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .hero-carousel {
        height: 400px;
    }

    .join-container {
        padding: 40px 48px;
    }

    .join-title {
        font-size: 32px;
    }

    .merchant-banner {
        padding-top: 8px;
    }

    .merchant-banner__content {
        max-width: 720px;
    }

    .merchant-commercials {
        margin-top: 20px;
    }

    .merchant-commercials__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .merchant-commercials__item {
        width: 100%;
        height: 168px;
    }

    /* Footer 响应式 */
    .footer-top {
        flex-wrap: wrap;
        gap: 32px;
    }

    .footer-company-info {
        width: 100%;
        max-width: 100%;
    }

    .footer-newsletter-form {
        width: 100%;
    }

    .footer-email-input-wrapper {
        width: 100%;
        max-width: 400px;
    }
}

/* 手机设备 */
@media (max-width: 768px) {

    .category-scroll-nav {
        display: block;
        margin-bottom: 32px;
    }

    .category-scroll-nav__btn {
        display: none;
    }

    .nav-actions {
        gap: 8px;
    }

    .main-content,
    .footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hero-carousel {
        height: 300px;
    }

    .hero-cta {
        font-size: 14px;
        padding: 12px 24px;
        bottom: 40px;
    }

    .section-title {
        font-size: 24px;
    }

    .merchant-banner {
        margin-top: 32px;
        padding-top: 0;
        overflow: visible;
    }

    .merchant-banner__title {
        font-size: 28px;
    }

    .merchant-banner__content {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        max-width: 100%;
        padding: 0 12px;
    }

    .merchant-banner__image {
        margin-top: 16px;
    }

    .merchant-banner__features {
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 20px;
    }

    .merchant-banner__divider {
        display: none;
    }

    .merchant-commercials {
        margin: 16px auto 32px;
        padding: 0;
    }

    .merchant-commercials__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .merchant-commercials__item {
        width: 100%;
        height: auto;
        aspect-ratio: 384 / 193;
        border-radius: 14px;
    }

    .category-tabs {
        gap: 8px;
    }

    .category-tab {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* Footer 手机端响应式 */
    .footer {
        padding: 32px 16px;
    }

    .footer-top {
        flex-direction: column;
        gap: 32px;
    }

    .footer-company-info {
        width: 100%;
    }

    .footer-newsletter {
        padding: 24px 16px;
    }

    .footer-newsletter-title {
        font-size: 20px;
    }

    .footer-newsletter-form {
        flex-direction: column;
        width: 100%;
    }

    .footer-email-input-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .footer-subscribe-btn {
        width: 100%;
        justify-content: center;
    }

    .footer-links-group {
        flex-wrap: wrap;
        gap: 4px;
    }

    .footer-social {
        align-self: flex-start;
    }

    .join-container {
        padding: 32px 24px;
    }

    .join-title {
        font-size: 24px;
    }

    .join-features {
        flex-direction: column;
        gap: 12px;
    }

    .join-divider {
        display: none;
    }
}

@media (max-width: 480px) {

    .hero-carousel {
        height: 240px;
    }
}