/*
 * Ajustes globales sobre el tema original (Elementor) que necesita la versión Sulu.
 * Se carga en todas las páginas después de los CSS originales (templates/base.html.twig).
 */

/* Tokens de diseño de la web (los del kit de Elementor, post-10.css), disponibles en toda la
   página: los usan la tienda, el aviso de cookies, los modales y los botones flotantes. */
:root {
    --ek-dark: #212529;
    --ek-text: #485B60;
    --ek-bg: #FDFBF7;
    --ek-sand: #F7F3EC;
    --ek-line: #DDDDDD;
    --ek-max: 1250px;
}

/* ------------------------------------------------------------------ tipografía
   Montserrat en toda la web frontal. Los controles de formulario no heredan la fuente por defecto
   y Leaflet (mapa de los inmuebles) trae la suya: se fuerzan a Montserrat. */
body, button, input, select, textarea, optgroup { font-family: "Montserrat", sans-serif; }
/* Chino: Montserrat no tiene caracteres chinos. Letras latinas y números siguen en Montserrat y los
   caracteres chinos usan la fuente china del sistema (misma familia visual: sans-serif limpia).
   Elementor declara "Montserrat, Sans-serif": con lang="zh" el navegador ya elige una fuente china
   para ese Sans-serif; aquí se fija el orden para que sea la misma en todos los sistemas. */
:root:lang(zh) { --ek-cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif; }
:lang(zh) body, :lang(zh) button, :lang(zh) input, :lang(zh) select, :lang(zh) textarea,
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3, :lang(zh) h4, :lang(zh) h5, :lang(zh) h6, :lang(zh) p, :lang(zh) a,
:lang(zh) li, :lang(zh) span, :lang(zh) strong, :lang(zh) label, :lang(zh) .elementor-heading-title,
:lang(zh) .elementor-widget-text-editor, :lang(zh) .ekit-menu-nav-link, :lang(zh) .qodef-m-title {
    font-family: "Montserrat", var(--ek-cjk) !important;
}
/* el chino no usa mayúsculas ni capitalización: sin text-transform, y algo más de interlineado */
:lang(zh) body { line-height: 1.75; }
:lang(zh) [class*="ek-"], :lang(zh) .elementor-heading-title, :lang(zh) .ekit-menu-nav-link { text-transform: none !important; letter-spacing: normal; }
.leaflet-container, .leaflet-container a, .leaflet-control-attribution { font-family: "Montserrat", sans-serif !important; }

