/* ==========================================================
   assets/css/archive-aviso.css
   Estilos visuales del Catálogo de Clasificados y Filtros Facetados
   Tu Aviso Los Andes - Mendoza
   ========================================================== */

.tal-cat-page-wrap {
    background-color: #f1f5f9;
    min-height: 100vh;
    padding: 16px 16px 80px 16px;
    font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #333333;
    box-sizing: border-box;
}

.tal-cat-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* BREADCRUMBS */
.tal-cat-breadcrumbs {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.tal-cat-breadcrumbs a {
    color: #3483fa;
    text-decoration: none;
    font-weight: 500;
}
.tal-cat-breadcrumbs a:hover {
    text-decoration: underline;
    color: #0B2A4A;
}

/* ==========================================================
   BARRA SUPERIOR MINIMALISTA ESTILO MERCADO LIBRE (SIN CAJA NI BOX)
   ========================================================== */
.tal-cat-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 2px;
}

.tal-cat-top-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.tal-cat-top-title {
    font-size: 22px;
    font-weight: 700;
    color: #333333;
    margin: 0;
    line-height: 1.2;
}

.tal-cat-top-count {
    font-size: 13px;
    color: #64748b;
    font-weight: 400;
}

.tal-cat-sort-form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.tal-cat-sort-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}
.tal-cat-sort-select {
    height: 32px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    background: #ffffff;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s ease;
}
.tal-cat-sort-select:focus {
    border-color: #3483fa;
}

/* CHIPS DE FILTROS ACTIVOS */
.tal-active-tags-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 0 2px;
}
.tal-tag-active-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    color: #333333;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.tal-tag-active-item a {
    color: #64748b;
    text-decoration: none;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease;
}
.tal-tag-active-item a:hover {
    color: #ef4444;
}
.tal-btn-clear-all-tags {
    font-size: 12px;
    font-weight: 700;
    color: #3483fa;
    text-decoration: none;
    padding: 4px 8px;
}
.tal-btn-clear-all-tags:hover {
    text-decoration: underline;
}

/* LAYOUT EN 2 COLUMNAS */
.tal-cat-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* ==========================================================
   SIDEBAR MINIMALISTA TRANSPARENTE (ESTILO MERCADO LIBRE)
   ========================================================== */
.tal-cat-sidebar {
    width: 230px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    box-sizing: border-box;
}

/* TARJETA INTERRUPTOR "SOLO DESTACADOS" (ESTILO FULL MERCADO LIBRE) */
.tal-sidebar-dest-box {
    margin-bottom: 22px;
}
.tal-dest-switch-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    text-decoration: none !important;
    color: #333333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.tal-dest-switch-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    transform: translateY(-1px);
}
.tal-dest-switch-card.is-active {
    background: #ffffff;
    border-color: #F59E0B;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}
.tal-dest-switch-left {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #333333;
}
.tal-dest-switch-card.is-active .tal-dest-switch-left {
    color: #d97706;
}
.tal-switch-pill {
    width: 34px;
    height: 18px;
    background: #cbd5e1;
    border-radius: 20px;
    position: relative;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}
.tal-switch-pill::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.tal-dest-switch-card.is-active .tal-switch-pill {
    background: #F59E0B;
}
.tal-dest-switch-card.is-active .tal-switch-pill::after {
    transform: translateX(16px);
}

/* GRUPOS DE FILTROS EN EL SIDEBAR (DIRECTOS, SIN CAJAS) */
.tal-sidebar-group {
    margin-bottom: 22px;
}

.tal-sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: #333333;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-transform: none;
    letter-spacing: 0;
}

/* LISTA DE CATEGORÍAS EN TEXTO LIMPIO */
.tal-facet-tree {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tal-tree-item {
    display: flex;
    flex-direction: column;
}

.tal-tree-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 0;
}

.tal-tree-link {
    flex-grow: 1;
    color: #333333;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 400;
    transition: color 0.15s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.35;
}
.tal-tree-link:hover {
    color: #3483fa;
    text-decoration: none;
}
.tal-tree-row.is-active .tal-tree-link {
    color: #3483fa;
    font-weight: 700;
}

