/* ============================================================================
   ARCHIVO: propiedades.css
   UBICACIÓN: CanariasApart.Web/wwwroot/css/front/propiedades.css
   DESCRIPCIÓN: Estilos para búsqueda de propiedades (estilo Airbnb)
   COLORES: #008572 (teal), #dfbb3e (gold)
   VERSIÓN: 2 — Buscador horizontal, diseño pulido, footer
   ============================================================================ */

:root {
    --prop-teal: #008572;
    --prop-teal-light: #00a68b;
    --prop-teal-dark: #006b5c;
    --prop-gold: #dfbb3e;
    --prop-text: #222;
    --prop-text-light: #717171;
    --prop-border: #ddd;
    --prop-bg: #fff;
    --prop-bg-light: #f7f7f7;
    --prop-shadow: 0 2px 16px rgba(0,0,0,.08);
    --prop-shadow-hover: 0 6px 24px rgba(0,0,0,.12);
    --prop-radius: 12px;
    --prop-radius-sm: 8px;
    --prop-transition: .2s ease;
    --prop-font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --prop-font-display: 'Cormorant Garamond', Georgia, serif;
}

/* ============================== LAYOUT ============================== */
.propiedades-page { font-family: var(--prop-font); color: var(--prop-text); background: var(--prop-bg); min-height: 100vh; }
.propiedades-wrapper { display: flex; flex-direction: column; min-height: calc(100vh - 70px); }

/* ============================== SEARCH BAR — HORIZONTAL ============================== */
.prop-search-bar {
    background: var(--prop-bg);
    border-bottom: 1px solid var(--prop-border);
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 6px rgba(0,0,0,.04);
}

.prop-search-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: nowrap;
}

.prop-search-dates {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.prop-search-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.prop-search-field label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--prop-text-light);
    padding-left: 2px;
}

.prop-search-field input[type="date"],
.prop-search-field select {
    border: 1.5px solid var(--prop-border);
    border-radius: var(--prop-radius-sm);
    padding: 9px 12px;
    font-size: 14px;
    font-family: var(--prop-font);
    background: var(--prop-bg);
    outline: none;
    transition: border-color var(--prop-transition), box-shadow var(--prop-transition);
    min-width: 148px;
    height: 42px;
}

.prop-search-field input:focus,
.prop-search-field select:focus {
    border-color: var(--prop-teal);
    box-shadow: 0 0 0 2px rgba(0,133,114,.12);
}

.prop-search-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--prop-text-light);
    white-space: nowrap;
    height: 42px;
    padding: 0 6px;
    cursor: pointer;
}

.prop-search-check input[type="checkbox"] {
    accent-color: var(--prop-teal);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.prop-btn-search {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--prop-teal);
    color: #fff;
    border: none;
    border-radius: var(--prop-radius-sm);
    padding: 0 24px;
    height: 42px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--prop-font);
    cursor: pointer;
    transition: background var(--prop-transition), transform var(--prop-transition);
    white-space: nowrap;
    letter-spacing: .3px;
    flex-shrink: 0;
}

.prop-btn-search:hover {
    background: var(--prop-teal-light);
    transform: translateY(-1px);
}

.prop-btn-search:active {
    transform: translateY(0);
}

/* ============================== TOOLBAR ============================== */
.prop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-bottom: 1px solid var(--prop-border);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    gap: 12px;
    flex-wrap: wrap;
}

.prop-toolbar-left { display: flex; align-items: center; gap: 12px; }
.prop-counter { font-size: 14px; font-weight: 600; color: var(--prop-text); }

.prop-btn-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--prop-bg);
    border: 1.5px solid var(--prop-border);
    border-radius: 24px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--prop-font);
    cursor: pointer;
    transition: all var(--prop-transition);
    white-space: nowrap;
}

.prop-btn-filters:hover { border-color: var(--prop-text); box-shadow: var(--prop-shadow); }
.prop-btn-filters i { font-size: 13px; }
.prop-sort-wrap { display: flex; align-items: center; gap: 8px; }
.prop-sort-wrap label { font-size: 13px; color: var(--prop-text-light); white-space: nowrap; }

