/* 首页专用样式 */

/* 轮播图样式，左右间距与公告、分类、商品区块对齐 */
.banner {
    position: relative;
    width: auto;
    height: auto;
    min-height: 140px;
    overflow: hidden;
    border-radius: 0;
    margin: 0 0 8px;
    touch-action: pan-y;
    background: #f5f5f5;
}

.banner-track {
    display: flex;
    height: 100%;
    will-change: transform;
}

.banner-item {
    position: relative;
    flex: 0 0 auto;
    height: 100%;
    display: block;
    cursor: pointer;
    background: #f5f5f5;
}

.banner-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.notice-bar {
    display: flex;
    align-items: center;
    margin: 0 0 8px;
    padding: 12px 15px;
    min-height: 48px;
    background: #fff7f0;
    border-radius: 0;
}

.notice-label {
    flex-shrink: 0;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    margin-right: 12px;
    padding: 4px 8px;
    line-height: 1.2;
    background: linear-gradient(135deg, #f37021 0%, #ff8e53 100%);
    border-radius: 6px;
}

.notice-viewport {
    flex: 1;
    height: 32px;
    overflow: hidden;
    isolation: isolate;
    contain: layout paint;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.notice-track {
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    transition: transform 0.4s ease;
}

.notice-item {
    height: 32px;
    line-height: 32px;
    font-size: 15px;
    color: #555;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
}

.banner-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* 四大功能模块 */
#categoryNav.category-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    margin: 0 0 8px;
    box-shadow: none;
}

#categoryNav .category-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    min-height: 92px;
    padding: 16px 14px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(31, 35, 41, 0.06);
    text-decoration: none;
    color: #333;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#categoryNav .category-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(31, 35, 41, 0.1);
}

#categoryNav .category-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    margin: 0 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: none;
}

#categoryNav .category-icon::before {
    content: '';
    width: 28px;
    height: 28px;
    background-color: currentColor;
    -webkit-mask: var(--ui-icon) center / contain no-repeat;
    mask: var(--ui-icon) center / contain no-repeat;
}

#categoryNav .category-icon.is-image::before {
    display: none;
}

#categoryNav .category-icon.icon-hot {
    color: #fff;
    background: linear-gradient(135deg, #f37021 0%, #ff8e53 100%);
}

#categoryNav .category-icon.icon-score {
    color: #fff;
    background: linear-gradient(135deg, #ff8a3d 0%, #ffb347 100%);
}

#categoryNav .category-icon.icon-video {
    color: #fff;
    background: linear-gradient(135deg, #4c8dff 0%, #6ec8ff 100%);
}

#categoryNav .category-icon.icon-article {
    color: #fff;
    background: linear-gradient(135deg, #36cfc9 0%, #67e8c0 100%);
}

#categoryNav .category-icon.icon-cart {
    color: #fff;
    background: linear-gradient(135deg, #f37021 0%, #ff8e53 100%);
}

#categoryNav .category-icon.icon-poster {
    color: #fff;
    background: linear-gradient(135deg, #7b6cff 0%, #9f8cff 100%);
}

#categoryNav .category-meta {
    min-width: 0;
    text-align: left;
}

#categoryNav .category-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    color: #222;
}

#categoryNav .category-desc {
    margin-top: 4px;
    font-size: 12px;
    color: #999;
    line-height: 1.2;
}

/* 区块样式 */
.section {
    margin-bottom: 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 15px 12px;
}

