:root {
    --primary: #a6863d;
    --primary-hover: #2a3a40;
    --text: #c09d4b;
    --text-muted: #64748B;
    --bg: #2a3a40;
    --surface: #f5f5f5;
    --border: #a6863d;
    --accent-soft: #2a3a40;
    --shadow: rgba(43, 58, 64, 0.08);
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    color: var(--text);
    background: var(--bg);
}

/* Header */
header {
    padding: 10px 0px;
    border-bottom: 4px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 100;
    border-radius: 10px;
}

.logo {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Filtros */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 10px;
    background: var(--surface);
    position: sticky;
    top: 55px;
    z-index: 90;
    border-bottom: 4px solid var(--border);
    overflow-x: auto;
    border-radius: 10px;
}

.filter-btn {
    border: none;
    background: none;
    padding: 10px 10px;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 4px solid transparent;
    white-space: nowrap;
    transition: 0.3s;
}

.filter-btn:hover {
    color: var(--primary);
}

.filter-btn.active {
    color: var(--text);
    border-bottom: 2px solid var(--primary);
    background: var(--accent-soft);
    border-radius: 8px;
}

.container {
    max-width: 1200px;
    margin: 25px auto;
    padding: 0 20px;
}

/* Grid catálogo */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    cursor: pointer;
    transition: 0.3s;
    background: var(--surface);
    padding: 10px;
    border-radius: 12px;
    border: 4px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--border);
    box-shadow: 0 4px 12px var(--shadow);
}

.card img {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 15px;
    object-fit: cover;
}

.card h3 {
    font-size: 1rem;
    margin: 12px 0 4px 0;
    color: var(--text);
}

.card .zona-tag {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
}

/* Detalle */
#detail-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 200;
    overflow-y: auto;
}

.detail-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.btn-back {
    cursor: pointer;
    margin-bottom: 20px;
    display: block;
    font-weight: 600;
    color: var(--primary);
}

.btn-back:hover {
    color: var(--primary-hover);
}

/* Galería principal: 3 columnas iguales */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    border-radius: 15px;
    overflow: hidden;
}

.gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 10px;
}

/* Galería extendida (más de 3 fotos) */
.gallery-extra {
    margin-top: 20px;
}

.extra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.extra-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
}

/* Responsive móvil */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .gallery-grid img {
        height: 250px;
    }

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

    .extra-grid img {
        height: 120px;
    }
}

/* Tarjeta de detalle */
.detail-card-main {
    background: var(--surface);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.detail-visual-group h1 {
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    color: var(--bg);
}

.zona-tag-inline {
    display: inline-block;
    margin-bottom: 15px;
    background: var(--primary);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.detail-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 0 10px 0;
}

.detail-divider {
    height: 1px;
    background: #d1d5db;
    margin: 5px 0;
}

.detail-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.detail-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.detail-period {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .detail-card-main {
        padding: 15px;
    }

    .detail-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-reserve {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}

/* Botones de acción */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.btn-reserve {
    background: var(--primary);
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    margin-top: 10px;
    transition: 0.2s;
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.btn-reserve:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: #25D366;
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
    margin-top: 10px;
    display: inline-block;
    text-align: center;
    flex: 1;
    min-width: 200px;
}

.btn-whatsapp:hover {
    background: #1ebe57;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-reserve,
    .btn-whatsapp {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Lightbox Modal */
#image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

#image-modal img {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#image-modal .close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2001;
}

#image-modal .close:hover {
    color: #bbb;
}

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