.prop-sort-wrap select {
    border: 1.5px solid var(--prop-border);
    border-radius: var(--prop-radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    font-family: var(--prop-font);
    background: var(--prop-bg);
    outline: none;
    cursor: pointer;
}

.prop-sort-wrap select:focus { border-color: var(--prop-teal); }

/* ============================== CONTENIDO ============================== */
.prop-content { display: flex; flex: 1; max-width: 1400px; margin: 0 auto; width: 100%; }
.prop-list-section { flex: 1; padding: 24px; overflow-y: auto; max-height: calc(100vh - 180px); }
.prop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }

.prop-map-section {
    width: 45%;
    min-width: 400px;
    position: sticky;
    top: 120px;
    height: calc(100vh - 180px);
    border-left: 1px solid var(--prop-border);
}

#propMap { width: 100%; height: 100%; }

/* ============================== TARJETAS ============================== */
.prop-card { border-radius: var(--prop-radius); overflow: hidden; transition: transform var(--prop-transition); }
.prop-card:hover { transform: translateY(-3px); }
.prop-card-link { text-decoration: none; color: inherit; display: block; }

.prop-card-carousel {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--prop-radius);
    overflow: hidden;
    background: var(--prop-bg-light);
}

.prop-card-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .4s ease; }
.prop-card-slide.active { opacity: 1; }
.prop-card-slide img { width: 100%; height: 100%; object-fit: cover; }

.prop-card-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--prop-transition), transform var(--prop-transition);
    z-index: 2;
    font-size: 11px;
    color: var(--prop-text);
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.prop-card-carousel:hover .prop-card-arrow { opacity: 1; }
.prop-card-arrow-left { left: 8px; }
.prop-card-arrow-right { right: 8px; }
.prop-card-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.1); }

.prop-card-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 2;
}

.prop-card-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    transition: background var(--prop-transition), transform var(--prop-transition);
}

.prop-card-dot.active { background: #fff; transform: scale(1.2); }

.prop-card-body { padding: 14px 2px 6px; }

.prop-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.prop-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--prop-text);
}

.prop-card-rating { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.prop-card-rating i { color: var(--prop-text); font-size: 11px; }
.prop-card-rating span { color: var(--prop-text-light); font-weight: 400; font-size: 13px; }
.prop-card-new { color: var(--prop-teal); font-size: 13px; }
.prop-card-new i { color: var(--prop-gold); font-size: 12px; }
.prop-card-location { font-size: 13px; color: var(--prop-text-light); margin: 4px 0 2px; }
.prop-card-location i { font-size: 11px; color: var(--prop-teal); margin-right: 2px; }
.prop-card-features { font-size: 13px; color: var(--prop-text-light); margin: 2px 0 10px; }

.prop-card-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-top: 1px solid #ebebeb;
    padding-top: 10px;
    margin-top: 4px;
}

.prop-card-price-night { font-size: 16px; font-weight: 700; color: var(--prop-text); }
.prop-card-price-night small { font-weight: 400; font-size: 14px; color: var(--prop-text-light); }
.prop-card-price-total { font-size: 13px; color: var(--prop-text-light); text-decoration: underline; }

/* ============================== FILTROS PANEL ============================== */
.prop-filter-panel {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(2px);
}

.prop-filter-panel.show { display: flex; }

.prop-filter-content {
    background: var(--prop-bg);
    border-radius: var(--prop-radius);
    max-width: 600px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0,0,0,.2);
    animation: filterSlideUp .25s ease;
}

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

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--prop-border);
    position: sticky;
    top: 0;
    background: var(--prop-bg);
    z-index: 1;
}

.filter-header h3 { font-size: 17px; font-weight: 700; margin: 0; }

.filter-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--prop-text);
    padding: 4px 8px;
    border-radius: 50%;
    transition: background var(--prop-transition);
}

