/* =========================================
   LISTADO DE SERVICIOS (comida / hospedaje / turismo / guías)
   Todo lo estructural va en CSS propio porque este
   layout se genera vía JavaScript (modulos_servicios.js)
   y esas clases no se compilan en el style.css del proyecto.
   ========================================= */

.cs-header {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}
@media (min-width: 768px) {
    .cs-header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 1.5rem;
    }
}

/* --- Filtros --- */
.cs-filters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}
@media (min-width: 640px) {
    .cs-filters {
        flex-direction: row;
        align-items: center;
        width: auto;
    }
}

.cs-search-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}
@media (min-width: 640px) {
    .cs-search-wrap {
        min-width: 220px;
    }
}

.cs-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #8e0225;
    pointer-events: none;
}

.cs-search-input {
    width: 100%;
    padding: 0.55rem 0.75rem 0.55rem 2.25rem;
    border-radius: 9999px;
    border: 1px solid #e5e2e1;
    background: #fff;
    font-size: 0.875rem;
    color: #1b1c1c;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cs-search-input:focus {
    border-color: #8e0225;
    box-shadow: 0 0 0 3px rgba(142, 2, 37, 0.12);
}

.cs-rating-select {
    padding: 0.55rem 2rem 0.55rem 0.9rem;
    border-radius: 9999px;
    border: 1px solid #e5e2e1;
    background: #fff;
    font-size: 0.875rem;
    color: #1b1c1c;
    outline: none;
    cursor: pointer;
    flex-shrink: 0;
}
.cs-rating-select:focus {
    border-color: #8e0225;
    box-shadow: 0 0 0 3px rgba(142, 2, 37, 0.12);
}

/* --- Grid de tarjetas --- */
.cs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 640px) {
    .cs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .cs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tarjeta individual: entra en animación stagger */
@keyframes cs-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cs-card {
    animation: cs-fade-up 500ms ease both;
}

/* --- Estados: cargando / vacío / error --- */
.cs-status {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 3.5rem 1rem;
    text-align: center;
}

.cs-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(142, 2, 37, 0.15);
    border-top-color: #8e0225;
    animation: cs-spin 0.8s linear infinite;
}
@keyframes cs-spin {
    to { transform: rotate(360deg); }
}

.cs-retry-btn {
    margin-top: 0.25rem;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    background: #8e0225;
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}
.cs-retry-btn:hover {
    background: #650017;
}

/* --- Botón "Ver más" --- */
.cs-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

.cs-load-more-btn {
    padding: 0.65rem 2rem;
    border-radius: 9999px;
    border: 1.5px solid #8e0225;
    background: transparent;
    color: #8e0225;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.cs-load-more-btn:hover {
    background: #8e0225;
    color: #fff;
}
.cs-load-more-btn.is-hidden {
    display: none;
}

/* --- Badges de valoración / RUC dentro de la tarjeta --- */
.cs-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #cda727;
}