/* ============================================
   WE ÖTZI — ATLAS DE TATUADORES (/explore)
   Bauhaus unificado (mismo lenguaje que /registerclosedbeta):
   regla fina 1.5px, cream/ink del tema global, un solo set de acentos.
   Typography:  Archivo Black (display)
                JetBrains Mono (technical)
                Inter (body)
   ============================================ */

/* Page-scoped font import (does not pollute the rest of the app). */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=JetBrains+Mono:wght@400;500;700&family=Inter:wght@400;500;700;800&display=swap');

/* ----- TOKENS (page-scoped; bg/fg inherit theme tokens from styles.css) ----- */
.explore-app {
    --atlas-display: 'Archivo Black', 'Inter', sans-serif;
    --atlas-mono: 'JetBrains Mono', 'Consolas', monospace;
    --atlas-body: 'Inter', system-ui, sans-serif;

    /* Acentos alineados a la edición Bauhaus del registro. */
    --primary-red: #E63A1F;
    --primary-yellow: #F2B519;
    --primary-blue: #1E3FA6;
    --atlas-red-deep: #C42E15;

    --atlas-rule: 1.5px;
    --atlas-pad: clamp(16px, 2.2vw, 32px);
    --atlas-header-h: 64px;

    --atlas-shadow-sm: 3px 3px 0 var(--fg);
    --atlas-shadow-md: 4px 4px 0 var(--fg);
    --atlas-shadow-lg: 8px 8px 0 var(--fg);

    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-rows: auto auto auto 1fr;
    /* minmax(0, 1fr) evita que el rail de pills (overflow-x) ensanche
       la única columna del grid más allá del viewport. */
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "masthead"
        "filters"
        "tabs"
        "main";
    background: var(--bg);
    color: var(--fg);
    font-family: var(--atlas-body);
    overflow: hidden;
    position: relative;
}

/* Hide the global noise overlay on this page — it muddies the map. */
.explore-app ~ *,
body:has(.explore-app)::before { opacity: 0 !important; }

/* ============================================================
   MASTHEAD — nav unificado WEÖTZI + tag Atlas
   ============================================================ */
.explore-header {
    grid-area: masthead;
    position: relative;
    z-index: 30;
    background: var(--bg);
    border-bottom: var(--atlas-rule) solid var(--fg);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    height: var(--atlas-header-h);
    padding: 0 var(--atlas-pad);
    gap: 24px;
}

/* LEFT — back + logo + tag Atlas con contador */
.explore-header-left {
    display: flex;
    align-items: center;
    height: 100%;
    min-width: 0;
}

.explore-back {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: var(--atlas-rule) solid var(--fg);
    background: var(--bg);
    color: var(--fg);
    text-decoration: none;
    font-family: var(--atlas-mono);
    font-size: 0.95rem;
    margin-right: 18px;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.explore-back:hover {
    background: var(--fg);
    color: var(--bg);
}

.explore-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--atlas-display);
    font-size: 17px;
    letter-spacing: 0.02em;
    color: var(--fg);
    text-decoration: none;
    margin-right: 22px;
    flex-shrink: 0;
}

.explore-logo-marks {
    display: flex;
    align-items: center;
    gap: 4px;
}

.explore-logo-marks .sq { width: 13px; height: 13px; background: var(--primary-red); }
.explore-logo-marks .ci { width: 13px; height: 13px; background: var(--primary-yellow); border-radius: 50%; }
.explore-logo-marks .tr {
    width: 0; height: 0;
    border-left: 6.5px solid transparent;
    border-right: 6.5px solid transparent;
    border-bottom: 13px solid var(--primary-blue);
}

.explore-logo .umlaut { display: inline-block; transform: translateY(-1px); }

.explore-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--atlas-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg);
    padding-left: 22px;
    border-left: var(--atlas-rule) solid var(--fg);
    align-self: stretch;
    margin: 0;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.explore-tag .dot {
    width: 7px;
    height: 7px;
    background: var(--primary-red);
    border-radius: 50%;
    flex-shrink: 0;
}

