/* ==========================================================================
   NEXO — skin del marketplace
   Inspirado en el diseño de Habittel (crema + teal + arena, Sora/Figtree,
   tarjetas redondeadas, bordes suaves). Se carga DESPUÉS de
   yapa_marketplace.css y solo redeclara apariencia: no toca selectores
   ni IDs de los que depende el JS (carrito, mega menú, drawer, wishlist).

   Los colores de marca del marketplace (--main-primary_color /
   --main-secondary_color) siguen mandando; los de abajo son el default.
   ========================================================================== */

:root {
    --nx-deep:   #12343b;
    --nx-teal:   #1f5963;
    --nx-sand:   #d6c3a5;
    --nx-cream:  #f7f4ee;
    --nx-ink:    #1c2526;
    --nx-muted:  #5c6b6d;
    --nx-line:   rgba(18, 52, 59, .14);
    --nx-radius: 18px;
    --nx-radius-sm: 12px;
    --nx-shadow: 0 10px 30px rgba(18, 52, 59, .08);
    --nx-display: 'Sora', 'Figtree', system-ui, sans-serif;
    --nx-sans:    'Figtree', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background: var(--nx-cream);
    color: var(--nx-ink);
    font-family: var(--nx-sans);
}

h1, h2, h3, h4,
.hy h1, .hy h2, .hy h3 {
    font-family: var(--nx-display);
    letter-spacing: -.01em;
}

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--nx-teal);
    outline-offset: 3px;
}

/* ---------- Header ---------- */
.top-header,
.main-nav {
    background: #fff;
    border-bottom: 1px solid var(--nx-line);
}
.search-bar input,
.main-form input {
    border-radius: 999px;
    border: 1px solid var(--nx-line);
    background: var(--nx-cream);
}
.search-bar button,
.main-search-button {
    border-radius: 999px;
}
.btn-login, .btn-register {
    border-radius: 999px;
    font-weight: 700;
}

/* ---------- Home: bloques (.hy) ---------- */
.hy { background: var(--nx-cream); }

/* hero tipo panel con círculos decorativos (guiño al hero de Habittel) */
.hy-hero {
    position: relative;
    overflow: hidden;
}
.hy-hero::before,
.hy-hero::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: min(46vw, 520px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(214, 195, 165, .55);
    box-shadow: 0 0 0 40px rgba(214, 195, 165, .14), 0 0 0 80px rgba(214, 195, 165, .08);
    pointer-events: none;
}
.hy-hero::before { top: -34%; right: -12%; }
.hy-hero::after  { bottom: -48%; left: -14%; }
.hy-hero > * { position: relative; z-index: 1; }

.hy-slide-media img,
.hy-spotlight-logo img,
.hy-seller-media img {
    border-radius: var(--nx-radius);
}

/* etiquetas: pastilla en vez de "etiqueta de regalo" */
.hy-tag {
    clip-path: none;
    border-radius: 999px;
    padding: 7px 16px;
    background: var(--nx-teal);
    color: #fff;
}
.hy-tag::before { display: none; }
.hy-tag.is-outline {
    background: transparent;
    color: var(--nx-teal);
    border: 1.5px solid var(--nx-teal);
    padding: 5.5px 15px;
}

.hy-btn-primary,
.hy-more {
    border-radius: 999px;
}

/* tarjetas de categoría, tiendas, confianza */
.hy-cat-frame,
.hy-trust-card,
.hy-spotlight,
.hy-store-row,
.hy-seller {
    border-radius: var(--nx-radius);
}
.hy-trust-card,
.hy-store-row {
    background: #fff;
    border: 1px solid var(--nx-line);
    box-shadow: var(--nx-shadow);
}
.hy-trust-item .ic { color: var(--nx-teal); }

