@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap');

/* trabi-commerce.css */

/* ── Variables de marca ─────────────────────────────── */
:root {
    --trabi-rojo:      #D70000;
    --trabi-rojo-dark: #aa0000;
    --trabi-radio:     8px;
}

/* ── Wrapper general de la página de acceso ─────────── */
.trabi-acceso-wrap {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
    font-family: inherit;
}

/* ── Tabs ────────────────────────────────────────────── */
.trabi-acceso-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1.5rem;
}

.trabi-tab {
    flex: 1;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    color: #888;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
    font-family: 'Nunito', sans-serif;
}

.trabi-tab.active,
.trabi-tab[aria-selected="true"] {
    color: #D70000;
    border-bottom-color: #D70000;
}

.trabi-tab:hover:not(.active) {
    color: #444;
}

/* ── Panels ──────────────────────────────────────────── */
.trabi-panel {
    display: none;
}

.trabi-panel.active {
    display: block;
}

/* ── Campos ──────────────────────────────────────────── */
.trabi-field {
    margin-bottom: 1rem;
}

.trabi-field label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
    font-weight: 500;
}


/* ══════════════════════════════════════════════════════
   INPUTS, SELECTS Y TEXTAREAS — estilo unificado global
   ══════════════════════════════════════════════════════ */
.trabi-catalogo input[type="text"],
.trabi-catalogo input[type="search"],
.trabi-catalogo input[type="email"],
.trabi-catalogo input[type="tel"],
.trabi-catalogo input[type="number"],
.trabi-catalogo select,
.trabi-catalogo textarea,
.trabi-field input,
.trabi-field select,
.trabi-field textarea,
.trabi-ficha-wrap input[type="text"],
.trabi-ficha-wrap input[type="search"],
.trabi-ficha-wrap input[type="number"],
.trabi-ficha-wrap select,
.trabi-ficha-wrap textarea,
.trabi-mapa-select,
.trabi-variante-select,
.trabi-busqueda {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    font-size: 14px;
    border: 1.5px solid #d0d0d0;
    border-radius: 12px;
    background: #fff;
    color: #222;
    font-family: 'Nunito', sans-serif;
    transition: border-color .15s, box-shadow .15s;
    appearance: auto;
}

.trabi-catalogo input[type="text"]:focus,
.trabi-catalogo input[type="search"]:focus,
.trabi-catalogo input[type="email"]:focus,
.trabi-catalogo input[type="tel"]:focus,
.trabi-catalogo input[type="number"]:focus,
.trabi-catalogo select:focus,
.trabi-catalogo textarea:focus,
.trabi-field input:focus,
.trabi-field select:focus,
.trabi-field textarea:focus,
.trabi-ficha-wrap input:focus,
.trabi-ficha-wrap select:focus,
.trabi-ficha-wrap textarea:focus,
.trabi-mapa-select:focus,
.trabi-variante-select:focus,
.trabi-busqueda:focus {
    outline: none;
    border-color: #D70000;
    box-shadow: 0 0 0 3px rgba(215,0,0,.1);
}

.trabi-catalogo textarea,
.trabi-field textarea,
.trabi-ficha-wrap textarea {
    resize: vertical;
    min-height: 80px;
}

/* El input de cantidad en cards es especial — no debe heredar el estilo global */
.trabi-cant-input {
    width: 32px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-align: center;
    font-size: 13px;
    -moz-appearance: textfield;
}

.trabi-field input,
.trabi-field select,
.trabi-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    color: #222;
    transition: border-color .15s, box-shadow .15s;
    font-family: 'Nunito', sans-serif;
}

.trabi-field input:focus,
.trabi-field select:focus,
.trabi-field textarea:focus {
    outline: none;
    border-color: #D70000;
    box-shadow: 0 0 0 3px rgba(215,0,0,.1);
}

.trabi-field textarea {
    resize: vertical;
    min-height: 80px;
}

.trabi-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.trabi-forgot {
    display: block;
    font-size: 12px;
    color: #888;
    text-align: right;
    margin-top: 4px;
    text-decoration: underline;
    cursor: pointer;
}

/* ── Botones ─────────────────────────────────────────── */
.trabi-btn-primary {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    background: #D70000;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 6px;
    transition: background .15s;
    font-family: 'Nunito', sans-serif;
}

.trabi-btn-primary:hover {
    background: #aa0000;
}

.trabi-btn-primary:disabled {
    background: #ddd;
    cursor: not-allowed;
}

.trabi-btn-secondary {
    display: block;
    width: 100%;
    padding: 11px;
    font-size: 15px;
    background: none;
    color: #333;
    border: 1px solid #d0d0d0;
    border-radius: var(--trabi-radio);
    cursor: pointer;
    text-align: center;
    transition: background .15s, border-color .15s;
    font-family: inherit;
    text-decoration: none;
}

.trabi-btn-secondary:hover {
    background: #f5f5f5;
    border-color: #aaa;
}

/* ── Separador ───────────────────────────────────────── */
.trabi-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1.25rem 0;
    font-size: 12px;
    color: #aaa;
}

.trabi-divider::before,
.trabi-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

/* ── Info box ────────────────────────────────────────── */
.trabi-info-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f7f7f7;
    border-radius: var(--trabi-radio);
    padding: 12px 14px;
    font-size: 13px;
    color: #555;
    margin-bottom: 1.25rem;
}

.trabi-info-box svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #888;
}

/* ── Section label ───────────────────────────────────── */
.trabi-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #aaa;
    margin: 1.5rem 0 .75rem;
}