.explore-tag .explore-tag-label {
    font-weight: 700;
}

.explore-tag .explore-tag-counter {
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* RIGHT — nav links + globo + toggle Ö + burger */
.explore-header-right {
    display: flex;
    align-items: center;
    gap: 22px;
}

.explore-nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    font-family: var(--atlas-body);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.explore-nav-links a {
    color: var(--fg);
    text-decoration: none;
    transition: color 0.15s ease;
}

.explore-nav-links a:hover { color: var(--primary-red); }

.explore-globe-cta {
    background: var(--primary-red);
    color: #F2EFE6;
    font-family: var(--atlas-body);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 9px 16px;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.12s ease;
}

.explore-globe-cta:hover {
    background: var(--atlas-red-deep);
    transform: translateY(-1px);
}

#theme-toggle.explore-theme-mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: var(--atlas-rule) solid var(--fg);
    background: var(--bg);
    color: var(--fg);
    display: grid;
    place-items: center;
    font-family: var(--atlas-display);
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

#theme-toggle.explore-theme-mark:hover {
    background: var(--primary-yellow);
    color: var(--text-on-light);
}

.explore-burger {
    display: none;
    width: 34px;
    height: 34px;
    border: var(--atlas-rule) solid var(--fg);
    background: var(--bg);
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 0;
    flex-shrink: 0;
}

.explore-burger i {
    width: 16px;
    height: 2px;
    background: var(--fg);
    display: block;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.explore-burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.explore-burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.explore-burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.explore-mobile-menu.dashboard-mobile-menu { display: none; }
.explore-mobile-menu.dashboard-mobile-menu[hidden] { display: none !important; }

/* ============================================================
   FILTERS — pills visibles + drawer de filtros avanzados
   ============================================================ */
.explore-filters {
    grid-area: filters;
    border-bottom: var(--atlas-rule) solid var(--fg);
    background: var(--bg);
    position: relative;
    z-index: 25;
    min-width: 0;
}

.explore-filters-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px var(--atlas-pad);
}

.explore-app .filter-pill-group {
    flex: 1;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent);
    min-width: 0;
    /* Aire para que translate+sombra del hover no se recorte. */
    padding: 4px 4px 6px 0;
    margin: -4px 0 -2px;
}

.explore-app .filter-pill-group::-webkit-scrollbar { display: none; }

.explore-app .filter-pill {
    flex: 0 0 auto;
    font-family: var(--atlas-mono);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    padding: 8px 13px;
    border: var(--atlas-rule) solid var(--fg);
    background: var(--bg);
    color: var(--fg);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.explore-app .filter-pill i { font-size: 0.85em; }

.explore-app .filter-pill:hover {
    transform: translate(-1px, -1px);
    box-shadow: var(--atlas-shadow-sm);
}

.explore-app .filter-pill.is-active {
    background: var(--primary-yellow);
    color: var(--text-on-light);
}

.explore-app .filter-pill .pill-count { opacity: 0.5; font-size: 0.92em; }

.explore-filters-toggle {
    flex-shrink: 0;
    height: 36px;
    padding: 0 14px;
    border: var(--atlas-rule) solid var(--fg);
    background: var(--bg);
    color: var(--fg);
    font-family: var(--atlas-mono);
    font-weight: 700;
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s ease, color 0.15s ease;
    position: relative;
}

.explore-filters-toggle:hover,
.explore-filters-toggle[aria-expanded="true"] {
    background: var(--fg);
    color: var(--bg);
}

.explore-filters-toggle .chev {
    font-size: 0.8em;
    transition: transform 0.18s ease;
}

.explore-filters-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* Punto rojo = hay filtros avanzados activos. */
.explore-filters-toggle .explore-filters-toggle-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-red);
    flex-shrink: 0;
}

.explore-filters-toggle .explore-filters-toggle-dot[hidden] { display: none; }

