/* ===========================================================
   C21 La Heredad — Sistema de diseño
   Mobile-first. Clean. Dorado #BEAF87 · Negro #000 · Fondo #FFF/#F9F9F9.
   =========================================================== */

.c21-page,
.c21-page * { box-sizing: border-box; }

.c21-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #111;
    background: #fff;
    line-height: 1.6;
    font-size: 16px;
}

.c21-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px;
}

/* ---------- Breadcrumbs ---------- */
.c21-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: #666;
    margin: 8px 0 20px;
}
.c21-breadcrumbs a {
    color: #666;
    text-decoration: none;
    transition: color .2s;
}
.c21-breadcrumbs a:hover { color: #BEAF87; }
.c21-breadcrumbs span[aria-hidden] { color: #bbb; }

/* ---------- Galería ---------- */
.c21-gallery {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 24px;
}
@media (min-width: 768px) {
    .c21-gallery {
        grid-template-columns: 2fr 1fr 1fr;
        grid-template-rows: 1fr 1fr;
    }
}
.c21-gallery__cell {
    all: unset;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    background: #f1f1f1;
    aspect-ratio: 4/3;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
}
.c21-gallery__cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.c21-gallery__cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@media (min-width: 768px) {
    .c21-gallery__cell--main {
        grid-column: 1;
        grid-row: 1 / 3;
        aspect-ratio: auto;
    }
}
.c21-gallery__more {
    all: unset;
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 10px 16px;
    background: rgba(0,0,0,.75);
    color: #fff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background .2s;
}
.c21-gallery__more:hover { background: #000; }

/* ---------- Layout principal ---------- */
.c21-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 960px) {
    .c21-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
}

/* ---------- Badges ---------- */
.c21-main__head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.c21-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
}
.c21-badge--venta  { background: #BEAF87; color: #fff; }
.c21-badge--renta  { background: #000;    color: #fff; }
.c21-badge--soft   { background: #F5F1E6; color: #6b5d3e; }

/* ---------- Título & ubicación ---------- */
.c21-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 8px;
    color: #000;
    letter-spacing: -.01em;
}
@media (min-width: 768px) { .c21-title { font-size: 30px; } }

.c21-loc {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555;
    font-size: 15px;
    margin: 0 0 24px;
}
.c21-loc .c21-icon { flex: 0 0 auto; }

/* ---------- Fila de specs ---------- */
.c21-specsRow {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 20px;
    background: #F9F9F9;
    border-radius: 12px;
    margin-bottom: 32px;
}
@media (min-width: 560px) { .c21-specsRow { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 960px) { .c21-specsRow { grid-template-columns: repeat(5, 1fr); } }

.c21-specsRow__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}
.c21-specsRow__item svg { margin-bottom: 2px; }
.c21-specsRow__item strong {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}
.c21-specsRow__item small {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* ---------- Secciones ---------- */
.c21-section {
    margin-bottom: 40px;
}
.c21-h2 {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #BEAF87;
    display: inline-block;
}
.c21-desc {
    color: #333;
    font-size: 15px;
    line-height: 1.75;
}
.c21-desc p { margin: 0 0 12px; }

/* ---------- Detalles (grid de clave:valor) ---------- */
.c21-details {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid #eee;
}
@media (min-width: 640px) { .c21-details { grid-template-columns: 1fr 1fr; gap: 0 32px; } }
.c21-details li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}
.c21-details span { color: #888; }
.c21-details strong { color: #111; font-weight: 600; }

/* ---------- Amenidades ---------- */
.c21-amenities {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px 24px;
}
@media (min-width: 560px) { .c21-amenities { grid-template-columns: 1fr 1fr; } }

.c21-amenities li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
    padding: 6px 0;
}

/* ---------- Calculadora ---------- */
.c21-calc {
    background: #F9F9F9;
    border: 1px solid #EEE;
    border-radius: 12px;
    padding: 20px;
}
.c21-calc__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}
.c21-calc__input {
    width: 100%;
    padding: 12px 14px;
    font-size: 18px;
    font-weight: 600;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    background: #fff;
    color: #000;
    font-family: inherit;
}
.c21-calc__input:focus {
    outline: none;
    border-color: #BEAF87;
    box-shadow: 0 0 0 3px rgba(190, 175, 135, .2);
}
.c21-calc__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 560px) { .c21-calc__grid { grid-template-columns: 1fr 1fr; gap: 16px; } }

.c21-calc__box {
    background: #fff;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #eee;
}
.c21-calc__box h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #888;
    margin: 0 0 10px;
    font-weight: 600;
}
.c21-calc__box ul {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
    font-size: 13px;
}
.c21-calc__box ul li {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    color: #555;
}
.c21-calc__box ul li span { font-weight: 600; color: #111; }
.c21-calc__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    padding-top: 10px;
    border-top: 2px solid #BEAF87;
    color: #000;
    font-size: 15px;
}

/* ---------- Mapa ---------- */
.c21-map {
    width: 100%;
    height: 360px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

/* ---------- Qué hay cerca ---------- */
.c21-nearby {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
@media (min-width: 560px) { .c21-nearby { grid-template-columns: repeat(4, 1fr); } }
.c21-nearby__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 8px;
    background: #F9F9F9;
    border-radius: 10px;
    text-align: center;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background .2s, transform .2s;
    border: 1px solid transparent;
}
.c21-nearby__item:hover {
    background: #fff;
    border-color: #BEAF87;
    transform: translateY(-2px);
}
.c21-nearby__emoji { font-size: 24px; }

/* ---------- Sidebar: tarjeta de precio ---------- */
.c21-side { min-width: 0; }
.c21-priceCard {
    background: #fff;
    border: 1px solid #EEE;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
@media (min-width: 960px) {
    .c21-priceCard {
        position: sticky;
        top: 24px;
    }
}
.c21-priceCard__meta {
    font-size: 11px;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 6px;
}
.c21-priceCard__op {
    display: inline-block;
    background: #BEAF87;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}
.c21-priceCard__price {
    font-size: 28px;
    font-weight: 800;
    color: #000;
    line-height: 1.1;
    margin-bottom: 4px;
    letter-spacing: -.01em;
}
.c21-priceCard__m2 {
    color: #888;
    font-size: 13px;
    margin-bottom: 16px;
}
.c21-priceCard__sep {
    border: 0;
    border-top: 1px solid #eee;
    margin: 16px 0;
}
.c21-priceCard__advisor {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* ---------- Botones ---------- */
.c21-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    border: 1px solid transparent;
    font-family: inherit;
    margin-bottom: 10px;
}
.c21-btn:last-child { margin-bottom: 0; }
.c21-btn--wa {
    background: #25D366;
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 211, 102, .3);
}
.c21-btn--wa:hover {
    background: #1EBE57;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, .4);
}
.c21-btn--ghost {
    background: #fff;
    color: #000;
    border-color: #000;
}
.c21-btn--ghost:hover {
    background: #000;
    color: #fff;
}

/* ---------- Utilidades ---------- */
.c21-muted {
    color: #888;
    font-size: 13px;
    margin: 8px 0 16px;
}

/* ---------- Lightbox ---------- */
.c21-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.c21-lightbox[hidden] { display: none; }
.c21-lightbox__img {
    max-width: 95%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.c21-lightbox__close,
.c21-lightbox__nav {
    all: unset;
    position: absolute;
    color: #fff;
    cursor: pointer;
    font-size: 40px;
    line-height: 1;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.c21-lightbox__close:hover,
.c21-lightbox__nav:hover { background: rgba(255,255,255,.15); }
.c21-lightbox__close { top: 20px; right: 20px; }
.c21-lightbox__nav--prev { left: 20px; top: 50%; transform: translateY(-50%); }
.c21-lightbox__nav--next { right: 20px; top: 50%; transform: translateY(-50%); }
.c21-lightbox__count {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0,0,0,.5);
    padding: 6px 14px;
    border-radius: 999px;
}

/* ---------- WhatsApp flotante (mobile) ---------- */
.c21-floating-wa {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, .4);
    z-index: 999;
    transition: transform .2s;
}
.c21-floating-wa:hover { transform: scale(1.08); }
@media (min-width: 960px) { .c21-floating-wa { display: none; } }

/* ===========================================================
   Listado (card / archive / search)
   =========================================================== */

.c21-listing { margin: 20px 0; font-family: 'Inter', sans-serif; }
.c21-listing__meta { color: #666; font-size: 13px; margin-bottom: 16px; }
.c21-grid { display: grid; gap: 20px; }
.c21-grid--1 { grid-template-columns: 1fr; }
.c21-grid--2 { grid-template-columns: repeat(2, 1fr); }
.c21-grid--3 { grid-template-columns: repeat(3, 1fr); }
.c21-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .c21-grid--3, .c21-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .c21-grid, .c21-grid--2, .c21-grid--3, .c21-grid--4 { grid-template-columns: 1fr; } }

.c21-card-prop {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
    border: 1px solid #f0f0f0;
}
.c21-card-prop:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.c21-card-prop__media {
    display: block;
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f3f3f3;
}
.c21-card-prop__media img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .4s;
}
.c21-card-prop:hover .c21-card-prop__media img { transform: scale(1.04); }
.c21-card-prop__noimg {
    display: flex; align-items: center; justify-content: center;
    height: 100%; color: #aaa; font-size: 13px;
}
.c21-card-prop__body { padding: 16px; }
.c21-card-prop__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #000;
}
.c21-card-prop__title a { color: inherit; text-decoration: none; }
.c21-card-prop__loc { color: #888; font-size: 13px; margin-bottom: 10px; }
.c21-card-prop__price {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin-bottom: 12px;
}
.c21-card-prop__specs {
    display: flex;
    gap: 14px;
    color: #666;
    font-size: 13px;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}
.c21-card-prop__specs span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Badges sobre la foto */
.c21-card-prop .c21-badge {
    position: absolute;
    padding: 5px 12px;
    font-weight: 600;
}
.c21-card-prop .c21-badge--op { top: 12px; left: 12px; }
.c21-card-prop .c21-badge--type {
    top: 12px; right: 12px;
    background: rgba(0,0,0,.7);
    color: #fff;
    backdrop-filter: blur(6px);
}

/* Badge "Destacado" dorado — esquina superior izquierda sobre la foto */
.c21-badge--featured {
    background: linear-gradient(135deg, #BEAF87, #a8966d) !important;
    color: #fff !important;
    font-size: 11px !important;
    letter-spacing: .8px !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 10px rgba(190, 175, 135, .45);
}
.c21-card-prop .c21-badge--featured {
    top: 12px; left: 12px;
    padding: 6px 12px;
}
.c21-card-prop--featured .c21-badge--op {
    top: 46px;
}
.c21-card-prop--featured {
    border: 1px solid rgba(190, 175, 135, .35);
}

/* ===========================================================
   Grid "Inmuebles Destacados" — 4 columnas desktop, carrusel mobile
   =========================================================== */
.c21-featured {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
}
.c21-featured__track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
@media (max-width: 1100px) {
    .c21-featured__track { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    .c21-featured__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Modo carrusel mobile: scroll horizontal con snap */
@media (max-width: 640px) {
    .c21-featured--carousel-mobile .c21-featured__track,
    .c21-featured--carousel .c21-featured__track {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 16px;
        gap: 14px;
        padding: 4px 4px 16px;
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #BEAF87 #f1f1f1;
    }
    .c21-featured--carousel-mobile .c21-featured__track > *,
    .c21-featured--carousel .c21-featured__track > * {
        flex: 0 0 82%;
        max-width: 82%;
        scroll-snap-align: start;
    }
    .c21-featured__track::-webkit-scrollbar { height: 6px; }
    .c21-featured__track::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
    .c21-featured__track::-webkit-scrollbar-thumb { background: #BEAF87; border-radius: 3px; }
}

/* ===========================================================
   Empty state con CTA a WhatsApp
   =========================================================== */
.c21-empty {
    padding: 60px 20px !important;
    text-align: center !important;
    background: #fff;
    border-radius: 16px;
    border: 1px dashed #e5e5e5;
    margin: 20px 0;
    font-family: 'Inter', sans-serif;
}
.c21-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px; height: 72px;
    border-radius: 50%;
    background: rgba(190, 175, 135, .12);
    margin-bottom: 16px;
}
.c21-empty__title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 0 0 8px;
}
.c21-empty__text {
    color: #666;
    font-size: 15px;
    max-width: 480px;
    margin: 0 auto 24px;
    line-height: 1.5;
}
.c21-empty__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: #fff !important;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 6px 18px rgba(37, 211, 102, .3);
    transition: transform .2s, box-shadow .2s;
}
.c21-empty__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(37, 211, 102, .4);
    color: #fff !important;
}

/* Paginación */
.c21-pager { display: flex; gap: 6px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.c21-pager__link {
    padding: 8px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all .2s;
}
.c21-pager__link:hover { border-color: #BEAF87; color: #BEAF87; }
.c21-pager__link.is-active { background: #BEAF87; color: #fff; border-color: #BEAF87; }

.c21-empty { padding: 60px 20px; text-align: center; color: #888; }

/* ===========================================================
   Buscador C21 — rediseño profesional
   Gana al tema con selectores específicos + !important donde toca.
   =========================================================== */

.c21-search,
.c21-search * { box-sizing: border-box; }

/* Protección contra temas que expanden los SVG: nunca mayor a 24px dentro del buscador. */
.c21-search svg { max-width: 24px !important; max-height: 24px !important; flex: 0 0 auto; }
.c21-search__icon svg { width: 18px !important; height: 18px !important; }
.c21-filter__icon svg,
.c21-search__more svg,
.c21-search__mobileToggle svg { width: 16px !important; height: 16px !important; }

.c21-search {
    background: #fff !important;
    padding: 18px !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .06) !important;
    border: 1px solid #eee !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    max-width: 1180px;
    margin: 0 auto 28px !important;
    color: #222;
}

/* Neutralizar custom-selects inyectados por el tema (nice-select, select2, etc.) */
.c21-search .nice-select,
.c21-search .select2,
.c21-search [class*="select2"],
.c21-search select + .nice-select,
.c21-search select + span.select,
.c21-search select + div[class*="select"],
.c21-search .wpcf7-form-control-wrap .wpcf7-select {
    display: none !important;
}
.c21-search select[data-no-enhance] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    pointer-events: auto !important;
}

/* ---------- Fila 1: buscador + botón + toggle mobile ---------- */
.c21-search__bar {
    display: flex !important;
    align-items: stretch !important;
    gap: 10px !important;
    flex-wrap: wrap;
}
.c21-search__inputWrap {
    position: relative !important;
    flex: 1 1 300px !important;
    display: flex !important;
    align-items: center !important;
}
.c21-search__icon {
    position: absolute !important;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #999;
    pointer-events: none;
    display: inline-flex;
}
.c21-search__icon svg { width: 100%; height: 100%; }

.c21-search input[type=search] {
    width: 100% !important;
    padding: 13px 14px 13px 42px !important;
    border: 1px solid #e2e2e2 !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    background: #fff !important;
    font-family: inherit !important;
    height: auto !important;
    margin: 0 !important;
    color: #222 !important;
    transition: border-color .2s, box-shadow .2s !important;
}
.c21-search input[type=search]:hover { border-color: #cfcfcf !important; }
.c21-search input[type=search]:focus {
    outline: none !important;
    border-color: #BEAF87 !important;
    box-shadow: 0 0 0 3px rgba(190, 175, 135, .18) !important;
}

.c21-search__submit {
    background: #000 !important;
    color: #fff !important;
    padding: 0 28px !important;
    border: 0 !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    letter-spacing: .3px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
    height: 46px;
    flex: 0 0 auto;
}
.c21-search__submit:hover { background: #BEAF87 !important; }
.c21-search__submit:disabled { opacity: .85; cursor: wait; }

/* Spinner dentro del botón Buscar */
.c21-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: c21-spin .7s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes c21-spin { to { transform: rotate(360deg); } }

.c21-search__mobileToggle {
    display: none;
    background: #fff;
    color: #111;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    padding: 0 16px;
    height: 46px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    align-items: center;
    gap: 8px;
}
.c21-search__mobileToggle svg { width: 16px; height: 16px; }

/* ---------- Panel con filtros (se esconde en mobile) ---------- */
.c21-search__panel {
    margin-top: 12px;
    display: block;
}

/* ---------- Fila 2: filtros principales en grid ---------- */
.c21-search__filters {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
    gap: 10px !important;
    align-items: stretch;
}

.c21-filter {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    background: #fff !important;
    border: 1px solid #e2e2e2 !important;
    border-radius: 10px !important;
    padding: 0 10px 0 38px !important;
    height: 46px;
    transition: border-color .2s, box-shadow .2s;
    min-width: 0;
}
.c21-filter:hover,
.c21-filter:focus-within {
    border-color: #BEAF87 !important;
    box-shadow: 0 0 0 3px rgba(190, 175, 135, .12);
}
.c21-filter__icon {
    position: absolute !important;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #BEAF87;
    display: inline-flex;
    pointer-events: none;
}
.c21-filter__icon svg { width: 100%; height: 100%; }

.c21-filter select,
.c21-filter input[type=number] {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #222 !important;
    height: 44px !important;
    line-height: 44px !important;
    margin: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
}
.c21-filter input[type=number] { cursor: text; }

/* Chevron para los selects */
.c21-filter:not(.c21-filter--range)::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #999;
    border-bottom: 2px solid #999;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.c21-filter select {
    padding-right: 22px !important;
}

/* Range de precio: dos inputs en un solo pill */
.c21-filter--range {
    padding-right: 10px !important;
    gap: 6px;
}
.c21-filter--range input[type=number] {
    width: 100% !important;
    text-align: left;
    font-size: 13px !important;
}
.c21-filter__sep {
    color: #ccc;
    font-weight: 500;
    flex: 0 0 auto;
}

/* Botón "Más filtros" */
.c21-search__more {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    border: 1px dashed #d0d0d0;
    background: #fff;
    color: #555;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}
.c21-search__more svg { width: 16px; height: 16px; color: #BEAF87; }
.c21-search__more:hover {
    border-color: #BEAF87;
    border-style: solid;
    color: #BEAF87;
}
.c21-search__more.is-open {
    border-style: solid;
    border-color: #BEAF87;
    color: #BEAF87;
    background: rgba(190, 175, 135, .08);
}

/* ---------- Fila 3: filtros extra (colapsable) ---------- */
.c21-search__extra {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px dashed #eee;
}
.c21-search__extra.is-open { display: grid; }

/* ---------- Mobile: colapsar todo el panel ---------- */
@media (max-width: 700px) {
    .c21-search__submit { flex: 1 1 auto; padding: 0 20px !important; }
    .c21-search__mobileToggle { display: inline-flex; }
    .c21-search__panel { display: none; }
    .c21-search.is-mobile-open .c21-search__panel { display: block; }
    .c21-search__filters {
        grid-template-columns: 1fr 1fr !important;
    }
    .c21-filter--range { grid-column: 1 / -1; }
    .c21-search__more { grid-column: 1 / -1; }
    .c21-search__extra.is-open { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
    .c21-search__filters { grid-template-columns: 1fr !important; }
    .c21-search__extra.is-open { grid-template-columns: 1fr; }
}

/* ===========================================================
   Wrapper del listado — fondo gris claro tipo Ciencuadras
   =========================================================== */
.c21-listing {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    background: #F4F4F4;
    border-radius: 16px;
}
.c21-listing__header,
.c21-listing__meta {
    margin: 0 0 20px !important;
    padding: 0 4px;
    font-size: 14px;
    color: #444;
    font-weight: 600;
    letter-spacing: .3px;
    font-family: 'Inter', sans-serif;
}
.c21-listing__meta span {
    display: inline-block;
    padding: 6px 14px;
    background: #fff;
    border-radius: 999px;
    border: 1px solid #e5e5e5;
    font-size: 13px;
    color: #333;
}

/* ---------- Categorías (shortcode [c21_categorias]) ---------- */
.c21-cats {
    max-width: 1180px;
    margin: 32px auto;
    padding: 0 16px;
}
.c21-cats__head {
    text-align: center;
    margin-bottom: 28px;
}
.c21-cats__title {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #111;
    margin: 0 0 6px;
    letter-spacing: -0.2px;
}
.c21-cats__subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #666;
    margin: 0;
}
.c21-cats__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
@media (min-width: 560px) {
    .c21-cats__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
    .c21-cats__grid { grid-template-columns: repeat(6, 1fr); }
}
.c21-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px 10px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    text-decoration: none !important;
    color: #111 !important;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    min-height: 118px;
}
.c21-cat:hover {
    transform: translateY(-3px);
    border-color: #BEAF87;
    box-shadow: 0 8px 20px rgba(190, 175, 135, 0.18);
    background: #fff;
}
.c21-cat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(190, 175, 135, 0.12);
    color: #BEAF87;
    transition: background .2s ease, color .2s ease;
}
.c21-cat:hover .c21-cat__icon {
    background: #BEAF87;
    color: #fff;
}
.c21-cat__icon svg {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
}
.c21-cat__label {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    text-align: center;
    letter-spacing: .2px;
}
