
/**
 * KS Inmuebles - estilos públicos
 * Autor: Codilogic
 */

:root {
    --ks-public-black: #161616;
    --ks-public-gold: #b69a62;
    --ks-public-light: #f5f2eb;
    --ks-public-border: #e4dfd5;
    --ks-public-red: #9f2f28;
    --ks-public-green: #2d6a4f;
}

.ks-rebajado-label,
.ks-price-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    background: var(--ks-public-red);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1;
}

.ks-status {
    display: inline-flex;
    padding: 6px 10px;
    border: 1px solid var(--ks-public-border);
    background: #fff;
    color: var(--ks-public-black);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.ks-status-disponible {
    border-color: #bad7c8;
    background: #edf7f1;
    color: var(--ks-public-green);
}

.ks-status-vendido,
.ks-status-retirado {
    background: #f3f3f3;
    color: #666;
}

.ks-status-reservado {
    border-color: #ead8ad;
    background: #fff8e7;
    color: #82651e;
}

.ks-price-box {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    position: relative;
}

.ks-price-badge {
    flex-basis: 100%;
    width: fit-content;
}

.ks-price-item {
    min-width: 190px;
    padding: 16px 18px;
    border: 1px solid var(--ks-public-border);
    background: #fff;
}

.ks-price-label,
.ks-price-old,
.ks-price-current {
    display: block;
}

.ks-price-label {
    margin-bottom: 5px;
    color: #777;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ks-price-old {
    margin-bottom: 2px;
    color: #999;
    font-size: 15px;
    text-decoration: line-through;
}

.ks-price-current {
    color: var(--ks-public-black);
    font-size: 25px;
    font-weight: 700;
}

.ks-property-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    background: var(--ks-public-border);
    border: 1px solid var(--ks-public-border);
}

.ks-summary-item {
    min-width: 140px;
    flex: 1 1 140px;
    padding: 18px;
    background: #fff;
    text-align: center;
}

.ks-summary-value,
.ks-summary-label {
    display: block;
}

.ks-summary-value {
    color: var(--ks-public-black);
    font-size: 20px;
    font-weight: 700;
}

.ks-summary-label {
    margin-top: 3px;
    color: #777;
    font-size: 13px;
}

.ks-characteristics-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.ks-characteristics-list li {
    padding: 11px 13px;
    border: 1px solid var(--ks-public-border);
    background: #fff;
}

.ks-characteristics-list li::before {
    content: "✓";
    margin-right: 8px;
    color: var(--ks-public-gold);
    font-weight: 700;
}

.ks-public-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.ks-public-gallery-item {
    display: block;
    overflow: hidden;
    background: #eee;
    aspect-ratio: 4 / 3;
}

.ks-public-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.ks-public-gallery-item:hover img {
    transform: scale(1.025);
}

.ks-whatsapp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    background: #25d366;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    border-radius: 3px;
    transition: transform .2s ease, opacity .2s ease;
}

.ks-whatsapp-button:hover {
    transform: translateY(-1px);
    opacity: .92;
}

@media (max-width: 767px) {
    .ks-characteristics-list,
    .ks-public-gallery {
        grid-template-columns: 1fr 1fr;
    }

    .ks-price-box {
        display: block;
    }

    .ks-price-item {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .ks-characteristics-list,
    .ks-public-gallery {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   PROPIEDADES DESTACADAS - HOME
   ========================================================= */

.ks-featured-properties {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.ks-featured-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e3ded4;
    background: #fff;
    transition: transform .25s ease, box-shadow .25s ease;
}

.ks-featured-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0,0,0,.08);
}

.ks-featured-image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #e8e5df;
}

.ks-featured-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .35s ease;
}

.ks-featured-card:hover .ks-featured-image img {
    transform: scale(1.025);
}

.ks-featured-no-image {
    height: 100%;
    display: grid;
    place-items: center;
    color: #888;
}