/* ---------- Tarjetas de producto ---------- */
.product-card,
.products-grid .product-card {
    background: #fff;
    border: 1px solid var(--nx-line);
    border-radius: var(--nx-radius);
    overflow: hidden;
    box-shadow: none;
    transition: box-shadow .2s ease, transform .2s ease;
}
.product-card:hover {
    box-shadow: var(--nx-shadow);
    transform: translateY(-2px);
}
.product-image-container { border-radius: 0; background: #f1ede4; }
.product-title { font-family: var(--nx-display); font-weight: 600; }
.product-price { color: var(--nx-deep); font-weight: 700; }
.btn-add-cart {
    background: var(--nx-teal);
    border-radius: 999px;
    color: #fff;
}
.btn-add-cart:hover { background: var(--nx-deep); }
.btn-add-to-wishlist, .btn-quick-view {
    border-radius: 50%;
}

/* ---------- Footer ---------- */
footer { font-family: var(--nx-sans); }

/* ---------- Preloader ---------- */
body .preloader {
    background: radial-gradient(ellipse at 50% 42%, #fffdf8 0%, #f7f4ee 56%, #eee6d8 100%);
}
body .preloader__name { color: var(--nx-deep); font-family: var(--nx-display); }
body .preloader__sub  { color: var(--nx-muted); }
body .preloader__dots span { background: var(--nx-teal); }
body .pl2-bar-wrap { background: rgba(214, 195, 165, .35); }
body .pl2-bar { background: var(--nx-teal); }
body .pl2-card { background: #fff; box-shadow: 0 18px 48px rgba(18, 52, 59, .1), 0 0 0 1px rgba(214, 195, 165, .45); }

/* ---------- Formularios genéricos ---------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="search"],
input[type="password"], input[type="number"], select, textarea {
    border-radius: var(--nx-radius-sm);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .product-card { transition: none; }
}

/* ---------- Home: panel de búsqueda (estilo Habittel) ---------- */
.nx-search-wrap { margin-top: -44px; position: relative; z-index: 5; padding: 0 clamp(16px, 4vw, 32px); }
.nx-search {
    display: flex; align-items: flex-end; gap: 16px;
    background: #fff; border: 1px solid var(--nx-line);
    border-radius: 22px; padding: 18px 20px;
    box-shadow: 0 18px 48px rgba(18, 52, 59, .12);
}
.nx-field { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nx-field label { font: 700 11px/1 var(--nx-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--nx-muted); }
.nx-field input {
    width: 100%; border: 0; border-bottom: 2px solid var(--nx-line); background: transparent;
    font: 500 17px/1.4 var(--nx-sans); color: var(--nx-ink); padding: 6px 0; outline: none; border-radius: 0;
}
.nx-field input:focus { border-bottom-color: var(--nx-teal); }
.nx-go {
    border: 0; cursor: pointer; border-radius: 999px; padding: 14px 30px;
    background: var(--nx-teal); color: #fff; font: 700 15px/1 var(--nx-sans);
}
.nx-go:hover { background: var(--nx-deep); }
.nx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.nx-chip {
    padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--nx-line);
    font: 600 13px/1 var(--nx-sans); color: var(--nx-deep); text-decoration: none;
}
.nx-chip:hover { background: var(--nx-teal); color: #fff; border-color: var(--nx-teal); }
@media (max-width: 640px) {
    .nx-search { flex-direction: column; align-items: stretch; }
    .nx-go { width: 100%; }
}

/* ==========================================================================
   MÓDULO INMUEBLES (solo Habittel) — buscador con pestañas y mapas
   ========================================================================== */
.nxp-hero { padding: 28px clamp(16px, 4vw, 32px) 0; }
.nxp-panel {
    position: relative; overflow: hidden;
    background: #fff; border: 1px solid var(--nx-line); border-radius: 28px;
    padding: clamp(24px, 4vw, 48px); box-shadow: var(--nx-shadow);
}
.nxp-panel::before {
    content: ""; position: absolute; top: -40%; right: -10%; width: 380px; aspect-ratio: 1; border-radius: 50%;
    border: 1px solid rgba(214, 195, 165, .6); box-shadow: 0 0 0 36px rgba(214, 195, 165, .14), 0 0 0 72px rgba(214, 195, 165, .08);
    pointer-events: none;
}
.nxp-panel > * { position: relative; }
.nxp-panel h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 22px; color: var(--nx-deep); max-width: 18ch; line-height: 1.1; }
.nxp-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--nx-cream); border-radius: 999px; margin-bottom: 20px; flex-wrap: wrap; }
.nxp-tabs button {
    border: 0; background: transparent; cursor: pointer; padding: 10px 22px; border-radius: 999px;
    font: 700 14px/1 var(--nx-sans); color: var(--nx-muted);
}
.nxp-tabs button[aria-selected="true"] { background: var(--nx-teal); color: #fff; }
.nxp-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.nxp-f { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; min-width: 0; }
.nxp-f span { font: 700 11px/1 var(--nx-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--nx-muted); }
.nxp-f select {
    width: 100%; height: 52px; padding: 0 14px; border: 1px solid var(--nx-line); border-radius: var(--nx-radius-sm);
    background: var(--nx-cream); font: 500 16px/1 var(--nx-sans); color: var(--nx-ink);
}
.nxp-go {
    height: 52px; border: 0; cursor: pointer; border-radius: 999px; padding: 0 32px;
    background: var(--nx-teal); color: #fff; font: 700 15px/1 var(--nx-sans);
}
.nxp-go:hover { background: var(--nx-deep); }

.nxm-wrap { padding: 28px clamp(16px, 4vw, 32px) 0; }
.nxm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.nxm-head h2 { margin: 0; font-size: 24px; color: var(--nx-deep); }
.nxm-toggle {
    border: 1px solid var(--nx-line); background: #fff; border-radius: 999px; padding: 8px 16px; cursor: pointer;
    font: 600 13px/1 var(--nx-sans); color: var(--nx-deep);
}
.nxm-map { height: 420px; border-radius: var(--nx-radius); border: 1px solid var(--nx-line); overflow: hidden; z-index: 1; }
.nxm-addr { margin: 0 0 12px; color: var(--nx-muted); }
.nxm-detail { padding-bottom: 28px; }
@media (max-width: 640px) {
    .nxp-form { flex-direction: column; align-items: stretch; }
    .nxp-go { width: 100%; }
    .nxm-map { height: 320px; }
}