.tal-tree-toggle-btn {
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: transform 0.2s ease, color 0.15s ease;
    flex-shrink: 0;
    padding: 0;
}
.tal-tree-toggle-btn:hover {
    color: #333333;
}
.tal-tree-item.is-open > .tal-tree-row .tal-tree-toggle-btn {
    transform: rotate(180deg);
    color: #333333;
}

/* SUBCATEGORÍAS INDENTADAS EN TEXTO LIMPIO */
.tal-subcat-list {
    list-style: none;
    margin: 2px 0 6px 8px;
    padding: 0 0 0 10px;
    border-left: 2px solid #e2e8f0;
    display: none;
    flex-direction: column;
    gap: 2px;
}
.tal-tree-item.is-open > .tal-subcat-list {
    display: flex;
}

.tal-subcat-item a {
    display: block;
    padding: 2px 0;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.15s ease;
    line-height: 1.35;
}
.tal-subcat-item a:hover {
    color: #3483fa;
}
.tal-subcat-item.is-active a {
    color: #3483fa;
    font-weight: 700;
}

/* DEPARTAMENTOS EN TEXTO LIMPIO */
.tal-facet-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tal-facet-list.is-scrollable {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
}

.tal-facet-item a {
    display: block;
    padding: 3px 0;
    color: #333333;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 400;
    transition: color 0.15s ease;
    line-height: 1.35;
}
.tal-facet-item a:hover {
    color: #3483fa;
}
.tal-facet-item.is-active a {
    color: #3483fa;
    font-weight: 700;
}

/* FILTRO DE PRECIO COMPACTO */
.tal-price-range-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tal-price-inputs-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.tal-price-input {
    width: 100%;
    height: 32px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0 8px;
    font-size: 12.5px;
    color: #333333;
    background: #ffffff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}
.tal-price-input:focus {
    border-color: #3483fa;
}
.tal-btn-apply-price {
    height: 32px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #333333;
    cursor: pointer;
    transition: all 0.15s ease;
}
.tal-btn-apply-price:hover {
    background: #0B2A4A;
    color: #ffffff;
    border-color: #0B2A4A;
}

/* ÁREA DE RESULTADOS (GRILLA 4 COLUMNAS) */
.tal-cat-main-content {
    flex-grow: 1;
    min-width: 0;
}

.tal-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    box-sizing: border-box;
}

/* PAGINACIÓN */
.tal-pagination-box {
    margin-top: 34px;
    display: flex;
    justify-content: center;
    gap: 6px;
}
.tal-pagination-box a,
.tal-pagination-box span.current {
    min-width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #333333;
    padding: 0 8px;
    box-sizing: border-box;
}
.tal-pagination-box a:hover {
    border-color: #0B2A4A;
    color: #0B2A4A;
    background: #f8fafc;
}
.tal-pagination-box span.current {
    background: #0B2A4A;
    color: #ffffff;
    border-color: #0B2A4A;
}

/* CAJA VACÍA */
.tal-cat-empty-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 60px 24px;
    text-align: center;
}
.tal-cat-empty-box i {
    font-size: 44px;
    color: #cbd5e1;
    margin-bottom: 14px;
}
.tal-cat-empty-box h3 {
    font-size: 18px;
    font-weight: 800;
    color: #0B2A4A;
    margin: 0 0 6px 0;
}
.tal-cat-empty-box p {
    font-size: 13.5px;
    color: #64748b;
    max-width: 480px;
    margin: 0 auto 18px auto;
}

/* ==========================================================
   BARRA DE FILTROS MÓVIL ESTILO MERCADO LIBRE
   ========================================================== */
.tal-mobile-filter-bar {
    display: none;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 2px;
}
.tal-mobile-filter-bar::-webkit-scrollbar {
    display: none;
}

.tal-mchip-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #333333;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.tal-mchip-btn.is-active {
    background: #0B2A4A;
    color: #ffffff !important;
    border-color: #0B2A4A;
}
.tal-mchip-btn.btn-destacados-chip.is-active {
    background: #F59E0B;
    border-color: #F59E0B;
}

