/* ============================================================
   Ticopropiedades — CSS Principal
   ============================================================ */

:root {
    --primary:        #059669;
    --primary-dark:   #047857;
    --primary-light:  #d1fae5;
    --secondary:      #f97316;
    --secondary-dark: #ea6b10;
    --accent:         #ecfdf5;
    --text:           #0f172a;
    --muted:          #64748b;
    --border:         #e2e8f0;
    --bg:             #f8fafc;
    --white:          #fff;
    --danger:         #ef4444;
    --success:        #10b981;
    --radius:         10px;
    --radius-sm:      7px;
    --shadow:         0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md:      0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
    --shadow-hover:   0 20px 25px -5px rgba(5,150,105,.15), 0 8px 10px -6px rgba(5,150,105,.08);
    --transition:     .22s cubic-bezier(.4,0,.2,1);
    --font:           'Inter','Segoe UI',system-ui,sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

/* ── LAYOUT ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section    { padding: 64px 0; }
.section-alt { background: var(--bg); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }

/* ── HEADER / NAV ── */
.site-header {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 900;
    box-shadow: 0 1px 12px rgba(0,0,0,.06);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; max-width: 1200px; margin: 0 auto; gap: 16px;
}
.site-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; line-height: 1; }
.site-logo svg { display: block; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
    padding: 7px 12px; border-radius: var(--radius);
    color: var(--text); font-weight: 500; font-size: .9rem;
    transition: background var(--transition);
}
.main-nav a:hover { background: var(--accent); color: var(--primary); border-radius: var(--radius); }

/* User menu */
.user-menu { position: relative; }
.user-toggle {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; border-radius: var(--radius);
    background: none; border: none; cursor: pointer; font-size: .9rem; font-family: var(--font);
}
.user-dropdown {
    display: none; position: absolute; right: 0; top: calc(100% + 4px);
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-hover); min-width: 180px; z-index: 100; overflow: hidden;
}
.user-dropdown a { display: block; padding: 9px 16px; font-size: .875rem; color: var(--text); }
.user-dropdown a:hover { background: var(--bg); }
.user-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.user-menu:hover .user-dropdown { display: block; }


.menu-toggle {
    display: none; background: none; border: none; cursor: pointer;
    padding: 8px; flex-direction: column; gap: 5px;
    transition: all .2s;
}
.menu-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease;
    transform-origin: center;
}
/* Animación 3 rayas → X cuando el menú está abierto */
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.ad-header-banner { display: flex; justify-content: center; padding: 6px 0; background: var(--bg); border-bottom: 1px solid var(--border); }