/* ── Mensaje de feedback (JS) ────────────────────────── */
.trabi-mensaje {
    padding: 12px 16px;
    border-radius: var(--trabi-radio);
    font-size: 14px;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.trabi-mensaje.exito {
    background: #eafaf1;
    color: #1a7a3f;
    border: 1px solid #a8e6c1;
}

.trabi-mensaje.error {
    background: #fef2f2;
    color: #c0152a;
    border: 1px solid #fecaca;
}

/* ── Avisos de estado (pendiente / rechazado) ────────── */
.trabi-aviso {
    max-width: 480px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.trabi-aviso h2 {
    font-size: 20px;
    font-weight: 500;
    margin: .75rem 0 .5rem;
}

.trabi-aviso p {
    font-size: 15px;
    color: #555;
    margin: 0 0 .5rem;
}

.trabi-aviso-icon {
    font-size: 32px;
    display: block;
}

.trabi-aviso-extra {
    font-size: 13px;
    color: #888;
}

.trabi-aviso--pendiente {
    background: #fffbeb;
    border-color: #fde68a;
}

.trabi-aviso--rechazado {
    background: #fef2f2;
    border-color: #fecaca;
}

.trabi-aviso .trabi-btn-secondary {
    margin-top: 1rem;
    display: inline-block;
    width: auto;
    padding: 9px 24px;
}

/* ── Spinner (loading) ───────────────────────────────── */
.trabi-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: trabi-spin .6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes trabi-spin {
    to { transform: rotate(360deg); }
}


/* ══════════════════════════════════════════════════════
   CATÁLOGO
   ══════════════════════════════════════════════════════ */

.trabi-catalogo {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    align-items: start;
    position: relative;
}

/* ── Filtros ─────────────────────────────────────────── */
.trabi-filtros {
    background: #fff;
    border: none;
    border-radius: 12px;
    padding: 1.25rem;
    position: sticky;
    top: 80px;
    box-shadow: rgba(0,0,0,0.05) 0 0 15px 0;
    font-family: 'Nunito', sans-serif;
}

.trabi-filtros-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 14px;
}

.trabi-filtros-limpiar {
    font-size: 12px;
    color: #D70000;
    background: none !important;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    transition: opacity .15s;
}
.trabi-filtros-limpiar:hover {
    background: none !important;
    opacity: .7;
}

.trabi-filtro-grupo {
    margin-bottom: 1.25rem;
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
}

.trabi-filtro-titulo {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #aaa;
    margin: 0 0 .6rem;
    font-family: 'Nunito', sans-serif;
}

.trabi-filtro-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trabi-filtro-lista li {
    margin-bottom: 2px;
}

.trabi-cat-btn {
    background: none;
    border: none;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    width: 100%;
    text-align: left;
    transition: background .12s, color .12s;
    font-family: 'Nunito', sans-serif;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.trabi-cat-btn:hover,
.trabi-cat-btn.active {
    background: rgba(215,0,0,0.07);
    color: #D70000;
    font-weight: 700;
}

/* Chevron indicador de expandir/colapsar (solo en categorías con subcategorías) */
.trabi-cat-chevron {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(-45deg);
    transition: transform .18s ease;
    opacity: .55;
}

.trabi-cat-item.trabi-cat-abierta > .trabi-cat-btn .trabi-cat-chevron {
    transform: rotate(45deg);
    opacity: .85;
}

/* Subcategorías: colapsadas por defecto, se despliegan solo para la
   categoría activa/seleccionada (o su padre) */
.trabi-subcats {
    list-style: none;
    padding: 0 0 0 12px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .2s ease;
}

.trabi-cat-item.trabi-cat-abierta > .trabi-subcats {
    max-height: 1000px;
    margin: 2px 0 0;
}

.trabi-subcat-btn {
    font-size: 12px;
    color: #666;
}

.trabi-filtro-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.trabi-chip {
    padding: 4px 10px;
    font-size: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: none;
    cursor: pointer;
    color: #555;
    transition: all .12s;
    font-family: 'Nunito', sans-serif;
}

.trabi-chip.active {
    background: #D70000;
    color: #fff;
    border-color: #D70000;
}

/* Círculos de color en el filtro lateral */
.trabi-filtro-colores {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
}

.trabi-chip-color {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}

.trabi-chip-color:hover {
    transform: scale(1.15);
}

.trabi-chip-color.active {
    border-color: #D70000;
    transform: scale(1.15);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #D70000;
    background: inherit; /* mantener el color del círculo */
    color: inherit;
}

/* ── Grid header ─────────────────────────────────────── */
.trabi-grid-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.trabi-grid-header::before {
    content: none;
}

.trabi-busqueda {
    flex: 1;
    padding: 10px 14px;
    font-size: 14px;
    border: none;
    border-radius: 24px;
    outline: none;
    transition: box-shadow .15s;
    box-shadow: rgba(0,0,0,0.05) 0 0 15px 0;
    font-family: 'Nunito', sans-serif;
    background: #fff;
}

.trabi-busqueda:focus {
    box-shadow: rgba(215,0,0,0.15) 0 0 15px 0;
}

.trabi-contador {
    font-size: 13px;
    color: #aaa;
    white-space: nowrap;
}



/* ── Acción libreros en cards de destacados ─────────── */
.trabi-dest-accion {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: .5rem;
    padding-top: .5rem;
    border-top: 1px solid #f0f0f0;
}

.trabi-dest-accion .trabi-cantidad-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.trabi-dest-accion .trabi-cant-menos,
.trabi-dest-accion .trabi-cant-mas {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    font-size: 15px;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trabi-dest-accion .trabi-cant-input {
    width: 32px;
    text-align: center;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 0;
    font-size: 13px;
    height: 28px;
    box-shadow: none;
}

.trabi-dest-accion .trabi-btn-agregar {
    flex: 1;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    background: var(--trabi-rojo);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: background .12s;
    white-space: nowrap;
}

.trabi-dest-accion .trabi-btn-agregar:hover {
    background: #b80000;
}

@media (max-width: 768px) {
    .trabi-dest-accion {
        display: none; /* no cabe en mobile horizontal */
    }
}

/* ── Badges de filtros activos ───────────────────────── */
.trabi-filtros-activos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: .75rem;
}

.trabi-badge-activo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff0f0;
    color: var(--trabi-rojo);
    border: 1px solid rgba(215,0,0,.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px 3px 12px;
    font-family: 'Nunito', sans-serif;
}

.trabi-badge-x {
    background: none;
    border: none;
    color: var(--trabi-rojo);
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    opacity: .7;
    transition: opacity .1s;
}

.trabi-badge-x:hover {
    opacity: 1;
}

/* ── Grid de cards ───────────────────────────────────── */
.trabi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* ── Paginación ──────────────────────────────────────── */
.trabi-paginacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 32px 0 16px;
}

.trabi-pag-btn {
    background: none;
    color: #5F5E5A;
    border: none;
    width: 36px;
    height: 36px;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    font-family: 'Nunito', sans-serif;
    border-radius: 50%;
    line-height: 1;
}

.trabi-pag-btn:hover:not(:disabled) {
    color: #D70000;
}

.trabi-pag-btn:disabled {
    opacity: 0.25;
    cursor: default;
}

.trabi-pag-nums {
    display: flex;
    align-items: center;
    gap: 4px;
}

.trabi-pag-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: none;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #5F5E5A;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.trabi-pag-num:hover {
    background: #F5F1E8;
    color: #2C2C2A;
}