/* BOTTOM SHEET MODAL PARA MÓVILES */
.tal-filter-sheet-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 99999999;
    display: none;
    align-items: flex-end;
    justify-content: center;
    box-sizing: border-box;
}
.tal-filter-sheet-overlay.is-open {
    display: flex;
}

.tal-filter-sheet-card {
    background: #ffffff;
    width: 100%;
    max-width: 580px;
    border-radius: 20px 20px 0 0;
    padding: 16px 18px 24px 18px;
    box-sizing: border-box;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: talSheetSlideUp 0.22s cubic-bezier(0.25, 1, 0.5, 1);
}
@keyframes talSheetSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.tal-filter-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.tal-filter-sheet-title {
    font-size: 17px;
    font-weight: 800;
    color: #0B2A4A;
    margin: 0;
}
.tal-filter-sheet-close {
    background: none;
    border: none;
    font-size: 26px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}

.tal-filter-sheet-content {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.tal-filter-sheet-footer {
    display: flex;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    margin-top: 10px;
}

.tal-btn-sheet-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 18px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s ease;
    box-sizing: border-box;
}
.tal-btn-sheet-reset:hover {
    background: #f8fafc;
    color: #0f172a;
}

.tal-btn-sheet-apply {
    flex-grow: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: #0B2A4A;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(11, 42, 74, 0.2);
    transition: background-color 0.15s ease, transform 0.15s ease;
    box-sizing: border-box;
}
.tal-btn-sheet-apply:hover {
    background: #3483fa;
}

/* ÁRBOL DESPLEGABLE TÁCTIL DE CATEGORÍAS EN MÓVIL (MINIMALISTA ESTILO MERCADO LIBRE) */
.tal-msheet-cat-tree {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.tal-msheet-cat-item {
    border: none;
    border-bottom: 1px solid #f1f5f9;
    background: transparent;
    transition: background-color 0.12s ease;
}
.tal-msheet-cat-item:last-child {
    border-bottom: none;
}
.tal-msheet-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 4px 2px;
}
.tal-msheet-cat-link {
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    text-decoration: none;
    flex-grow: 1;
    line-height: 1.35;
    padding: 6px 0;
    transition: color 0.15s ease;
}
.tal-msheet-cat-link:hover {
    color: #3483fa;
}
.tal-msheet-cat-link.is-active {
    color: #3483fa;
    font-weight: 800;
}
.tal-msheet-expand-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.15s ease;
    flex-shrink: 0;
    padding: 0;
}
.tal-msheet-expand-btn:hover {
    color: #333333;
}
.tal-msheet-cat-item.is-open .tal-msheet-expand-btn {
    transform: rotate(180deg);
    color: #0B2A4A;
}
.tal-msheet-subcat-list {
    list-style: none;
    margin: 2px 0 8px 8px;
    padding: 0 0 4px 12px;
    border-left: 2px solid #e2e8f0;
    display: none;
    flex-direction: column;
    gap: 4px;
}
.tal-msheet-cat-item.is-open .tal-msheet-subcat-list {
    display: flex;
}
.tal-msheet-subcat-item a {
    display: block;
    padding: 5px 6px;
    font-size: 13.5px;
    color: #475569;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.15s ease;
    line-height: 1.35;
}
.tal-msheet-subcat-item a:hover {
    color: #3483fa;
    background: #f8fafc;
}
.tal-msheet-subcat-item.is-active a {
    color: #3483fa;
    font-weight: 700;
    background: #eff6ff;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1100px) {
    .tal-cat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .tal-cat-sidebar {
        display: none;
    }
    .tal-mobile-filter-bar {
        display: flex;
    }
    .tal-cat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .tal-cat-top-bar {
        margin-bottom: 10px;
    }
    .tal-cat-top-title {
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    .tal-cat-page-wrap {
        padding: 10px 8px 80px 8px;
    }
    .tal-cat-sort-form {
        display: none;
    }
}