.ks-featured-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ks-featured-operation,
.ks-featured-status,
.ks-featured-discount {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 9px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ks-featured-operation {
    background: #b99a55;
    color: #111;
}

.ks-featured-status {
    background: rgba(18,18,18,.86);
    color: #fff;
}

.ks-featured-status-disponible {
    background: #2f7455;
}

.ks-featured-status-reservado {
    background: #947126;
}

/* VENDIDO: sello grande diagonal */
.ks-featured-status-vendido {
    position: absolute;
    z-index: 20;

    top: clamp(75px, 8vw, 115px);
    left: 50%;

    width: 125%;
    min-height: 0;

    padding: 13px 0;

    transform: translateX(-50%) rotate(-26deg);

    background: rgba(255,255,255,.14);

    border-top: 7px solid #ef1b1b;
    border-bottom: 7px solid #ef1b1b;

    color: #ef1b1b;

    justify-content: center;

    font-size: clamp(34px, 4vw, 56px);
    font-weight: 900;
    line-height: 1;

    letter-spacing: .08em;
    text-align: center;

    text-shadow:
        -1px -1px 0 rgba(255,255,255,.8),
         1px  1px 0 rgba(255,255,255,.8);

    pointer-events: none;
}

/* Retirado sí sigue siendo una etiqueta normal */
.ks-featured-status-retirado {
    background: #666;
}

/* =========================================================
   SELLO GRANDE DE INMUEBLE VENDIDO
   ========================================================= */
.ks-sold-overlay {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
}

.ks-sold-overlay span {
    display: block;
    width: 145%;
    flex: 0 0 145%;
    padding: 12px 0 10px;
    transform: rotate(-27deg);
    border-top: 7px solid #ef1b1b;
    border-bottom: 7px solid #ef1b1b;
    background: rgba(255,255,255,.16);
    color: #ef1b1b;
    text-align: center;
    font-size: clamp(38px, 4.6vw, 62px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: .08em;
    text-shadow:
        -1px -1px 0 rgba(255,255,255,.55),
         1px  1px 0 rgba(255,255,255,.55);
}

@media (max-width: 767px) {
    .ks-sold-overlay span {
        width: 155%;
        flex-basis: 155%;
        padding: 10px 0 8px;
        border-top-width: 6px;
        border-bottom-width: 6px;
        font-size: 38px;
    }
}

.ks-featured-discount {
    margin-left: auto;
    background: #a4362f;
    color: #fff;
}

.ks-featured-body {
    padding: 20px;
}

.ks-featured-location {
    min-height: 20px;
    margin-bottom: 7px;
    color: #9d8145;
    font-size: 12px;
    font-weight: 700;
}

.ks-featured-title {
    min-height: 58px;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 23px;
    font-weight: 500;
    line-height: 1.16;
}

.ks-featured-title a {
    color: #191919;
    text-decoration: none !important;
}

.ks-featured-title a:hover {
    color: #9d8145;
}

.ks-featured-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 17px 0;
    color: #777;
    font-size: 13px;
}

.ks-featured-specs strong {
    color: #2a2a2a;
}

.ks-featured-prices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-height: 75px;
    padding-top: 15px;
    border-top: 1px solid #eeeae2;
}

.ks-featured-price {
    min-width: 0;
}

.ks-featured-price-wide {
    grid-column: 1 / -1;
}

.ks-featured-price-label,
.ks-featured-price-old {
    display: block;
}

.ks-featured-price-label {
    margin-bottom: 2px;
    color: #898989;
    font-size: 11px;
    text-transform: uppercase;
}

.ks-featured-price-old {
    color: #999;
    font-size: 12px;
    text-decoration: line-through;
}

.ks-featured-price strong {
    display: block;
    margin-top: 2px;
    color: #9d8145;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
}

.ks-featured-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #eeeae2;
}

.ks-featured-ref {
    color: #949494;
    font-size: 11px;
    font-weight: 700;
}

.ks-featured-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    background: #191919;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 800;
}

.ks-featured-button:hover {
    background: #b99a55;
    color: #111 !important;
}

.ks-featured-empty {
    padding: 25px;
    border: 1px solid #e3ded4;
    background: #fff;
    color: #777;
    text-align: center;
}

@media (max-width: 1024px) {
    .ks-featured-properties {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .ks-featured-properties {
        grid-template-columns: 1fr;
    }

    .ks-featured-title {
        min-height: 0;
    }
}


/* =========================================================
   KS Inmuebles v1.4.3 - Home / acciones comerciales
   Autor: Codilogic
   ========================================================= */

.ks-featured-footer {
    display: block;
}

.ks-featured-ref {
    display: block;
    margin-bottom: 11px;
}

.ks-featured-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ks-featured-actions .ks-featured-button,
.ks-featured-whatsapp,
.ks-featured-whatsapp:visited {
    width: 100%;
    min-height: 40px;
    padding: 9px 10px;
    text-align: center;
}

.ks-featured-whatsapp,
.ks-featured-whatsapp:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #25d366;
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
    transition: transform .2s ease, background .2s ease;
}

.ks-featured-whatsapp:hover {
    transform: translateY(-1px);
    background: #1fb95a;
    color: #ffffff !important;
}