.trabi-pag-num.activa {
    background: #D70000;
    color: #fff;
}

.trabi-pag-num.activa:hover {
    background: #B00000;
}

.trabi-pag-ellipsis {
    width: 28px;
    text-align: center;
    color: #9CA3AF;
    font-size: 14px;
    font-family: 'Nunito', sans-serif;
    user-select: none;
}

.trabi-card {
    background: #fff;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
    box-shadow: rgba(0,0,0,0.05) 0 0 15px 0 !important;
    font-family: 'Nunito', sans-serif;
    text-decoration: none !important;
    color: inherit !important;
    cursor: pointer;
}

.trabi-card:hover {
    box-shadow: rgba(0,0,0,0.1) 0 0 15px 0;
    transform: translateY(-3px);
}

.trabi-card.oculta {
    display: none;
}

.trabi-card-img {
    aspect-ratio: 1;
    overflow: hidden;
    background: #fff;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trabi-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0;
    transition: transform .25s ease;
}

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

.trabi-card-body {
    padding: .75rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex: 1;
}

.trabi-card-nombre {
    font-size: 1em;
    font-weight: 700;
    color: #111;
    margin: 0;
    line-height: 1.2;
    font-family: 'Nunito', sans-serif;
    transition: color .15s;
}

.trabi-card:hover .trabi-card-nombre {
    color: #D70000;
}

.trabi-card-precio {
    font-size: 1.05em;
    font-weight: 800;
    color: #D70000;
    margin: -2px 0 0;
    font-family: 'Nunito', sans-serif;
}

.trabi-card-precio-desde {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    margin-right: 2px;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.trabi-card-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trabi-meta-item {
    font-size: 11px;
    color: #777;
}

.trabi-meta-label {
    font-weight: 600;
    color: #aaa;
    margin-right: 3px;
}

/* ── Acción: cantidad + agregar ──────────────────────── */

/* ── Select de variante en cards ────────────────────── */
.trabi-card-variante-select {
    width: 100%;
    margin-bottom: 0;
    padding: 5px 10px;
    font-size: 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    box-shadow: none !important;
    transition: border-color .15s;
}

.trabi-card-variante-select:focus {
    outline: none;
    border-color: var(--trabi-rojo);
}

/* Card-img-link: imagen como bloque completo */
.trabi-card-img-link {
    display: block;
    text-decoration: none;
}

.trabi-card-accion {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: auto;
    padding-top: .5rem;
    border-top: 1px solid #f0f0f0;
}

/* Fila superior: select ocupa todo el ancho */
.trabi-card-accion .trabi-card-variante-select {
    width: 100%;
    margin-bottom: 0;
}

/* Fila inferior: cantidad a la izquierda, botón a la derecha */
.trabi-card-accion-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.trabi-cantidad-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.trabi-cant-btn {
    width: 26px;
    height: 26px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .1s;
}

.trabi-cant-btn:hover {
    background: #f5f5f5;
}

.trabi-cant-input {
    width: 32px;
    text-align: center;
    border: none;
    font-size: 13px;
    padding: 0;
    -moz-appearance: textfield;
}

.trabi-cant-input::-webkit-outer-spin-button,
.trabi-cant-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.trabi-btn-agregar {
    flex: 1;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 600;
    background: var(--trabi-rojo);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background .12s;
    white-space: nowrap;
}

.trabi-btn-agregar:hover {
    background: var(--trabi-rojo-dark);
}

.trabi-btn-agregar.agregado {
    background: #16a34a;
}

/* ── Panel de pedido ─────────────────────────────────── */
/* ══════════════════════════════════════════════════════
   SIDEBAR DE PEDIDO
   ══════════════════════════════════════════════════════ */
.trabi-sidebar-overlay {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,.35);
    z-index: 9998 !important;
}

.trabi-sidebar-overlay.visible {
    display: block;
}

.trabi-pedido-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    height: 100% !important;
    width: 360px;
    max-width: 92vw;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0,0,0,.12);
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
}

.trabi-pedido-sidebar.visible {
    transform: translateX(0);
}

.trabi-pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
}

.trabi-pedido-titulo {
    font-weight: 700;
    font-size: 16px;
    display: block;
}