.filter-close:hover { background: var(--prop-bg-light); }
.filter-section { padding: 22px 24px; border-bottom: 1px solid #ebebeb; }
.filter-section:last-of-type { border-bottom: none; }
.filter-section h4 { font-size: 15px; font-weight: 700; margin: 0 0 16px; color: var(--prop-text); }

.filter-price-row { display: flex; gap: 12px; align-items: center; }
.filter-price-input { flex: 1; position: relative; }
.filter-price-input label { display: block; font-size: 11px; color: var(--prop-text-light); margin-bottom: 4px; }

.filter-price-input input {
    width: 100%;
    border: 1.5px solid var(--prop-border);
    border-radius: var(--prop-radius-sm);
    padding: 10px 12px 10px 24px;
    font-size: 14px;
    font-family: var(--prop-font);
    outline: none;
}

.filter-price-input input:focus { border-color: var(--prop-teal); }
.filter-price-input .filter-price-symbol { position: absolute; left: 10px; bottom: 12px; font-size: 14px; color: var(--prop-text-light); }
.filter-price-separator { font-size: 18px; color: var(--prop-text-light); margin-top: 14px; }

.filter-select-row { display: flex; gap: 16px; }
.filter-select-group { flex: 1; }
.filter-select-group label { display: block; font-size: 13px; color: var(--prop-text-light); margin-bottom: 6px; }

.filter-select-group select {
    width: 100%;
    border: 1.5px solid var(--prop-border);
    border-radius: var(--prop-radius-sm);
    padding: 10px 12px;
    font-size: 14px;
    font-family: var(--prop-font);
    background: var(--prop-bg);
    outline: none;
    cursor: pointer;
}

.filter-select-group select:focus { border-color: var(--prop-teal); }
.filter-types-grid { display: flex; flex-wrap: wrap; gap: 8px; }

.filter-type-btn {
    border: 1.5px solid var(--prop-border);
    border-radius: 24px;
    padding: 10px 20px;
    font-size: 13px;
    font-family: var(--prop-font);
    background: var(--prop-bg);
    cursor: pointer;
    transition: all var(--prop-transition);
    white-space: nowrap;
    font-weight: 500;
}

.filter-type-btn:hover { border-color: var(--prop-text); }
.filter-type-btn.active { background: var(--prop-teal); color: #fff; border-color: var(--prop-teal); }

.filter-amenities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    max-height: 210px;
    overflow: hidden;
    transition: max-height .3s ease;
}

.filter-amenities-grid.expanded { max-height: 2000px; }

.filter-amenity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 6px;
    transition: background var(--prop-transition);
}

.filter-amenity-item:hover { background: var(--prop-bg-light); }
.filter-amenity-item input { accent-color: var(--prop-teal); width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.filter-amenity-item i { color: var(--prop-text-light); width: 18px; text-align: center; font-size: 14px; }
.filter-amenity-item span { flex: 1; }

.filter-toggle-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--prop-text);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-family: var(--prop-font);
}

.filter-toggle-more:hover { color: var(--prop-teal); }

.filter-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--prop-border);
    position: sticky;
    bottom: 0;
    background: var(--prop-bg);
}

.filter-btn-clear {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    color: var(--prop-text);
    font-family: var(--prop-font);
}

.filter-btn-clear:hover { color: var(--prop-teal); }

.filter-btn-apply {
    background: var(--prop-teal);
    color: #fff;
    border: none;
    border-radius: var(--prop-radius-sm);
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--prop-transition);
    font-family: var(--prop-font);
}

.filter-btn-apply:hover { background: var(--prop-teal-light); }

/* ============================== MAP INFO WINDOW ============================== */
.map-info-window { max-width: 260px; }
.map-iw-link { text-decoration: none; color: inherit; display: flex; gap: 10px; }
.map-iw-img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.map-iw-body { flex: 1; min-width: 0; }
.map-iw-title { font-size: 13px; font-weight: 600; margin-bottom: 3px; line-height: 1.3; }
.map-iw-meta { font-size: 11px; color: var(--prop-text-light); margin-bottom: 3px; }
.map-iw-rating { margin-left: 6px; }
.map-iw-rating i { color: var(--prop-gold); font-size: 10px; }
.map-iw-price { font-size: 13px; font-weight: 700; }