@media (max-width: 420px) {
    .ks-featured-actions {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   v1.4.4 - Landings SEO de población y provincia
   ========================================================== */
.ks-location-archive {
    background: #f6f3ec;
    color: #171717;
}

.ks-location-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.ks-location-hero {
    padding: 72px 0 54px;
    background: #f6f3ec;
    border-bottom: 1px solid rgba(23, 23, 23, 0.09);
}

.ks-location-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 30px;
    font-size: 13px;
    color: #6d6a63;
}

.ks-location-breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.ks-location-breadcrumbs a:hover {
    color: #9d7b2d;
}

.ks-location-eyebrow {
    display: block;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: #a88636;
}

.ks-location-hero h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    font-weight: 500;
    letter-spacing: -0.035em;
}

.ks-location-intro {
    max-width: 820px;
    margin-top: 24px;
    font-size: 17px;
    line-height: 1.7;
    color: #555149;
}

.ks-location-intro p:last-child {
    margin-bottom: 0;
}

.ks-location-results {
    padding: 54px 0 76px;
}

.ks-location-count {
    margin-bottom: 24px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #777168;
}

.ks-location-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.ks-location-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(23, 23, 23, 0.08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.045);
}

.ks-location-card-image {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e9e4d9;
}

.ks-location-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.ks-location-card:hover .ks-location-card-image img {
    transform: scale(1.035);
}

.ks-location-no-image {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #777168;
}

.ks-location-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.ks-location-badges span {
    padding: 7px 9px;
    background: rgba(19, 19, 19, 0.92);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.ks-location-card-body {
    padding: 22px;
}

.ks-location-card-location {
    margin-bottom: 9px;
    color: #9d7b2d;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ks-location-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
    line-height: 1.25;
}

.ks-location-card h2 a {
    color: #171717;
    text-decoration: none;
}

.ks-location-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
    margin-bottom: 18px;
    color: #666159;
    font-size: 13px;
}

.ks-location-card-price {
    min-height: 30px;
    margin-bottom: 18px;
    font-size: 22px;
}

.ks-location-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(23, 23, 23, 0.08);
    font-size: 11px;
    color: #777168;
}

.ks-location-card-footer a,
.ks-location-empty a,
.ks-location-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 17px;
    border: 1px solid #a88636;
    background: #a88636;
    color: #171717;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.ks-location-pagination {
    margin-top: 45px;
}

.ks-location-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ks-location-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(23, 23, 23, 0.13);
    background: #fff;
    color: #171717;
    text-decoration: none;
}

.ks-location-pagination .current {
    border-color: #171717;
    background: #171717;
    color: #fff;
}

.ks-location-empty {
    padding: 48px;
    background: #fff;
    border: 1px solid rgba(23, 23, 23, 0.08);
}

.ks-location-empty h2 {
    margin-top: 0;
}

.ks-location-cta {
    padding: 64px 0;
    background: #171717;
    color: #fff;
}

.ks-location-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
}

.ks-location-cta span {
    display: block;
    margin-bottom: 10px;
    color: #c5a04a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.ks-location-cta h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(28px, 4vw, 42px);
}

.ks-location-cta p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 900px) {
    .ks-location-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ks-location-cta-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .ks-location-container {
        width: min(100% - 28px, 1180px);
    }

    .ks-location-hero {
        padding: 48px 0 38px;
    }

    .ks-location-results {
        padding: 38px 0 56px;
    }

    .ks-location-grid {
        grid-template-columns: 1fr;
    }

    .ks-location-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .ks-location-empty {
        padding: 30px 22px;
    }
}


/* =========================================================
   TARJETA - ESTADO VENDIDO
   Sello grande diagonal sobre la fotografía
   ========================================================= */

.ks-card-status-vendido {
    position: absolute !important;

    top: 70px;
    left: 50%;

    width: 135%;
    min-height: 72px;

    display: flex !important;
    align-items: center;
    justify-content: center;

    padding: 10px 20px !important;

    background: rgba(255, 255, 255, .12) !important;

    border: 8px solid #f01818;

    color: #f01818 !important;

    font-size: clamp(30px, 3.2vw, 52px) !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: .06em !important;

    text-align: center;

    transform: translateX(-50%) rotate(-27deg);

    z-index: 20;

    pointer-events: none;

    box-shadow: 0 0 0 2px rgba(240, 24, 24, .08);
}

/* RETIRADO continúa siendo una etiqueta normal */
.ks-card-status-retirado {
    background: #666;
}