.trabi-pedido-count {
    font-size: 12px;
    color: #aaa;
    font-weight: 400;
    display: block;
    margin-top: 2px;
}

.trabi-sidebar-cerrar {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--trabi-rojo);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background .12s;
}

.trabi-sidebar-cerrar:hover {
    background: #fff0f0;
}

.trabi-pedido-items {
    overflow-y: auto;
    flex: 1;
    padding: .75rem 1.25rem;
}

.trabi-pedido-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: .5rem;
    padding: .75rem 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}

.trabi-pedido-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.trabi-pedido-item-precio {
    font-size: 11.5px;
    font-weight: 700;
    color: #D70000;
}

.trabi-pedido-item-nombre {
    flex: 1;
    color: #333;
    line-height: 1.4;
}

/* Cuando el nombre es link a la ficha */
a.trabi-pedido-item-link {
    text-decoration: none;
    color: #333;
    transition: color 0.15s ease;
}

a.trabi-pedido-item-link:hover {
    color: #D70000;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.trabi-pedido-item-cant-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.trabi-pedido-item-cant-btn {
    background: none;
    border: none;
    width: 26px;
    height: 26px;
    font-size: 15px;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .1s;
}

.trabi-pedido-item-cant-btn:hover {
    background: #f5f5f5;
}

.trabi-pedido-item-cant {
    font-weight: 700;
    font-size: 13px;
    min-width: 22px;
    text-align: center;
    color: var(--trabi-rojo);
}

.trabi-pedido-item-quitar {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 18px;
    padding: 0 2px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .12s;
}

.trabi-pedido-item-quitar:hover,
.trabi-pedido-item-quitar:focus,
.trabi-pedido-item-quitar:active {
    color: var(--trabi-rojo) !important;
    background: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.trabi-pedido-vacio {
    font-size: 13px;
    color: #ccc;
    text-align: center;
    padding: 2rem 0;
    margin: 0;
}

.trabi-pedido-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #f0f0f0;
}

.trabi-pedido-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 14px;
    color: #333;
    margin-bottom: .85rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid #f0f0f0;
    font-family: 'Nunito', sans-serif;
}

.trabi-pedido-total-monto {
    color: var(--trabi-rojo);
    font-size: 18px;
    font-weight: 800;
}

.trabi-btn-wa {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 12px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    background: #25d366 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: background .12s !important;
    font-family: 'Nunito', sans-serif !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.trabi-btn-wa:hover:not(:disabled) {
    background: #1ebe5d !important;
    color: #fff !important;
}

.trabi-btn-wa:focus,
.trabi-btn-wa:active {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(37,211,102,.3) !important;
    background: #25d366 !important;
    color: #fff !important;
}

.trabi-btn-wa:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ── FAB flotante ────────────────────────────────────── */
.trabi-pedido-fab {
    position: fixed !important;
    right: 1.5rem !important;
    bottom: 1.5rem !important;
    width: 52px;
    height: 52px;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: transform .15s;
}

.trabi-pedido-fab:hover,
.trabi-pedido-fab:focus,
.trabi-pedido-fab:active {
    transform: scale(1.08) !important;
    background: #25d366 !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.2) !important;
    outline: none !important;
}

.trabi-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--trabi-rojo);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* ── Responsive ──────────────────────────────────────── */

/* ══════════════════════════════════════════════════════
   MOBILE — overflow y padding global
   ══════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Evitar scroll horizontal en mobile */
    html {
        overflow-x: hidden !important;
    }
    body {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }

    /* FAB: posición mobile que no genera scroll en iOS */
    .trabi-pedido-fab {
        right: 16px !important;
        bottom: 16px !important;
        /* Compensar safe area en notch */
        bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Catálogo: padding lateral para separar del borde */
    .trabi-catalogo {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Grid de destacados: padding lateral */
    .trabi-dest-grid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Sidebar: padding interior más generoso */
    .trabi-pedido-header {
        padding: 1rem 1.25rem;
    }

    .trabi-pedido-items {
        padding: .5rem 1rem;
    }

    .trabi-pedido-footer {
        padding: .75rem 1rem 1.25rem;
    }

    /* Ficha de producto: padding lateral */
    .trabi-ficha-wrap {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        box-sizing: border-box;
    }
}

/* ── Botón toggle de filtros (solo mobile) ─────────── */
.trabi-filtros-toggle {
    display: none; /* oculto en desktop */
}

@media (max-width: 768px) {
    .trabi-catalogo {
        grid-template-columns: 1fr;
    }

    /* Filtros: ocultos por defecto en mobile, drawer que baja desde arriba */
    .trabi-filtros {
        position: static;
        display: none;
        margin-bottom: 1rem;
    }

    .trabi-filtros.abierto {
        display: block;
    }

    /* Botón toggle visible en mobile */
    .trabi-filtros-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 18px;
        font-size: 14px;
        font-weight: 600;
        font-family: 'Nunito', sans-serif;
        background: #fff;
        color: #333;
        border: 1.5px solid #d0d0d0;
        border-radius: 12px;
        cursor: pointer;
        margin-bottom: 1rem;
        transition: border-color .15s, color .15s;
        width: 100%;
        justify-content: center;
        box-shadow: rgba(0,0,0,0.04) 0 2px 8px 0;
    }

    .trabi-filtros-toggle[aria-expanded="true"] {
        border-color: #D70000;
        color: #D70000;
    }

    .trabi-filtros-badge {
        background: #D70000;
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

    .trabi-grid {
        grid-template-columns: 1fr;
    }

    .trabi-pedido-sidebar {
        width: 100%;
        max-width: 100%;
    }
}


/* ══════════════════════════════════════════════════════
   FICHA DE PRODUCTO
   ══════════════════════════════════════════════════════ */

.trabi-ficha-wrap {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem 2rem 4rem;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .trabi-ficha-wrap {
        width: 90%;
        padding-left: 0;
        padding-right: 0;
    }
}

.trabi-breadcrumb {
    margin-bottom: 1.5rem;
}

.trabi-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #D70000;
    color: #FFFFFF;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 26px;
    border-radius: 99px;
    transition: background 0.2s ease, transform 0.1s ease;
}