/* ============================== NO RESULTS / LOADING ============================== */
.prop-no-results { text-align: center; padding: 60px 20px; grid-column: 1/-1; }
.prop-no-results i { font-size: 48px; color: var(--prop-border); margin-bottom: 16px; display: block; }
.prop-no-results p { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
.prop-no-results span { font-size: 14px; color: var(--prop-text-light); }
.prop-loading { text-align: center; padding: 60px 20px; grid-column: 1/-1; }
.prop-loading-spinner { width: 36px; height: 36px; border: 3px solid var(--prop-border); border-top: 3px solid var(--prop-teal); border-radius: 50%; animation: propSpin 1s linear infinite; margin: 0 auto 12px; }
@keyframes propSpin { to { transform: rotate(360deg); } }
.prop-loading p { font-size: 14px; color: var(--prop-text-light); }

/* ============================== FOOTER ============================== */
.prop-footer {
    background: linear-gradient(135deg, #1a3c34 0%, #0d2620 100%);
    color: #b8c9c5;
    padding: 48px 24px 0;
    font-family: var(--prop-font);
    margin-top: auto;
}

.prop-footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 36px;
}

.prop-footer-brand { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.prop-footer-logo-text { font-family: var(--prop-font-display); font-size: 28px; font-weight: 600; letter-spacing: .5px; }
.prop-footer .logo-canarias { color: #fff; }
.prop-footer .logo-apart { color: var(--prop-gold); }
.prop-footer-logo-sub { font-size: 10px; text-transform: uppercase; letter-spacing: 3px; color: rgba(255,255,255,.4); }
.prop-footer p { font-size: 14px; line-height: 1.6; color: #8fa8a1; margin: 0; }
.prop-footer-col h4 { color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; margin: 0 0 16px; }
.prop-footer-col a { display: block; color: #8fa8a1; text-decoration: none; font-size: 14px; margin-bottom: 10px; transition: color var(--prop-transition); }
.prop-footer-col a:hover { color: var(--prop-gold); }

.prop-footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255,255,255,.3);
    flex-wrap: wrap;
    gap: 8px;
}

.prop-footer-bottom .fa-heart { color: var(--prop-gold); margin: 0 2px; }

/* ============================== MOBILE MAP TOGGLE ============================== */
.prop-map-toggle-mobile {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--prop-text);
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--prop-font);
    cursor: pointer;
    z-index: 50;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
    gap: 8px;
    align-items: center;
}

.prop-map-toggle-mobile i { font-size: 16px; }
.prop-map-mobile-modal { display: none; position: fixed; inset: 0; z-index: 500; background: var(--prop-bg); }
.prop-map-mobile-modal.show { display: block; }
.prop-map-mobile-modal .prop-map-mobile-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--prop-border); font-weight: 600; }
.prop-map-mobile-modal .prop-map-mobile-header button { background: none; border: none; font-size: 20px; cursor: pointer; padding: 4px 8px; }
.prop-map-mobile-modal #propMapMobile { width: 100%; height: calc(100vh - 52px); }

/* ============================== RESPONSIVE ============================== */
@media (max-width: 1024px) {
    .prop-map-section { display: none; }
    .prop-content { display: block; }
    .prop-list-section { max-height: none; overflow: visible; }
    .prop-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .prop-map-toggle-mobile { display: flex; }
    .prop-footer-content { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 768px) {
    .prop-search-form { flex-direction: column; align-items: stretch; gap: 10px; }
    .prop-search-dates { display: flex; gap: 8px; }
    .prop-search-dates .prop-search-field { flex: 1; }
    .prop-search-field input[type="date"],
    .prop-search-field select { min-width: auto; width: 100%; }
    .prop-toolbar { padding: 10px 16px; }
    .prop-list-section { padding: 16px; }
    .prop-grid { grid-template-columns: 1fr; gap: 24px; }
    .filter-amenities-grid { grid-template-columns: 1fr; }
    .prop-search-bar { padding: 12px 16px; }
    .prop-btn-search { width: 100%; justify-content: center; }
    .prop-sort-wrap label { display: none; }
    .prop-footer-content { grid-template-columns: 1fr; gap: 24px; }
    .prop-footer-bottom { flex-direction: column; text-align: center; }
}
