/* ================================
   右侧商品区域（PC）
================================ */
#bag-right {
    flex: 1;        /* ⭐ 让右侧区域占满剩余空间 */
    min-width: 0;   /* ⭐ 允许右侧区域真正变宽（关键中的关键） */
}

.bag-right-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* ⭐ PC 自动多列 */
    justify-content: start;
    gap: 8px;
    padding: 8px 8px 8px 0px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    flex: 1;
    flex-shrink: 1;
    overflow-x: hidden; /* ⭐ 防止大屏出现滑块 */
}


/* ================================
   产品卡片（PC）
================================ */
.product-card {
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #bbb;
}


/* 产品封面图 */
.product-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* ⭐ 正方形，随 card 宽度自适应 */
    object-fit: contain;
    border-radius: 4px;
}


/* ================================
   产品信息区域
================================ */
.product-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #333;
    margin-top: 8px;
}

.product-title {
    font-weight: bold;
    line-height: 1.2;
}

.product-price {
    color: #d0021b;
}

.product-action {
    margin-top: 4px;
    padding: 4px 8px;
    font-size: 12px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    align-self: start;
}


/* ================================
   小屏（≤768px）
================================ */
@media (max-width: 768px) {

    .bag-right-grid {
        grid-template-columns: repeat(2, 1fr); /* ⭐ 手机永远 2 列 */
        gap: 12px;
        padding: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden; /* ⭐ 防止滑块 */
    }

    .product-card {
        width: 100%;
        padding: 8px;
        box-sizing: border-box;
    }

    .product-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: contain;
    }

    .product-info {
        font-size: 12px;
        margin-top: 8px;
    }

    .product-action {
        font-size: 11px;
        padding: 3px 6px;
    }
}