.trabi-breadcrumb a:hover {
    background: #B00000;
    color: #FFFFFF;
    text-decoration: none;
    transform: translateY(-1px);
}

.trabi-breadcrumb a:active {
    transform: translateY(0);
}

/* ── Layout 2 columnas ───────────────────────────────── */
.trabi-ficha {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}



/* ── Fila de círculos selectores en specs ────────────── */
.trabi-attr-circles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

/* Asegurar que el atributo [hidden] se respete dentro del plugin.
   Las reglas específicas (.trabi-color-selector, .trabi-dato, etc.) ganan
   especificidad sobre el [hidden] del user-agent stylesheet, así que
   forzamos display:none cuando esté presente. */
.trabi-ficha-wrap [hidden] {
    display: none !important;
}

/* ── Círculos selectores de color (libreros en ficha) ── */
.trabi-color-selector {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    border-radius: 50% !important;
    aspect-ratio: 1 / 1 !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border: 2.5px solid transparent;
    cursor: pointer;
    display: inline-block;
    margin-right: 4px;
    margin-bottom: 4px;
    vertical-align: middle;
    transition: transform .12s, box-shadow .12s, border-color .12s;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.trabi-color-selector:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.trabi-color-selector.activo {
    border-color: var(--trabi-rojo);
    box-shadow: 0 0 0 3px rgba(215,0,0,.2);
    transform: scale(1.1);
}

/* Animación shake cuando no se seleccionó color */
@keyframes trabi-shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-5px); }
    40%       { transform: translateX(5px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.trabi-error-shake {
    animation: trabi-shake .4s ease;
}

/* ── Galería ─────────────────────────────────────────── */
.trabi-ficha-img-principal {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trabi-ficha-img-principal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
}

.trabi-ficha-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: .75rem;
}

.trabi-thumb {
    width: 64px;
    height: 64px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
    cursor: pointer;
    padding: 0;
    transition: border-color .12s;
}

.trabi-thumb:hover,
.trabi-thumb.active {
    border-color: var(--trabi-rojo);
}

.trabi-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

/* ── Info ────────────────────────────────────────────── */
.trabi-ficha-cats {
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 0 0 .5rem;
}

.trabi-ficha-cats a {
    color: #aaa;
    text-decoration: none;
}

.trabi-ficha-nombre {
    font-size: 26px;
    font-weight: 700;
    color: #111;
    margin: 0 0 .35rem;
    line-height: 1.2;
    font-family: 'Nunito', sans-serif;
}

.trabi-ficha-precio {
    font-size: 1.6em;
    font-weight: 800;
    color: #D70000;
    margin: 0 0 1rem;
    font-family: 'Nunito', sans-serif;
}

.trabi-ficha-precio-desde {
    font-size: 13px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .02em;
    margin-right: 3px;
}

.trabi-ficha-desc-corta {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

/* ── Tabla de datos Trabi ────────────────────────────── */
.trabi-ficha-datos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    background: #f9f9f9;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.trabi-dato {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trabi-dato-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #aaa;
}

.trabi-dato-val {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

/* ── Atributos técnicos ──────────────────────────────── */
.trabi-ficha-subtitulo {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #aaa;
    margin: 0 0 .75rem;
    font-family: 'Nunito', sans-serif;
}

.trabi-atributos-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1.25rem;
}

.trabi-attr-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.trabi-attr-label {
    color: #888;
}

.trabi-attr-val {
    font-weight: 500;
    color: #222;
    text-align: right;
}

/* ── Acción (agregar al pedido) ──────────────────────── */
.trabi-ficha-accion {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: .75rem;
}

.trabi-ficha-accion .trabi-btn-agregar {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
}

.trabi-ficha-volver-link {
    font-size: 13px;
    color: #D70000;
    text-decoration: none;
    display: inline-block;
    font-family: 'Nunito', sans-serif;
    margin-top: 1rem;
}

.trabi-ficha-volver-link:hover {
    text-decoration: underline;
}

/* ── Descripción larga ───────────────────────────────── */
.trabi-ficha-desc-larga {
    border-top: 1px solid #f0f0f0;
    padding-top: 2rem;
    font-size: 15px;
    color: #444;
    line-height: 1.8;
}

/* ── Links de cards en el catálogo ──────────────────── */
.trabi-card-img-link {
    display: block;
    text-decoration: none;
}

.trabi-card-nombre-link {
    text-decoration: none;
}

.trabi-card-nombre-link:hover .trabi-card-nombre {
    color: var(--trabi-rojo);
}

/* ── Responsive ficha ────────────────────────────────── */
@media (max-width: 768px) {
    .trabi-ficha {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .trabi-ficha-nombre {
        font-size: 20px;
    }

    .trabi-ficha-datos {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Selector de variante en ficha ───────────────────── */
.trabi-ficha-variante {
    margin-bottom: 1rem;
}

.trabi-ficha-variante .trabi-ficha-subtitulo {
    margin-bottom: .4rem;
}

.trabi-variante-select {
    cursor: pointer;
}


/* ══════════════════════════════════════════════════════
   MAPA DE PUNTOS DE VENTA
   ══════════════════════════════════════════════════════ */

.trabi-mapa-wrap {
    font-family: 'Nunito', sans-serif;
}

.trabi-mapa-controles {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}

.trabi-mapa-busqueda-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
    display: flex;
    align-items: center;
}

.trabi-mapa-busqueda-wrap svg {
    position: absolute;
    left: 14px;
    color: #aaa;
    pointer-events: none;
    z-index: 1;
}

.trabi-mapa-busqueda {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: none;
    border-radius: 24px;
    outline: none;
    transition: box-shadow .15s;
    font-family: 'Nunito', sans-serif;
    box-sizing: border-box;
    box-shadow: rgba(0,0,0,0.05) 0 0 15px 0;
    background: #fff;
}

.trabi-mapa-busqueda:focus {
    box-shadow: rgba(215,0,0,0.15) 0 0 15px 0;
}

.trabi-mapa-select {
    cursor: pointer;
    min-width: 180px;
    width: auto;
}

.trabi-mapa-select:focus {
    box-shadow: rgba(215,0,0,0.15) 0 0 15px 0;
}

.trabi-mapa-vista {
    display: flex;
    border: none;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: rgba(0,0,0,0.05) 0 0 15px 0;
}

.trabi-vista-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    background: #fff;
    border: none;
    cursor: pointer;
    color: #888;
    transition: background .12s, color .12s;
    font-family: 'Nunito', sans-serif;
}

.trabi-vista-btn.active {
    background: #D70000;
    color: #fff;
}

.trabi-vista-btn:not(.active):hover {
    background: #f5f5f5;
    color: #333;
}

.trabi-mapa-contador {
    font-size: 13px;
    color: #aaa;
    margin: 0 0 .75rem;
}

/* ── Contenedor del mapa Leaflet ─────────────────────── */
.trabi-mapa-contenedor {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

#trabi-leaflet-map {
    height: 520px;
    width: 100%;
    background: #f5f5f5;
    display: block;
}

/* Forzar visibilidad del contenedor antes de que Leaflet cargue */
.trabi-mapa-contenedor {
    min-height: 520px;
}

.trabi-mapa-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 14px;
    color: #888;
    z-index: 1000;
}

.trabi-spinner-grande {
    width: 36px;
    height: 36px;
    border: 3px solid #f0f0f0;
    border-top-color: var(--trabi-rojo);
    border-radius: 50%;
    animation: trabi-spin .7s linear infinite;
}

/* ── Popup del mapa ──────────────────────────────────── */
.trabi-popup {
    min-width: 200px;
}

.trabi-popup-nombre {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin: 0 0 4px;
}

.trabi-popup-dir {
    font-size: 12px;
    color: #777;
    margin: 0 0 10px;
    line-height: 1.4;
}

.trabi-popup-acciones {
    display: flex;
    gap: 8px;
}

.trabi-popup-wa {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
}

.trabi-popup-dir-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    background: none;
    color: #555;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
}

