/* ============================================
   威尔丹独立站 - 产品列表页 手机端专属布局（v4）
   - hero 改 16:9 整图 banner（覆盖式）
   - 颜色调亮（米色 #F0E8D4 → #F5F0EB）
   - 卡片背景同步调亮
   v: 20260527_v7  /* 卡片底色对齐首页 cream #F5F0EB */
   ============================================ */

/* PC 默认隐藏 hero */
.products-hero { display: none; }

@media (max-width: 1024px) {
    /* sidebar 隐藏 + 单列布局 */
    .products-sidebar { display: none !important; }
    .products-page {
        display: block !important;
        padding: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        gap: 0 !important;
    }
    .products-main {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 隐藏旧 banner / header */
    .products-banner,
    .products-header { display: none !important; }

    /* ========== Hero 区域：16:9 整图 banner ========== */
    .products-hero {
        display: block !important;
        position: relative;
        width: calc(100% - 24px) !important;
        margin: 10px 12px 14px !important;
        padding: 0 !important;
        aspect-ratio: 16 / 9;          /* 关键：16:9 */
        min-height: 0;
        border-radius: 14px;
        overflow: hidden;
        background: #F5F0EB;           /* 兜底色（亮一倍） */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    }
    .products-hero .hero-img {
        position: absolute;
        inset: 0;
        width: 100%; height: 100%;
        display: block;
    }
    .products-hero .hero-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;             /* 整图填充，自动裁切 */
        object-position: center;
        display: block;
        mix-blend-mode: normal;        /* 不要乘法混合 */
    }
    /* 右下角文字浮层（半透明遮罩，保证可读） */
    .products-hero .hero-text {
        position: absolute;
        right: 14px;
        bottom: 12px;
        max-width: 60%;
        padding: 6px 12px;
        background: rgba(255, 255, 255, 0.75);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        border-radius: 8px;
        text-align: right;
    }
    .products-hero .hero-text .hero-title-zh {
        font-size: 18px;
        font-weight: 700;
        color: #222;
        margin: 0 0 2px;
        line-height: 1.2;
    }
    .products-hero .hero-text .hero-title-en {
        font-size: 9px;
        color: #666;
        text-transform: uppercase;
        letter-spacing: 1.2px;
        margin: 0;
        font-weight: 400;
        line-height: 1.3;
    }

    /* hero 无图时：纯色卡 + 文字居中 */
    .products-hero.no-img {
        aspect-ratio: auto;
        min-height: 120px;
        background: #F5F0EB;
        display: flex !important;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 18px 14px !important;
    }
    .products-hero.no-img .hero-text {
        position: static;
        background: transparent;
        backdrop-filter: none;
        max-width: 100%;
        padding: 0;
        text-align: center;
    }
    .products-hero.no-img .hero-text .hero-title-zh {
        font-size: 24px;
        color: #222;
    }
    .products-hero.no-img .hero-text .hero-title-en {
        font-size: 11px;
        color: #999;
    }

    /* ========== 3 列产品卡 ========== */
    .products-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        padding: 4px 12px 14px !important;
        margin: 0 !important;
    }
    .product-card {
        background: #F5F0EB !important;     /* 调亮 */
        border-radius: 10px !important;
        box-shadow: none !important;
        border: none !important;
        overflow: hidden;
        padding: 0 !important;
        margin: 0 !important;
        aspect-ratio: 1 / 1 !important;
        display: flex !important;
        flex-direction: column;
        text-decoration: none !important;
    }
    .product-card .product-image {
        flex: 1;
        display: flex;
        align-items: center; justify-content: center;
        padding: 6px;
        overflow: hidden;
        width: 100%;
        height: 100%;
        background: transparent !important;
    }
    .product-card .product-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        mix-blend-mode: multiply;
    }
    .product-card .product-image svg {
        max-width: 60%;
        max-height: 60%;
        color: #aaa;
        opacity: 0.5;
    }
    .product-card .product-info { display: none !important; }
}
