/*
Theme Name: INAN Inmobiliaria
Theme URI: https://inan.cl
Author: Grupo INAN SpA
Author URI: https://inan.cl
Description: Tema a medida para portal inmobiliario de alto rendimiento. Buscador avanzado por operación, tipo, precio, ubicación y código único. Diseño corporativo premium.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: inan
Requires at least: 6.0
Requires PHP: 7.4
*/

/* ============================================================
 *  TOKENS
 * ============================================================ */
:root{
	--ink:#0E1A3C;
	--ink-soft:#28365B;
	--paper:#ffffff;
	--bg:#F6F7F9;
	--bg-2:#EDF0F5;
	--line:#E3E7EE;
	--line-strong:#D2D8E3;
	--muted:#5C6675;
	--muted-2:#8A93A2;
	--accent:#E5730E;
	--accent-hover:#C9620A;
	--accent-ink:#8A4405;
	--accent-soft:#FCEEE0;

	--font-display:'Sora','Segoe UI',system-ui,sans-serif;
	--font-body:'Inter','Segoe UI',system-ui,-apple-system,sans-serif;
	--font-mono:ui-monospace,'SFMono-Regular','JetBrains Mono',Menlo,monospace;

	--r:16px;
	--r-sm:11px;
	--r-pill:999px;

	--shadow-sm:0 1px 2px rgba(16,26,60,.05);
	--shadow:0 2px 6px rgba(16,26,60,.05),0 14px 34px rgba(16,26,60,.07);
	--shadow-lg:0 24px 60px rgba(16,26,60,.14);

	--wrap:1240px;
	--gap:24px;
	--ease:cubic-bezier(.2,.7,.2,1);
}