/* ── Vista lista ─────────────────────────────────────── */
.trabi-lista-contenedor {
    margin-top: 1rem;
}

.trabi-lista-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.trabi-lista-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 1rem;
    transition: box-shadow .15s;
}

.trabi-lista-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.07);
}

.trabi-lista-nombre {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin: 0 0 4px;
}

.trabi-lista-prov {
    font-size: 11px;
    color: var(--trabi-rojo);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0 0 4px;
}

.trabi-lista-dir {
    font-size: 13px;
    color: #777;
    margin: 0 0 10px;
    line-height: 1.4;
}

.trabi-lista-acciones {
    display: flex;
    gap: 8px;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
    .trabi-mapa-controles { flex-direction: column; align-items: stretch; }
    .trabi-mapa-select { width: 100%; }
    #trabi-leaflet-map { height: 380px; }
}


/* ══════════════════════════════════════════════════════
   PRODUCTOS DESTACADOS
   ══════════════════════════════════════════════════════ */

/* ── Variables de sección ────────────────────────────── */
.trabi-dest-grid {
    --dest-rojo: #D70000;
    display: grid;
    gap: 1.5rem;
    font-family: 'Nunito', sans-serif;
}

.trabi-dest-cols-4 { grid-template-columns: repeat(4, 1fr); }
.trabi-dest-cols-3 { grid-template-columns: repeat(3, 1fr); }
.trabi-dest-cols-2 { grid-template-columns: repeat(2, 1fr); }


/* ── Cards dentro del grid de destacados ─────────────── */
.trabi-dest-grid .trabi-card {
    height: 100%;
}

.trabi-dest-grid .trabi-card-img-link {
    display: block;
    flex-shrink: 0;
}

.trabi-dest-grid .trabi-card-img-link .trabi-card-img {
    border-radius: 12px 12px 0 0;
}

/* ── Card ────────────────────────────────────────────── */
.trabi-dest-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: rgba(0,0,0,0.05) 0 0 15px 0;
    box-shadow: rgba(0,0,0,0.05) 0 0 15px 0 !important;
    transition: box-shadow .2s, transform .2s;
    cursor: pointer;
}

