/* ==========================================================================
   1. CORE Y TIPOGRAFÍA GLOBAL (Estricto con tus variables)
   ========================================================================== */
#rowTodoslosserviciosFeed,
#rowRestaurantesFeed,
.tsf-grid,
.divRestaurantes,
.filter-group,
.tsf-categorias-filter,
.tsf-card,
.divRestaurante,
.tsf-badge,
.tsf-ver-mas,
.aVerMasAñilRight {
    font-family: var(--font-family-normal) !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   2. REJILLA DE 4 COLUMNAS (Estable y limpia)
   ========================================================================== */
.tsf-grid.tsf-grid-4-columnas,
.divRestaurantes {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
    /* Un poco más de espacio entre tarjetas da más aire */
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 20px !important;
}

@media (max-width: 1200px) {

    .tsf-grid.tsf-grid-4-columnas,
    .divRestaurantes {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 900px) {

    .tsf-grid.tsf-grid-4-columnas,
    .divRestaurantes {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {

    .tsf-grid.tsf-grid-4-columnas,
    .divRestaurantes {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   3. ESTILIZACIÓN DE LAS TARJETAS (Elegantes y con estilo)
   ========================================================================== */
.tsf-card,
.divRestaurante {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    /* Esquinas más suaves */
    overflow: hidden !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04) !important;
    /* Sombra sutil pero elegante */
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.tsf-card:hover,
.divRestaurante:hover {
    transform: translateY(-4px) !important;
    /* Pequeña elevación al pasar el ratón */
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08) !important;
}

/* Contenedor e Imagen vertical (340x460) */
.tsf-card-foto-wrapper {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 135.29% !important;
    overflow: hidden !important;
    background-color: #fcfcfc !important;
}

.tsf-card-foto-img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    display: block !important;
}

.tsf-card:hover .tsf-card-foto-img,
.divRestaurante:hover .tsf-card-foto-img {
    transform: scale(1.05) !important;
    /* Zoom suave premium */
}

/* ==========================================================================
   4. TEXTOS E INFRAESTRUCTURA INTERNA (Con gracia)
   ========================================================================== */
.tsf-card-content,
.divContent {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    padding: 20px !important;
    background: #ffffff !important;
}

.tsf-card-titulo,
.divTitulo {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin-bottom: 6px !important;
    line-height: 1.3 !important;
}

.tsf-card-comarca,
.divComarca {
    font-size: 13px !important;
    color: #888888 !important;
    margin-bottom: 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.tsf-card-comarca i,
.divComarca i {
    color: var(--color-secundario-hex) !important;
    /* Icono de mapa en tu morado */
}

/* Etiquetas internas rediseñadas (Premios, capacidades) */
.tsf-badges {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-bottom: 18px !important;
}

.tsf-badge {
    background-color: rgba(0, 0, 0, 0.03) !important;
    color: #444444 !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: background 0.2s ease !important;
}

.tsf-badge i {
    color: var(--color-secundario-hex) !important;
    /* Los iconos internos adoptan el morado */
}

/* Enlaces "Ver más" integrando el morado y efecto hover */
.tsf-ver-mas,
.aVerMasAñilRight {
    margin-top: auto !important;
    color: var(--color-secundario-hex) !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: gap 0.2s ease, color 0.2s ease !important;
}

.tsf-card:hover .tsf-ver-mas,
.divRestaurante:hover .aVerMasAñilRight {
    gap: 10px !important;
    /* La flecha se mueve sutilmente a la derecha al hacer hover */
    color: var(--color-boton-hex) !important;
    /* Pasa a naranja en hover */
}

/* ==========================================================================
   5. DISEÑO DE FILTROS PREMIUM (Comarcas y Tipos unificados)
   ========================================================================== */
/* Filtro de Comarcas */
.filter-group.comarcas-filter {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    /* Centra los botones igual que en tu captura */
    gap: 8px !important;
    margin-bottom: 35px !important;
    /* Empuja la barra naranja hacia abajo para que respire */
    padding-bottom: 40px !important;
}

.filter-group .filter-btn {
    padding: 8px 16px !important;
    border: 1.5px solid var(--color-secundario-hex) !important;
    /* Borde morado */
    background-color: transparent !important;
    color: var(--color-secundario-hex) !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
}

/* Filtro de Categorías / Tipos (Más grandes y separados) */
.tsf-categorias-filter {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    /* Centra los botones de forma equilibrada */
    gap: 8px !important;
    /* Mismo espaciado exacto que las comarcas */
    margin-top: 35px !important;
    /* Mantiene la separación con la barra naranja */
    margin-bottom: 40px !important;
    background: transparent !important;
    padding: 5px 0 !important;
}

.tsf-categorias-filter .tsf-cat-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    /* Alineación limpia entre icono y texto */
    padding: 6px 14px !important;
    /* Mismo tamaño y proporciones que las comarcas */

    /* Forzado de diseño idéntico al botón desactivado de comarca */
    border: 1px solid #cccccc !important;
    /* Borde gris fino nativo de comarca */
    background: #ffffff !important;
    /* Fondo blanco puro (anula el degradado gris del tema) */
    background-color: #ffffff !important;
    color: #444444 !important;
    /* Texto gris/negro legible por defecto */

    border-radius: 20px !important;
    /* Esquinas redondeadas idénticas a las comarcas */
    font-size: 13px !important;
    /* Mismo tamaño de letra exacto que las comarcas */
    font-weight: 500 !important;
    /* Mismo grosor de letra estilizado */
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    /* Anula cualquier sombra de tu plantilla */
    text-shadow: none !important;
    height: auto !important;
}

.tsf-cat-icono {
    width: 28px !important;
    /* Tamaño ampliado para que destaquen */
    height: 28px !important;
    /* Tamaño ampliado para que destaquen */
    object-fit: contain !important;
    transition: transform 0.25s ease, filter 0.25s ease !important;
}

/* [ESTADOS HOVER Y ACTIVO UNIFICADOS EN TU NARANJA] */
.filter-group .filter-btn:hover,
.filter-group .filter-btn.active {
    background-color: var(--color-boton-hex) !important;
    /* Fondo Naranja */
    border-color: var(--color-boton-hex) !important;
    /* Borde Naranja */
    color: #ffffff !important;
    /* Texto Blanco */
    transform: translateY(-1px) !important;
}

/* Cuando pasas el ratón (Hover) o el filtro de tipo está seleccionado (Active) */
.tsf-categorias-filter .tsf-cat-btn:hover,
.tsf-categorias-filter .tsf-cat-btn.active {
    background: var(--color-secundario-hex) !important;
    /* Fondo Morado idéntico al de arriba */
    background-color: var(--color-secundario-hex) !important;
    border-color: var(--color-secundario-hex) !important;
    color: #ffffff !important;
    /* Texto blanco impecable y limpio */
}

/* ==========================================================================
   6. COMPONENTES FLOTANTES EN FOTO (Wishlist y Badges de Tipo)
   ========================================================================== */
.wishlist-flotante-wrapper {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    z-index: 10 !important;
}

.btn-wishlist-add {
    background: #ffffff !important;
    border: none !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12) !important;
    transition: transform 0.2s ease, background-color 0.2s ease !important;
}

.btn-wishlist-add:hover {
    transform: scale(1.1) !important;
}

/* Si está guardado en la agenda, se tiñe sutilmente de naranja */
.btn-wishlist-add.guardado {
    background-color: var(--color-boton-hex) !important;
}

.wishlist-svg-icon {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
}

/* Badge de tipo (Abajo a la izquierda) */
.tsf-tipo-badge {
    position: absolute !important;
    bottom: 14px !important;
    left: 14px !important;
    background: #ffffff !important;
    padding: 7px 16px !important;
    /* Un poco más de aire para acompañar el nuevo tamaño */
    border-radius: 30px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    /* Grosor de letra del tipo más grande solicitado */
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08) !important;
    color: #222222 !important;
}

/* Icono dentro del badge de la tarjeta más grande */
.tsf-tipo-badge-icono {
    width: 18px !important;
    /* Icono más grande solicitado (antes 13px) */
    height: 18px !important;
    /* Icono más grande solicitado (antes 13px) */
    object-fit: contain !important;
}

/* ── Buscador por texto ── */
.tsf-buscador-wrapper {
    max-width: 1400px;
    margin: 40px auto 0;
    padding: 0 30px;
    box-sizing: border-box;
}

.tsf-buscador-inner {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid var(--color-secundario-hex);
    border-radius: 30px;
    padding: 0 20px;
    height: 52px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease;
}

.tsf-buscador-inner:focus-within {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.tsf-buscador-icono {
    color: var(--color-secundario-hex);
    font-size: 16px;
    margin-right: 12px;
    flex-shrink: 0;
}

.tsf-buscador-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    font-size: 15px;
    font-family: var(--font-family-normal);
    color: #333;
    background: transparent;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.tsf-buscador-input::placeholder {
    color: #aaa;
    font-size: 14px;
}

.tsf-buscador-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 8px;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.tsf-buscador-clear:hover {
    color: var(--color-secundario-hex);
}

@media (max-width: 768px) {
    .tsf-buscador-wrapper {
        padding: 0 12px;
        margin-top: 24px;
    }

    .tsf-buscador-inner {
        height: 44px;
        padding: 0 14px;
    }

    .tsf-buscador-input {
        font-size: 14px;
    }
}