/* 最新活动区域 - 横向滚动样式 */

/* 最新活动区域容器 */
.home-focus-ad.scroll-style {
    background: white;
    margin-bottom: 10px;
}

.home-focus-ad.scroll-style .weui-panel__hd {
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 2px solid #f0f0f0;
    font-size: 18px;
    font-weight: 900;
    color: #2d3436;
}

.activity-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fire-icon {
    animation: fire-shake 1.5s ease-in-out infinite;
}

@keyframes fire-shake {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.activity-count {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

/* 横向滚动容器 */
.activity-scroll-container {
    overflow-x: auto !important; /* 确保横向可滚动 */
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
    scrollbar-width: none; /* Firefox 隐藏滚动条 */
    padding: 12px 0 12px 12px;
    position: relative;
    cursor: grab; /* 鼠标抓手样式 */
}

.activity-scroll-container:active {
    cursor: grabbing; /* 拖动时的样式 */
}

.activity-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari 隐藏滚动条 */
}

/* 产品网格 - 2行滚动 */
.activity-products-scroll {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    grid-auto-flow: column;
    grid-auto-columns: 110px; /* 缩小卡片宽度，让一屏显示3列（6个卡片） */
    gap: 8px;
    padding-right: 12px;
}

/* 产品卡片 */
.activity-product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.activity-product-card:active {
    transform: scale(0.96);
}

/* 降价角标 */
.discount-corner {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 4px 8px 6px 10px;
    border-radius: 0 12px 0 12px;
    font-size: 11px;
    font-weight: 900;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255,107,107,0.5);
}

/* 左上角标签 */
.corner-label {
    position: absolute;
    top: 6px;
    left: 6px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(255,107,107,0.4);
    letter-spacing: 0.5px;
}

/* HOT标签 - 移到右上角 */
.hot-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    color: #ff6b6b;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    letter-spacing: 0.5px;
}

/* 产品图片区 - 改为长方形（16:9比例） */
.activity-product-image {
    width: 100%;
    height: 62px; /* 110px * 9/16 ≈ 62px，保持16:9比例 */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5; /* 默认背景色 */
}

.activity-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持图片比例，裁切多余部分 */
    position: relative;
    z-index: 1; /* 确保图片在背景色上面 */
}

/* 无图片时的占位符样式 */
.product-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* 文字样式 */
.product-icon-text {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.5px;
    user-select: none;
    text-align: center;
    line-height: 1.3;
    padding: 0 8px;
    max-width: 100%;
    word-wrap: break-word;
    word-break: break-all;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 大图标样式（会员类型） */
.product-icon-icon {
    font-size: 42px;
    user-select: none;
    text-align: center;
    line-height: 1;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

/* 不同配色 - 渐变背景色（当图片加载失败或没有图片时显示） */
.bg-purple { background: linear-gradient(135deg, #a8b5ff 0%, #8b9cff 100%) !important; }
.bg-pink { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%) !important; }
.bg-blue { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%) !important; }
.bg-orange { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%) !important; }
.bg-red { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%) !important; }
.bg-green { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%) !important; }
.bg-yellow { background: linear-gradient(135deg, #ffd89b 0%, #f9ca24 100%) !important; }
.bg-teal { background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%) !important; }
.bg-coral { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important; }
.bg-mint { background: linear-gradient(135deg, #96fbc4 0%, #f9f586 100%) !important; }
.bg-peach { background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%) !important; }
.bg-lavender { background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%) !important; }
.bg-sunset { background: linear-gradient(135deg, #ffa585 0%, #ffeda0 100%) !important; }
.bg-ocean { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; }

/* 产品信息区 */
.activity-product-info {
    padding: 8px;
    background: white;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.activity-product-name {
    font-size: 11px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    min-height: 28px;
    flex: 1;
}

.activity-product-price-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-product-current {
    font-size: 16px;
    font-weight: 900;
    color: #ff6b6b;
    letter-spacing: -0.5px;
    line-height: 1;
}

.activity-product-original {
    font-size: 11px;
    color: #95a5a6;
    text-decoration: line-through;
}

/* 滚动提示箭头 - 改为底部显示 */
.scroll-hint-bottom {
    padding: 8px 0;
    text-align: center;
    background: linear-gradient(to top, rgba(255,255,255,0.95), rgba(255,255,255,0.7));
    color: #ff6b6b;
    font-size: 12px;
    font-weight: 600;
    opacity: 1;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    user-select: none;
    pointer-events: none; /* 禁用点击事件 */
}

/* 初始显示动画 */
@keyframes scroll-hint-appear {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.scroll-hint-bottom.show {
    opacity: 1;
    animation: scroll-hint-appear 0.5s ease-out;
}

.scroll-hint-bottom.hide {
    opacity: 0;
}

.scroll-hint-text {
    font-size: 11px;
    color: #999;
}

.scroll-arrow {
    display: inline-block;
    animation: scroll-arrow-move 1.5s ease-in-out infinite;
    line-height: 1;
}

@keyframes scroll-arrow-move {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); } /* 改为向右移动 */
}

/* 响应式优化 */
@media (max-width: 360px) {
    .activity-products-scroll {
        grid-auto-columns: 100px;
    }

    .activity-product-name {
        font-size: 10px;
        min-height: 26px;
    }

    .activity-product-current {
        font-size: 14px;
    }
}

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

.home-focus-ad.scroll-style {
    animation: fadeInUp 0.6s ease-out;
}