.trabi-dest-card:hover {
    box-shadow: rgba(0,0,0,0.1) 0 0 15px 0;
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

/* ── Imagen ──────────────────────────────────────────── */
.trabi-dest-img {
    position: relative;
    aspect-ratio: 1;
    background: #fff;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trabi-dest-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.trabi-dest-card:hover .trabi-dest-img img {
    transform: scale(1.04);
}

/* ── Badges sobre la imagen ──────────────────────────── */
.trabi-dest-badge-cat {
    display: inline-block;
    background: var(--dest-rojo);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 4px 10px;
    border-radius: 20px;
    align-self: flex-start;
}

.trabi-dest-badge-nuevo {
    display: inline-block;
    background: #111;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 4px 10px;
    border-radius: 20px;
    align-self: flex-start;
}

/* ── Cuerpo ──────────────────────────────────────────── */
.trabi-dest-body {
    padding: 1rem 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    flex: 1;
}

.trabi-dest-sku {
    font-size: 10px;
    font-weight: 600;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin: 0;
    font-family: 'Nunito', sans-serif;
}

.trabi-dest-nombre {
    font-size: 1.2em;
    font-weight: 700;
    color: #111;
    margin: 0;
    line-height: 1.2;
    font-family: 'Nunito', sans-serif;
    transition: color .15s;
}

.trabi-dest-card:hover .trabi-dest-nombre {
    color: var(--dest-rojo);
}

.trabi-dest-desc {
    font-size: 0.9em;
    font-weight: 400;
    color: #777;
    margin: 0;
    line-height: 1.5;
    font-family: 'Nunito', sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Círculos de color ───────────────────────────────── */
.trabi-dest-colores {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 2px;
}

.trabi-color-circulo {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,.12);
    display: inline-block;
    flex-shrink: 0;
}

.trabi-color-circulo[style*="linear-gradient"] {
    border: none;
}

/* ── Badges de presentación ──────────────────────────── */
.trabi-dest-presentaciones {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 2px;
}

.trabi-dest-badge-pres {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: #f5f5f5;
    color: #444;
    border: none;
    font-family: 'Nunito', sans-serif;
}

/* ── Colores en catálogo ─────────────────────────────── */
.trabi-card-colores {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
    .trabi-dest-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .trabi-dest-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .trabi-dest-cols-4,
    .trabi-dest-cols-3,
    .trabi-dest-cols-2 { grid-template-columns: repeat(2, 1fr); }
}



/* ══════════════════════════════════════════════════════
   CARDS — layout horizontal en mobile
   ══════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Grid catálogo: 1 columna */
    .trabi-grid {
        grid-template-columns: 1fr;
        gap: .6rem;
    }

    /* Card catálogo: fila horizontal */
    .trabi-card {
        flex-direction: row;
        align-items: stretch;
    }

    .trabi-card-img {
        width: 110px;
        min-width: 110px;
        aspect-ratio: 1;
        border-radius: 12px 0 0 12px;
        flex-shrink: 0;
        background: #fff;
    }

    .trabi-card-img img {
        object-fit: cover;
    }

    .trabi-card-body {
        padding: .6rem .75rem;
        justify-content: center;
        gap: .35rem;
        min-width: 0;
    }

    .trabi-card-nombre {
        font-size: .9em;
        line-height: 1.25;
    }

    .trabi-card-accion {
        padding-top: .35rem;
        border-top: none;
    }

    .trabi-card-colores .trabi-color-circulo {
        width: 14px !important;
        height: 14px !important;
    }

    /* Grid destacados: 1 columna */
    .trabi-dest-grid {
        grid-template-columns: 1fr !important;
        gap: .6rem;
    }

    /* Card destacados: fila horizontal */
    .trabi-dest-card {
        flex-direction: row !important;
        align-items: stretch;
    }

    .trabi-dest-card .trabi-dest-img {
        width: 110px;
        min-width: 110px;
        flex-shrink: 0;
        border-radius: 12px 0 0 12px;
        aspect-ratio: 1;
        background: #fff;
    }

    .trabi-dest-card .trabi-dest-img img {
        object-fit: cover;
    }

    .trabi-dest-card .trabi-dest-body {
        padding: .6rem .75rem;
        justify-content: center;
        min-width: 0;
        gap: .3rem;
    }

    /* Badge oculto en mobile */
    .trabi-dest-card .trabi-dest-badge-cat,
    .trabi-dest-card .trabi-dest-badge-nuevo {
        display: none;
    }

    .trabi-dest-card .trabi-dest-nombre {
        font-size: .88em;
        line-height: 1.25;
    }

    .trabi-dest-card .trabi-dest-colores {
        gap: 3px;
    }

    .trabi-dest-card .trabi-color-circulo {
        width: 14px !important;
        height: 14px !important;
    }
}



/* ── Meta info en cards dentro de destacados ─────────── */
.trabi-dest-grid .trabi-card-meta,
.trabi-dest-grid .trabi-card-nombre,
.trabi-dest-grid .trabi-meta-item,
.trabi-dest-grid .trabi-meta-label {
    font-family: 'Nunito', sans-serif !important;
}

.trabi-dest-grid .trabi-meta-label {
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: .04em !important;
    color: #aaa !important;
    display: block !important;
    line-height: 1.2 !important;
}

.trabi-dest-grid .trabi-meta-item {
    font-size: 12px !important;
    color: #555 !important;
    display: inline-block !important;
    margin-right: 8px !important;
    line-height: 1.4 !important;
}

.trabi-dest-grid .trabi-card-nombre {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #1a1a1a !important;
    margin: 4px 0 !important;
}

.trabi-dest-grid .trabi-card-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px 10px !important;
    margin-bottom: 4px !important;
}

/* ══════════════════════════════════════════════════════
   OVERRIDES DE ALTA ESPECIFICIDAD — botones en cards
   Necesario para superar resets de Elementor
   ══════════════════════════════════════════════════════ */