/* ============================================================
 *  BASE
 * ============================================================ */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{
	margin:0;
	font-family:var(--font-body);
	font-size:16px;
	line-height:1.6;
	color:var(--ink);
	background:var(--bg);
	-webkit-font-smoothing:antialiased;
	text-rendering:optimizeLegibility;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
button{font-family:inherit;cursor:pointer}
.re-ico{width:18px;height:18px;flex:none}
.re-btn .re-ico{width:18px;height:18px}
h1,h2,h3,h4{font-family:var(--font-display);font-weight:700;line-height:1.12;letter-spacing:-.02em;margin:0}
h1{font-size:clamp(2.1rem,4.4vw,3.5rem)}
h2{font-size:clamp(1.5rem,2.6vw,2.1rem)}
h3{font-size:1.2rem}
p{margin:0 0 1rem}

.re-wrap{max-width:var(--wrap);margin-inline:auto;padding-inline:24px}
.re-eyebrow{font-family:var(--font-display);font-weight:600;font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;color:var(--accent-ink)}
.screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

:focus-visible{outline:2.5px solid var(--accent);outline-offset:2px;border-radius:4px}

/* ============================================================
 *  BOTONES / CHIPS
 * ============================================================ */
.re-btn{
	display:inline-flex;align-items:center;gap:8px;
	padding:13px 22px;border-radius:var(--r-pill);border:0;
	font-family:var(--font-display);font-weight:600;font-size:.95rem;
	transition:transform .2s var(--ease),background .2s var(--ease),box-shadow .2s var(--ease);
}
.re-btn--primary{background:var(--accent);color:#fff;box-shadow:0 6px 18px rgba(229,115,14,.28)}
.re-btn--primary:hover{background:var(--accent-hover);transform:translateY(-2px)}
.re-btn--ink{background:var(--ink);color:#fff}
.re-btn--ink:hover{background:var(--ink-soft);transform:translateY(-2px)}
.re-btn--ghost{background:transparent;color:var(--ink);border:1.5px solid var(--line-strong)}
.re-btn--ghost:hover{border-color:var(--ink);background:#fff}
.re-btn--wa{background:#25D366;color:#062e15}
.re-btn--wa:hover{background:#1eb356}
.re-btn--block{width:100%;justify-content:center}

.re-chip{
	display:inline-flex;align-items:center;gap:6px;
	padding:5px 12px;border-radius:var(--r-pill);
	font-size:.74rem;font-weight:600;letter-spacing:.02em;
	background:var(--bg-2);color:var(--ink-soft);
}
.re-chip--op{background:var(--ink);color:#fff;text-transform:uppercase;font-size:.68rem;letter-spacing:.08em}
.re-sku{
	font-family:var(--font-mono);font-size:.76rem;font-weight:500;
	color:var(--accent-ink);background:var(--accent-soft);
	padding:3px 9px;border-radius:6px;letter-spacing:.02em;
}

/* ============================================================
 *  HEADER
 * ============================================================ */
.re-header{
	position:sticky;top:0;z-index:50;
	background:rgba(255,255,255,.86);backdrop-filter:saturate(1.4) blur(12px);
	border-bottom:1px solid var(--line);
}
.re-header__inner{display:flex;align-items:center;gap:28px;height:74px}
.re-brand{font-family:var(--font-display);font-weight:800;font-size:1.28rem;letter-spacing:-.03em;color:var(--ink)}
.re-brand span{color:var(--accent)}
.re-nav{display:flex;gap:26px;margin-left:auto}
.re-nav a{font-weight:500;font-size:.95rem;color:var(--ink-soft);position:relative;padding:6px 0}
.re-nav a::after{content:"";position:absolute;left:0;right:100%;bottom:0;height:2px;background:var(--accent);transition:right .25s var(--ease)}
.re-nav a:hover::after{right:0}
.re-header__cta{display:flex;gap:10px;align-items:center}
.re-burger{display:none;flex-direction:column;gap:5px;background:none;border:0;padding:8px}
.re-burger span{width:24px;height:2px;background:var(--ink);border-radius:2px;transition:.25s var(--ease)}

/* ============================================================
 *  HERO + CONSOLA DE BÚSQUEDA (elemento firma)
 * ============================================================ */
.re-hero{position:relative;padding:76px 0 132px;overflow:hidden}
.re-hero::before{
	content:"";position:absolute;inset:0;z-index:-1;
	background:
		radial-gradient(120% 90% at 88% -10%,rgba(229,115,14,.10),transparent 55%),
		radial-gradient(90% 80% at 0% 0%,rgba(14,26,60,.06),transparent 60%),
		var(--bg);
}
.re-hero__grid{
	position:absolute;inset:0;z-index:-1;opacity:.5;
	background-image:linear-gradient(var(--line) 1px,transparent 1px),linear-gradient(90deg,var(--line) 1px,transparent 1px);
	background-size:64px 64px;
	-webkit-mask-image:radial-gradient(120% 80% at 50% -10%,#000,transparent 70%);
	mask-image:radial-gradient(120% 80% at 50% -10%,#000,transparent 70%);
}
.re-hero__lead{max-width:720px}
.re-hero h1{margin:14px 0 16px}
.re-hero h1 em{font-style:normal;color:var(--accent)}
.re-hero__sub{font-size:1.12rem;color:var(--muted);max-width:560px}

.re-console{
	margin-top:40px;background:var(--paper);border:1px solid var(--line);
	border-radius:var(--r);box-shadow:var(--shadow);padding:10px;
}
.re-console__tabs{display:flex;gap:4px;padding:6px 6px 12px}
.re-tab{
	padding:9px 18px;border-radius:var(--r-pill);border:0;background:transparent;
	font-family:var(--font-display);font-weight:600;font-size:.9rem;color:var(--muted);
	transition:.2s var(--ease);
}
.re-tab[aria-selected="true"]{background:var(--ink);color:#fff}
.re-console__fields{
	display:grid;grid-template-columns:1.3fr 1fr 1.2fr .9fr auto;gap:0;
	background:var(--bg);border-radius:12px;border:1px solid var(--line);
}
.re-field{display:flex;flex-direction:column;gap:3px;padding:12px 16px;border-right:1px solid var(--line);min-width:0}
.re-field:last-of-type{border-right:0}
.re-field label{font-size:.68rem;font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--muted-2)}
.re-field select,.re-field input{
	border:0;background:transparent;font-family:var(--font-body);font-size:.98rem;
	font-weight:500;color:var(--ink);padding:2px 0;width:100%;
}
.re-field select:focus,.re-field input:focus{outline:none}
.re-field--range{display:grid;grid-template-columns:1fr auto 1fr}
.re-field--range span{color:var(--muted-2);align-self:center}
.re-console__submit{display:flex;align-items:center;padding:8px}
.re-console__submit .re-btn{height:100%;padding-inline:26px}

.re-code-search{display:flex;align-items:center;gap:10px;padding:12px 8px 6px;margin-top:8px;border-top:1px dashed var(--line)}
.re-code-search label{font-size:.8rem;color:var(--muted);font-weight:500}
.re-code-search input{
	font-family:var(--font-mono);font-size:.9rem;border:1px solid var(--line);
	background:var(--bg);border-radius:8px;padding:8px 12px;width:200px;color:var(--ink);
}
.re-code-search button{background:none;border:0;color:var(--accent-ink);font-weight:600;font-size:.86rem}

/* ============================================================
 *  SECCIONES DE INICIO
 * ============================================================ */
.re-section{padding:64px 0}
.re-section__head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:34px}
.re-section__head p{margin:6px 0 0;color:var(--muted)}
.re-link{font-family:var(--font-display);font-weight:600;color:var(--accent-ink);display:inline-flex;gap:6px;align-items:center}
.re-link:hover{gap:10px;transition:gap .2s var(--ease)}

.re-cats{display:grid;grid-template-columns:repeat(5,1fr);gap:16px}
.re-cat{
	display:flex;flex-direction:column;gap:8px;padding:22px;border-radius:var(--r);
	background:var(--paper);border:1px solid var(--line);transition:.25s var(--ease);
}
.re-cat:hover{border-color:var(--accent);transform:translateY(-3px);box-shadow:var(--shadow)}
.re-cat .re-ico{width:26px;height:26px;color:var(--accent)}
.re-cat strong{font-family:var(--font-display);font-size:1rem}
.re-cat small{color:var(--muted-2)}

/* ============================================================
 *  TARJETA DE PROPIEDAD
 * ============================================================ */
.re-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--gap)}
.re-card{
	background:var(--paper);border:1px solid var(--line);border-radius:var(--r);
	overflow:hidden;display:flex;flex-direction:column;
	transition:transform .28s var(--ease),box-shadow .28s var(--ease),border-color .28s var(--ease);
}
.re-card:hover{transform:translateY(-5px);box-shadow:var(--shadow);border-color:var(--line-strong)}
.re-card__media{position:relative;aspect-ratio:16/11;overflow:hidden;background:var(--bg-2)}
.re-card__media img{width:100%;height:100%;object-fit:cover;transition:transform .5s var(--ease)}
.re-card:hover .re-card__media img{transform:scale(1.05)}
.re-card__badges{position:absolute;top:12px;left:12px;display:flex;gap:6px;flex-wrap:wrap}
.re-card__sku{position:absolute;top:12px;right:12px}
.re-card__body{padding:18px 18px 20px;display:flex;flex-direction:column;gap:10px;flex:1}
.re-card__price{font-family:var(--font-display);font-weight:800;font-size:1.4rem;color:var(--ink);letter-spacing:-.02em}
.re-card__price small{font-size:.8rem;font-weight:600;color:var(--muted-2)}
.re-card__title{font-family:var(--font-display);font-weight:600;font-size:1.04rem;line-height:1.3;color:var(--ink)}
.re-card__loc{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:.88rem}
.re-card__loc .re-ico{width:15px;height:15px;color:var(--muted-2)}
.re-specs{display:flex;gap:16px;margin-top:auto;padding-top:14px;border-top:1px solid var(--line);color:var(--ink-soft);font-size:.86rem;font-weight:500}
.re-specs span{display:inline-flex;align-items:center;gap:6px}
.re-specs .re-ico{width:17px;height:17px;color:var(--muted-2)}

/* ============================================================
 *  ARCHIVO / RESULTADOS
 * ============================================================ */
.re-archive{padding:36px 0 72px}
.re-archive__top{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:26px;flex-wrap:wrap}
.re-archive__top h1{font-size:clamp(1.7rem,3vw,2.3rem)}
.re-archive__count{color:var(--muted);font-size:.95rem}
.re-archive__layout{display:grid;grid-template-columns:288px 1fr;gap:34px;align-items:start}

.re-sidebar{position:sticky;top:98px;background:var(--paper);border:1px solid var(--line);border-radius:var(--r);padding:22px}
.re-sidebar h2{font-size:1.05rem;font-family:var(--font-display)}
.re-sidebar__group{padding:18px 0;border-bottom:1px solid var(--line)}
.re-sidebar__group:last-of-type{border-bottom:0;padding-bottom:0}
.re-sidebar label{display:block;font-size:.72rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted-2);margin-bottom:7px}
.re-sidebar select,.re-sidebar input{
	width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:var(--r-sm);
	background:var(--bg);font-family:var(--font-body);font-size:.94rem;color:var(--ink);
}
.re-sidebar select:focus,.re-sidebar input:focus{outline:none;border-color:var(--accent);background:#fff}
.re-range{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.re-sidebar__actions{display:flex;flex-direction:column;gap:9px;margin-top:20px}

.re-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:20px}
.re-sort{display:flex;align-items:center;gap:8px}
.re-sort select{padding:9px 12px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--paper);font-family:var(--font-body);font-size:.9rem;color:var(--ink)}
.re-filter-toggle{display:none}

.re-empty{text-align:center;padding:80px 20px;background:var(--paper);border:1px dashed var(--line-strong);border-radius:var(--r)}
.re-empty h3{font-size:1.3rem;margin-bottom:8px}
.re-empty p{color:var(--muted);max-width:420px;margin-inline:auto}

.re-pagination{display:flex;justify-content:center;gap:8px;margin-top:44px}
.re-pagination .page-numbers{
	min-width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;
	padding:0 12px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--paper);
	font-weight:600;color:var(--ink-soft);transition:.2s var(--ease);
}
.re-pagination .page-numbers:hover{border-color:var(--ink)}
.re-pagination .current{background:var(--ink);color:#fff;border-color:var(--ink)}

/* ============================================================
 *  FICHA INDIVIDUAL
 * ============================================================ */
.re-single{padding:30px 0 80px}
.re-breadcrumb{font-size:.85rem;color:var(--muted-2);margin-bottom:20px;display:flex;gap:8px;flex-wrap:wrap}
.re-breadcrumb a:hover{color:var(--accent-ink)}
.re-single__head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:22px;flex-wrap:wrap}
.re-single__head h1{font-size:clamp(1.7rem,3vw,2.4rem);max-width:720px}
.re-single__head .re-card__loc{margin-top:10px;font-size:.98rem}
.re-single__price{text-align:right}
.re-single__price .amount{font-family:var(--font-display);font-weight:800;font-size:2rem;color:var(--ink)}
.re-single__price .amount small{font-size:.9rem;color:var(--muted-2);font-weight:600}

.re-gallery{display:grid;grid-template-columns:1fr 96px;gap:12px;margin-bottom:34px}
.re-gallery__main{aspect-ratio:16/10;border-radius:var(--r);overflow:hidden;background:var(--bg-2);cursor:zoom-in}
.re-gallery__main img{width:100%;height:100%;object-fit:cover}
.re-gallery__thumbs{display:flex;flex-direction:column;gap:12px;overflow:auto;max-height:100%}
.re-gallery__thumbs button{border:2px solid transparent;border-radius:12px;overflow:hidden;padding:0;background:none;aspect-ratio:1}
.re-gallery__thumbs img{width:100%;height:100%;object-fit:cover}
.re-gallery__thumbs button[aria-current="true"]{border-color:var(--accent)}

.re-single__layout{display:grid;grid-template-columns:1fr 348px;gap:40px;align-items:start}

.re-keyspecs{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:34px}
.re-keyspec{background:var(--paper);border:1px solid var(--line);border-radius:var(--r);padding:18px}
.re-keyspec .re-ico{width:22px;height:22px;color:var(--accent);margin-bottom:8px}
.re-keyspec strong{font-family:var(--font-display);font-size:1.35rem;display:block;line-height:1}
.re-keyspec small{color:var(--muted-2);font-size:.8rem}

.re-block{margin-bottom:34px}
.re-block h2{font-size:1.3rem;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.re-desc{color:var(--ink-soft);line-height:1.75}
.re-features{display:grid;grid-template-columns:repeat(2,1fr);gap:12px 30px;list-style:none;padding:0;margin:0}
.re-features li{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid var(--line);font-size:.94rem}
.re-features li span:first-child{color:var(--muted)}
.re-features li span:last-child{font-weight:600}

.re-contact{position:sticky;top:98px;background:var(--paper);border:1px solid var(--line);border-radius:var(--r);padding:26px;box-shadow:var(--shadow-sm)}
.re-contact__price{font-family:var(--font-display);font-weight:800;font-size:1.9rem;color:var(--ink);letter-spacing:-.02em}
.re-contact__price small{font-size:.85rem;color:var(--muted-2);font-weight:600;display:block;margin-top:2px}
.re-contact__sku{margin:14px 0 20px}
.re-contact__actions{display:flex;flex-direction:column;gap:10px}
.re-contact__meta{margin-top:20px;padding-top:18px;border-top:1px solid var(--line);font-size:.9rem;color:var(--muted)}
.re-contact__meta a{color:var(--ink);font-weight:600}

/* ============================================================
 *  FOOTER
 * ============================================================ */
.re-footer{background:var(--ink);color:#C6CEDE;padding:60px 0 30px;margin-top:40px}
.re-footer__grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:40px;margin-bottom:40px}
.re-footer .re-brand{color:#fff;margin-bottom:12px}
.re-footer h4{color:#fff;font-size:.95rem;margin-bottom:14px}
.re-footer a{color:#C6CEDE;font-size:.92rem;display:block;padding:5px 0}
.re-footer a:hover{color:#fff}
.re-footer__bottom{border-top:1px solid rgba(255,255,255,.12);padding-top:24px;display:flex;justify-content:space-between;gap:16px;font-size:.84rem;color:#8A94AC;flex-wrap:wrap}
.re-footer__dev{color:#AEB7CC;font-weight:500}
.re-footer__dev:hover{color:var(--accent)}

/* ============================================================
 *  LIGHTBOX
 * ============================================================ */
.re-lightbox{position:fixed;inset:0;z-index:100;background:rgba(8,13,28,.92);display:none;align-items:center;justify-content:center;padding:30px}
.re-lightbox.is-open{display:flex}
.re-lightbox img{max-width:92vw;max-height:90vh;border-radius:12px}
.re-lightbox__close{position:absolute;top:22px;right:26px;background:none;border:0;color:#fff;font-size:2.2rem;line-height:1}

/* ============================================================
 *  COMODIDADES / REQUISITOS / CHECKBOXES
 * ============================================================ */
.re-amn-group{font-family:var(--font-display);font-size:.82rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin:20px 0 10px}
.re-amn-group:first-of-type{margin-top:4px}
.re-amn{display:grid;grid-template-columns:repeat(2,1fr);gap:8px 22px;list-style:none;padding:0;margin:0}
.re-amn li{display:flex;align-items:center;gap:9px;font-size:.94rem;color:var(--ink-soft)}
.re-amn .re-ico{width:16px;height:16px;color:var(--accent);flex-shrink:0}

.re-requisitos .re-req-note{color:var(--muted);font-size:.92rem;margin:-4px 0 20px}
.re-req-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px 26px}
.re-req{display:flex;align-items:flex-start;gap:12px}
.re-req-ic{width:38px;height:38px;flex-shrink:0;border-radius:50%;display:grid;place-items:center;background:var(--accent-soft)}
.re-req-ic .re-ico{width:19px;height:19px;color:var(--accent-ink)}
.re-req span:last-child{font-size:.94rem;color:var(--ink-soft);line-height:1.45;padding-top:8px}

.re-amn-filter{border:1px solid var(--line);border-radius:var(--r-sm);margin-bottom:8px;overflow:hidden}
.re-amn-filter summary{cursor:pointer;padding:10px 12px;font-size:.88rem;font-weight:600;color:var(--ink-soft);list-style:none;user-select:none;background:var(--bg)}
.re-amn-filter summary::-webkit-details-marker{display:none}
.re-amn-filter summary::after{content:"+";float:right;color:var(--muted-2)}
.re-amn-filter[open] summary::after{content:"–"}
.re-amn-filter[open] summary{border-bottom:1px solid var(--line)}
.re-check{display:flex;align-items:center;gap:9px;padding:8px 12px;font-size:.9rem;color:var(--ink-soft);text-transform:none;letter-spacing:0;margin:0}
.re-check input{width:auto;margin:0;accent-color:var(--accent)}

/* ============================================================
 *  RESPONSIVE
 * ============================================================ */
@media(max-width:1080px){
	.re-console__fields{grid-template-columns:1fr 1fr}
	.re-field{border-right:0;border-bottom:1px solid var(--line)}
	.re-console__submit{grid-column:1/-1}
	.re-console__submit .re-btn{width:100%}
	.re-cats{grid-template-columns:repeat(3,1fr)}
	.re-single__layout{grid-template-columns:1fr}
	.re-contact{position:static}
	.re-keyspecs{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:860px){
	.re-nav,.re-header__cta .re-btn--ghost{display:none}
	.re-burger{display:flex}
	.re-nav.is-open{display:flex;position:absolute;top:74px;left:0;right:0;flex-direction:column;background:#fff;padding:20px 24px;border-bottom:1px solid var(--line);gap:4px;margin:0}
	.re-grid{grid-template-columns:repeat(2,1fr)}
	.re-archive__layout{grid-template-columns:1fr}
	.re-sidebar{position:fixed;inset:0;z-index:80;border-radius:0;overflow:auto;transform:translateX(-100%);transition:transform .3s var(--ease)}
	.re-sidebar.is-open{transform:none}
	.re-filter-toggle{display:inline-flex}
	.re-footer__grid{grid-template-columns:1fr}
}
@media(max-width:560px){
	.re-wrap{padding-inline:18px}
	.re-grid,.re-cats,.re-features{grid-template-columns:1fr}
	.re-keyspecs{grid-template-columns:1fr 1fr}
	.re-gallery{grid-template-columns:1fr}
	.re-gallery__thumbs{flex-direction:row;max-height:none}
	.re-single__head{flex-direction:column}
	.re-single__price{text-align:left}
}

@media(prefers-reduced-motion:reduce){
	*,*::before,*::after{animation-duration:.001ms!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
}