/* Drawer */
.explore-filter-drawer {
    border-top: var(--atlas-rule) solid var(--fg);
    background: var(--surface-color);
    padding: 14px var(--atlas-pad);
    animation: explore-drawer-in 0.18s ease;
}

.explore-filter-drawer[hidden] { display: none; }

@keyframes explore-drawer-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scoped under .explore-app to override marketplace.css, which stacks
   .filter-select-group vertically. */
.explore-app .filter-select-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.explore-app .filter-select-group select {
    flex: 0 0 auto;
    width: auto; /* marketplace.css fuerza width:100% y apila los selects */
    min-width: 168px;
    height: 38px;
    padding: 0 32px 0 12px;
    border: var(--atlas-rule) solid var(--fg);
    background: var(--bg);
    color: var(--fg);
    font-family: var(--atlas-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' stroke='%230A0A0A' stroke-width='1.5' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px 12px;
    transition: border-color 0.15s ease;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

[data-theme="dark"] .explore-app .filter-select-group select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' stroke='%23F2F0E9' stroke-width='1.5' fill='none'/></svg>");
}

.explore-app .filter-select-group select:hover,
.explore-app .filter-select-group select:focus {
    border-color: var(--primary-red);
    outline: none;
}

.explore-clear-btn {
    height: 38px;
    padding: 0 16px;
    border: var(--atlas-rule) solid var(--primary-red);
    background: transparent;
    color: var(--primary-red);
    font-family: var(--atlas-mono);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    margin-left: auto;
    transition: background 0.15s ease, color 0.15s ease;
}

.explore-clear-btn:hover {
    background: var(--primary-red);
    color: #F2EFE6;
}

/* ============================================================
   TABS (mobile only — hidden on desktop)
   ============================================================ */
.explore-tabs {
    display: none;
    grid-area: tabs;
}

@media (max-width: 900px) {
    .explore-tabs {
        display: flex;
        border-bottom: var(--atlas-rule) solid var(--fg);
        background: var(--bg);
    }
    .explore-tab {
        flex: 1;
        height: 46px;
        background: transparent;
        border: none;
        border-right: var(--atlas-rule) solid var(--fg);
        font-family: var(--atlas-mono);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        font-size: 0.72rem;
        cursor: pointer;
        display: flex; align-items: center; justify-content: center; gap: 8px;
        color: var(--fg);
        transition: background 0.15s ease, color 0.15s ease;
    }
    .explore-tab:last-child { border-right: none; }
    .explore-tab.is-active {
        background: var(--fg);
        color: var(--bg);
    }
}

/* ============================================================
   MAIN — split shell (list rail + map atlas)
   ============================================================ */
/* The global `main {}` rule in styles.css adds padding, max-width: 1400px,
   align-items: center, and flex-grow. We override every property here so
   the split layout fills its grid track edge-to-edge. */
main.explore-main {
    grid-area: main;
    display: grid;
    grid-template-columns: minmax(360px, 36%) 1fr;
    grid-template-rows: 1fr;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    max-width: none;
    width: 100%;
    align-items: stretch;
    justify-content: stretch;
    flex-grow: 0;
}

/* ----- LIST RAIL -----
   min-height: 0 + min-width: 0 are required so the panel can shrink below
   its content's intrinsic size and trigger overflow-y: auto correctly inside
   the grid track. */
.explore-list-panel {
    border-right: var(--atlas-rule) solid var(--fg);
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg);
    padding: 0 var(--atlas-pad) 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    min-width: 0;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--fg) transparent;
}

.explore-list-panel::-webkit-scrollbar { width: 6px; }
.explore-list-panel::-webkit-scrollbar-track { background: transparent; }
.explore-list-panel::-webkit-scrollbar-thumb { background: var(--fg); border-radius: 0; }

.explore-list-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: var(--atlas-rule) solid var(--fg);
    padding: 16px 0 10px;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 2;
}

.explore-list-meta #explore-results-count {
    font-family: var(--atlas-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
}

.explore-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    /* Aire para el desplazamiento del hover. */
    padding: 4px 4px 4px 0;
    margin: -4px 0;
}

