/* ========================================
   ESTILOS ESPECÍFICOS DE ALOJAMIENTOS
======================================== */

/* PAGE HEADER */
.page-header {
    background: linear-gradient(135deg, var(--primary), #2563eb);
}

/* MAIN LAYOUT */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    padding: 2rem 0;
    min-height: calc(100vh - 400px);
}

/* FILTERS SIDEBAR */
.filters-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    overflow-y: auto;
    z-index: 50;
}

.filters-header {
    display: none;
}

.filters-close {
    display: none;
}

.filters-title {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group {
    margin-bottom: 1.25rem;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--dark);
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.65rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.checkbox-group label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.85rem;
}

.filter-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 1.25rem 0;
}

.reset-filters {
    width: 100%;
    padding: 0.65rem;
    background: var(--gray);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1rem;
    min-height: 44px;
    font-size: 0.9rem;
}

.reset-filters:hover {
    background: var(--dark);
}

/* RESULTS SECTION */
.results-section {
    min-height: 600px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-count {
    font-size: 1.1rem;
    color: var(--gray);
}

.results-count strong {
    color: var(--primary);
    font-size: 1.3rem;
}

/* CARDS GRID */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(30, 58, 138, 0.15);
    border-color: var(--primary);
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    text-transform: uppercase;
}

.card-badge.cochera {
    background: var(--secondary);
}

.card-img-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Placeholder cuando no hay imagen */
.card-img-container:not(:has(img)) {
    flex-direction: column;
    gap: 0.75rem;
}

.card-img-container:not(:has(img))::before {
    content: '\f1ad';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    font-size: 3.5rem;
    color: #9ca3af;
}

.card-img-container:not(:has(img))::after {
    content: 'Sin imagen';
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 500;
}

.card-share {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    color: var(--primary);
}

.card-share:hover {
    background: white;
    transform: scale(1.1);
}

.card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--dark);
    line-height: 1.3;
}

.card-features {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #f3f4f6;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--gray);
}

.feature-badge.highlight {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 600;
}

.feature-badge i {
    font-size: 0.85rem;
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--gray);
}

.card-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}

.card-info-item i {
    margin-top: 2px;
    color: var(--primary);
    flex-shrink: 0;
}

.card-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1rem 0;
    margin-top: auto;
}

.card-price small {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 400;
}

.price-original {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 1.2rem;
    margin-left: 0.5rem;
}

.promo-tag {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    animation: pulse-promo 2s ease-in-out infinite;
}

@keyframes pulse-promo {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(220, 38, 38, 0.5);
    }
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* BOTONES EN CARDS */
.card-actions .btn-secondary {
    background: #25D366;
}

.card-actions .btn-secondary:hover {
    background: #20ba5a;
}

.card-actions .btn-primary {
    background: var(--accent);
}

.card-actions .btn-primary:hover {
    background: #ea580c;
}
/* MODAL */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 1rem;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 2rem;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-light);
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.modal-close:hover {
    background: #f3f4f6;
    color: var(--dark);
}

.modal-carousel {
    position: relative;
    height: 400px;
    background: #000;
}

.modal-carousel-images {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.modal-carousel-images img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    flex-shrink: 0;
    background: #000;
}

.modal-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    color: var(--dark);
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-carousel-btn:hover {
    background: white;
}

.modal-carousel-btn.prev { left: 20px; }
.modal-carousel-btn.next { right: 20px; }

.modal-carousel-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 10;
}

.modal-body {
    padding: 2rem;
}

.info-section {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.info-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-section p {
    margin: 0.5rem 0;
    line-height: 1.8;
}

.info-section a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.info-section a:hover {
    text-decoration: underline;
    color: var(--primary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
}

.info-item i {
    color: var(--primary);
    font-size: 1.2rem;
}

.servicios-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.servicio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
}

.servicio-item::before {
    content: '✓';
    color: var(--success);
    font-weight: bold;
    font-size: 1.2rem;
}

/* MOBILE FILTERS TOGGLE */
.mobile-filters-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.4);
    z-index: 89;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-filters-toggle:hover {
    transform: scale(1.1);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
        min-height: calc(100vh - 200px);
    }
    
    .filters-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 999;
        overflow-y: auto;
        border-radius: 0;
        padding: 1rem;
        height: 100vh;
        max-height: 100vh;
    }
    
    .filters-sidebar.active {
        display: block;
        animation: slideInRight 0.3s ease;
    }
    
    .filters-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid #e5e7eb;
    }
    
    .filters-close {
        display: flex;
        background: #ef4444;
        color: white;
        border: none;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        font-size: 1.5rem;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;
    }
    
    .filters-close:hover {
        background: #dc2626;
        transform: rotate(90deg);
    }
    
    @keyframes slideInRight {
        from {
            transform: translateX(100%);
        }
        to {
            transform: translateX(0);
        }
    }
    
    .mobile-filters-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    /* Ajustar botón volver arriba en móvil para stack vertical */
    #backToTop {
        bottom: 95px; /* Encima del botón de filtros */
        right: 20px;
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 768px) {
    .modal-carousel {
        height: 250px;
    }
    
    .modal-carousel-btn {
        width: 40px;
        height: 40px;
        padding: 0.8rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        padding-bottom: 120px; /* Espacio para los botones flotantes */
    }
    
    .card-actions {
        grid-template-columns: 1fr;
    }
    
    .card-img-container {
        height: 180px;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .info-section {
        padding: 1rem;
    }
}
/* Badge especial para hotel con cochera */
.card-badge.hotel-cochera {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
}
