/* =============================================================
 * search.css — 雪茄在线搜索页样式
 * 2026-10-30 搜索功能重做 (cigar-tech)
 *
 * ⚠ 本文件只服务搜索页, 所有类名统一 .sopt- 前缀, 避免与
 *   cigar-shared.css / cigar.css / common.css (别人的独占范围) 撞车。
 *   页面零 JavaScript, tab / 筛选 / 分页的选中态全靠 .sopt-*-on 类。
 * ============================================================= */

.sopt-wrap {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

/* ---------- 顶部结果计数 ---------- */
.sopt-top {
    margin: 0 0 14px;
}
.sopt-topLabel {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    word-break: break-word;
}

/* ---------- tab 栏 ---------- */
.sopt-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid #e2e2e2;
    margin: 0 0 12px;
    padding: 0 2px;
}
.sopt-tab {
    display: inline-block;
    padding: 10px 18px;
    font-size: 16px;
    color: #888;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color .15s ease, border-color .15s ease;
}
.sopt-tab:hover {
    color: #333;
}
.sopt-tab-on {
    color: #111;
    font-weight: bold;
    border-bottom-color: #111;
}
.sopt-tabNum {
    font-size: 12px;
    color: #aaa;
    margin-left: 4px;
    font-weight: normal;
}
.sopt-tab-on .sopt-tabNum {
    color: #666;
}

/* ---------- 筛选行 ---------- */
.sopt-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}
.sopt-filter {
    display: inline-block;
    padding: 5px 14px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    white-space: nowrap;
}
.sopt-filter:hover {
    color: #333;
    border-color: #ccc;
}
.sopt-filter-on {
    color: #fff;
    background: #333;
    border-color: #333;
}

/* ---------- 提示行 (海淘数据建议英文搜索) ---------- */
.sopt-hint {
    font-size: 13px;
    color: #888;
    margin: 0 0 12px;
}

/* ---------- 结果网格 ---------- */
.sopt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
    width: 100%;
}
.sopt-card {
    box-sizing: border-box;
    border: 1px solid #e8e8e8;
    background: #fff;
    overflow: hidden;
    min-width: 0;
}
.sopt-cardLink {
    display: block;
    text-decoration: none;
    color: inherit;
}
.sopt-cardThumb {
    height: 130px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.sopt-cardImg {
    max-width: 100%;
    max-height: 130px;
    /* ⚠ 与全站口径一致: contain, 不裁切不拉伸 */
    object-fit: contain;
    display: block;
}
.sopt-cardBody {
    padding: 10px 12px 12px;
}
.sopt-cardCn {
    font-size: 14px;
    color: #222;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sopt-cardEn {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sopt-cardMeta {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- 价格行 (只展示, 不做购买引导) ---------- */
.sopt-priceRow {
    padding: 0 12px 6px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.sopt-price {
    font-size: 15px;
    color: #b34a2a;
    font-weight: bold;
}
.sopt-stock {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 2px;
}
.sopt-stock-in {
    color: #3a7d3a;
    background: #eef7ee;
}
.sopt-stock-out {
    color: #999;
    background: #f2f2f2;
}
.sopt-srcLine {
    padding: 0 12px 12px;
    font-size: 12px;
    color: #999;
    line-height: 1.5;
    word-break: break-word;
}
.sopt-srcLink {
    color: #6a8bb5;
    text-decoration: none;
    white-space: nowrap;
}
.sopt-srcLink:hover {
    text-decoration: underline;
}

/* ---------- 分页 ---------- */
.sopt-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 0 8px;
    flex-wrap: wrap;
}
.sopt-pageBtn {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
}
.sopt-pageBtn:hover {
    border-color: #999;
    color: #111;
}
.sopt-pageBtn-off {
    color: #bbb;
    border-color: #eee;
    background: #fafafa;
}
.sopt-pageInfo {
    font-size: 13px;
    color: #666;
}

/* ---------- 空态 ---------- */
.sopt-empty {
    text-align: center;
    padding: 60px 20px;
}
.sopt-emptyMain {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}
.sopt-emptySub {
    font-size: 13px;
    color: #999;
}

/* ---------- 响应式 ---------- */
@media screen and (max-width: 768px) {
    .sopt-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    .sopt-tab {
        padding: 9px 12px;
        font-size: 15px;
    }
    .sopt-cardThumb {
        height: 110px;
    }
    .sopt-cardImg {
        max-height: 110px;
    }
}
@media screen and (max-width: 480px) {
    .sopt-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 8px;
    }
    .sopt-cardBody {
        padding: 8px 9px 10px;
    }
    .sopt-cardCn {
        font-size: 13px;
    }
    .sopt-tab {
        padding: 8px 9px;
        font-size: 14px;
    }
    .sopt-tabNum {
        font-size: 11px;
        margin-left: 2px;
    }
    .sopt-cardThumb {
        height: 96px;
    }
    .sopt-cardImg {
        max-height: 96px;
    }
    .sopt-pager {
        gap: 8px;
        padding: 18px 0 6px;
    }
    .sopt-pageBtn {
        padding: 6px 12px;
    }
}
