/* ===== 公告栏 ===== */
.notice-bar {
    width: 100%;
    background: #fff;
    border-radius: 4px;
    padding: 8px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
}

/* ===== 列表表头（5列）===== */
.list-header {
    width: 100%;
    height: 40px;
    background: #fafbfc;
    border: 1px solid #e8e8e8;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
    font-size: 16px;
    color: #555;
    font-weight: 700;
}
.lh-col { display: inline-block; }
.lh-col-name { flex: 1; min-width: 0; padding-left: 10px; text-align: left; }
.lh-col-type { width: 56px; text-align: center; flex-shrink: 0; }
.lh-col-stock { width: 56px; text-align: center; flex-shrink: 0; margin-left: 12px; margin-right: 8px; }
.lh-col-price { width: 80px; text-align: right; flex-shrink: 0; padding-right: 16px; margin-right: 4px; }
.lh-col-action { width: 56px; text-align: center; flex-shrink: 0; }

/* ===== 分类标题 ===== */
.category { width: 100%; margin-bottom: 0; }
.category-header {
    width: 100%;
    height: 35px;
    background: #f0f2f5;
    border-left: 3px solid #3688fc;
    border-right: 1px solid #e8e8e8;
    border-top: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
}
.category-header .badge { font-size: 18px; font-weight: 700; }

/* ===== 商品列表容器 ===== */
.product-list { width: 100%; }

/* ===== 商品行 ===== */
.product-list-row {
    width: 100%;
    height: 80px;
    background: #fff;
    border-left: 1px solid #e8e8e8;
    border-right: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    transition: background .15s;
}
.product-list-row:hover { background: #f0f7ff; }
.product-list-row:last-child { border-radius: 0 0 4px 4px; }

/* ===== 行内内容 ===== */
.product-list-row-inner {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    position: relative;
    padding: 0 10px 0 0;
    box-sizing: border-box;
}
.product-list-row-soldout { opacity: 0.55; cursor: default; }

/* ===== 商品名 + 图片 ===== */
.plist-name-wrap {
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-left: 10px;
}
.plist-img {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 3px;
    margin-right: 8px;
    background: #eee;
}

/* ===== 图片懒加载：加载前显示浅灰背景 + 微脉冲动画 ===== */
.lazy-img {
    opacity: 0;
    transition: opacity 0.3s ease;
    background: linear-gradient(135deg, #f5f5f5 25%, #e8e8e8 50%, #f5f5f5 75%);
    background-size: 200% 200%;
    animation: lazy-shimmer 1.5s ease-in-out infinite;
}
@keyframes lazy-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== 图片懒加载：加载完成后淡入 ===== */
.lazy-loaded {
    opacity: 1;
    animation: lazy-fadein 0.35s ease forwards;
}
@keyframes lazy-fadein {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}
.plist-name {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* ===== 类型列：人工=红字+红框 / 自动=蓝字+蓝框 ===== */
.plist-type {
    width: 56px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    padding: 2px 6px;
    white-space: nowrap;
    border-radius: 2px;
    border: 1px solid transparent;
}
.plist-type-manual {
    color: #ea5455;
    border-color: #ea5455;
}
.plist-type-auto {
    color: #3688fc;
    border-color: #3688fc;
}

/* ===== 库存列：充足=绿色+绿框 / 不足=红色+红框 ===== */
.plist-stock {
    width: 56px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    border-radius: 2px;
    padding: 2px 6px;
    margin-left: 12px;
    white-space: nowrap;
}
.plist-stock-ok {
    color: #28a745;
    border: 1px solid #28a745;
}
.plist-stock-low {
    color: #ea5455;
    border: 1px solid #ea5455;
}

/* ===== 价格列 ===== */
.plist-price {
    width: 80px;
    text-align: right;
    font-size: 16px;
    font-weight: 700;
    color: #ea5455;
    white-space: nowrap;
    padding-right: 16px;
}

/* ===== 操作列：购买=蓝框 / 缺货=灰框 ===== */
.plist-action {
    width: 56px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    border: 1px solid #3688fc;
    border-radius: 2px;
    padding: 2px 6px;
    color: #3688fc;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}
.plist-action:hover {
    background-color: #3688fc;
    color: #fff;
}
.product-list-row-soldout .plist-action {
    color: #999;
    border-color: #ccc;
    cursor: default;
}
.product-list-row-soldout .plist-action:hover {
    background-color: transparent;
    color: #999;
}

/* ===== 折扣标签 ===== */
.plist-discount {
    flex-shrink: 0;
    font-size: 10px;
    color: #e6a23c;
    border: 1px solid #e6a23c;
    border-radius: 2px;
    padding: 0 4px;
    margin-left: 4px;
}

/* ===== 手机端适配 ===== */
@media screen and (max-width: 576px) {
    .notice-bar { font-size: 12px; padding: 6px 10px; }
    .list-header { display: none; }
    .category-header { height: 35px; }
    .category-header .badge { font-size: 13px; }
    .product-list-row { height: 60px; }
    .product-list-row-inner { height: 60px; }
    .plist-img { width: 44px; height: 44px; margin-right: 8px; }
    .plist-name { font-size: 13px; }
    .plist-type { width: 44px; text-align: center; font-size: 13px; }
    .plist-stock { width: 44px; text-align: center; font-size: 13px; margin-left: 8px; }
    .plist-price { width: 64px; text-align: right; font-size: 14px; padding-right: 10px; }
    .plist-action { width: 46px; text-align: center; font-size: 13px; }
    .plist-discount { display: none; }
}
