/* 首页样式 */

.page {
    background: #f5f5f5;
    min-height: 100vh;
}

/* 顶部导航 */
.header-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.16rem;
    padding: 0.2rem 0.3rem;
    padding-top: calc(env(safe-area-inset-top) + 0.2rem);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.logo-wrap {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-slogan {
    flex: 1;
    min-width: 0;
    font-size: 0.22rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    word-break: break-word;
}

/* 首页右上角「积分中心」入口 */
.header-points-entry {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.08rem;
    margin-left: 0.12rem;
    padding: 0.12rem 0.26rem;
    background: #fff;
    color: #2563eb;
    border-radius: 0.4rem;
    font-size: 0.24rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 0.06rem 0.16rem rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.header-points-entry:active {
    transform: scale(0.95);
    box-shadow: 0 0.02rem 0.08rem rgba(37, 99, 235, 0.28);
}
.header-points-entry .hpe-icon {
    font-size: 0.3rem;
    line-height: 1;
    filter: drop-shadow(0 0.02rem 0.02rem rgba(0, 0, 0, 0.12));
}
.header-points-entry .hpe-text { letter-spacing: 0.02rem; }

.logo-icon {
    width: 0.6rem;
    height: 0.6rem;
    margin-right: 0.12rem;
}

.platform-logo {
    height: 0.7rem;
    max-width: 4rem;
    width: auto;
    object-fit: contain;
    display: block;
}

.logo-text {
    font-size: 0.36rem;
    font-weight: bold;
    color: #fff;
}

.logo-sub {
    font-size: 0.16rem;
    color: #999;
    margin-left: 0.08rem;
    align-self: flex-end;
    margin-bottom: 0.04rem;
}

.header-divider {
    margin: 0 0.2rem;
    color: #ddd;
}

.header-phone {
    font-size: 0.28rem;
    color: #666;
}

/* 商城公告（单行横向滚动） */
.site-announcement {
    display: flex;
    align-items: center;
    gap: 0.12rem;
    margin: 0.16rem 0.3rem 0;
    padding: 0.14rem 0.2rem;
    background: linear-gradient(90deg, #fff7e6, #ffefd1);
    border-radius: 0.12rem;
    border: 1px solid #ffe0b3;
    overflow: hidden;
}
.site-announcement .ann-icon {
    font-size: 0.32rem;
    flex-shrink: 0;
}
.site-announcement .ann-viewport {
    flex: 1;
    min-width: 0;
    height: 0.4rem;
    overflow: hidden;
}
.site-announcement .ann-list {
    will-change: transform;
}
.site-announcement .ann-item {
    height: 0.4rem;
    line-height: 0.4rem;
    color: #8a5a00;
    font-size: 0.26rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 限时秒杀模块 */
.flash-module {
    margin: 0.2rem 0.3rem;
    background: linear-gradient(135deg, #ff6034 0%, #ee0a24 100%);
    border-radius: 0.16rem;
    padding: 0.2rem;
    box-shadow: 0 0.06rem 0.16rem rgba(238, 10, 36, 0.25);
}
.flash-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.16rem;
}
.flash-head-title { color: #fff; font-size: 0.32rem; font-weight: 700; }
.flash-head-more { color: rgba(255,255,255,0.95); font-size: 0.24rem; text-decoration: none; }
.flash-scroll {
    display: flex;
    gap: 0.16rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.04rem;
}
.flash-scroll::-webkit-scrollbar { display: none; }
.flash-card {
    flex: 0 0 auto;
    width: 1.9rem;
    background: #fff;
    border-radius: 0.12rem;
    overflow: hidden;
    text-decoration: none;
    display: block;
}
.flash-card img { width: 1.9rem; height: 1.9rem; object-fit: cover; background: #f5f5f5; display: block; }
.flash-card .flash-name {
    font-size: 0.22rem; color: #333; padding: 0.08rem 0.12rem 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.flash-card .flash-price { color: #ee0a24; font-size: 0.32rem; font-weight: 700; padding: 0.02rem 0.12rem 0; }
.flash-card .flash-price span { font-size: 0.2rem; }
.flash-card .flash-orig { color: #999; font-size: 0.2rem; text-decoration: line-through; padding: 0 0.12rem 0.12rem; }

/* Banner轮播 */
.banner-section {
    padding: 0.2rem 0.3rem;
    background: #fff;
}

.swiper {
    position: relative;
    border-radius: 0.16rem;
    overflow: hidden;
}

.swiper-track {
    display: flex;
    transition: transform 0.4s ease;
    will-change: transform;
}

.swiper-item {
    flex-shrink: 0;
    display: block;
    text-decoration: none;
}

.swiper-item img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

.swiper-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.12rem;
    display: flex;
    justify-content: center;
    gap: 0.1rem;
    z-index: 2;
}

.swiper-dot {
    width: 0.12rem;
    height: 0.12rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transition: all 0.3s;
    cursor: pointer;
}

.swiper-dot.active {
    width: 0.32rem;
    border-radius: 0.06rem;
    background: #fff;
}

/* 促销活动入口卡片 */
.activity-entry {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin: 0.2rem 0.3rem;
    padding: 0.24rem 0.28rem;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fed7aa;
    border-radius: 0.16rem;
    text-decoration: none;
    color: #333;
    box-shadow: 0 1px 3px rgba(251, 146, 60, 0.08);
}
.activity-entry-icon { font-size: 0.6rem; flex-shrink: 0; }
.activity-entry-text { flex: 1; min-width: 0; }
.activity-entry-title { font-size: 0.3rem; font-weight: 600; color: #c2410c; }
.activity-entry-sub { font-size: 0.22rem; color: #9a3412; margin-top: 0.06rem; }
.activity-entry-arrow {
    font-size: 0.4rem;
    color: #ea580c;
    flex-shrink: 0;
    animation: arrowSlide 1.2s ease-in-out infinite;
}
@keyframes arrowSlide {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(6px); }
}
.activity-entry-icon {
    animation: iconPulse 1.8s ease-in-out infinite;
}
@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.12); }
}
.activity-entry {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.activity-entry:active {
    transform: scale(0.98);
    box-shadow: 0 1px 2px rgba(251, 146, 60, 0.15);
}

/* swiper item 入场轻微缩放 */
.swiper-item img {
    animation: bannerZoom 8s ease-in-out infinite alternate;
}
@keyframes bannerZoom {
    from { transform: scale(1); }
    to   { transform: scale(1.04); }
}
.swiper-dot {
    transition: width 0.3s ease, background 0.3s ease;
}

/* 功能入口网格 */
.feature-section {
    background: #fff;
    margin: 0.2rem 0.3rem;
    border-radius: 0.16rem;
    padding: 0.3rem 0.2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.3rem 0.1rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.feature-icon {
    width: 0.96rem;
    height: 0.96rem;
    border-radius: 0.24rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.12rem;
    font-size: 0.28rem;
    color: #fff;
    font-weight: 500;
}

.feature-icon-img {
    width: 1rem;
    height: 1rem;
    border-radius: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.12rem;
    font-size: 0.56rem;
    background: linear-gradient(180deg, #fff 0%, #f8f8f8 100%);
    box-shadow: 0 0.04rem 0.12rem rgba(0,0,0,0.08);
}

.feature-text {
    font-size: 0.22rem;
    color: #333;
    text-align: center;
}

/* 快捷入口卡片 */
.quick-cards {
    display: flex;
    gap: 0.2rem;
    padding: 0 0.3rem;
    margin-bottom: 0.2rem;
}

.quick-card {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem;
    border-radius: 0.16rem;
    text-decoration: none;
}

.quick-card-orange {
    background: linear-gradient(135deg, #eff6ff 0%, #ffe8dc 100%);
}

.quick-card-red {
    background: linear-gradient(135deg, #fff0f0 0%, #ffe0e0 100%);
}

.quick-card-title {
    font-size: 0.3rem;
    font-weight: 500;
    color: #2563eb;
    margin-bottom: 0.1rem;
}

.quick-card-red .quick-card-title {
    color: #ff4d4f;
}

.quick-card-btn {
    font-size: 0.22rem;
    color: #3b82f6;
    background: rgba(37, 99, 235,0.1);
    padding: 0.08rem 0.16rem;
    border-radius: 0.2rem;
}

.quick-card-red .quick-card-btn {
    color: #ff6b6b;
    background: rgba(255,77,79,0.1);
}

.quick-card-icon {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* 促销Banner */
.promo-banner {
    margin: 0.2rem 0.3rem;
    border-radius: 0.16rem;
    padding: 0.4rem;
    position: relative;
    overflow: hidden;
    min-height: 2.4rem;
}

.wine-banner {
    background: linear-gradient(135deg, #b8860b 0%, #daa520 50%, #cd853f 100%);
    display: flex;
    align-items: center;
}

.tech-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 2rem;
}

.hot-banner {
    background: #2563eb;
}

.promo-content {
    position: relative;
    z-index: 2;
}

.promo-title {
    font-size: 0.44rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.16rem;
}

.promo-tag {
    display: inline-block;
    padding: 0.1rem 0.24rem;
    background: #2563eb;
    color: #fff;
    font-size: 0.24rem;
    border-radius: 0.04rem;
    margin-bottom: 0.2rem;
}

.promo-tag-outline {
    display: inline-block;
    padding: 0.12rem 0.3rem;
    border: 2px solid rgba(255,255,255,0.8);
    color: #fff;
    font-size: 0.28rem;
    border-radius: 0.3rem;
    margin-bottom: 0.2rem;
}

.promo-desc {
    font-size: 0.26rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 0.2rem;
}

.promo-btn {
    display: inline-block;
    padding: 0.16rem 0.4rem;
    background: #2563eb;
    color: #fff;
    font-size: 0.26rem;
    border-radius: 0.3rem;
    text-decoration: none;
}

.promo-btn-white {
    background: #fff;
    color: #2563eb;
}

.promo-img {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.promo-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 商品区域 */
.products-section {
    padding: 0.3rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.3rem;
}

.section-line {
    color: #2563eb;
    font-size: 0.3rem;
}

.section-icon {
    font-size: 0.3rem;
    margin: 0 0.1rem;
}

.section-title-text {
    font-size: 0.32rem;
    color: #2563eb;
    font-weight: 500;
    margin: 0 0.1rem;
}

/* 商品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.2rem;
}

.product-card {
    background: #fff;
    border-radius: 0.16rem;
    overflow: hidden;
    text-decoration: none;
}

.product-img {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
}

.product-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.1rem;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 100%);
    color: #fff;
    font-size: 0.2rem;
    text-align: center;
}

.product-info {
    padding: 0.2rem;
}

.product-name {
    font-size: 0.26rem;
    color: #333;
    line-height: 1.4;
    height: 0.72rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 0.12rem;
}

.product-price {
    font-size: 0.36rem;
    font-weight: bold;
    color: #ff4d4f;
}

/* 底部信息 */
.footer-info {
    text-align: center;
    padding: 0.4rem 0.3rem;
    background: #fff;
    margin-top: 0.2rem;
}

.footer-tags {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.footer-tag {
    font-size: 0.24rem;
    color: #666;
}

.footer-hotline {
    font-size: 0.24rem;
    color: #999;
}

/* 底部导航 — 用 common.css 统一样式 */

/* 商品原价 */
.product-original {
    font-size: 0.22rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 4px;
}

/* 骨架屏 */
@keyframes skeleton-loading {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton-img, .skeleton-line {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}
.skeleton-img {
    width: 100%;
    padding-bottom: 100%;
}
.skeleton-card .product-img {
    overflow: hidden;
}

/* 首页促销卡（动态加载） */
.home-promo-cards {
    padding: 0 0.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.2rem;
}
.home-promo-card {
    display: block;
    width: 100%;
    border-radius: 0.16rem;
    overflow: hidden;
    box-shadow: 0 0.04rem 0.12rem rgba(0,0,0,0.06);
    background: #fff;
    transition: transform 0.15s;
}
.home-promo-card:active { transform: scale(0.99); }
.home-promo-card img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 3 / 1;
    object-fit: cover;
}
