/* ── B2B Product Filter Widget Styles ───────────────────────────── */

.b2b-filter-wrap {
    display: flex;
    gap: 0;
    align-items: flex-start;
    font-family: inherit;
}

/* ── Sidebar ── */
.b2b-sidebar {
    width: 210px;
    min-width: 210px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 18px 14px;
    position: sticky;
    top: 80px;
    max-height: 90vh;
    overflow-y: auto;
    margin-right: 20px;
}

.b2b-sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.b2b-filter-group {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}
.b2b-filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.b2b-filter-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 8px;
}

/* Category pills */
.b2b-cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.b2b-cat-pill,
.b2b-extra-pill {
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 11px;
    cursor: pointer;
    border: 1px solid #e0e0e0;
    background: #f7f7f7;
    color: #555;
    transition: all .15s;
    line-height: 1.5;
}
.b2b-cat-pill:hover,
.b2b-extra-pill:hover {
    background: #efefef;
}
.b2b-cat-pill.active,
.b2b-extra-pill.active {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
}

/* Checkboxes & radios */
.b2b-check-row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 0;
    cursor: pointer;
}
.b2b-check-row input {
    accent-color: #1a1a2e;
    width: 13px;
    height: 13px;
    cursor: pointer;
    flex-shrink: 0;
}
.b2b-check-row span {
    font-size: 12px;
    color: #444;
    line-height: 1.4;
}

/* Price range */
.b2b-price-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.b2b-price-row input {
    width: 70px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    color: #333;
    background: #fafafa;
}
.b2b-price-row span {
    font-size: 12px;
    color: #999;
}

/* ── Main area ── */
.b2b-main {
    flex: 1;
    min-width: 0;
}

.b2b-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.b2b-count {
    font-size: 12px;
    color: #888;
}
.b2b-sort-select {
    font-size: 12px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 7px;
    background: #fff;
    color: #333;
    cursor: pointer;
}

/* ── Grid ── */
.b2b-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

/* ── Card ── */
.b2b-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s;
}
.b2b-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
}

.b2b-card-img {
    background: #f5f5f5;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.b2b-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.b2b-card-body {
    padding: 11px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.b2b-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.b2b-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    background: #f2f2f2;
    color: #666;
    border: 1px solid #e8e8e8;
}
.b2b-tag--brand {
    background: #eef4ff;
    color: #3a6dbf;
    border-color: #c5d9f7;
}

.b2b-card-title {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.45;
    margin: 0;
}
.b2b-card-title a {
    color: inherit;
    text-decoration: none;
}
.b2b-card-title a:hover {
    text-decoration: underline;
}

.b2b-price {
    font-size: 11px;
    font-weight: 600;
    color: #222;
}
.b2b-price ins { text-decoration: none; }

.b2b-moq {
    font-size: 10px;
    color: #888;
    line-height: 1.4;
}

.b2b-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}
.b2b-badge--out  { background: #fff0f0; color: #c0392b; }
.b2b-badge--back { background: #fff8e1; color: #b7860b; }

/* ── Card footer ── */
.b2b-card-footer {
    padding: 9px 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.b2b-qty-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 7px;
    overflow: hidden;
    background: #fafafa;
}
.b2b-qty-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    font-size: 15px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    transition: background .1s;
}
.b2b-qty-btn:hover { background: #eee; }
.b2b-qty-input {
    width: 34px;
    border: none;
    background: none;
    text-align: center;
    font-size: 12px;
    color: #222;
    padding: 0;
    -moz-appearance: textfield;
}
.b2b-qty-input::-webkit-inner-spin-button,
.b2b-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.b2b-add-btn {
    flex: 1;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 7px 0;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
    letter-spacing: .02em;
}
.b2b-add-btn:hover { opacity: .85; }
.b2b-add-btn.added {
    background: #27ae60;
}

/* ── Pagination ── */
.b2b-pagination {
    display: flex;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.b2b-page-btn {
    padding: 6px 13px;
    border: 1px solid #ddd;
    border-radius: 7px;
    background: #fff;
    font-size: 12px;
    color: #444;
    cursor: pointer;
    transition: all .15s;
}
.b2b-page-btn:hover:not(:disabled) {
    background: #f0f0f0;
}
.b2b-page-btn:disabled,
.b2b-page-btn.current {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
    cursor: default;
}

/* Loading overlay */
.b2b-grid.loading {
    opacity: .5;
    pointer-events: none;
}

.b2b-no-products {
    font-size: 13px;
    color: #888;
    padding: 20px 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .b2b-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .b2b-filter-wrap { flex-direction: column; }
    .b2b-sidebar {
        width: 100%;
        min-width: unset;
        position: static;
        margin-right: 0;
        margin-bottom: 16px;
        max-height: none;
    }
    .b2b-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
    .b2b-grid { grid-template-columns: 1fr; }
}