/* ── BUTTONS ── */
.btn {
    display: inline-block; padding: 10px 22px; border-radius: var(--radius);
    font-weight: 600; font-size: .9rem; cursor: pointer; border: none; font-family: var(--font);
    transition: all var(--transition); line-height: 1;
}
.btn-primary  { background: linear-gradient(135deg, #059669 0%, #0d9488 100%); color: var(--white); box-shadow: 0 4px 14px rgba(5,150,105,.3); }
.btn-primary:hover { background: linear-gradient(135deg, #047857 0%, #0f766e 100%); color: var(--white); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(5,150,105,.4); }
.btn-secondary { background: linear-gradient(135deg, #f97316 0%, #ef4444 100%); color: var(--white); box-shadow: 0 4px 14px rgba(249,115,22,.25); }
.btn-secondary:hover { background: linear-gradient(135deg, #ea6b10 0%, #dc2626 100%); color: var(--white); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(249,115,22,.35); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--accent); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-sm { padding: 6px 14px; font-size: .8rem; }

/* ── FORMS ── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 5px; }
.form-group small { display: block; font-size: .78rem; color: var(--muted); margin-top: 4px; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; padding: 10px 13px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: .95rem; font-family: var(--font); color: var(--text);
    transition: border-color var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(5,150,105,.12);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }

/* Form sections (publicar) */
.form-section { background: var(--white); border: 1px solid rgba(5,150,105,.1); border-radius: 14px; padding: 26px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(5,150,105,.04); }
.form-section h3 { font-size: 1rem; font-weight: 800; margin-bottom: 18px; color: var(--primary); padding-left: 10px; border-left: 3px solid var(--primary); letter-spacing: -.01em; }

/* Amenidades */
.amenidades-check { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.check-item {
    display: flex; align-items: center; gap: 7px; font-size: .875rem; cursor: pointer;
    padding: 8px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border);
    transition: border-color var(--transition), background var(--transition);
}
.check-item:hover { border-color: var(--primary); background: var(--accent); }
.check-item input { width: auto; cursor: pointer; accent-color: var(--primary); }

/* Upload area */
.upload-area {
    border: 2px dashed var(--primary-light); border-radius: var(--radius); transition: border-color var(--transition), background var(--transition);
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}
.upload-area:hover, .upload-area.drag-over { border-color: var(--primary); background: linear-gradient(135deg, #ecfdf5, #d1fae5); }
.upload-label { display: flex; flex-direction: column; align-items: center; padding: 32px; cursor: pointer; gap: 8px; }
.upload-label p { margin: 0; color: var(--muted); font-size: .9rem; text-align: center; }
.fotos-preview { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; }
.foto-thumb { position: relative; width: 100px; height: 80px; border-radius: 6px; overflow: hidden; }
.foto-thumb img { width: 100%; height: 100%; object-fit: cover; }
.foto-thumb span { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; background: rgba(0,0,0,.5); color: white; font-size: .65rem; padding: 2px; }

/* Range inputs */
.range-inputs { display: flex; gap: 8px; align-items: center; }
.range-inputs input { flex: 1; }
.btn-group-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.radio-btn { padding: 5px 12px; border: 1px solid var(--border); border-radius: 20px; cursor: pointer; font-size: .8rem; user-select: none; }
.radio-btn.active, .radio-btn input:checked + * { background: var(--primary); color: white; border-color: var(--primary); }
.radio-btn input { display: none; }

/* ── ALERTS ── */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: .9rem; display: flex; align-items: flex-start; gap: 8px; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error   { background: #fee2e2; color: #991b1b; }
.alert-info    { background: #dbeafe; color: #1e40af; }
.alert-warning { background: #fef9c3; color: #854d0e; }

/* ── HERO ── */
.hero {
    background: linear-gradient(160deg, #064e3b 0%, #065f46 30%, #059669 68%, #0d9488 100%);
    color: var(--white); padding: 80px 20px 64px; text-align: center;
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(circle at 1.5px 1.5px, rgba(255,255,255,.055) 1px, transparent 0);
    background-size: 30px 30px;
}
.hero-content { max-width: 700px; margin: 0 auto 34px; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem,4.5vw,3.2rem); font-weight: 900; margin-bottom: 14px; line-height: 1.12; letter-spacing: -.025em; }
.hero p  { font-size: 1.1rem; opacity: .85; line-height: 1.65; max-width: 520px; margin: 0 auto; }

.section-label {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--accent); color: var(--primary);
    padding: 5px 14px; border-radius: 30px; font-size: .73rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px;
    border: 1px solid var(--primary-light);
}
.hero .section-label {
    background: rgba(255,255,255,.16); color: white; border-color: rgba(255,255,255,.22);
    backdrop-filter: blur(8px);
}

/* Search bar hero */
.search-bar {
    background: var(--white); border-radius: 16px; padding: 22px 24px;
    box-shadow: 0 24px 48px rgba(0,0,0,.18), 0 8px 16px rgba(0,0,0,.08);
    max-width: 920px; margin: 0 auto; position: relative; z-index: 1;
    display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 14px; align-items: end;
}
.search-bar label { display: block; font-size: .72rem; font-weight: 700; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .05em; }
.search-bar select, .search-bar input {
    width: 100%; padding: 11px 13px; border: 1.5px solid var(--border);
    border-radius: 10px; font-size: .9rem; font-family: var(--font); color: var(--text);
    transition: border-color var(--transition);
}
.search-bar select:focus, .search-bar input:focus { outline: none; border-color: var(--primary); }

/* ── SECTION HEADER ── */
.section-header { text-align: center; margin-bottom: 44px; }
.section-header h2 { font-size: clamp(1.5rem,3vw,2.2rem); font-weight: 800; margin-bottom: 10px; letter-spacing: -.025em; }
.section-header p  { color: var(--muted); max-width: 480px; margin: 0 auto; line-height: 1.65; }

/* ── PROPERTY CARD ── */
.property-card {
    background: var(--white); border-radius: 16px; overflow: hidden;
    box-shadow: var(--shadow-md); border: 1px solid rgba(0,0,0,.04);
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease;
    position: relative;
}
.property-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }

.badge-destacada {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    background: #fef3c7; color: #92400e; font-size: .7rem; font-weight: 700;
    padding: 3px 8px; border-radius: 20px;
}

.property-card-image {
    display: block; position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--border);
}
.property-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.property-card:hover .property-card-image img { transform: scale(1.05); }
.no-foto { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bg); }

.property-badge, .property-tipo-badge {
    position: absolute; padding: 3px 9px; border-radius: 20px;
    font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.property-badge { top: 10px; left: 10px; }
.property-tipo-badge { top: 10px; left: 10px; top: auto; bottom: 10px; background: rgba(0,0,0,.55); color: white; }
.badge-venta               { background: linear-gradient(135deg, #059669, #0d9488); color: white; }
.badge-alquiler            { background: linear-gradient(135deg, #f97316, #ef4444); color: white; }
.badge-alquiler_vacacional { background: linear-gradient(135deg, #3b82f6, #6366f1); color: white; }

.property-card-body { padding: 18px; }
.property-price { font-size: 1.35rem; font-weight: 900; color: var(--primary); letter-spacing: -.02em; }
.property-price small { font-size: .75rem; font-weight: 500; color: var(--muted); }
.property-title { font-size: .95rem; font-weight: 600; margin: 6px 0; line-height: 1.4; }
.property-title a:hover { color: var(--primary); }
.property-location { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.property-features { display: flex; gap: 14px; padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.feature-item { display: flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); }

/* Card footer: días en mercado */
.property-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.dias-mercado { font-size: .72rem; color: var(--muted); }
.dias-mercado.dm-nuevo { color: #059669; font-weight: 600; }
.dias-mercado.dm-viejo { color: #f97316; }
.card-ver-btn { font-size: .78rem; font-weight: 600; color: var(--primary); }
.card-ver-btn:hover { color: var(--primary-dark); }
/* Badge verificado */
.badge-verificado { display: inline-flex; align-items: center; gap: 3px; background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; border-radius: 20px; font-size: .7rem; font-weight: 700; padding: 2px 8px; white-space: nowrap; }

/* ── PROPIEDADES PAGE ── */
.page-propiedades { padding: 32px 0 64px; }
.propiedades-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }

.filters-sidebar { position: sticky; top: 80px; }
.filter-panel {
    background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 22px;
    box-shadow: var(--shadow);
}
.filter-panel h3 { font-size: 1rem; font-weight: 800; margin-bottom: 18px; letter-spacing: -.01em; }
.filter-group { margin-bottom: 14px; }
.filter-group label { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; margin-bottom: 5px; }
.filter-group select, .filter-group input { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius); font-size: .875rem; font-family: var(--font); }

.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.results-count { font-size: .95rem; color: var(--muted); }
.results-sort { display: flex; align-items: center; gap: 8px; font-size: .875rem; }
.results-sort select { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--font); }

.grid-results { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.ad-in-results { grid-column: 1/-1; }

.no-results { text-align: center; padding: 64px 20px; color: var(--muted); }
.no-results h3 { font-size: 1.1rem; color: var(--text); margin: 12px 0 6px; }

/* ── STATS ── */
.stats-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #0d2b1a 100%);
    color: white; padding: 64px 0; position: relative; overflow: hidden;
}
.stats-section::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.04) 1px, transparent 0);
    background-size: 24px 24px;
}
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; text-align: center; position: relative; }
.stat-item .number {
    font-size: 2.8rem; font-weight: 900; line-height: 1; letter-spacing: -.04em;
    background: linear-gradient(135deg, #6ee7b7 0%, #34d399 50%, #059669 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-item .label  { opacity: .65; font-size: .875rem; margin-top: 8px; letter-spacing: .02em; }

/* ── ZONES ── */
.zones-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.zone-card { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 4/3; display: block; cursor: pointer; text-decoration: none; }
.zone-card:hover .zone-bg { transform: scale(1.06); }
.zone-bg { position: absolute; inset: 0; transition: transform .5s ease; }
.zone-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.25) 55%, transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 18px 20px; color: white; gap: 5px; }
.zone-name  { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.zone-count { font-size: .82rem; opacity: .85; font-weight: 500; }

/* ── DETAIL PAGE ── */
.detail-gallery { margin-bottom: 32px; }
.gallery-main { border-radius: 16px; overflow: hidden; aspect-ratio: 16/9; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery-thumb { width: 84px; height: 64px; object-fit: cover; border-radius: 10px; cursor: pointer; border: 2.5px solid transparent; flex-shrink: 0; transition: border-color var(--transition), opacity var(--transition); }
.gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb:not(.active) { opacity: .75; }

.detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 36px; align-items: start; }
.detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.detail-header h1 { font-size: 1.6rem; font-weight: 700; line-height: 1.3; }
.detail-location { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .9rem; margin-top: 6px; }
.detail-price { font-size: 2.2rem; font-weight: 900; color: var(--primary); white-space: nowrap; letter-spacing: -.03em; }
.detail-price small { font-size: .9rem; font-weight: 500; color: var(--muted); }

.property-meta-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--border); border-radius: 14px; overflow: hidden; margin: 22px 0; }
.meta-item { text-align: center; background: var(--white); padding: 16px 12px; }
.meta-item .value { font-size: 1.15rem; font-weight: 800; color: var(--primary); letter-spacing: -.01em; }
.meta-item .label { font-size: .72rem; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }

.detail-section { margin: 28px 0; }
.detail-section h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.detail-desc { color: #374151; line-height: 1.8; }
.amenidades-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.amenidad-item { font-size: .875rem; display: flex; align-items: center; gap: 7px; padding: 8px 10px; background: var(--accent); border-radius: 8px; }
.amenidad-item span { color: var(--primary); font-weight: 700; }
.detail-actions { display: flex; gap: 10px; margin-top: 20px; }

#property-map { width: 100%; height: 350px; border-radius: 12px; border: 1px solid var(--border); }

/* Contact sidebar */
.detail-sidebar { position: sticky; top: 80px; }
.contact-card { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: var(--shadow-md); }
.agent-info { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.agent-avatar { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.agent-avatar img { width: 100%; height: 100%; object-fit: cover; }
.agent-name { font-weight: 600; }
.btn-fav.active { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

/* ── AUTH ── */
.auth-page {
    min-height: calc(100vh - 200px); display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(160deg, #f0fdf4 0%, #ecfdf5 45%, #f8fafc 100%);
}
.auth-card {
    background: rgba(255,255,255,.92); backdrop-filter: blur(16px);
    border: 1px solid rgba(5,150,105,.12); border-radius: 20px; padding: 44px 40px;
    width: 100%; max-width: 440px;
    box-shadow: 0 24px 48px rgba(5,150,105,.1), 0 4px 8px rgba(0,0,0,.05);
}
.auth-logo {
    display: flex; justify-content: center; margin-bottom: 22px;
}
.auth-logo svg { display: block; }
.auth-card h1 { font-size: 1.5rem; font-weight: 800; text-align: center; margin-bottom: 4px; letter-spacing: -.02em; }
.auth-card > p { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 26px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: .875rem; color: var(--muted); }

/* ── PROFILE ── */
.profile-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.profile-sidebar { position: sticky; top: 80px; }
.profile-card {
    background: var(--white); border: 1px solid rgba(5,150,105,.1);
    border-radius: 16px; padding: 28px 24px; text-align: center; margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(5,150,105,.07);
}
.profile-avatar-wrap { margin-bottom: 14px; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto; }
.avatar-placeholder {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #059669, #0d9488);
    color: white; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .875rem;
}
.avatar-placeholder.large {
    width: 80px; height: 80px; font-size: 2rem; font-weight: 900;
    box-shadow: 0 8px 20px rgba(5,150,105,.3);
}
.profile-name { font-size: 1.1rem; font-weight: 700; }
.profile-plan { display: inline-block; margin-top: 6px; padding: 3px 12px; border-radius: 20px; font-size: .72rem; font-weight: 700; }
.plan-gratis    { background: linear-gradient(135deg, #f1f5f9, #e2e8f0); color: #475569; }
.plan-destacado { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1e40af; }
.plan-premium   { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; border: 1px solid #fcd34d; }

.stats-card { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: 0 2px 6px rgba(0,0,0,.04); }
.stat-row { display: flex; justify-content: space-between; padding: 8px 4px; font-size: .875rem; border-top: 1px solid var(--border); }
.stat-row:first-child { border-top: none; }
.stat-row strong { color: var(--primary); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab-btn { padding: 10px 18px; background: none; border: none; cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all var(--transition); font-family: var(--font); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Mis propiedades */
.prop-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.prop-row-img { width: 72px; height: 54px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: var(--border); }
.prop-row-img img { width: 100%; height: 100%; object-fit: cover; }
.no-foto-sm { width: 100%; height: 100%; background: var(--bg); }
.prop-row-info { flex: 1; min-width: 0; }
.prop-row-title { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 4px; }
.prop-row-meta { font-size: .78rem; color: var(--muted); }
.prop-row-status { flex-shrink: 0; }
.prop-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

.status-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: .72rem; font-weight: 700; }
.status-activa  { background: #dcfce7; color: #166534; }
.status-pausada { background: #fef9c3; color: #854d0e; }

/* Mensajes */
.mensajes-list { display: flex; flex-direction: column; gap: 12px; }
.mensaje-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.mensaje-item.unread { border-left: 3px solid var(--primary); }
.mensaje-header { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: .875rem; }
.mensaje-header span { color: var(--muted); font-size: .8rem; }
.mensaje-texto { font-size: .875rem; color: #374151; margin: 6px 0; }
.mensaje-actions { font-size: .8rem; }

/* ── PAGINATION ── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 40px; }
.pagination a, .pagination span { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: var(--radius); border: 1px solid var(--border); font-weight: 500; font-size: .875rem; color: var(--text); transition: all var(--transition); }
.pagination a:hover, .pagination .current { background: var(--primary); border-color: var(--primary); color: white; }

/* ── PUBLISH PAGE ── */
.publish-page .container { padding-top: 40px; padding-bottom: 80px; }
.publish-page h1 { font-size: 1.8rem; font-weight: 700; }

/* ══════════════════════════════════════════════════════════════
   AD SLOTS — base
   ══════════════════════════════════════════════════════════════ */
.ad-slot { display: block; text-align: center; }
.ad-slot img { margin: 0 auto; }
.ad-slot.ad-header-banner { padding: 6px 0; background: var(--bg); }
.ad-slot.ad-sidebar-top, .ad-slot.ad-sidebar-mid,
.ad-slot.ad-sidebar-bottom, .ad-slot.ad-detail-sidebar,
.ad-slot.ad-detail-mid { margin-bottom: 16px; }
.ad-slot.ad-mobile-banner { display: none; }

/* ── Carrusel multi-marca ── */
.ad-carousel { position: relative; overflow: hidden; }
.ad-slide { display: none; }
.ad-slide.ad-slide-active { display: block; animation: adFadeIn .5s ease; }
@keyframes adFadeIn { from { opacity: 0; } to { opacity: 1; } }
.ad-carousel-dots { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 5px; }
.ad-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45);
    cursor: pointer; transition: background .2s; }
.ad-dot.active { background: #fff; }

/* ── Sticky bar ── */
.ad-sticky-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 800;
    background: rgba(15,23,42,.94); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 6px 50px 6px 0; min-height: 66px;
}
.ad-sticky-bar .ad-sticky-inner { display: flex; align-items: center; justify-content: center; }
.ad-sticky-bar .ad-close {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
    color: #e2e8f0; width: 30px; height: 30px; border-radius: 50%;
    cursor: pointer; font-size: .8rem; display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.ad-sticky-bar .ad-close:hover { background: rgba(255,255,255,.25); }
body.has-sticky-ad { padding-bottom: 102px; }

/* ══════════════════════════════════════════════════════════════
   PLACEHOLDER "ANÚNCIESE AQUÍ"
   ══════════════════════════════════════════════════════════════ */
.ad-placeholder {
    cursor: pointer; border-radius: 10px; overflow: hidden; position: relative;
    transition: transform .22s, box-shadow .22s;
    user-select: none; -webkit-user-select: none;
}
.ad-placeholder:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(5,150,105,.22); }

/* Shimmer animado */
.ad-ph-shimmer {
    position: absolute; top: 0; left: -100%; width: 60%; height: 100%; z-index: 2; pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.07) 50%, transparent 65%);
    animation: adShimmer 3.5s infinite;
}
@keyframes adShimmer { 0% { left: -100%; } 100% { left: 200%; } }

/* ── Leaderboard / Sticky (728×90 / 970×90) ── */
.ad-ph-leader { width: 100%; height: 90px; display: flex; }
.ad-ph-bg-leader {
    width: 100%; height: 100%; position: relative; overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 35%, #0c2318 65%, #059669 100%);
    display: flex; align-items: center; padding: 0 20px; gap: 16px;
}
.ad-ph-left-leader { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.ad-ph-title-leader { font-size: .95rem; font-weight: 800; color: #f0fdf4; letter-spacing: -.01em; }
.ad-ph-sub-leader { font-size: .72rem; color: #6ee7b7; margin-top: 2px; }
.ad-ph-sep { width: 1px; height: 44px; background: rgba(255,255,255,.1); flex-shrink: 0; margin: 0 4px; }
.ad-ph-right-leader { display: flex; align-items: center; gap: 24px; flex: 1; }
.ad-ph-kpis { display: flex; gap: 18px; }
.ad-ph-kpi { font-size: .75rem; color: #94a3b8; white-space: nowrap; }
.ad-ph-kpi strong { display: block; font-size: .95rem; color: #6ee7b7; font-weight: 800; }
.ad-ph-btn-sm {
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    color: #fff; font-size: .75rem; font-weight: 700; padding: 7px 14px;
    border-radius: 20px; border: none; cursor: pointer; white-space: nowrap;
    box-shadow: 0 4px 12px rgba(5,150,105,.4); transition: transform .15s, box-shadow .15s;
}
.ad-ph-btn-sm:hover { transform: scale(1.04); box-shadow: 0 6px 18px rgba(5,150,105,.5); }
.ad-ph-size-corner {
    position: absolute; right: 8px; bottom: 5px;
    font-size: .6rem; color: rgba(255,255,255,.2); font-family: monospace;
}

/* ── Rectangle (300×250) ── */
.ad-ph-rect { width: 300px; min-height: 250px; }
.ad-ph-dots-bg {
    position: absolute; inset: 0; z-index: 0;
    background-image: radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 20px 20px;
}
.ad-ph-body-rect {
    position: relative; z-index: 1;
    width: 300px; min-height: 250px;
    background: linear-gradient(160deg, #0f172a 0%, #1a2744 45%, #0c2318 75%, #059669 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; padding: 24px 20px; text-align: center;
}
.ad-ph-megaphone { animation: adFloat 3s ease-in-out infinite; }
@keyframes adFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.ad-ph-tag { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
    color: #6ee7b7; background: rgba(5,150,105,.15); padding: 3px 10px; border-radius: 20px; }
.ad-ph-headline { font-size: 1.6rem; font-weight: 900; color: #f0fdf4; letter-spacing: -.03em; line-height: 1.15; }
.ad-ph-reach { font-size: .75rem; color: #94a3b8; line-height: 1.5; }
.ad-ph-stats-row { display: flex; gap: 20px; }
.ad-ph-stat { text-align: center; }
.ad-ph-stat strong { display: block; font-size: 1.1rem; font-weight: 900; color: #6ee7b7; }
.ad-ph-stat span { font-size: .65rem; color: #64748b; text-transform: uppercase; letter-spacing: .06em; }
.ad-ph-btn {
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    color: #fff; font-size: .8rem; font-weight: 700; padding: 9px 20px;
    border-radius: 24px; border: none; cursor: pointer; width: 100%;
    box-shadow: 0 4px 14px rgba(5,150,105,.4); transition: transform .15s;
}
.ad-ph-btn:hover { transform: scale(1.03); }
.ad-ph-size-label { font-size: .6rem; color: rgba(255,255,255,.18); font-family: monospace; }

/* ── Mobile banner (320×50) ── */
.ad-ph-mobile {
    width: 100%; height: 50px;
    background: linear-gradient(90deg, #0f172a 0%, #0c2318 60%, #059669 100%);
    display: flex; align-items: center; justify-content: center;
    gap: 10px; padding: 0 16px; border-radius: 0;
}
.ad-ph-icon-sm { font-size: 1rem; }
.ad-ph-text-sm { font-size: .8rem; font-weight: 600; color: #d1fae5; flex: 1; }
.ad-ph-arrow { font-size: .85rem; color: #6ee7b7; font-weight: 700; }

/* ══════════════════════════════════════════════════════════════
   MODAL "ANÚNCIESE AQUÍ"
   ══════════════════════════════════════════════════════════════ */
.admod-overlay {
    position: fixed; inset: 0; z-index: 9000;
    background: rgba(15,23,42,.65); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px; overflow-y: auto;
}
.admod-box {
    background: #fff; border-radius: 18px; width: 100%; max-width: 580px;
    box-shadow: 0 24px 60px rgba(0,0,0,.25); position: relative; overflow: hidden;
    animation: admodIn .28s cubic-bezier(.34,1.56,.64,1);
}
@keyframes admodIn { from { opacity:0; transform: scale(.94) translateY(16px); } to { opacity:1; transform: none; } }
.admod-close {
    position: absolute; top: 14px; right: 14px; z-index: 10;
    background: rgba(255,255,255,.2); border: none; color: #fff;
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s; backdrop-filter: blur(4px);
}
.admod-close:hover { background: rgba(255,255,255,.35); }

.admod-header {
    background: linear-gradient(135deg, #059669 0%, #0d9488 60%, #0f172a 100%);
    padding: 24px 28px; display: flex; align-items: center; gap: 18px; color: #fff;
}
.admod-header-icon { flex-shrink: 0; }
.admod-title { font-size: 1.2rem; font-weight: 800; margin: 0; }
.admod-subtitle { font-size: .82rem; margin: 4px 0 0; opacity: .8; }

.admod-stats {
    display: flex; gap: 0; border-bottom: 1px solid #f1f5f9; background: #f8fafc;
}
.admod-stat {
    flex: 1; text-align: center; padding: 14px 8px;
    border-right: 1px solid #f1f5f9;
}
.admod-stat:last-child { border-right: none; }
.admod-stat strong { display: block; font-size: 1.1rem; font-weight: 900; color: #059669; }
.admod-stat span { font-size: .7rem; color: #64748b; text-transform: uppercase; letter-spacing: .05em; }

.admod-box form, #admod-success { padding: 22px 28px 24px; }
.admod-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.admod-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.admod-field label { font-size: .8rem; font-weight: 700; color: #374151; }
.admod-field .req { color: #ef4444; }
.admod-field input, .admod-field select, .admod-field textarea {
    padding: 9px 12px; border: 1.5px solid #e2e8f0; border-radius: 8px;
    font-size: .875rem; font-family: inherit; color: #0f172a;
    transition: border-color .18s, box-shadow .18s;
}
.admod-field input:focus, .admod-field select:focus, .admod-field textarea:focus {
    outline: none; border-color: #059669; box-shadow: 0 0 0 3px rgba(5,150,105,.1);
}
.admod-field textarea { resize: vertical; min-height: 80px; }

.admod-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.admod-btn-cancel {
    padding: 10px 18px; border-radius: 8px; border: 1.5px solid #e2e8f0;
    background: #fff; color: #64748b; font-size: .875rem; font-weight: 600; cursor: pointer;
    transition: border-color .18s, color .18s;
}
.admod-btn-cancel:hover { border-color: #059669; color: #059669; }
.admod-btn-submit {
    padding: 10px 22px; border-radius: 8px; border: none;
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    color: #fff; font-size: .875rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 4px 12px rgba(5,150,105,.3); transition: transform .15s, box-shadow .15s;
}
.admod-btn-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(5,150,105,.4); }
.admod-btn-submit:disabled { opacity: .6; transform: none; }

.admod-success { text-align: center; padding: 40px 28px; }
.admod-success-icon {
    width: 64px; height: 64px; border-radius: 50%; background: #ecfdf5;
    color: #059669; font-size: 1.8rem; font-weight: 900; display: flex;
    align-items: center; justify-content: center; margin: 0 auto 16px;
    box-shadow: 0 0 0 8px rgba(5,150,105,.08);
}
.admod-success h3 { font-size: 1.3rem; font-weight: 800; margin: 0 0 8px; }
.admod-success p { color: #64748b; font-size: .9rem; margin: 0 0 20px; line-height: 1.6; }

@media (max-width: 520px) {
    .admod-row { grid-template-columns: 1fr; }
    .admod-header { padding: 20px; }
    .admod-box form, #admod-success { padding: 18px; }
    .ad-ph-kpis { display: none; }
    .ad-ph-sep  { display: none; }
}

/* Auth page with side banner */
.auth-page-wide { gap: 40px; align-items: center; justify-content: center; max-width: 900px; margin: 0 auto; }
.auth-side-banner { display: none; flex-shrink: 0; }
@media (min-width: 900px) {
    .auth-page-wide .auth-side-banner { display: block; }
}

/* ── FOOTER ── */
.site-footer { background: linear-gradient(160deg, #0a1628 0%, #111827 60%, #0d2015 100%); color: #94a3b8; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; }
.footer-brand .logo { font-size: 1.4rem; font-weight: 900; color: white; margin-bottom: 12px; letter-spacing: -.03em; }
.footer-brand .logo span { color: var(--secondary); }
.footer-brand p { font-size: .875rem; line-height: 1.75; color: #64748b; }
.footer-col h4 { color: white; font-weight: 700; font-size: .875rem; margin-bottom: 16px; letter-spacing: .01em; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul a { color: #64748b; font-size: .875rem; transition: color var(--transition); }
.footer-col ul a:hover { color: var(--secondary); }
.social-links { display: flex; gap: 10px; margin-top: 16px; }
.social-link { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.06); display: flex; align-items: center; justify-content: center; color: #94a3b8; transition: all var(--transition); }
.social-link:hover { background: var(--primary); color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.06); padding: 20px 0; font-size: .8rem; color: #475569; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .propiedades-layout  { grid-template-columns: 240px 1fr; }
    .grid-results        { grid-template-columns: 1fr 1fr; }
    .grid-3              { grid-template-columns: 1fr 1fr; }
    .footer-grid         { grid-template-columns: 1fr 1fr; }
    .stats-grid          { grid-template-columns: repeat(2,1fr); }
    .detail-layout       { grid-template-columns: 1fr; }
    .detail-sidebar      { position: static; }
}

@media (max-width: 768px) {
    /* ── Menú móvil ── */
    .menu-toggle  { display: flex; }
    .main-nav     {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: white; border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(0,0,0,.12);
        padding: 8px 16px 16px; flex-direction: column;
        align-items: flex-start; gap: 0; z-index: 900;
    }
    .main-nav.open { display: flex; }
    .main-nav a   {
        width: 100%; padding: 12px 8px; font-size: 1rem;
        border-bottom: 1px solid var(--border);
    }
    .main-nav a:last-child { border-bottom: none; }
    .main-nav .btn { margin-top: 8px; width: 100%; text-align: center; }

    /* ── User menu móvil ── */
    .user-menu    { width: 100%; }
    .user-toggle  { width: 100%; justify-content: space-between; }
    .user-dropdown { position: static; border: none; box-shadow: none; padding-left: 12px; }
    .user-dropdown a:hover { background: var(--bg); }
    .user-menu:hover .user-dropdown { display: none; }
    .user-menu.open .user-dropdown { display: block; }

    /* ── Banners en móvil: ocultar formatos desktop grandes ── */
    .ad-slot.ad-header-banner,
    .ad-slot.ad-footer-banner,
    .ad-slot.ad-home-mid,
    .ad-slot.ad-results-top,
    .ad-slot.ad-in-listings,
    .ad-slot.ad-in-listings-2,
    .ad-slot.ad-detail-top,
    .ad-slot.ad-detail-bottom { display: none !important; }

    /* Sticky bar: ajustar para móvil */
    .ad-sticky-bar { overflow: hidden; }
    .ad-sticky-bar .ad-slot { overflow: hidden; max-width: 100%; }
    .ad-sticky-bar img { max-width: 100%; height: auto; }

    .search-bar     { grid-template-columns: 1fr; }
    .propiedades-layout { grid-template-columns: 1fr; }
    .filters-sidebar { position: static; }
    .filter-panel    { display: none; }
    .filter-panel.show { display: block; }
    .grid-results    { grid-template-columns: 1fr; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .zones-grid      { grid-template-columns: 1fr 1fr; }
    .property-meta-grid { grid-template-columns: repeat(2,1fr); }
    .amenidades-grid { grid-template-columns: 1fr 1fr; }
    .form-row, .form-row-4 { grid-template-columns: 1fr; }
    .profile-layout  { grid-template-columns: 1fr; }
    .profile-sidebar { position: static; }
    .detail-header   { flex-direction: column; }
    .ad-slot.ad-mobile-banner { display: block; }
    .section { padding: 48px 0; }
    .hero { padding: 50px 16px 40px; }
}

@media (max-width: 480px) {
    .zones-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .amenidades-check { grid-template-columns: 1fr 1fr; }
    .prop-row-actions { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; }
}