.seckill-section {
    margin: 0 0 16px;
}
.sk-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 0 4px;
}
.sk-list.is-page {
    padding: 8px 0 20px;
}
.sk-card {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: 0;
    padding: 10px 15px;
    box-shadow: none;
    overflow: hidden;
    cursor: pointer;
}
.sk-cover {
    position: relative;
    width: 86px;
    min-height: 86px;
    align-self: stretch;
    border-radius: 10px;
    background: #f3f3f3;
    flex-shrink: 0;
    overflow: hidden;
}
.sk-cover-img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #f3f3f3;
}
.sk-badge {
    z-index: 2;
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 1px 6px;
    font-size: 10px;
    color: #fff;
    line-height: 1.4;
    background: linear-gradient(135deg, #ff4d4f 0%, #f37021 100%);
    border-radius: 8px;
}
.sk-main {
    flex: 1;
    min-width: 0;
    padding: 2px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.sk-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.sk-now {
    color: #e02e24;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.1;
}
.sk-now em {
    font-style: normal;
    font-size: 12px;
    margin-right: 1px;
}
.sk-origin {
    margin-top: 2px;
    font-size: 11px;
    color: #bbb;
    text-decoration: line-through;
}
.sk-aside {
    width: 96px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #fff4ee 0%, #ffece3 100%);
    border-radius: 10px;
    padding: 8px 6px;
}
.sk-cd-lab {
    font-size: 10px;
    color: #e02e24;
    font-weight: 600;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}
.sk-cd-nums {
    display: flex;
    align-items: center;
    justify-content: center;
}
.sk-cd-nums span {
    min-width: 20px;
    padding: 3px 2px;
    background: linear-gradient(180deg, #ff5a4d 0%, #e02e24 100%);
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 2px 4px rgba(224, 46, 36, 0.25);
}
.sk-cd-nums i {
    font-style: normal;
    color: #e02e24;
    font-weight: 700;
    margin: 0 2px;
    font-size: 12px;
}
.sk-go {
    margin-top: 8px;
    width: 100%;
    text-align: center;
    padding: 4px 0;
    font-size: 12px;
    color: #fff;
    background: linear-gradient(135deg, #ff4d4f 0%, #f37021 100%);
    border-radius: 12px;
}
.sk-card.is-end .sk-cd-nums span {
    background: #ccc;
    box-shadow: none;
}
.sk-card.is-end .sk-cd-lab,
.sk-card.is-end .sk-cd-nums i {
    color: #999;
}
.sk-card.is-end .sk-go {
    background: #ddd;
}

.goods-board {
    margin: 0 15px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(31, 35, 41, 0.06);
    overflow: hidden;
}

.goods-board-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 14px 10px;
}

.goods-board .section-title {
    font-size: 16px;
}

.goods-board .section-more {
    margin-left: 10px;
    flex-shrink: 0;
}

.goods-board-panel {
    margin-bottom: 0;
}

.goods-board .goods-grid {
    padding: 8px 0 14px;
}

.goods-board .goods-card {
    box-shadow: none;
    border: 1px solid #f2f2f2;
}

.section-title {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    margin-right: 8px;
    background: #cfcfcf;
    border-radius: 2px;
}

.section-more {
    font-size: 13px;
    color: #999;
    text-decoration: none;
}

.section-more:hover {
    color: #f37021;
}

.coupon-section {
    margin: 0 0 16px;
}

.coupon-section .section-header {
    padding-bottom: 10px;
}

.coupon-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
}

.coupon-ticket {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 88px;
    padding: 12px 12px 12px 0;
    background: linear-gradient(90deg, #fff5f0 0%, #fff 42%);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(243, 112, 33, 0.08);
    position: relative;
    overflow: hidden;
}

.coupon-ticket::before,
.coupon-ticket::after {
    content: '';
    position: absolute;
    left: 78px;
    width: 12px;
    height: 12px;
    background: var(--bg, #f5f5f5);
    border-radius: 50%;
}

.coupon-ticket::before {
    top: -6px;
}

.coupon-ticket::after {
    bottom: -6px;
}

.coupon-amount {
    width: 78px;
    flex-shrink: 0;
    text-align: center;
    color: #f37021;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.coupon-amount em {
    font-style: normal;
    font-size: 13px;
    margin-right: 1px;
}

.coupon-amount em:last-child {
    margin-left: 1px;
    margin-right: 0;
}

.coupon-amount.is-ship {
    font-size: 22px;
    letter-spacing: 1px;
}

.coupon-info {
    flex: 1;
    min-width: 0;
    padding: 0 8px 0 6px;
    border-left: 1px dashed #ffd0c2;
}

.coupon-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.coupon-rule,
.coupon-time {
    margin-top: 3px;
    font-size: 11px;
    color: #999;
}

.coupon-btn {
    flex-shrink: 0;
    border: 0;
    padding: 6px 10px;
    border-radius: 14px;
    color: #fff;
    font-size: 12px;
    background: linear-gradient(135deg, #f37021 0%, #ff8e53 100%);
}

.coupon-btn.claimed {
    background: #ddd;
    color: #fff;
}

.coupon-empty {
    margin: 0 15px;
    padding: 28px 12px;
    text-align: center;
    color: #bbb;
    font-size: 13px;
    background: #fff;
    border-radius: 12px;
}

.home-article-card {
    display: flex;
    margin: 0 15px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
}

.home-article-cover {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    background: #f3f3f3 center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-article-cover .cover-letter {
    font-size: 28px;
    font-weight: 700;
    color: #ff9a56;
}

.home-article-body {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
}

.home-article-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.home-article-desc {
    margin-top: 6px;
    font-size: 12px;
    color: #888;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.home-article-meta {
    margin-top: auto;
    padding-top: 8px;
    font-size: 12px;
    color: #999;
}

/* 商品网格样式 */
.goods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0;
}

.page-main > .goods-grid {
    padding-top: 12px;
    padding-bottom: 20px;
}

.goods-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(243, 112, 33, 0.08);
    cursor: pointer;
}

.goods-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.goods-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.goods-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #f37021 0%, #ff9a56 100%);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 500;
}

.goods-info {
    padding: 12px;
}

.goods-name {
    font-size: 14px;
    color: #333;
    line-height: 1.3;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.goods-price {
    font-size: 16px;
    font-weight: 600;
    color: #f37021;
    margin-bottom: 4px;
}

.goods-original-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    margin-left: 6px;
    font-weight: normal;
}

.goods-sales {
    font-size: 12px;
    color: #999;
}

.goods-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}

.goods-foot-meta {
    min-width: 0;
}

.goods-foot .goods-price,
.goods-foot .goods-item-price {
    margin-bottom: 2px;
}

.goods-buy-btn {
    flex-shrink: 0;
    display: inline-block;
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1.2;
    color: #fff;
    background: linear-gradient(135deg, #f37021 0%, #ff8e53 100%);
    border-radius: 14px;
    white-space: nowrap;
}

/* 商品列表样式 */
.goods-list {
    padding: 0;
}

.goods-item {
    display: flex;
    background: #fff;
    border-radius: 0;
    padding: 12px 15px;
    margin-bottom: 8px;
    box-shadow: none;
    cursor: pointer;
}

.goods-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.goods-item-image {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-right: 12px;
    flex-shrink: 0;
}

.goods-item-tag {
    position: absolute;
    top: 4px;
    left: 4px;
    background: linear-gradient(135deg, #f5a623 0%, #ffd56a 100%);
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 6px;
}
.goods-item-tag.is-sk {
    background: linear-gradient(135deg, #ff4d4f 0%, #f37021 100%);
}

.goods-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.goods-item-name {
    font-size: 14px;
    color: #333;
    line-height: 1.3;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.goods-item-price {
    font-size: 16px;
    font-weight: 600;
    color: #f37021;
    margin-bottom: 4px;
}

.goods-item-original-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    margin-left: 6px;
    font-weight: normal;
}

.goods-item-sales {
    font-size: 12px;
    color: #999;
}

/* 头部样式调整 */
.header {
    background: linear-gradient(135deg, #f37021 0%, #ff9a56 100%);
    border-bottom: none;
}

.header-content {
    color: #fff;
}

.header-title {
    color: #fff;
}

.header-btn {
    color: #fff;
}

.logo {
    filter: brightness(0) invert(1);
}

/* 响应式设计 */
@media (max-width: 375px) {
    .notice-bar {
        margin: 0 0 8px;
        padding: 10px 12px;
        min-height: 44px;
    }

    .banner {
        margin: 0 0 8px;
    }
    
    #categoryNav.category-nav {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 0;
        margin: 0 0 8px;
    }

    #categoryNav .category-item {
        min-height: 82px;
        padding: 12px 10px;
    }
    
    #categoryNav .category-icon {
        width: 44px;
        height: 44px;
        margin-right: 10px;
    }

    #categoryNav .category-icon::before {
        width: 24px;
        height: 24px;
    }
    
    #categoryNav .category-name {
        font-size: 14px;
    }

    .goods-board {
        margin: 0 12px 16px;
    }

    .coupon-list {
        padding: 0 12px;
    }

    .goods-buy-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .goods-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 12px;
    }
    
    .goods-info {
        padding: 10px;
    }
    
    .goods-name {
        font-size: 13px;
    }
    
    .goods-price {
        font-size: 15px;
    }
    
    .goods-list {
        padding: 0 12px;
    }
    
    .goods-item {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .goods-item-image {
        width: 70px;
        height: 70px;
        margin-right: 10px;
    }
    
    .goods-item-name {
        font-size: 13px;
    }
    
    .goods-item-price {
        font-size: 15px;
    }
}