/* ----- ARTIST CARD ----- */
.explore-card {
    border: var(--atlas-rule) solid var(--fg);
    background: var(--bg);
    cursor: pointer;
    display: grid;
    grid-template-columns: 96px 1fr;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    position: relative;
    overflow: hidden;
}

.explore-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--atlas-shadow-md);
}

.explore-card.is-active {
    border-color: var(--primary-red);
    box-shadow: 4px 4px 0 var(--primary-red);
    transform: translate(-2px, -2px);
}

.explore-card-img {
    background: var(--surface-color);
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    border-right: var(--atlas-rule) solid var(--fg);
}

.explore-card-img.no-image {
    background:
        radial-gradient(circle at 32% 36%, var(--primary-yellow) 26%, transparent 26.5%),
        linear-gradient(135deg, var(--primary-red) 22%, transparent 22.5%),
        var(--surface-color);
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.explore-card-body {
    padding: 13px 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.explore-card-name {
    font-family: var(--atlas-display);
    font-size: 1rem;
    line-height: 1;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.explore-card-meta {
    font-family: var(--atlas-mono);
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.explore-card-styles {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    order: -1;
}

.explore-card-styles .tag-mini {
    font-family: var(--atlas-mono);
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--text-secondary);
    padding: 1px 6px;
    color: var(--text-secondary);
    background: transparent;
}

.explore-card-price {
    margin-top: auto;
    padding-top: 4px;
    font-family: var(--atlas-mono);
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.05em;
    color: var(--primary-red);
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   MAP PANEL — full-bleed atlas, sin overlays decorativos
   ============================================================ */
.explore-map-panel {
    position: relative;
    overflow: hidden;
    background: var(--surface-color);
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.explore-map { width: 100%; height: 100%; min-height: 200px; }

/* Mapless / loading veil */
.explore-map-empty {
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--atlas-mono);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    background: var(--bg);
    z-index: 5;
}

/* ============================================================
   BAUHAUS MAP PIN (custom OverlayView)
   ============================================================ */
.bauhaus-pin-wrap {
    position: absolute;
    /* The point of the triangle (6px below the .bauhaus-pin box) must
       sit exactly on the artist's lat/lng. So we shift the wrap up by
       100% of its own height, then push back up by the triangle height. */
    transform: translate(-50%, calc(-100% - 6px));
    cursor: pointer;
    pointer-events: auto;
    z-index: 20;
    will-change: transform;
}

.bauhaus-pin {
    position: relative;
    background: var(--bg);
    color: var(--fg);
    border: var(--atlas-rule) solid var(--fg);
    padding: 5px 11px;
    font-family: var(--atlas-mono);
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    box-shadow: 2px 2px 0 var(--fg);
    white-space: nowrap;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

/* Triangle stem — anchors to .bauhaus-pin via position:relative. */
.bauhaus-pin::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid var(--fg);
}

/* Active / hovered pin: punches forward, fills with yellow. */
.bauhaus-pin-wrap:hover { z-index: 21; }
.bauhaus-pin-wrap:hover .bauhaus-pin,
.bauhaus-pin-wrap.is-active .bauhaus-pin {
    background: var(--primary-yellow);
    color: var(--text-on-light);
    transform: translate(-2px, -2px);
    box-shadow: var(--atlas-shadow-md);
    z-index: 22;
}

.bauhaus-pin-wrap.is-recommended .bauhaus-pin {
    background: var(--primary-red);
    color: #F2EFE6;
}

.bauhaus-pin-wrap.is-recommended .bauhaus-pin::after { border-top-color: var(--fg); }

/* Studio pin variant: blue accent, reads the studio name. */
.bauhaus-pin-wrap.is-studio { z-index: 18; }
.bauhaus-pin.bauhaus-pin-studio {
    background: var(--primary-blue);
    color: #F2EFE6;
    border-color: var(--fg);
    font-family: var(--atlas-display);
    font-size: 0.68rem;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    padding: 4px 10px;
    box-shadow: 2px 2px 0 var(--fg);
}
.bauhaus-pin.bauhaus-pin-studio::after { border-top-color: var(--fg); }
.bauhaus-pin-wrap.is-studio:hover { z-index: 22; }
.bauhaus-pin-wrap.is-studio:hover .bauhaus-pin {
    transform: translate(-2px, -2px);
    box-shadow: var(--atlas-shadow-md);
    background: var(--primary-yellow);
    color: var(--text-on-light);
}

/* ============================================================
   ARTIST MODAL
   ============================================================ */
.explore-modal-backdrop {
    position: fixed; inset: 0; z-index: 80;
    background: rgba(10, 10, 10, 0.6);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}

.explore-modal {
    background: var(--bg);
    border: var(--atlas-rule) solid var(--fg);
    box-shadow: var(--atlas-shadow-lg);
    width: min(560px, 100%);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    position: relative;
    animation: explore-modal-in 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes explore-modal-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.explore-modal-close {
    position: absolute; top: 10px; right: 10px;
    background: var(--bg); color: var(--fg);
    border: var(--atlas-rule) solid var(--fg);
    width: 36px; height: 36px;
    cursor: pointer;
    z-index: 5;
    transition: background 0.15s ease, color 0.15s ease;
}

.explore-modal-close:hover {
    background: var(--primary-red);
    color: #F2EFE6;
}

.modal-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-color);
    border-bottom: var(--atlas-rule) solid var(--fg);
}

.modal-body {
    padding: 22px 24px 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-styles { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-styles .tag-mini {
    font-family: var(--atlas-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--text-secondary);
    padding: 2px 7px;
    color: var(--text-secondary);
    background: transparent;
}

.modal-name {
    font-family: var(--atlas-display);
    font-size: 1.8rem;
    line-height: 0.95;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: var(--fg);
}

.modal-meta { display: flex; flex-direction: column; gap: 6px; }
.modal-meta-row {
    font-family: var(--atlas-mono);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--fg);
}
.modal-meta-row i { color: var(--primary-red); width: 14px; text-align: center; }

.modal-bio {
    font-family: var(--atlas-body);
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-secondary);
    border-left: var(--atlas-rule) solid var(--fg);
    padding-left: 14px;
    overflow-wrap: anywhere;
}
.modal-bio p,
.modal-bio div { margin: 0 0 0.62em; }
.modal-bio p:last-child,
.modal-bio div:last-child { margin-bottom: 0; }
.modal-bio ul,
.modal-bio ol { margin: 0.5em 0 0.5em 1.25em; padding: 0; }
.modal-bio a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.modal-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    border-top: var(--atlas-rule) solid var(--fg);
    border-bottom: var(--atlas-rule) solid var(--fg);
    padding: 12px 0;
}
.modal-price-row .price-label {
    font-family: var(--atlas-mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.modal-price-row .price-value {
    font-family: var(--atlas-display);
    font-size: 1.5rem;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
}

/* Source badge (Estudio / Independiente) sits between the name and meta. */
.modal-source-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    font-family: var(--atlas-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 4px 9px;
    border: var(--atlas-rule) solid var(--fg);
    background: var(--bg);
    color: var(--fg);
    margin-top: -4px;
}

.modal-source-badge.is-studio { background: var(--primary-yellow); color: var(--text-on-light); }
.modal-source-badge.is-independent { background: var(--bg); color: var(--fg); }

.modal-cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.modal-cta-quote, .modal-cta-profile {
    height: 48px;
    border: var(--atlas-rule) solid var(--fg);
    font-family: var(--atlas-body);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.72rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.modal-cta-quote { background: var(--primary-red); color: #F2EFE6; border-color: var(--primary-red); }
.modal-cta-quote:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--atlas-shadow-sm);
    background: var(--atlas-red-deep);
    border-color: var(--atlas-red-deep);
}

.modal-cta-profile { background: var(--bg); color: var(--fg); }
.modal-cta-profile:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--atlas-shadow-sm);
}

/* "Cómo llegar" — wide secondary action, opens Google Maps. */
.modal-cta-directions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    margin-top: 2px;
    border: var(--atlas-rule) solid var(--fg);
    background: var(--fg);
    color: var(--bg);
    font-family: var(--atlas-body);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.modal-cta-directions:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--atlas-shadow-sm);
}

