:root {
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --br-5xs: 4px;
    --br-9xs: 2px;
    --br-28xl: 28px;
    --padding-5xs: 8px;
    --padding-base: 16px;
    --padding-3xs: 10px;
    --padding-9xs: 4px;
    --padding-11xs: 2px;
    --gap-5xs: 8px;
    --gap-9xs: 4px;
    --gap-base: 16px;
    --gap-5xl: 24px;
    --font-size-supermini: 10px;
    --title-normal: 20px;
    --texto-14: 14px;
    --title-small: 16px;
    --blanco: #ffffff;
    --gris-05: #111827;
    --gris-04: #e5e7eb;
    --gris-03: #d1d5db;
    --gris-02: #6b7280;
    --gris-01: #374151;
    --hover-color: #2563eb;
    --color-azulclaro: #dbeafe;
    --color-amarillo: #fef3c7;
    --denied-error: #ef4444;
    --www-altamirainmuebles-com-1440x810-default-lochmara: #0284c7;
    --www-altamirainmuebles-com-1440x810-default-tundora1: #404040;
}

.maplibregl-popup-content {
    padding: 0;
    border-radius: 8px;
    /* var(--br-5xs) matches logic, but strict pixel usually better for mapbox */
    overflow: hidden;
    width: 320px !important;
    /* Fixed width for consistency */
    max-width: 340px !important;
    font-family: 'Inter', sans-serif;
}

.minifichaLink {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-detail-div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    background: var(--blanco);
}

/* HEADER IMAGE SECTION */
.rectangle-group {
    width: 100%;
    position: relative;
    height: 200px;
}

.frame-item {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

/* MARCAS DE AGUA (Badges) */
.marcas-agua {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.marca-agua {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #333;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.marca-agua.tipo .deco-virtual1 {
    color: #333;
}

.marca-agua.obranueva {
    background-color: var(--color-azulclaro);
    color: #1e40af;
}

.marca-agua.credito {
    background-color: var(--color-amarillo);
    color: #92400e;
}

/* PHOTO CONTROLS (Simplification: just counter) */
.photo-counter {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    z-index: 2;
}

.heart-icon {
    position: absolute;
    bottom: -20px;
    /* Overlap effect */
    right: 16px;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    cursor: pointer;
}

.heart-icon img {
    width: 20px;
    height: 20px;
}

/* CONTENT SECTION */
.frame-parentinfo {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.valor-precio {
    font-size: 22px;
    font-weight: 700;
    color: var(--gris-05);
}

.piso-en-sant1 {
    font-size: 15px;
    font-weight: 500;
    color: var(--gris-02);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ref-group {
    display: flex;
    gap: 6px;
    font-size: 12px;
    color: var(--gris-03);
    align-items: center;
}

.ref-chip {
    background: var(--color-gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--gris-02);
    font-weight: 500;
}

/* FEATURES ROW */
.minif-frame-parent16 {
    display: flex;
    gap: 16px;
    margin-top: 4px;
    border-top: 1px solid var(--color-gray-200);
    padding-top: 12px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 40px;
}

.feature-icon {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.feature-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--gris-02);
}