/* ------------------------------------------------------------------ botones (toda la web) */
.ek-btn,
.elementor-kit-10 .ek-btn,
.elementor-kit-10 button.ek-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 15px 28px; border: 1px solid var(--ek-dark); border-radius: 0;
    background: var(--ek-dark); color: #fff;
    font-family: "Montserrat", sans-serif; font-size: 16px; font-weight: 500; line-height: 1.4; text-transform: none;
    text-decoration: none; cursor: pointer; transition: background .25s, color .25s;
}
.ek-btn:hover, .elementor-kit-10 .ek-btn:hover, .elementor-kit-10 button.ek-btn:hover { background: transparent; color: var(--ek-dark); }
.ek-btn--ghost, .elementor-kit-10 .ek-btn--ghost, .elementor-kit-10 button.ek-btn--ghost { background: transparent; color: var(--ek-dark); }
.ek-btn--ghost:hover, .elementor-kit-10 .ek-btn--ghost:hover, .elementor-kit-10 button.ek-btn--ghost:hover { background: var(--ek-dark); color: #fff; }
.ek-btn--light, .elementor-kit-10 .ek-btn--light { background: #fff; color: var(--ek-dark); border-color: #fff; }
.ek-btn--light:hover, .elementor-kit-10 .ek-btn--light:hover { background: transparent; color: #fff; }
.ek-btn--block { width: 100%; }


/* Menú principal: con la entrada "Tienda" añadida (tools/import_theme.py) no cabía en una
   línea con el padding original de 15px. Solo escritorio: en tablet/móvil es el menú hamburguesa.
   (!important: ElementsKit usa selectores con el id del widget, más específicos que estos) */
@media (min-width: 1025px) {
    header .elementskit-navbar-nav > li > a.ekit-menu-nav-link { padding-left: 9px !important; padding-right: 9px !important; }
}
@media (min-width: 1025px) and (max-width: 1366px) {
    header .elementskit-navbar-nav > li > a.ekit-menu-nav-link { padding-left: 6px !important; padding-right: 6px !important; }
}

/* ------------------------------------------------------------------ tipo de cliente
   <html data-ek-cliente="particular|empresa"> (ekonos.js). Sin elección = particular. */
html:not([data-ek-cliente="empresa"]) [data-cliente="empresa"],
html[data-ek-cliente="empresa"] [data-cliente="particular"] { display: none !important; }

.ek-cliente-switch {
    display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0;
    font-family: "Montserrat", sans-serif; font-size: 14px; color: #485B60;
}
.ek-cliente-switch__label { margin-right: 12px; }
.ek-cliente-switch button,
.elementor-kit-10 .ek-cliente-switch button {
    display: inline-flex; align-items: baseline; gap: 6px;
    padding: 8px 16px; margin: 0 -1px 0 0;
    border: 1px solid #212529; border-radius: 0; background: transparent; color: #212529;
    font: 500 14px/1.4 "Montserrat", sans-serif; text-transform: none; cursor: pointer;
    transition: background .2s, color .2s;
}
.ek-cliente-switch button small { font-size: 11px; font-weight: 400; opacity: .7; }
.ek-cliente-switch button:hover { background: #F7F3EC; color: #212529; }
.ek-cliente-switch button.is-active,
.elementor-kit-10 .ek-cliente-switch button.is-active { background: #212529; color: #fff; }

/* ------------------------------------------------------------------ modal de bienvenida */
body.ek-modal-abierto { overflow: hidden; }
.ek-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ek-modal[hidden] { display: none; }
.ek-modal__backdrop { position: absolute; inset: 0; background: rgba(33, 37, 41, .62); backdrop-filter: blur(2px); }
.ek-modal__box:focus { outline: none; }
.ek-modal__box {
    position: relative; width: 100%; max-width: 640px; max-height: calc(100vh - 40px); overflow-y: auto;
    background: #FDFBF7; border-left: 4px solid #212529; padding: 44px 48px 32px;
    font-family: "Montserrat", sans-serif; color: #485B60; box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
    animation: ek-modal-in .35s ease;
}
@keyframes ek-modal-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.ek-modal__logo { margin: 0 0 18px; font-size: 30px; font-weight: 200; letter-spacing: .01em; color: #212529; }
.ek-modal__title,
.elementor-kit-10 .ek-modal__title { margin: 0 0 12px; font-size: 30px; line-height: 1.25; font-weight: 500; color: #212529; }
.ek-modal__intro { margin: 0 0 28px; font-size: 16px; line-height: 1.65; }
.ek-modal__options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.ek-opcion,
.elementor-kit-10 .ek-opcion {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left;
    padding: 22px 20px; border: 1px solid #DDDDDD; border-left: 4px solid #212529; border-radius: 0;
    background: #fff; color: #212529; cursor: pointer; text-transform: none;
    font-family: "Montserrat", sans-serif; transition: background .2s, color .2s, transform .2s;
}
.ek-opcion svg { width: 30px; height: 30px; fill: none !important; stroke: currentColor; stroke-width: 1.4; margin-bottom: 8px; }
.ek-opcion strong { font-size: 18px; font-weight: 500; line-height: 1.3; }
.ek-opcion span { font-size: 14px; font-weight: 400; color: #485B60; line-height: 1.45; }
.ek-opcion:hover, .ek-opcion:focus-visible, .ek-opcion.is-active,
.elementor-kit-10 .ek-opcion:hover, .elementor-kit-10 .ek-opcion:focus-visible { background: #212529; color: #fff; transform: translateY(-2px); }
.ek-opcion:hover span, .ek-opcion:focus-visible span, .ek-opcion.is-active span { color: #DDDDDD; }
.ek-modal__langs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding-top: 20px; border-top: 1px solid #DDDDDD; font-size: 14px; }
.ek-modal__langs span { margin-right: 8px; }
.ek-modal__langs a,
.elementor-kit-10 .ek-modal__langs a { padding: 3px 10px; border: 1px solid #DDDDDD; color: #485B60; font-size: 13px; font-weight: 500; line-height: 1.5; text-transform: none; }
.ek-modal__langs a.is-active, .ek-modal__langs a:hover { background: #212529; border-color: #212529; color: #fff; }
.ek-modal__note { margin: 16px 0 0; font-size: 13px; font-style: italic; }
@media (max-width: 600px) {
    .ek-modal__box { padding: 32px 24px 24px; }
    .ek-modal__title, .elementor-kit-10 .ek-modal__title { font-size: 24px; }
    .ek-modal__options { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ idioma: cabecera */
/* el contenedor del botón "Contactanos" es flex en columna (variables de Elementor): en fila */
header .elementor-element.elementor-element-7dc1ffc1 { --content-width: auto !important; --width: auto !important; width: auto !important; flex-shrink: 0 !important; }
header .elementor-element.elementor-element-7dc1ffc1 > .e-con-inner { width: auto !important; max-width: none !important; }
header .elementor-element.elementor-element-2443667c { flex-shrink: 0 !important; width: auto !important; }
/* ...y el contenedor del menú (ancho fijo en %) ocupa lo que queda */
@media (min-width: 1025px) {
    header .elementor-element.elementor-element-880951f { --width: auto !important; flex: 1 1 auto !important; min-width: 0; --padding-left: 0px !important; --padding-right: 0px !important; }
    header .elementor-element-5526c332 > .elementor-widget-container { margin-left: 0 !important; }
    header .elementor-element.elementor-element-7dc1ffc1,
    header .elementor-element.elementor-element-7dc1ffc1 > .e-con-inner { width: fit-content !important; flex: 0 0 auto !important; padding-left: 0 !important; padding-right: 0 !important; }
    header .elementor-element.elementor-element-7dc1ffc1 > .e-con-inner { gap: 4px !important; column-gap: 4px !important; }
    header .elementor-element.elementor-element-586de2e9 { --column-gap: 16px !important; --gap: 0px 16px !important; }
}
/* portátiles: se recupera el sitio que ocupan "Tienda" y el selector de idioma */
@media (min-width: 1025px) and (max-width: 1440px) {
    header .elementor-element-2443667c .qodef-qi-button { padding-left: 18px !important; padding-right: 18px !important; }
    .ek-lang__globe { display: none; }
    .ek-lang__toggle, .elementor-kit-10 .ek-lang__toggle { padding: 12px 6px; }
}
header .elementor-element.elementor-element-7dc1ffc1 { --flex-direction: row !important; --align-items: center !important; --justify-content: flex-end !important; --gap: 6px !important; --flex-wrap: nowrap !important; }
.ek-lang { position: relative; font-family: "Montserrat", sans-serif; }
.ek-lang__toggle,
.elementor-kit-10 .ek-lang__toggle {
    display: inline-flex; align-items: center; gap: 6px; padding: 12px 10px;
    border: 0; border-radius: 0; background: transparent; color: #212529;
    font: 500 15px/1.5rem "Montserrat", sans-serif; text-transform: none; cursor: pointer;
}
.ek-lang__toggle:hover, .ek-lang.is-open .ek-lang__toggle,
.elementor-kit-10 .ek-lang__toggle:hover { background: var(--e-global-color-primary, #F8F9FA); color: #212529; }
.ek-lang__globe { width: 18px; height: 18px; fill: none !important; stroke: currentColor; stroke-width: 1.3; }
.ek-lang__chevron { width: 11px; height: 11px; fill: none !important; stroke: currentColor; stroke-width: 1.4; transition: transform .2s; }
.ek-lang.is-open .ek-lang__chevron { transform: rotate(180deg); }
.ek-lang__menu {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 1000; min-width: 180px;
    margin: 0; padding: 8px 0; list-style: none; background: #fff; border-top: 3px solid #212529;
    box-shadow: 0 12px 30px rgba(33, 37, 41, .12);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s, visibility .2s;
}
.ek-lang.is-open .ek-lang__menu { opacity: 1; visibility: visible; transform: none; }
.ek-lang__menu a,
.elementor-kit-10 .ek-lang__menu a {
    display: flex; align-items: center; gap: 10px; padding: 8px 18px;
    color: #485B60; font-size: 15px; font-weight: 400; line-height: 1.5; text-transform: none;
}
.ek-lang__menu a:hover { background: #F7F3EC; color: #212529; }
.ek-lang__menu a.is-active { color: #212529; font-weight: 500; }
.ek-lang__code { display: inline-block; width: 24px; font-size: 12px; font-weight: 600; color: #212529; }

/* idioma: menú hamburguesa (solo móvil; en tablet y escritorio está en la cabecera) */
.ek-lang-movil { display: none !important; }
@media (max-width: 767px) {
    .ek-lang-movil { display: flex !important; flex-direction: column; gap: 10px; padding: 18px 15px 18px 20px !important; border-top: 1px solid #E7E7E7; margin-top: 10px !important; }
    .ek-lang-movil__label { font: 500 13px "Montserrat", sans-serif; color: #485B60; text-transform: uppercase; letter-spacing: .06em; }
    .ek-lang-movil__list { display: flex; gap: 8px; }
    .ek-lang-movil__list a,
    .elementor-kit-10 .ek-lang-movil__list a { padding: 6px 14px; border: 1px solid #212529; color: #212529; font-size: 14px; font-weight: 500; line-height: 1.4; }
    .ek-lang-movil__list a.is-active { background: #212529; color: #fff; }
}

/* ------------------------------------------------------------------ aviso de cookies
   templates/ekonos/_cookies.html.twig: tarjeta abajo a la izquierda, no bloquea la navegación. */
.ek-cookies {
    position: fixed; left: 24px; bottom: 24px; z-index: 99990; width: min(560px, calc(100vw - 48px));
    font-family: "Montserrat", sans-serif; color: #485B60;
}
.ek-cookies[hidden] { display: none; }
.ek-cookies__box {
    max-height: calc(100vh - 48px); overflow-y: auto;
    background: #FDFBF7; border-left: 4px solid #212529; padding: 26px 28px 22px;
    box-shadow: 0 24px 60px rgba(33, 37, 41, .22); animation: ek-modal-in .35s ease;
}
.ek-cookies__title { margin: 0 0 8px; font-size: 20px; font-weight: 500; line-height: 1.3; color: #212529; }
.ek-cookies__text { font-size: 14px; line-height: 1.6; }
.ek-cookies__text p { margin: 0 0 6px; }
.ek-cookies__text a,
.elementor-kit-10 .ek-cookies__text a { color: #212529; font-size: 14px; font-weight: 500; text-transform: none; text-decoration: underline; }
.ek-cookies__panel { margin-top: 18px; border-top: 1px solid #DDDDDD; }
.ek-cookies__panel[hidden] { display: none; }
.ek-cookies__panel-title { margin: 16px 0 6px; font-size: 16px; font-weight: 500; color: #212529; }
.ek-cat { padding: 12px 0; border-bottom: 1px solid #E7E7E7; }
.ek-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ek-cat__name { font-size: 15px; font-weight: 500; color: #212529; }
.ek-cat__badge { font-size: 12px; color: #2e7d4f; font-weight: 500; white-space: nowrap; }
.ek-cat__text { margin: 6px 0 0 52px; font-size: 13px; line-height: 1.55; }
.ek-cookies__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.ek-cookies__actions [hidden] { display: none !important; }
.ek-cookies__actions .ek-btn { flex: 1 1 auto; }

.ek-btn--small,
.elementor-kit-10 .ek-btn--small,
.elementor-kit-10 button.ek-btn--small { padding: 11px 18px; font-size: 14px; }
.ek-link-btn,
.elementor-kit-10 .ek-link-btn { background: none; border: 0; padding: 4px 0; color: #212529; font: 500 14px "Montserrat", sans-serif; text-transform: none; text-decoration: underline; cursor: pointer; }

/* interruptor accesible (checkbox role="switch") */
.ek-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.ek-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ek-switch__ui { position: relative; flex: 0 0 40px; height: 22px; border-radius: 22px; background: #DDDDDD; transition: background .2s; }
.ek-switch__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.ek-switch input:checked + .ek-switch__ui { background: #212529; }
.ek-switch input:checked + .ek-switch__ui::after { transform: translateX(18px); }
.ek-switch input:disabled + .ek-switch__ui { opacity: .45; }
.ek-switch input:focus-visible + .ek-switch__ui { outline: 2px solid #212529; outline-offset: 2px; }

/* contenido de terceros bloqueado hasta consentir (mapa de Google...) */
iframe[data-ek-consent] { display: none !important; }
.ek-bloqueado {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px;
    min-height: 260px; padding: 28px; background: #F7F3EC; border-left: 4px solid #212529;
    font-family: "Montserrat", sans-serif; font-size: 15px; color: #485B60;
}
.ek-bloqueado p { margin: 0; }

/* ------------------------------------------------------------------ botones flotantes */
.ek-flotante,
.elementor-kit-10 .ek-flotante {
    position: fixed; bottom: 20px; z-index: 99980;
    display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px;
    border: 0; border-radius: 48px; background: #212529; color: #fff;
    font: 500 14px/1 "Montserrat", sans-serif; text-transform: none; cursor: pointer;
    box-shadow: 0 10px 28px rgba(33, 37, 41, .28); transition: transform .2s, background .2s;
}
.ek-flotante[hidden] { display: none !important; }
.ek-flotante:hover, .ek-flotante:focus-visible,
.elementor-kit-10 .ek-flotante:hover { transform: translateY(-2px); background: #000; color: #fff; }
.ek-flotante svg { width: 22px; height: 22px; flex: 0 0 22px; fill: none !important; stroke: currentColor; stroke-width: 1.5; }
.ek-flotante--cookies { left: 20px; }
.ek-flotante--precios { right: 20px; }
/* cookies: solo el icono; el texto aparece al pasar el ratón */
.ek-flotante--cookies .ek-flotante__label { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .3s; }
.ek-flotante--cookies:hover .ek-flotante__label, .ek-flotante--cookies:focus-visible .ek-flotante__label { max-width: 200px; }
.ek-flotante--cookies { gap: 0; }
.ek-flotante--cookies:hover, .ek-flotante--cookies:focus-visible { gap: 10px; }
body.ek-modal-abierto .ek-flotante { display: none !important; }
@media (max-width: 600px) {
    .ek-cookies { left: 12px; right: 12px; bottom: 12px; width: auto; }
    .ek-cookies__box { padding: 20px 18px 16px; }
    .ek-cat__text { margin-left: 0; }
    .ek-flotante, .elementor-kit-10 .ek-flotante { bottom: 14px; height: 44px; }
    .ek-flotante--cookies { left: 14px; }
    .ek-flotante--precios { right: 14px; }
}

/* ------------------------------------------------------------------ páginas legales (plantilla "legal") */
.page-content .wp-block-table { margin: 0 0 1.6em; overflow-x: auto; }
.page-content table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.page-content th, .page-content td { padding: 10px 12px; border: 1px solid #DDDDDD; text-align: left; vertical-align: top; }
.page-content thead th { background: #F7F3EC; color: #212529; font-weight: 600; }
.page-content a[href="#configurar-cookies"] { font-weight: 500; text-decoration: underline; }