.modal-cta-directions[hidden] { display: none !important; }

/* ----- LOADING OVERLAY ----- */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    font-family: var(--atlas-mono);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    color: var(--fg);
}

.loading-overlay .loader {
    width: 52px;
    height: 52px;
    border: var(--atlas-rule) solid var(--fg);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: atlas-spin 0.9s linear infinite;
}

@keyframes atlas-spin {
    to { transform: rotate(360deg); }
}

/* ----- EMPTY STATE ----- */
.explore-list-empty {
    border: var(--atlas-rule) solid var(--fg);
    padding: 28px 24px;
    text-align: center;
    background: var(--surface-color);
}

.explore-list-empty h2 {
    font-family: var(--atlas-display);
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    color: var(--fg);
}

.explore-list-empty p {
    font-family: var(--atlas-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ----- HIDDEN HELPER ----- */
.hidden { display: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
    .explore-tag .explore-tag-counter { display: none; }
    .explore-nav-links { gap: 18px; }
}

@media (max-width: 900px) {
    .explore-main {
        grid-template-columns: 1fr;
    }
    .explore-list-panel { border-right: none; }
    .explore-main[data-view="map"] .explore-list-panel { display: none; }
    .explore-main[data-view="list"] .explore-map-panel { display: none; }

    .explore-filters-row { padding: 10px 16px; }
    .explore-filter-drawer { padding: 12px 16px; }
    .explore-app .filter-select-group select { min-width: 0; flex: 1 1 calc(50% - 5px); }
    .explore-clear-btn { margin-left: 0; flex: 1 1 100%; }
}

@media (max-width: 768px) {
    .explore-app { --atlas-header-h: 56px; }
    .explore-header { padding: 0 16px; gap: 12px; }
    .explore-nav-links { display: none; }
    .explore-globe-cta { display: none; }
    .explore-burger { display: flex; }
    .explore-back { margin-right: 12px; width: 30px; height: 30px; }
    .explore-logo { font-size: 15px; margin-right: 14px; gap: 7px; }
    .explore-logo-marks .sq,
    .explore-logo-marks .ci { width: 11px; height: 11px; }
    .explore-logo-marks .tr {
        border-left-width: 5.5px;
        border-right-width: 5.5px;
        border-bottom-width: 11px;
    }
    .explore-tag { padding-left: 14px; }
    .explore-header-right { gap: 10px; }
    #theme-toggle.explore-theme-mark { width: 30px; height: 30px; font-size: 11px; }

    .explore-mobile-menu.dashboard-mobile-menu {
        position: fixed;
        left: 0;
        right: 0;
        top: var(--atlas-header-h, 56px);
        z-index: 35;
        display: flex;
        flex-direction: column;
        background: var(--bg);
        border-bottom: var(--atlas-rule) solid var(--fg);
        padding: 12px 16px 16px;
        animation: explore-drawer-in 0.18s ease;
    }

    .explore-mobile-menu .dashboard-mobile-menu-link {
        min-height: 48px;
        display: flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
        font-family: var(--atlas-body);
        font-size: 0.78rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        font-weight: 700;
        color: var(--fg);
        border-bottom: 1px solid var(--text-secondary);
        transition: color 0.15s ease;
    }

    .explore-mobile-menu .dashboard-mobile-menu-link:last-child { border-bottom: none; }
    .explore-mobile-menu .dashboard-mobile-menu-link:hover { color: var(--primary-red); }
    .explore-mobile-menu .explore-mobile-menu-link-globe { color: var(--primary-red); }

    .modal-name { font-size: 1.45rem; }
    .modal-cta-row { grid-template-columns: 1fr; }
}
