/* Bola Recuperada Woo — Frontend Styles v1.0 */


/* ── Filtro cruzado marca/categoría ──────────────────────── */

.brw-filter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.brw-filter-label {
    font-weight: 600;
}

.brw-filter-select {
    border: 1px solid var(--global-palette7, #cbd5e0);
    border-radius: 6px;
    padding: 10px 14px;
    background: #fff;
    cursor: pointer;
    min-width: 200px;
}

@media (max-width: 767px) {
    .brw-filter {
        justify-content: flex-start;
        margin-bottom: 16px;
    }
    .brw-filter-select {
        flex: 1;
        min-width: 0;
    }
}

/* ── Tabla (desktop) ──────────────────────────────────────── */

.brw-table {
    width: 100%;
    border-collapse: collapse;
}

.brw-table thead th {
    background: var(--global-palette1, #2b6cb0);
    color: #fff;
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.brw-table thead th:nth-child(2) { width: 120px; }
.brw-table thead th:nth-child(3) { width: 115px; }
.brw-table thead th:nth-child(4) { width: 130px; }
.brw-table thead th:last-child   { width: 145px; text-align: center; }

.brw-table tbody tr {
    border-bottom: 1px solid var(--global-palette7, #e2e8f0);
    transition: background 0.15s;
}

.brw-table tbody tr:hover {
    background: var(--global-palette8, #f7fafc);
}

.brw-table td {
    padding: 14px 18px;
    vertical-align: middle;
}

.brw-table td:last-child {
    width: 145px;
    text-align: center;
}

/* ── Celda producto ───────────────────────────────────────── */

.brw-product {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.brw-product img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
    background: #f9f9f9;
}

.brw-product div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brw-product-title {
    margin: 0 0 2px;
    padding: 0;
    border: none;
    font-size: 20px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.brw-product-desc {
    color: var(--global-palette3, #333333);
    margin: 0;
    padding: 0;
}

/* ── Controles ────────────────────────────────────────────── */

.brw-grade,
.brw-qty {
    border: 1px solid var(--global-palette7, #cbd5e0);
    border-radius: 6px;
    padding: 9px 10px;
    background: #fff;
    cursor: pointer;
    max-width: 150px;
}

.brw-grade { min-width: 110px; }
.brw-qty   { min-width: 72px;  }

.brw-regular-price {
    color: var(--global-palette5, #a0aec0);
    font-size: 0.88em;
    font-weight: 400;
    margin-right: 4px;
    white-space: nowrap;
}

.brw-price {
    font-weight: 700;
    color: var(--global-palette3, #333333);
    white-space: nowrap;
}

/* ── Botón añadir ─────────────────────────────────────────── */

.brw-add {
    background: var(--global-palette1, #2b6cb0);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 22px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s, background 0.15s;
    display: inline-block;
}

.brw-table .brw-add {
    display: block;
    margin: 0 auto;
    width: fit-content;
    min-width: 100px;
}

.brw-add:hover:not(:disabled) {
    opacity: 0.85;
}

.brw-add.brw-oos,
.brw-add:disabled {
    background: var(--global-palette6, #a0aec0);
    cursor: not-allowed;
    opacity: 1;
}

.brw-add.brw-loading {
    opacity: 0.6;
    cursor: wait;
}

/* ── Mensaje feedback ─────────────────────────────────────── */

.brw-msg {
    display: block;
    margin-top: 6px;
    opacity: 0;
    transition: opacity 0.2s;
    text-align: center;
}

.brw-msg.brw-msg-show {
    opacity: 1;
}

.brw-table .brw-msg {
    margin-top: 5px;
    min-height: 0;
    line-height: 1.3;
}

/* ── Nota pack (solo mobile) ──────────────────────────────── */

.brw-pack-note {
    display: none; /* oculta en desktop: el header ya lo dice */
    color: var(--global-palette5, #718096);
    margin: 0;
    text-align: center;
}

/* ── Sin resultados ───────────────────────────────────────── */

.brw-empty {
    padding: 32px;
    text-align: center;
    color: var(--global-palette5, #718096);
}

/* ── Cards (ocultas en desktop) ───────────────────────────── */

.brw-cards { display: none; }

/* ── Responsive: cards en mobile (<768px) ─────────────────── */

@media (max-width: 767px) {

    .brw-table  { display: none; }
    .brw-cards  { display: block; }

    .brw-card {
        border-bottom: 1px solid var(--global-palette7, #e2e8f0);
        margin-bottom: 0;
        background: #fff;
    }

    .brw-card-top {
        padding: 8px 8px 6px;
        border-bottom: 1px solid var(--global-palette7, #e2e8f0);
    }

    .brw-card-top .brw-product img {
        width: 150px;
        height: 150px;
    }

    .brw-product-title {
        font-size: 16px;
    }

    .brw-card-body {
        padding: 14px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .brw-card-row {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .brw-grade { flex: 1 1 120px; max-width: 160px; }
    .brw-qty   { width: 80px; }
    .brw-add   { flex: 1; text-align: center; display: block; width: auto; min-width: unset; margin: 0; }

    .brw-pack-note { display: block; }
}