.trabi-card .trabi-cant-btn,
.trabi-card-accion-buttons .trabi-cant-btn,
.trabi-dest-grid .trabi-cant-btn {
    width: 26px !important;
    height: 26px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 16px !important;
    color: #555 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.trabi-card .trabi-cant-btn:hover,
.trabi-dest-grid .trabi-cant-btn:hover {
    background: #f5f5f5 !important;
    color: var(--trabi-rojo) !important;
}

.trabi-card .trabi-cant-input,
.trabi-card-accion-buttons .trabi-cant-input,
.trabi-dest-grid .trabi-cant-input {
    width: 32px !important;
    text-align: center !important;
    border: none !important;
    border-left: 1px solid #e0e0e0 !important;
    border-right: 1px solid #e0e0e0 !important;
    border-radius: 0 !important;
    font-size: 13px !important;
    padding: 0 !important;
    height: 26px !important;
    background: #fff !important;
    box-shadow: none !important;
    -moz-appearance: textfield !important;
}

.trabi-card .trabi-btn-agregar,
.trabi-card-accion-buttons .trabi-btn-agregar,
.trabi-dest-grid .trabi-btn-agregar {
    flex: 1 !important;
    padding: 5px 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    background: var(--trabi-rojo) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-family: 'Nunito', sans-serif !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.trabi-card .trabi-btn-agregar:hover,
.trabi-dest-grid .trabi-btn-agregar:hover {
    background: #b80000 !important;
    color: #fff !important;
}

.trabi-card .trabi-btn-agregar.agregado,
.trabi-dest-grid .trabi-btn-agregar.agregado {
    background: #16a34a !important;
}

.trabi-card .trabi-cantidad-wrap,
.trabi-card-accion-buttons .trabi-cantidad-wrap,
.trabi-dest-grid .trabi-cantidad-wrap {
    display: flex !important;
    align-items: center !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    background: #fff !important;
}

.trabi-card .trabi-card-variante-select,
.trabi-dest-grid .trabi-card-variante-select {
    width: 100% !important;
    margin-bottom: .4rem !important;
    padding: 5px 10px !important;
    font-size: 12px !important;
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #333 !important;
    font-family: 'Nunito', sans-serif !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

/* ══════════════════════════════════════════════════════
   OVERRIDES DEL TEMA — mayor especificidad
   ══════════════════════════════════════════════════════ */

/* Neutralizar reset.css del tema en botones del plugin */
.trabi-acceso-wrap button:focus,
.trabi-acceso-wrap button:hover,
.trabi-acceso-wrap [type=button]:focus,
.trabi-acceso-wrap [type=button]:hover,
.trabi-acceso-wrap [type=submit]:focus,
.trabi-acceso-wrap [type=submit]:hover {
    background-color: inherit;
    color: inherit;
    text-decoration: none;
}

.trabi-acceso-wrap .trabi-btn-primary:hover,
.trabi-acceso-wrap .trabi-btn-primary:focus {
    background-color: #aa0000 !important;
    color: #fff !important;
}

.trabi-acceso-wrap .trabi-btn-secondary:hover,
.trabi-acceso-wrap .trabi-btn-secondary:focus {
    background: #f5f5f5 !important;
    color: #333 !important;
    border-color: #ccc !important;
}

.trabi-acceso-wrap .trabi-tab:hover,
.trabi-acceso-wrap .trabi-tab:focus {
    background-color: transparent !important;
    color: #444 !important;
}

.trabi-acceso-wrap .trabi-tab.active:hover,
.trabi-acceso-wrap .trabi-tab.active:focus {
    color: #D70000 !important;
}

/* Filtros — override hover de chips y cat-btn */
.trabi-filtros button:focus,
.trabi-filtros button:hover,
.trabi-filtros [type=button]:focus,
.trabi-filtros [type=button]:hover {
    background-color: inherit;
    color: inherit;
    text-decoration: none;
}

.trabi-filtros .trabi-cat-btn:hover,
.trabi-filtros .trabi-cat-btn:focus {
    background: rgba(215,0,0,0.07) !important;
    color: #D70000 !important;
}

.trabi-filtros .trabi-cat-btn.active,
.trabi-filtros .trabi-cat-btn.active:hover {
    background: rgba(215,0,0,0.07) !important;
    color: #D70000 !important;
}

.trabi-filtros .trabi-chip:hover,
.trabi-filtros .trabi-chip:focus {
    background: rgba(215,0,0,0.07) !important;
    color: #D70000 !important;
    border-color: #D70000 !important;
}

.trabi-filtros .trabi-chip.active,
.trabi-filtros .trabi-chip.active:hover {
    background: #D70000 !important;
    color: #fff !important;
    border-color: #D70000 !important;
}

.trabi-filtros .trabi-filtros-limpiar:hover,
.trabi-filtros .trabi-filtros-limpiar:focus {
    background: none !important;
    color: #D70000 !important;
    opacity: .7;
}

/* Mapa — override botones vista */
.trabi-mapa-wrap button:hover,
.trabi-mapa-wrap button:focus {
    background-color: inherit;
    color: inherit;
}

.trabi-mapa-wrap .trabi-vista-btn.active,
.trabi-mapa-wrap .trabi-vista-btn.active:hover {
    background: #D70000 !important;
    color: #fff !important;
}

.trabi-mapa-wrap .trabi-vista-btn:not(.active):hover {
    background: #f5f5f5 !important;
    color: #333 !important;
}

/* Ficha — override botones */
.trabi-ficha-wrap button:hover,
.trabi-ficha-wrap button:focus {
    background-color: inherit;
    color: inherit;
}

.trabi-ficha-wrap .trabi-btn-agregar:hover,
.trabi-ficha-wrap .trabi-btn-agregar:focus {
    background: #aa0000 !important;
    color: #fff !important;
}

.trabi-ficha-wrap .trabi-cant-btn:hover,
.trabi-ficha-wrap .trabi-cant-btn:focus {
    background: #f5f5f5 !important;
    color: #333 !important;
}

/* Catálogo — override botones agregar */
.trabi-catalogo button:hover,
.trabi-catalogo button:focus {
    background-color: inherit;
    color: inherit;
}

.trabi-catalogo .trabi-btn-agregar:hover,
.trabi-catalogo .trabi-btn-agregar:focus {
    background: #aa0000 !important;
    color: #fff !important;
}

.trabi-catalogo .trabi-cant-btn:hover,
.trabi-catalogo .trabi-cant-btn:focus {
    background: #f5f5f5 !important;
    color: #555 !important;
}