@media (max-width: 320px) {
    .notice-bar {
        margin: 0 0 8px;
    }

    .banner {
        margin: 0 0 8px;
    }
    
    #categoryNav.category-nav {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 0;
        margin: 0 0 8px;
    }

    #categoryNav .category-item {
        min-height: 76px;
        padding: 10px 8px;
        border-radius: 14px;
    }
    
    #categoryNav .category-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        margin-right: 8px;
    }
    
    #categoryNav .category-name {
        font-size: 13px;
    }

    .goods-board {
        margin: 0 10px 14px;
    }
    
    .goods-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 10px;
    }
    
    .goods-info {
        padding: 8px;
    }
    
    .goods-name {
        font-size: 12px;
    }
    
    .goods-price {
        font-size: 14px;
    }
    
    .goods-list {
        padding: 0 10px;
    }
    
    .goods-item {
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .goods-item-image {
        width: 60px;
        height: 60px;
        margin-right: 8px;
    }
    
    .goods-item-name {
        font-size: 12px;
    }
    
    .goods-item-price {
        font-size: 14px;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #f37021;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 触摸反馈 */
.goods-card:active,
.goods-item:active,
.category-item:active {
    transform: scale(0.98);
}

/* 页面切换动画 */
.page-enter {
    opacity: 0;
    transform: translateX(100%);
}

.page-enter-active {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s ease;
}

.page-exit {
    opacity: 1;
    transform: translateX(0);
}

.page-exit-active {
    opacity: 0;
    transform: translateX(-100%);
    transition: all 0.3s ease;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
} 