/* ============================================================
   Blue Ark Plugin — Styles
   Desarrollado por Blue Ark Solutions
   Colores: Azul var(--ba-color-primary, #03325E) | Turqueza var(--ba-color-hover, #1891AE)
   ============================================================ */

/* ============================================================
   BOTONES — Agregar a cotización
   ============================================================ */

.ba-add-to-quote {
    display: block;
    width: 100%;
    margin-top: 10px;
    background-color: var(--ba-color-primary, #03325E) !important;
    color: var(--ba-color-btn-text, #ffffff) !important;
    border: 2px solid var(--ba-color-primary, #03325E) !important;
    padding: 11px 20px !important;
    border-radius: 50px !important;
    cursor: pointer;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.4px;
    text-align: center;
    text-decoration: none !important;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease !important;
    box-shadow: none !important;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.ba-add-to-quote:hover,
.ba-add-to-quote:focus {
    background-color: var(--ba-color-hover, #1891AE) !important;
    border-color: var(--ba-color-hover, #1891AE) !important;
    color: var(--ba-color-btn-text, #ffffff) !important;
    text-decoration: none !important;
}

/* Estado: agregado / post-clic — regresa a azul */
.ba-add-to-quote.added,
.ba-add-to-quote.ba-done {
    background-color: var(--ba-color-primary, #03325E) !important;
    border-color: var(--ba-color-primary, #03325E) !important;
    color: var(--ba-color-btn-text, #ffffff) !important;
    cursor: default;
}

/* Estado: cargando — eliminar spinner morado del tema */
.ba-add-to-quote.loading,
.ba-add-to-quote:disabled {
    background-color: var(--ba-color-primary, #03325E) !important;
    border-color: var(--ba-color-primary, #03325E) !important;
    color: #ffffff !important;
    opacity: 0.75;
    cursor: wait;
}
.ba-add-to-quote.loading::after,
.ba-add-to-quote:disabled::after {
    display: none !important;
    content: none !important;
    background: none !important;
    border: none !important;
}

/* Botón en loop (listado de productos) */
.ba-loop-btn {
    margin-top: 8px;
}

/* Botón en página individual de producto */
.single-product .ba-add-to-quote {
    margin-top: 12px;
    width: auto;
    display: inline-block;
    padding: 12px 28px !important;
}

/* ============================================================
   PÁGINA DE COTIZACIÓN
   ============================================================ */
.ba-quote-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0 40px;
}
.ba-quote-title {
    font-size: 24px;
    margin-bottom: 28px;
    color: var(--ba-color-heading, #03325E);
    border-bottom: 2px solid var(--ba-color-heading, #03325E);
    padding-bottom: 10px;
}

/* ============================================================
   TABLA DE PRODUCTOS
   ============================================================ */
.ba-quote-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0,0,0,0.08);
    border-radius: 10px;
    overflow: hidden;
}
.ba-quote-table thead tr {
    background: #f0f6fa;
}
.ba-quote-table thead th {
    padding: 13px 16px;
    text-align: left;
    font-size: 12px;
    color: var(--ba-color-primary, #03325E);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.ba-quote-table tbody tr {
    border-bottom: 1px solid #eef2f5;
    transition: background 0.15s;
}
.ba-quote-table tbody tr:last-child {
    border-bottom: none;
}
.ba-quote-table tbody tr:hover {
    background: #f8fbfd;
}
.ba-quote-table td {
    padding: 14px 16px;
    vertical-align: middle;
}
.ba-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 12px;
    vertical-align: middle;
    border: 1px solid #e8eef2;
}
.ba-product-name {
    font-weight: 600;
    color: #222;
    vertical-align: middle;
}
.col-qty { width: 155px; text-align: center; }
.col-remove { width: 50px; text-align: center; }

/* Qty control */
.ba-qty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.ba-qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #c8d8e4;
    background: #f0f6fa;
    color: var(--ba-color-primary, #03325E);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    border-radius: 50px;
    transition: background 0.15s, border-color 0.15s;
    font-weight: 700;
}
.ba-qty-btn:hover {
    background: var(--ba-color-hover, #1891AE);
    border-color: var(--ba-color-hover, #1891AE);
    color: #fff;
}
.ba-qty-input {
    width: 50px !important;
    text-align: center;
    border: 1px solid #c8d8e4 !important;
    border-radius: 50px !important;
    padding: 5px 8px !important;
    font-size: 14px !important;
    color: #333;
}
.ba-qty-input::-webkit-inner-spin-button,
.ba-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Botón eliminar */
.ba-remove-item {
    background: none;
    border: none;
    color: #c0392b;
    cursor: pointer;
    font-size: 15px;
    padding: 5px 8px;
    border-radius: 50%;
    transition: background 0.15s;
}
.ba-remove-item:hover { background: #fdecea; }

/* ============================================================
   FORMULARIO
   ============================================================ */
.ba-quote-form-wrap {
    background: #fff;
    padding: 32px;
    border-radius: 10px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.08);
}
.ba-quote-form-wrap h3 {
    font-size: 18px;
    color: var(--ba-color-heading, #03325E);
    margin-top: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--ba-color-heading, #03325E);
    padding-bottom: 8px;
}
.ba-form-row { margin-bottom: 18px; }
.ba-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
@media (max-width: 600px) {
    .ba-two-col { grid-template-columns: 1fr; }
    .ba-add-to-quote { width: 100% !important; }
}
.ba-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}
.ba-field .req { color: #c0392b; }
.ba-field input,
.ba-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #c8d8e4 !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    color: #333;
    transition: border-color 0.2s;
    background: #fff;
}
.ba-field input:focus,
.ba-field textarea:focus {
    border-color: var(--ba-color-hover, #1891AE) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(24, 145, 174, 0.12);
}
.ba-form-actions {
    margin-top: 24px;
    text-align: right;
}
.ba-submit-btn {
    background-color: var(--ba-color-primary, #03325E) !important;
    color: var(--ba-color-btn-text, #ffffff) !important;
    border: 2px solid var(--ba-color-primary, #03325E) !important;
    padding: 13px 40px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 50px !important;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition: background-color 0.25s ease, border-color 0.25s ease !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}
.ba-submit-btn:hover,
.ba-submit-btn:focus {
    background-color: var(--ba-color-hover, #1891AE) !important;
    border-color: var(--ba-color-hover, #1891AE) !important;
    color: var(--ba-color-btn-text, #ffffff) !important;
}
.ba-submit-btn:disabled {
    background-color: #7a9ab5 !important;
    border-color: #7a9ab5 !important;
    cursor: not-allowed;
}

/* ============================================================
   MENSAJES
   ============================================================ */
.ba-error {
    color: #c0392b;
    background: #fdecea;
    border: 1px solid #f5c6c0;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 14px;
    font-size: 14px;
}
.ba-quote-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.07);
}
.ba-quote-empty p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}
.ba-quote-empty .button,
.ba-quote-success .button {
    background-color: var(--ba-color-primary, #03325E) !important;
    color: var(--ba-color-btn-text, #fff) !important;
    border-radius: 50px !important;
    padding: 12px 28px !important;
    border: 2px solid var(--ba-color-primary, #03325E) !important;
    font-weight: 600 !important;
    transition: background-color 0.25s, border-color 0.25s !important;
    text-decoration: none !important;
    display: inline-block;
}
.ba-quote-empty .button:hover,
.ba-quote-success .button:hover {
    background-color: var(--ba-color-hover, #1891AE) !important;
    border-color: var(--ba-color-hover, #1891AE) !important;
}
.ba-quote-success {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.07);
}
.ba-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--ba-color-primary, #1891AE);
    color: var(--ba-color-btn-text, #fff);
    border-radius: 50%;
    font-size: 28px;
    margin-bottom: 18px;
}
.ba-quote-success h2 {
    color: var(--ba-color-heading, #03325E);
    margin: 0 0 10px;
    font-size: 22px;
}
.ba-quote-success p {
    color: #555;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ============================================================
   ÍCONO FLOTANTE DE COTIZACIÓN
   ============================================================ */

.ba-float-wrap {
    position: fixed !important;
    bottom: 32px !important;
    right: 32px !important;
    z-index: 99999 !important;
    width: 64px !important;
    height: 64px !important;
    /* Aislar del layout del tema */
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: none !important;
    transform: none;
}

.ba-float-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    min-height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
    background-color: var(--ba-color-primary, #03325E) !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    text-decoration: none !important;
    box-shadow: 0 4px 16px rgba(3, 50, 94, 0.35) !important;
    transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease !important;
    position: relative !important;
    overflow: hidden;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    outline: none !important;
    /* Evitar que GeneratePress o WooCommerce lo sobreescriban */
    font-size: 0 !important;
    line-height: 0 !important;
}

.ba-float-btn:hover {
    background-color: var(--ba-color-hover, #1891AE) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 24px rgba(24, 145, 174, 0.4) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.ba-float-icon {
    width: 26px !important;
    height: 26px !important;
    max-width: 26px !important;
    max-height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    stroke: #ffffff !important;
    fill: none !important;
    display: block !important;
    flex-shrink: 0;
    pointer-events: none;
}

/* Neutralizar cualquier estilo del tema sobre SVG dentro del flotante */
.ba-float-wrap svg,
.ba-float-wrap svg *,
.ba-float-btn svg,
.ba-float-btn svg path,
.ba-float-btn svg rect,
.ba-float-btn svg line,
.ba-float-btn svg polyline {
    max-width: none !important;
    width: auto !important;
    height: auto !important;
}
.ba-float-btn svg {
    width: 26px !important;
    height: 26px !important;
    max-width: 26px !important;
    max-height: 26px !important;
    display: block !important;
    overflow: visible;
}

.ba-float-label {
    font-size: 9px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 3px;
    line-height: 1 !important;
    display: block !important;
}

/* Badge contador */
.ba-float-badge {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    width: 20px !important;
    height: 20px !important;
    background: #e74c3c !important;
    color: #fff !important;
    border-radius: 50% !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 20px !important;
    text-align: center !important;
    border: 2px solid #fff !important;
    display: none;
    transition: transform 0.2s ease;
    z-index: 10 !important;
    box-sizing: border-box !important;
    pointer-events: none;
}

.ba-float-badge--visible {
    display: block;
}

/* Glow pulsante alrededor del badge */
.ba-float-badge-glow {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: #e74c3c;
    opacity: 0.5;
    z-index: -1;
    animation: ba-glow-pulse 1.8s ease-in-out infinite;
}

@keyframes ba-glow-pulse {
    0%   { transform: scale(1);    opacity: 0.5; }
    50%  { transform: scale(1.9);  opacity: 0;   }
    100% { transform: scale(1);    opacity: 0.5; }
}

/* Animación bump al agregar */
.ba-float-badge--bump {
    animation: ba-bump 0.3s ease;
}
@keyframes ba-bump {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.5); }
    100% { transform: scale(1); }
}

/* ============================================================
   WRAPPER BOTÓN + CANTIDAD EN PRODUCTO INDIVIDUAL
   ============================================================ */
.ba-single-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.ba-single-qty {
    flex-shrink: 0;
}
.ba-single-btn {
    flex: 1;
    min-width: 180px;
    width: auto !important;
    margin-top: 0 !important;
}

/* ============================================================
   WRAPPER BOTÓN + CANTIDAD EN LOOP
   ============================================================ */
.ba-loop-wrap {
    padding: 0 4px;
}
.ba-loop-qty {
    margin-bottom: 8px;
    justify-content: flex-start;
}

@media (max-width: 600px) {
    .ba-float-wrap {
        bottom: 20px;
        right: 20px;
    }
    .ba-float-btn {
        width: 56px;
        height: 56px;
    }
    .ba-float-icon {
        width: 22px;
        height: 22px;
    }
    .ba-single-wrap {
        flex-direction: column;
        align-items: stretch;
    }
    .ba-single-btn {
        width: 100% !important;
    }
}

/* ============================================================
   CATÁLOGO DE PRODUCTOS — [bluearksolutions_catalogo]
   ============================================================ */

.ba-catalog-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0 60px;
    font-family: inherit;
}

/* --- Top bar --- */
.ba-catalog-topbar {
    margin-bottom: 28px;
}
.ba-search-form {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.ba-search-input-wrap {
    position: relative;
    flex: 1;
    max-width: 400px;
}
.ba-search-input {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 42px 10px 16px !important;
    border: 1px solid #c8d8e4 !important;
    border-radius: 50px !important;
    font-size: 14px !important;
    color: #333 !important;
    background: #fff !important;
    transition: border-color 0.2s !important;
    outline: none !important;
}
.ba-search-input:focus {
    border-color: var(--ba-color-hover, #1891AE) !important;
    box-shadow: 0 0 0 3px rgba(24,145,174,0.12) !important;
}
.ba-search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--ba-color-primary, #03325E);
    display: flex;
    align-items: center;
}
.ba-search-btn:hover { color: var(--ba-color-hover, #1891AE); }
.ba-clear-search {
    font-size: 13px;
    color: #c0392b;
    text-decoration: none;
    white-space: nowrap;
}
.ba-clear-search:hover { text-decoration: underline; }
.ba-results-count {
    font-size: 13px;
    color: #888;
    margin-left: auto;
    white-space: nowrap;
}

/* --- Layout: sidebar + main --- */
.ba-catalog-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
}
@media (max-width: 768px) {
    .ba-catalog-layout {
        grid-template-columns: 1fr;
    }
}

/* --- Sidebar --- */
.ba-catalog-sidebar {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.07);
    padding: 20px;
    position: sticky;
    top: 100px;
}
.ba-sidebar-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--ba-color-primary, #03325E) !important;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 14px !important;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ba-color-primary, #03325E);
}
.ba-cat-list,
.ba-subcat-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.ba-cat-list > li {
    margin-bottom: 2px;
}
.ba-cat-link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    color: #444 !important;
    text-decoration: none !important;
    transition: background 0.15s, color 0.15s !important;
    line-height: 1.3 !important;
}
.ba-cat-link:hover {
    background: #f0f6fa !important;
    color: var(--ba-color-primary, #03325E) !important;
    text-decoration: none !important;
}
.ba-cat-link--active {
    background: var(--ba-color-sidebar-active, #03325E) !important;
    color: var(--ba-color-sidebar-active-text, #ffffff) !important;
    font-weight: 600 !important;
}
.ba-cat-link--active:hover {
    background: var(--ba-color-sidebar-active, #1891AE) !important;
    color: var(--ba-color-sidebar-active-text, #ffffff) !important;
}

.ba-cat-count {
    background: rgba(0,0,0,0.08);
    border-radius: 20px;
    font-size: 11px;
    padding: 1px 7px;
    margin-left: 6px;
    flex-shrink: 0;
}
.ba-cat-link--active .ba-cat-count {
    background: rgba(255,255,255,0.25);
}
.ba-subcat-list {
    margin: 2px 0 4px 10px !important;
    border-left: 2px solid #e0eaf2;
    padding-left: 8px !important;
}
.ba-subcat-link {
    font-size: 12px !important;
    padding: 5px 8px !important;
}

/* --- Product grid --- */
.ba-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Full-width layout when no sidebar (category pages) */
.ba-catalog-layout--full {
    grid-template-columns: 1fr;
}
.ba-catalog-layout--full .ba-product-grid {
    grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1200px) {
    .ba-catalog-layout--full .ba-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 1024px) {
    .ba-product-grid { grid-template-columns: repeat(2, 1fr); }
    .ba-catalog-layout--full .ba-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 540px) {
    .ba-product-grid { grid-template-columns: 1fr; }
    .ba-catalog-layout--full .ba-product-grid { grid-template-columns: 1fr; }
}

/* --- Product card --- */
.ba-product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.ba-product-card:hover {
    box-shadow: 0 6px 20px rgba(3,50,94,0.13);
    transform: translateY(-2px);
}

/* Image */
.ba-card-img-link {
    display: block;
    text-decoration: none !important;
}
.ba-card-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f7f9fb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ba-card-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 12px;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}
.ba-product-card:hover .ba-card-img {
    transform: scale(1.04);
}

/* Body */
.ba-card-body {
    padding: 14px 16px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ba-card-cat {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--ba-color-hover, #1891AE) !important;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: block;
}
.ba-card-title {
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    flex: 1;
}
.ba-card-title a {
    color: #1a1a1a !important;
    text-decoration: none !important;
}
.ba-card-title a:hover {
    color: var(--ba-color-primary, #03325E) !important;
}

/* Footer */
.ba-card-footer {
    padding: 12px 16px 16px;
    border-top: 1px solid #f0f4f7;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ba-card-qty {
    justify-content: flex-start;
}
.ba-card-quote-btn {
    width: 100% !important;
    margin-top: 0 !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
}

/* --- Empty state --- */
.ba-catalog-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.07);
    grid-column: 1 / -1;
}
.ba-catalog-empty p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}
.ba-btn-primary {
    display: inline-block;
    background: var(--ba-color-primary, #03325E) !important;
    color: #fff !important;
    border-radius: 50px !important;
    padding: 11px 28px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    border: 2px solid var(--ba-color-primary, #03325E) !important;
    transition: background 0.25s, border-color 0.25s !important;
}
.ba-btn-primary:hover {
    background: var(--ba-color-hover, #1891AE) !important;
    border-color: var(--ba-color-hover, #1891AE) !important;
}

/* --- Pagination --- */
.ba-pagination {
    margin-top: 36px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ba-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #c8d8e4;
    color: var(--ba-color-primary, #03325E) !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    background: #fff;
}
.ba-pagination .page-numbers:hover {
    background: var(--ba-color-hover, #1891AE);
    border-color: var(--ba-color-hover, #1891AE);
    color: #fff !important;
}
.ba-pagination .page-numbers.current {
    background: var(--ba-color-primary, #03325E);
    border-color: var(--ba-color-primary, #03325E);
    color: #fff !important;
}
.ba-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    color: var(--ba-color-primary, #03325E) !important;
    cursor: default;
    font-weight: 700;
    letter-spacing: 1px;
}
.ba-pagination .page-numbers.prev,
.ba-pagination .page-numbers.next {
    width: auto;
    min-width: 90px;
    padding: 0 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}


/* Drawer y trigger — ocultos en desktop, solo móvil */
.ba-mobile-cat-bar,
.ba-drawer,
.ba-drawer-overlay {
    display: none !important;
}
/* ============================================================
   MÓVIL — Responsive completo
   ============================================================ */

@media (max-width: 768px) {

    /* ── Catálogo: ocultar sidebar desktop ── */
    .ba-catalog-sidebar {
        display: none !important;
    }

    /* ── Botón sticky de categorías (trigger) ── */
    .ba-mobile-cat-bar,
    .ba-drawer {
        display: flex !important;
    }
    .ba-mobile-cat-bar {
        display: flex !important;
        align-items: center;
        gap: 8px;
        margin-bottom: 16px;
        padding: 4px 0;
    }
    .ba-mobile-cat-trigger {
        display: inline-flex !important;
        align-items: center;
        gap: 8px;
        background: var(--ba-color-primary, #03325E) !important;
        color: #fff !important;
        border: none !important;
        border-radius: 50px !important;
        padding: 10px 18px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        cursor: pointer;
        box-shadow: 0 3px 12px rgba(3,50,94,0.3);
        transition: background 0.2s !important;
        flex: 1;
        max-width: 100%;
    }
    .ba-mobile-cat-trigger:hover {
        background: var(--ba-color-hover, #1891AE) !important;
    }
    .ba-mobile-cat-trigger-icon { display: flex; align-items: center; flex-shrink: 0; }
    .ba-mobile-cat-trigger-label {
        flex: 1;
        text-align: left;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .ba-mobile-cat-trigger-arrow { flex-shrink: 0; font-size: 14px; opacity: 0.8; }
    .ba-mobile-search-tag {
        font-size: 11px;
        background: #fff;
        border: 1px solid #c8d8e4;
        border-radius: 20px;
        padding: 4px 10px;
        white-space: nowrap;
        color: #555;
        flex-shrink: 0;
    }
    .ba-mobile-search-tag a { color: #c0392b; text-decoration: none; margin-left: 4px; }

    /* ── Overlay ── */
    .ba-drawer-overlay {
        display: none;
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0,0,0,0.55) !important;
        z-index: 9998 !important;
        backdrop-filter: blur(2px);
        animation: ba-overlay-in 0.2s ease;
    }
    .ba-drawer-overlay--open { display: block !important; }
    @keyframes ba-overlay-in {
        from { opacity: 0; }
        to   { opacity: 1; }
    }

    /* ── Drawer (bottom sheet) ── */
    .ba-drawer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        background: #fff !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -8px 40px rgba(0,0,0,0.18) !important;
        max-height: 85vh !important;
        display: flex;
        flex-direction: column;
        transform: translateY(100%);
        transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1) !important;
        will-change: transform;
    }
    .ba-drawer--open {
        transform: translateY(0) !important;
    }
    .ba-drawer-handle {
        width: 40px;
        height: 4px;
        background: #dde4ea;
        border-radius: 2px;
        margin: 12px auto 0;
        flex-shrink: 0;
    }
    .ba-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 20px 12px;
        border-bottom: 1px solid #eef2f5;
        flex-shrink: 0;
    }
    .ba-drawer-title {
        font-size: 16px;
        font-weight: 700;
        color: var(--ba-color-primary, #03325E);
        letter-spacing: 0.3px;
    }
    .ba-drawer-close {
        background: #f0f4f7 !important;
        border: none !important;
        border-radius: 50% !important;
        width: 32px !important;
        height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 16px !important;
        color: #555 !important;
        cursor: pointer;
        line-height: 1 !important;
        padding: 0 !important;
    }
    .ba-drawer-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px 0 24px;
        flex: 1;
    }
    .ba-drawer-cat {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 14px 20px !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        color: #2a2a2a !important;
        text-decoration: none !important;
        border-bottom: 1px solid #f5f7fa !important;
        transition: background 0.15s !important;
    }
    .ba-drawer-cat:active { background: #f0f6fa !important; }
    .ba-drawer-cat--active {
        color: var(--ba-color-primary, #03325E) !important;
        font-weight: 700 !important;
        background: #f0f6fa !important;
    }
    .ba-drawer-cat--active::before {
        content: '✓ ';
        color: var(--ba-color-hover, #1891AE);
    }
    .ba-drawer-cat--child {
        padding-left: 36px !important;
        font-size: 13px !important;
        color: #555 !important;
    }
    .ba-drawer-cat-count {
        background: #eef2f5;
        border-radius: 20px;
        font-size: 11px;
        font-weight: 600;
        padding: 2px 9px;
        color: #666;
        flex-shrink: 0;
        margin-left: 8px;
    }
    .ba-drawer-cat--active .ba-drawer-cat-count {
        background: var(--ba-color-primary, #03325E);
        color: #fff;
    }

    /* ── Catálogo layout: una sola columna ── */
    .ba-catalog-layout {
        grid-template-columns: 1fr !important;
    }

    /* ── Grid: 2 columnas en móvil ── */
    .ba-product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* ── Cards más compactas ── */
    .ba-card-body {
        padding: 10px 12px 6px !important;
        gap: 4px !important;
    }
    .ba-card-title {
        font-size: 11px !important;
        line-height: 1.3 !important;
    }
    .ba-card-cat {
        font-size: 10px !important;
    }
    .ba-card-footer {
        padding: 8px 12px 12px !important;
        gap: 7px !important;
    }
    .ba-card-quote-btn {
        font-size: 11px !important;
        padding: 8px 10px !important;
    }
    .ba-qty-btn {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        font-size: 15px !important;
    }
    .ba-qty-input {
        width: 38px !important;
        height: 26px !important;
        font-size: 12px !important;
    }

    /* ── Buscador más compacto ── */
    .ba-search-form {
        gap: 8px !important;
    }
    .ba-search-input-wrap {
        max-width: 100% !important;
    }
    .ba-results-count {
        display: none;
    }

    /* ── Tabla de cotización compacta ── */
    .ba-quote-table {
        font-size: 12px !important;
    }
    .ba-quote-table th {
        font-size: 11px !important;
        padding: 8px 6px !important;
    }
    .ba-quote-table td {
        padding: 8px 6px !important;
        vertical-align: middle !important;
    }
    /* Ocultar columna de imagen en móvil */
    .ba-quote-table .ba-col-img {
        display: none !important;
    }
    .ba-quote-table .ba-product-name {
        font-size: 12px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
    }
    /* Qty en tabla más pequeño */
    .ba-quote-table .ba-qty-btn {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        font-size: 14px !important;
    }
    .ba-quote-table .ba-qty-input {
        width: 34px !important;
        height: 24px !important;
        font-size: 12px !important;
    }

    /* ── Formulario de cotización ── */
    .ba-quote-form-grid {
        grid-template-columns: 1fr !important;
    }
    .ba-form-group input,
    .ba-form-group textarea {
        font-size: 14px !important;
    }

    /* ── Página de cotización: título ── */
    .ba-quote-wrap h2 {
        font-size: 20px !important;
    }
}

/* Extra pequeño: 1 columna */
@media (max-width: 400px) {
    .ba-product-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── Reload button en página vacía ── */
.ba-quote-empty-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 16px 0 10px;
}
.ba-btn-reload {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    background: #fff !important;
    color: var(--ba-color-primary, #03325E) !important;
    border: 2px solid var(--ba-color-primary, #03325E) !important;
    border-radius: 50px !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background 0.2s, color 0.2s !important;
}
.ba-btn-reload:hover {
    background: var(--ba-color-primary, #03325E) !important;
    color: #fff !important;
}
.ba-quote-empty-hint {
    font-size: 12px !important;
    color: #999 !important;
    margin-top: 0 !important;
}

/* ── Quote table móvil: ocultar imagen, compactar ── */
@media (max-width: 768px) {
    .ba-quote-table .ba-thumb {
        display: none !important;
    }
    .ba-quote-table td.col-product {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
    }
}

/* =============================================================
   CATEGORY / BRAND HEADER CARD
   ============================================================= */

.ba-cat-header-card {
    display: flex;
    align-items: center;
    gap: 32px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 32px 36px;
    margin-bottom: 0;
    box-shadow: 0 2px 16px rgba(3,50,94,0.07);
}

/* Brand logo column */
.ba-cat-header-logo-col {
    flex-shrink: 0;
    align-self: flex-start;
}

.ba-brand-logo-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    max-width: 220px;
    min-height: 100px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.ba-brand-logo-img {
    max-width: 180px;
    max-height: 90px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Category image column */
.ba-cat-header-img-col {
    flex-shrink: 0;
    width: 180px;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
}

.ba-cat-header-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Content column */
.ba-cat-header-content-col {
    flex: 1;
    min-width: 0;
}

.ba-cat-header-content-col.ba-cat-header-full {
    width: 100%;
}

.ba-cat-header-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--ba-color-primary, #03325E) !important;
    margin: 0 0 10px !important;
    line-height: 1.3 !important;
}

.ba-cat-header-desc {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 14px;
}

.ba-cat-header-desc p {
    margin: 0 0 8px;
}

.ba-cat-header-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ba-cat-header-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--ba-color-hover, #1891AE);
    font-weight: 600;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    padding: 4px 12px;
    border-radius: 50px;
}

.ba-cat-header-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 24px 0 20px;
}

/* =============================================================
   INDEX GRIDS — [bluearksolutions_categorias] and [bluearksolutions_marcas]
   ============================================================= */

.ba-index-grid {
    display: grid;
    gap: 20px;
}

.ba-cat-index-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.ba-brand-index-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.ba-index-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 8px rgba(3,50,94,0.06);
}

.ba-index-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(3,50,94,0.13);
    border-color: var(--ba-color-hover, #1891AE);
    text-decoration: none !important;
}

/* Category card image area */
.ba-index-card-img-wrap {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ba-index-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ba-index-card:hover .ba-index-card-img {
    transform: scale(1.04);
}

.ba-index-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    color: #a0aec0;
}

/* Brand card logo area */
.ba-brand-card-logo-wrap {
    width: 100%;
    height: 120px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px;
}

.ba-brand-card-logo {
    max-width: 140px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}

.ba-index-card:hover .ba-brand-card-logo {
    transform: scale(1.05);
}

.ba-brand-card-name-fallback {
    font-size: 18px;
    font-weight: 700;
    color: var(--ba-color-primary, #03325E);
    text-align: center;
    letter-spacing: 1px;
}

/* Card body */
.ba-index-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.ba-index-card-name {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

.ba-index-card-count {
    font-size: 12px;
    color: #718096;
}

.ba-index-card-arrow {
    font-size: 12px;
    font-weight: 600;
    color: var(--ba-color-hover, #1891AE);
    margin-top: auto;
    padding-top: 8px;
    transition: gap 0.2s;
}

.ba-index-card:hover .ba-index-card-arrow {
    letter-spacing: 0.3px;
}

/* =============================================================
   RESPONSIVE — Index grids & header card
   ============================================================= */
@media (max-width: 768px) {
    .ba-cat-index-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .ba-brand-index-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .ba-cat-header-card {
        flex-direction: column;
        gap: 20px;
        padding: 24px 20px;
        align-items: flex-start;
    }
    .ba-brand-logo-box {
        min-width: unset;
        max-width: 100%;
        width: 100%;
        padding: 16px 20px;
    }
    .ba-brand-logo-img {
        max-width: 140px;
        max-height: 70px;
    }
    .ba-cat-header-img-col {
        width: 100%;
        height: 160px;
    }
    .ba-cat-header-title {
        font-size: 18px !important;
    }
    .ba-index-card-img-wrap {
        height: 120px;
    }
    .ba-brand-card-logo-wrap {
        height: 100px;
    }
}

@media (max-width: 400px) {
    .ba-cat-index-grid,
    .ba-brand-index-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Quote page title row with reload button ── */
.ba-quote-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.ba-quote-title-row .ba-quote-title {
    margin-bottom: 0 !important;
}
.ba-btn-reload-subtle {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    background: #fff !important;
    color: var(--ba-color-hover, #1891AE) !important;
    border: 1.5px solid var(--ba-color-hover, #1891AE) !important;
    border-radius: 50px !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background 0.2s, color 0.2s !important;
    white-space: nowrap;
}
.ba-btn-reload-subtle:hover {
    background: var(--ba-color-sidebar-active, #1891AE) !important;
    color: var(--ba-color-sidebar-active-text, #ffffff) !important;
}


/* ── Brand card description and button ── */
.ba-brand-card-desc {
    font-size: 12px;
    color: #4a5568;
    line-height: 1.6;
    margin: 4px 0 0;
}
.ba-brand-card-btn {
    display: inline-block;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--ba-color-primary, #03325E) 0%, var(--ba-color-hover, #1891AE) 100%);
    padding: 7px 16px;
    border-radius: 50px;
    transition: opacity 0.2s;
    align-self: flex-start;
}
.ba-index-card:hover .ba-brand-card-btn {
    opacity: 0.88;
}
