/* SMART CARD STYLES (Ported from Democard) */
.smart-grid {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 0.875rem;
    padding: 2.5rem 0.875rem 0.5rem 1.5rem;
    align-items: stretch;
    position: relative;
    flex: 1;
    overflow: hidden;
    width: 100%;
}

.smart-text-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
}

.smart-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 0.375rem;
    margin-top: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    hyphens: auto;
    word-break: break-word;
}

.smart-title:has(.ad-title-suffix) {
    padding-left: 6px; /* Evita que el borde negativo se corte por overflow: hidden */
}

.smart-meta-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

/* Favorites Banner Styles */
.fav-banner {
    grid-column: 1 / -1;
    /* SPAN FULL WIDTH IN GRID */
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    padding: 1px 0.375rem;
    border-radius: 4px;
}

.smart-price-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    padding: 1px 0.375rem;
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

[data-theme="dark"] .smart-price-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.smart-location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    color: #111827;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;
    mask-image: none;
    -webkit-mask-image: none;
}

.smart-location.text-fade {
    mask-image: linear-gradient(to right, black calc(100% - 20px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 20px), transparent 100%);
}

[data-theme="dark"] .smart-location {
    color: #f3f4f6;
}

.smart-desc {
    font-size: 0.84375rem;
    color: var(--text-secondary);
    line-height: 1.625;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* Fallback base */
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6rem;
    /* Ajustado para mayor fluidez */
}

.smart-img {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.smart-img[src*=".svg"] {
    object-fit: contain !important;
    padding: 0.625rem;
    background: #f1f5f9;
}
[data-theme="dark"] .smart-img[src*=".svg"] {
    background: #1e293b;
}

.smart-img-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    flex-shrink: 0;
}

.card {
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: visible;
    width: 100%;
    padding: 0 !important;
    height: 240px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

/* El efecto hover ahora es exclusivo de cards premium */

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    min-height: 200px;
    align-content: start;
    width: 100%;
    max-width: 100%;
    padding: 0 4px;
}

@media (min-width: 2200px) {
    .grid {
        grid-template-columns: repeat(5, 1fr);
        padding: 0;
    }
}

@media (max-width: 2199px) and (min-width: 1650px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
        padding: 0;
    }
}

@media (max-width: 1649px) and (min-width: 1200px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 0;
    }
}

@media (max-width: 1199px) and (min-width: 750px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0;
    }
}

/* --- FAVORITES GUEST BANNER --- */
.fav-banner-guest-pro {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #fff1f2 100%);
    border: 1px solid rgba(236, 72, 153, 0.1);
    border-radius: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    animation: fadeIn 0.5s ease-out;
}

.fav-pro-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: white;
    color: #ec4899;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.1);
    border: 1px solid rgba(236, 72, 153, 0.05);
}

.fav-pro-icon svg {
    width: 24px;
    height: 24px;
}

.fav-pro-content {
    flex-grow: 1;
}

.fav-pro-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.fav-pro-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    line-height: 1.4;
}

.fav-pro-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.fav-pro-cta {
    padding: 0.6rem 1.15rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fav-pro-cta.mode-login {
    background: var(--text-primary);
    color: white;
    border: none;
}

.fav-pro-cta.mode-login:hover {
    background: #000;
    transform: translateY(-1px);
}

.fav-pro-cta.mode-register {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.fav-pro-cta.mode-register:hover {
    background: var(--bg-secondary);
    border-color: var(--text-primary);
}

@media (max-width: 850px) {
    .fav-banner-guest-pro {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }

    .fav-pro-actions {
        width: 100%;
        flex-direction: column;
    }

    .fav-pro-cta {
        width: 100%;
    }
}

.card-wrapper {
    width: 100%;
    height: 255px;
    position: relative;
    display: block;
    z-index: 0;
    opacity: 0;
    /* Oculto inicialmente */
    transition: opacity 0.4s ease;
}

.card-wrapper.loaded {
    opacity: 1;
    /* Aparece suavemente */
}

.badge-category {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.375rem 1rem;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: var(--shadow-sm);
    z-index: 10;
    color: white;
    background: var(--ribbon-bg, #3b82f6);
}

.badge-time {
    position: absolute;
    top: 0.75rem;
    left: 1.5rem;
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    font-weight: 500;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-id {
    position: absolute;
    top: 0.75rem;
    right: 0.875rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-tertiary);
    z-index: 10;
    opacity: 0.7;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    z-index: 20;
    pointer-events: none;
    margin-top: 0.6rem;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

/* El Punto de Luz (Equilibrado) */
.badge-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: block;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
    transition: all 0.3s ease;
}

/* Estados Elegantes */
.badge-status.active {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.25);
}

.card.premium .badge-status.active {
    background: rgba(255, 255, 255, 0.1);
    color: #4ade80;
    border-color: rgba(255, 255, 255, 0.2);
}

.badge-status.pending {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.25);
}

.card.premium .badge-status.pending {
    background: rgba(255, 255, 255, 0.1);
    color: #60a5fa;
    border-color: rgba(255, 255, 255, 0.2);
}

.badge-status.paused {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.25);
}

.card.premium .badge-status.paused {
    background: rgba(255, 255, 255, 0.1);
    color: #fbbf24;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Animación de pulso moderada */
.badge-status.active::before {
    animation: status-pulse-soft 2.5s infinite ease-in-out;
}

@keyframes status-pulse-soft {
    0% {
        transform: scale(1);
        box-shadow: 0 0 5px currentColor;
        opacity: 0.9;
    }

    50% {
        transform: scale(1.15);
        box-shadow: 0 0 10px currentColor;
        opacity: 1;
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 5px currentColor;
        opacity: 0.9;
    }
}

@media (max-width: 768px) {
    .smart-grid {
        padding-left: 0.875rem !important;
    }

    .badge-time {
        left: 0.875rem !important;
    }
}

.card.premium {
    /* Fondo: Cyber-Glass Deep (Mesh dinámico) */
    background: color-mix(in srgb, var(--ribbon-bg), black 25%);
    background-image:
        radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--ribbon-bg), white 12%) 0%, transparent 45%),
        radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--ribbon-bg), black 35%) 0%, transparent 45%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);

    /* Rim Light Arquitectónico: Borde fino pero brillante */
    border: 1.5px solid color-mix(in srgb, var(--ribbon-bg), white 30%);

    /* Volumen Interno (Safe for Grids): Sombras hacia adentro que no tapan a otros */
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.25),
        /* Brillo superior */
        inset 0 -1.5px 3px rgba(0, 0, 0, 0.4),
        /* Sombra de base interna */
        0 4px 10px -2px rgba(0, 0, 0, 0.3);
    /* Sombra base mínima externa */

    color: white;
    overflow: visible;
    z-index: 1;
    transition: box-shadow 0.3s ease;
}

.card.premium:hover {
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.25),
        inset 0 -1.5px 3px rgba(0, 0, 0, 0.4),
        0 12px 30px -10px rgba(0, 0, 0, 0.5);
}



.card.premium .smart-title {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.card.premium .smart-desc {
    color: rgba(255, 255, 255, 0.75);
}

.card.premium .badge-time,
.card.premium .smart-location,
.card.premium .smart-location i,
.card.premium .smart-location span {
    color: #ffffff !important;
    opacity: 1;
}

.card.premium .badge-id {
    color: #ffffff !important;
    opacity: 0.6;
}

.card.premium .badge-category {
    background: var(--ribbon-bg);
    color: white;
    border: 1px solid white;
    box-shadow: none;
    top: -2px;
}

.card.premium .badge-category i {
    fill: #fbbf24 !important;
}

.card.premium::after {
    content: "👑";
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    font-size: 1.25rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.card.premium .smart-price-badge {
    background: white;
    color: #15803d;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.card.premium .smart-price-badge i {
    color: #15803d !important;
}

.card.premium .lucide-badge-check,
.card.premium i[data-lucide="badge-check"] {
    color: #ffffff !important;
    stroke: #ffffff !important;
}

.card.premium .smart-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    border-bottom-left-radius: 11px;
    border-bottom-right-radius: 11px;
}

.card.premium .smart-btn {
    color: #ffffff;
    border-right: none;
    transition: opacity 0.2s ease;
    opacity: 0.95;
}

.card.premium .smart-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.card.premium .smart-btn i {
    stroke: currentColor;
}

.smart-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    height: 54px;
    display: grid;
    grid-template-columns: 1fr 54px 1fr;
}

.smart-footer.dashboard-mode {
    grid-template-columns: repeat(4, 1fr);
}

.smart-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    height: 100%;
}

.smart-btn:hover {
    color: var(--text-primary);
}

.smart-btn.btn-fav:hover {
    color: #ef4444;
}

.smart-btn.btn-fav.active {
    color: #ef4444 !important;
}

.smart-btn.btn-fav.active svg {
    fill: currentColor !important;
    transform: scale(1.1);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.smart-btn svg,
.smart-btn i {
    width: 19px !important;
    height: 19px !important;
}

.card.premium .btn-favorite {
    color: #ffffff !important;
}

.card.premium .btn-favorite:not(.active):hover {
    color: #ffffff !important;
}

.card.premium .btn-favorite:not(.active):hover svg {
    stroke: #ffffff !important;
    fill: none !important;
}

.card.premium .btn-favorite.active,
.card.premium .btn-favorite.active:hover {
    color: #ffffff !important;
}

.card.premium .btn-favorite.active svg,
.card.premium .btn-favorite.active:hover svg {
    stroke: #ffffff !important;
    fill: #ffffff !important;
    color: #ffffff !important;
}

.card-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
    backdrop-filter: blur(10px);
    padding: var(--navbar-height) 1rem 80px 1rem;
}

.card-detail-overlay.active {
    opacity: 1;
    visibility: visible;
}

.card-detail-modal {
    background: var(--bg);
    border-radius: 20px;
    width: 100%;
    max-width: 1100px;
    max-height: 100%;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, .3);
    transform: scale(.95) translateY(20px);
    transition: transform .35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1.5px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 400px;
    /* Asegura un alto mínimo para que el loader se vea centrado */
}

.card-detail-overlay.active .card-detail-modal {
    transform: scale(1) translateY(0);
}

[data-theme="dark"] .card-detail-modal {
    box-shadow: 0 25px 70px rgba(0, 0, 0, .6);
}

.card-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1.5px solid var(--border);
    background: linear-gradient(to bottom, var(--bg) 0%, var(--bg-secondary) 100%);
    flex-shrink: 0;
}

.card-detail-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    min-width: 0;
}

.card-detail-title .badge-category-modal {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: white;
    flex-shrink: 0;
}

.card-detail-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-detail-favorite,
.card-detail-report {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease;
    flex-shrink: 0;
}

.card-detail-favorite:hover {
    color: #ef4444;
    transform: scale(1.1);
}

.card-detail-report:hover {
    color: #f97316;
    transform: scale(1.1);
    background: var(--bg-secondary);
}

.card-detail-favorite.active {
    color: #ef4444;
}

.card-detail-favorite svg,
.card-detail-report svg {
    width: 22px;
    height: 22px;
}

.card-detail-close {
    background: var(--bg-tertiary);
    border: 1.5px solid var(--border);
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all .25s ease;
    flex-shrink: 0;
    font-weight: 300;
    line-height: 1;
}

.card-detail-close:hover {
    background: var(--border-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.card-detail-body {
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    flex: 1;
    min-height: 0;
}

.card-detail-body::-webkit-scrollbar {
    width: 6px;
}

.card-detail-body::-webkit-scrollbar-track {
    background: transparent;
}

.card-detail-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.card-detail-body::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

.detail-gallery {
    position: relative;
    width: 100%;
    border-bottom: 1.5px solid var(--border);
}

.detail-gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.detail-gallery-main img {
    width: 100%;
    height: 100%;
    display: none;
    position: absolute;
    top: 0;
    left: 0;
}

/* Capa de fondo: Blur vibrante oculto a peticion del usuario */
.detail-gallery-main img.bg-blur {
    display: none !important;
}

/* Capa principal: Imagen contenida y nítida con transición suave */
.detail-gallery-main img.main-img {
    object-fit: cover;
    z-index: 2;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-gallery-main img.main-img[src*=".svg"] {
    object-fit: contain !important;
    padding: 2rem;
    background: #f1f5f9;
}
[data-theme="dark"] .detail-gallery-main img.main-img[src*=".svg"] {
    background: #1e293b;
}

.detail-gallery-main img.main-img.img-loaded {
    opacity: 1;
}

.detail-gallery-main img.active {
    display: block;
}

.gallery-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 20;
}

.detail-gallery-main {
    cursor: zoom-in;
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
}

[data-theme="dark"] .detail-gallery-main {
    background: #1e293b;
}

.detail-gallery-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    animation: shimmer-effect 1.6s infinite;
    z-index: 1;
}

[data-theme="dark"] .detail-gallery-main::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
}

@keyframes shimmer-effect {
    100% {
        transform: translateX(100%);
    }
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: 2rem;
}

.lightbox-nav.next {
    right: 2rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.4rem 1rem;
    border-radius: 20px;
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    cursor: pointer;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    color: #ef4444;
}

.detail-price {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #059669;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1.5px solid rgba(5, 150, 105, 0.2);
}

[data-theme="dark"] .detail-price {
    background: rgba(17, 24, 39, 0.95);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

.detail-price svg {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    flex-shrink: 0 !important;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, .6);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .25s ease;
    backdrop-filter: blur(8px);
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, .8);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 1rem;
}

.gallery-nav.next {
    right: 1rem;
}

.gallery-nav svg {
    width: 20px;
    height: 20px;
}

.gallery-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, .5);
    border-radius: 20px;
    backdrop-filter: blur(8px);
}

.gallery-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .5);
    cursor: pointer;
    transition: all .25s ease;
}

.gallery-indicator.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg);
}

.gallery-thumbnail {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .25s ease;
}

.gallery-thumbnail:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.gallery-thumbnail.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, .2);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-content {
    padding: 1.25rem 1.5rem 1.75rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-section-title svg {
    width: 16px;
    height: 16px;
}

.detail-ad-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.detail-meta-grid {
    position: relative;
    margin-bottom: 1rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.detail-meta-grid table {
    width: 70%;
    border-collapse: collapse;
}

.detail-meta-grid td {
    padding: 0.15rem 0;
    vertical-align: middle;
    font-size: 0.8125rem;
}

.detail-meta-grid td:nth-child(1) {
    padding-right: 0.5rem;
    width: 1px;
}

.detail-meta-grid td:nth-child(2) {
    color: var(--text-tertiary);
    white-space: nowrap;
    width: 1px;
}

.detail-meta-grid td:nth-child(3) {
    padding-left: 0.5rem;
    padding-right: 0.75rem;
    color: var(--text-tertiary);
    width: 1px;
}

.detail-meta-grid td:nth-child(4) {
    font-weight: 600;
    color: var(--text-primary);
}

.detail-meta-grid svg {
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.detail-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.technical-specs {
    margin-top: 0.5rem;
}

.technical-specs table {
    width: 75%;
    border-collapse: collapse;
}

.technical-specs td {
    padding: 0.2rem 0;
    vertical-align: middle;
    font-size: 0.75rem;
}

.technical-specs td:nth-child(1) {
    padding-right: 0.5rem;
    width: 1px;
}

.technical-specs td:nth-child(2) {
    color: var(--text-tertiary);
    white-space: nowrap;
    width: 1px;
}

.technical-specs td:nth-child(3) {
    padding-left: 0.5rem;
    padding-right: 0.75rem;
    color: var(--text-tertiary);
    width: 1px;
}

.technical-specs td:nth-child(4) {
    font-weight: 500;
    color: var(--text-primary);
}

.technical-specs svg {
    width: 14px;
    height: 14px;
    color: var(--text-tertiary);
}

.btn-report:hover {
    color: #ef4444;
    opacity: 1;
}

.btn-report svg {
    width: 14px;
    height: 14px;
}

.card-detail-modal-content.premium .card-detail-header {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-bottom-color: rgba(251, 191, 36, 0.3);
}

.card-detail-modal-content.premium .badge-category-modal {
    background: rgba(255, 255, 255, 0.25) !important;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-detail-modal-content.premium .card-detail-close,
.card-detail-modal-content.premium .card-detail-favorite {
    color: white;
}

.card-detail-modal-content.premium .card-detail-close:hover,
.card-detail-modal-content.premium .card-detail-favorite:hover {
    color: rgba(255, 255, 255, 0.8);
}

.card-detail-modal-content.premium .card-detail-favorite.active {
    color: #ef4444;
}

@media (max-width: 1023px) {
    .card-detail-modal {
        position: relative;
        height: 88vh;
        max-height: 88vh;
        border-radius: 12px;
        overflow: hidden;
        display: grid;
        grid-template-rows: 50px minmax(0, 1fr) 70px;
        grid-template-columns: 100%;
        background: var(--bg);
    }

    .card-detail-header {
        grid-row: 1;
        position: relative;
        z-index: 100;
        background: color-mix(in srgb, var(--bg) 95%, transparent);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-bottom: 1px solid var(--border);
        padding: 0 0 0 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 50px;
        pointer-events: auto;
    }

    .card-detail-header::before {
        display: none !important;
    }

    [data-theme="dark"] .card-detail-header::before {
        background: linear-gradient(to bottom,
                var(--bg) 0%,
                rgba(15, 23, 42, 0.1) 60%,
                transparent 100%);
    }

    .card-detail-header * {
        pointer-events: auto;
    }

    .card-detail-header-actions {
        display: flex;
        align-items: center;
        height: 100%;
        gap: 0;
    }

    .card-detail-favorite,
    .card-detail-report {
        background: transparent !important;
        box-shadow: none !important;
        color: var(--text-primary);
        width: 48px;
        height: 100%;
        border-radius: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .card-detail-favorite:hover,
    .card-detail-report:hover,
    .card-detail-close:hover {
        background: rgba(0, 0, 0, 0.06) !important;
    }

    [data-theme="dark"] .card-detail-favorite:hover,
    [data-theme="dark"] .card-detail-report:hover,
    [data-theme="dark"] .card-detail-close:hover {
        background: rgba(255, 255, 255, 0.08) !important;
    }

    .card-detail-close {
        all: unset;
        box-sizing: border-box;
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 56px !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        background: rgba(0, 0, 0, 0.05) !important;
        border-left: 1px solid var(--border) !important;
        color: var(--text-primary) !important;
        cursor: pointer;
        z-index: 10;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 0.9;
    }

    .card-detail-close:active {
        background: rgba(0, 0, 0, 0.1) !important;
    }

    [data-theme="dark"] .card-detail-close:active {
        background: rgba(255, 255, 255, 0.15) !important;
    }

    .card-detail-close svg {
        width: 22px !important;
        height: 22px !important;
        stroke-width: 1.8;
    }

    [data-theme="dark"] .card-detail-close {
        background: rgba(255, 255, 255, 0.1) !important;
        color: white !important;
        border-left-color: rgba(255, 255, 255, 0.1) !important;
    }

    .card-detail-favorite svg,
    .card-detail-report svg {
        width: 18px !important;
        height: 18px !important;
    }

    .badge-category-modal {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
        border: none;
        padding: 0.35rem 0.75rem !important;
        font-size: 0.65rem !important;
        border-radius: 6px !important;
    }

    .card-detail-body {
        grid-row: 2;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0;
        display: block;
        background: var(--bg);
        z-index: 10;
        position: relative;
    }

    .detail-gallery {
        width: 100%;
        border: none;
    }

    .detail-gallery-main {
        aspect-ratio: 4/3;
        width: 100%;
        border-radius: 0;
    }

    .detail-gallery-main:has(img[src*=".svg"]) {
        aspect-ratio: auto !important;
        height: 180px !important;
    }

    .detail-gallery-main img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .detail-content {
        padding: 1.25rem 1rem 2rem !important;
    }

    .detail-section {
        margin-bottom: 0 !important;
    }

    .detail-ad-title {
        font-size: 1.25rem;
        font-weight: 700;
        margin-bottom: 1rem !important;
        line-height: 1.15;
        letter-spacing: -0.01em;
    }

    .detail-meta-grid {
        padding: 0.4rem 0.6rem;
        gap: 0;
        margin-top: 0 !important;
        margin-bottom: 1rem !important;
        border-radius: 8px;
        display: block;
    }

    .detail-meta-grid table {
        margin: 0;
        padding: 0;
    }

    .detail-meta-item {
        padding: 0;
        min-height: 0;
    }

    .detail-description {
        font-size: 0.925rem;
        line-height: 1.45;
        color: var(--text-secondary);
    }

    .gallery-thumbnails,
    .detail-price,
    .detail-section-title {
        display: none !important;
    }

    .detail-actions {
        grid-row: 3;
        height: 70px;
        width: 100%;
        padding: 0;
        margin: 0;
        background: white;
        border-top: 1px solid var(--border);
        z-index: 100;
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }

    .detail-action-btn {
        all: unset;
        box-sizing: border-box;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 0.6rem;
        font-family: inherit;
        font-size: 1rem;
        font-weight: 700;
        cursor: pointer;
    }

    .detail-action-btn.primary {
        background: #10b981;
        color: white;
        border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
    }

    .detail-action-btn.secondary {
        background: #3b82f6;
        color: white;
    }
}

@media (min-width: 1024px) {
    .detail-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        padding: 1.5rem 1.75rem;
        border-top: 1.5px solid var(--border);
        background: var(--bg-secondary);
        flex-shrink: 0;
    }

    .detail-action-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 1rem 1.5rem;
        border-radius: 12px;
        font-weight: 700;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all .25s ease;
        border: none;
        font-family: inherit;
    }

    .detail-action-btn svg {
        width: 20px;
        height: 20px;
    }

    .detail-action-btn.primary {
        background: #10b981;
        color: white;
        border: none;
    }

    .detail-action-btn.primary:hover {
        background: #0d9488;
    }

    .detail-action-btn.secondary {
        background: #3b82f6;
        color: white;
        border: none;
    }

    .detail-action-btn.secondary:hover {
        background: #2563eb;
    }

    .card-detail-modal {
        min-height: 600px;
    }

    .card-detail-body {
        display: flex;
        flex-direction: row-reverse;
        padding: 0;
        overflow: hidden;
    }

    .detail-content {
        flex: 1;
        overflow-y: auto;
        max-height: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .detail-content .detail-section {
        margin-bottom: 1rem;
    }

    .detail-description p {
        margin-top: 0;
        margin-bottom: 0.5rem;
    }

    .detail-description p:last-child {
        margin-bottom: 0;
    }

    .detail-gallery {
        flex: 0 0 58%;
        border-bottom: none;
        border-left: 1.5px solid var(--border);
        display: flex;
        flex-direction: column;
        max-height: 100%;
    }

    .detail-gallery-main {
        flex: 1;
        aspect-ratio: unset;
    }

    .gallery-thumbnails {
        flex-shrink: 0;
        padding: 0.75rem;
        gap: 0.4rem;
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
}

@media (max-width: 1023px) and (min-width: 769px) {
    .card-detail-modal {
        max-width: 750px;
    }

    .detail-content {
        padding: 1rem;
    }

    .detail-ad-title {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }

    .detail-price {
        font-size: 1.2rem;
        padding: 0.5rem 1rem;
    }

    .detail-meta-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .gallery-thumbnails {
        padding: 0.5rem;
        gap: 0.25rem;
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
}

@media (max-width: 768px) {
    .card-detail-overlay {
        padding: calc(var(--navbar-height) + 0.5rem) 0.5rem 90px 0.5rem;
    }
}

@media (max-width: 500px) {
    .card-detail-overlay {
        padding: calc(var(--navbar-height) + 0.25rem) 0.25rem 85px 0.25rem;
    }
}

/* Estilos de Carga del Modal - Pego Premium */
.modal-loading-container {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    background: var(--bg);
    /* Asegura que tape el contenido anterior */
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

.card-detail-body.loaded .modal-loading-container {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Loader estilo Pegó (4 círculos) */
.pego-loader {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.pego-loader span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    animation: pego-bounce 0.6s infinite alternate;
}

.pego-loader span:nth-child(2) {
    animation-delay: 0.15s;
    background: #8b5cf6;
}

.pego-loader span:nth-child(3) {
    animation-delay: 0.3s;
    background: #ec4899;
}

.pego-loader span:nth-child(4) {
    animation-delay: 0.45s;
    background: #f97316;
}

@keyframes pego-bounce {
    from {
        transform: translateY(0);
        opacity: 1;
        scale: 1;
    }

    to {
        transform: translateY(-12px);
        opacity: 0.7;
        scale: 1.2;
    }
}

.modal-loader-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    animation: modal-fade-pulse 1.5s ease-in-out infinite;
}

/* Transición de Contenido */
.detail-gallery,
.detail-content {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.card-detail-body.loaded .detail-gallery,
.card-detail-body.loaded .detail-content {
    opacity: 1;
    transform: translateY(0);
}

@keyframes modal-fade-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes modal-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes modal-pulse {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.98);
    }
}

/* Premium Guest Banner (Professional & Persuasive) */
.fav-banner-guest-pro {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    /* More compact padding */
    background: linear-gradient(to right, #ffffff, #f8fafc);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    /* Slightly tighter radius */
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.03);
    margin-bottom: 1rem;
    margin-top: -1.25rem;
    /* Pull up to negate grid padding */
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .fav-banner-guest-pro {
    background: linear-gradient(to right, #1e293b, #0f172a);
    border-color: #334155;
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.2);
}

.fav-pro-icon {
    width: 40px;
    /* Smaller icon container */
    height: 40px;
    border-radius: 8px;
    background: #eff6ff;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

[data-theme="dark"] .fav-pro-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.fav-pro-icon svg {
    width: 20px;
    /* Smaller icon */
    height: 20px;
    stroke-width: 2;
}

.fav-pro-content {
    flex: 1;
}

.fav-pro-content h4 {
    margin: 0 0 0.1rem 0;
    font-size: 0.9rem;
    /* Slightly smaller text */
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.fav-pro-content p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.fav-pro-content strong {
    color: var(--primary);
    font-weight: 600;
}

/* Actions Container - Vertical by default on Desktop now */
.fav-pro-actions {
    display: flex;
    flex-direction: column;
    /* Stacked on Desktop */
    gap: 0.5rem;
    align-items: stretch;
    min-width: 140px;
    /* Ensure buttons have decent width */
}

/* Base CTA Button adjustment */
.fav-pro-cta {
    padding: 0.5rem 0.8rem;
    /* Tighter buttons */
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Register (Primary) */
.fav-pro-cta.mode-register {
    background: var(--text-primary);
    color: var(--bg);
    border: 1px solid transparent;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    /* Lighter shadow */
}

.fav-pro-cta.mode-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* Login (Secondary / Outline) */
.fav-pro-cta.mode-login {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: none;
}

[data-theme="dark"] .fav-pro-cta.mode-login {
    border-color: #334155;
}

.fav-pro-cta.mode-login:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--text-primary);
}

[data-theme="dark"] .fav-pro-cta.mode-login:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Mobile Responsive Adjustments */
@media (max-width: 650px) {
    .fav-banner-guest-pro {
        flex-direction: column;
        align-items: stretch;
        /* Full width items */
        text-align: center;
        gap: 1rem;
        padding: 1.25rem;
        margin-bottom: 0.75rem;
        /* Even tighter on mobile */
    }

    .fav-pro-icon {
        margin: 0 auto;
        /* Center icon */
        width: 48px;
        height: 48px;
    }

    .fav-pro-content h4 {
        font-size: 1rem;
    }

    .fav-pro-actions {
        width: 100%;
        gap: 0.6rem;
    }

    .fav-pro-cta {
        width: 100%;
        /* Full width buttons */
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   REFACTORED SKELETON LOADING (REUSING CARD CSS)
   ======================================== */
.card.is-skeleton {
    pointer-events: none;
    cursor: default;
    background: var(--bg-secondary);
}

.card.is-skeleton .skeleton-placeholder {
    background: var(--bg-tertiary);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    opacity: 0.6;
}

/* Fix for absolute positioned badges */
.card.is-skeleton .badge-category.skeleton-placeholder,
.card.is-skeleton .badge-time.skeleton-placeholder,
.card.is-skeleton .badge-id.skeleton-placeholder {
    position: absolute;
    /* Re-enforce absolute positioning */
    display: block;
}

.card.is-skeleton .badge-category {
    width: 100px;
    height: 24px;
    top: 0;
    transform: translateX(-50%);
}

.card.is-skeleton .badge-time {
    width: 80px;
    height: 14px;
    top: 0.75rem;
    left: 1.5rem;
}

.card.is-skeleton .badge-id {
    width: 60px;
    height: 14px;
    top: 0.75rem;
    right: 0.875rem;
}

/* Shimmer Animation for all skeletons */
.card.is-skeleton::after,
.card.is-skeleton .skeleton-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.08),
            rgba(255, 255, 255, 0.2),
            rgba(255, 255, 255, 0.08),
            transparent);
    background-size: 200% 100%;
    animation: pego-shimmer 2s infinite linear;
}

[data-theme="dark"] .card.is-skeleton::after,
[data-theme="dark"] .card.is-skeleton .skeleton-placeholder::after {
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.02),
            rgba(255, 255, 255, 0.08),
            rgba(255, 255, 255, 0.02),
            transparent);
}

@keyframes pego-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Internal shapes alignment */
.card.is-skeleton .smart-title {
    height: 1.25rem;
    width: 95%;
    margin-top: 0;
    /* Match real card */
    margin-bottom: 0.5rem;
}

.card.is-skeleton .smart-meta-row {
    margin-bottom: 0.75rem;
    min-height: 20px;
}

.card.is-skeleton .smart-price-badge {
    height: 20px;
    width: 70px;
    background: var(--bg-tertiary) !important;
    border: none;
    opacity: 0.7;
    border-radius: 4px;
}

.card.is-skeleton .smart-location {
    height: 14px;
    width: 90px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    opacity: 0.5;
    margin-left: 4px;
}

.card.is-skeleton .smart-desc {
    display: flex;
    flex-direction: column;
    gap: 8px;
    mask-image: none !important;
    -webkit-mask-image: none !important;
}

.card.is-skeleton .smart-desc-line {
    height: 10px;
    width: 100%;
    background: var(--bg-tertiary);
    border-radius: 4px;
    opacity: 0.5;
}

.card.is-skeleton .smart-img {
    background: var(--bg-tertiary);
    box-shadow: none;
    width: 120px;
    height: 120px;
}

.card.is-skeleton .smart-footer {
    display: grid;
    grid-template-columns: 1fr 54px 1fr;
    align-items: center;
}

.card.is-skeleton .smart-btn {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent !important;
}

.card.is-skeleton .smart-btn::before {
    content: "";
    height: 14px;
    width: 60px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    opacity: 0.4;
}

.card.is-skeleton .smart-btn:nth-child(2)::before {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ELEGANT HIGHLIGHT PULSE ANIMATIONS WITHOUT CLOBBERING TRANSFORMS */

/* 1. Gratis / Gratuito */
@keyframes highlight-pulse-gratuito-anim {
    0% {
        box-shadow: 0 0 0 0 rgba(148, 163, 184, 0.8);
        border-color: #94a3b8;
    }
    50% {
        box-shadow: 0 0 0 15px rgba(148, 163, 184, 0);
        border-color: #64748b;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(148, 163, 184, 0);
        border-color: var(--border);
    }
}
.card.plan-gratuito.highlight-pulse {
    animation: highlight-pulse-gratuito-anim 1.8s ease-in-out 3;
    z-index: 50;
    position: relative;
}

/* 2. Premium */
@keyframes highlight-pulse-premium-anim {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.9);
        border-color: #60a5fa;
    }
    50% {
        box-shadow: 0 0 0 20px rgba(59, 130, 246, 0);
        border-color: #3b82f6;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
        border-color: color-mix(in srgb, var(--ribbon-bg), white 30%);
    }
}
.card.plan-premium.highlight-pulse {
    animation: highlight-pulse-premium-anim 1.8s ease-in-out 3;
    z-index: 50;
    position: relative;
}

/* 3. Business */
@keyframes highlight-pulse-business-anim {
    0% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.9);
        border-color: #fef08a;
    }
    50% {
        box-shadow: 0 0 0 20px rgba(234, 179, 8, 0);
        border-color: #eab308;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0);
        border-color: #eab308;
    }
}
.card.plan-business.highlight-pulse {
    animation: highlight-pulse-business-anim 1.8s ease-in-out 3;
    z-index: 50;
    position: relative;
}

/* Business VIP Card design */
.card.plan-business {
    background: #0d121f !important;
    background-image:
        radial-gradient(circle at 0% 0%, rgba(234, 179, 8, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(13, 18, 31, 0.9) 0%, transparent 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%) !important;
    border: 1.5px solid #eab308 !important;
    box-shadow:
        inset 0 1px 1px rgba(254, 240, 138, 0.15),
        inset 0 -1.5px 3px rgba(0, 0, 0, 0.5),
        0 4px 12px -2px rgba(234, 179, 8, 0.15) !important;
    color: #f8fafc !important;
    overflow: visible;
    z-index: 1;
}

.card.plan-business .smart-title {
    color: #fde047 !important;
}

.card.plan-business .smart-desc {
    color: #cbd5e1 !important;
}

.card.plan-business .badge-time,
.card.plan-business .smart-location,
.card.plan-business .smart-location i,
.card.plan-business .smart-location span {
    color: #f8fafc !important;
    opacity: 1;
}

.card.plan-business .badge-id {
    color: #94a3b8 !important;
    opacity: 0.6;
}

.card.plan-business .badge-category {
    background: #eab308 !important;
    color: #0d121f !important;
    border: 1px solid #fef08a !important;
    font-weight: 800;
}

.card.plan-business .smart-price-badge {
    background: rgba(234, 179, 8, 0.12) !important;
    color: #fde047 !important;
    border: 1px solid rgba(234, 179, 8, 0.25) !important;
}

.card.plan-business .smart-footer {
    border-top: 1px solid rgba(234, 179, 8, 0.15) !important;
    background: transparent !important;
}

.card.plan-business .smart-btn {
    color: #e2e8f0 !important;
}

.card.plan-business .smart-btn:hover {
    background: rgba(234, 179, 8, 0.08) !important;
    color: #fde047 !important;
}

.card.plan-business::after {
    content: "💎" !important;
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    font-size: 1.25rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

/* ========================================
   COUNTDOWN PILL — fuera del card, debajo
   ======================================== */

.card-wrapper:has(.card-countdown-pill) {
    height: auto;
    display: flex;
    flex-direction: column;
}

.card-countdown-pill {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2.5px 8px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    font-family: 'Inter', system-ui, sans-serif;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.card-countdown-pill i,
.card-countdown-pill [data-lucide] {
    flex-shrink: 0;
    color: #64748b;
    transition: color 0.3s ease;
}

.card-countdown-pill .ccd-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: #64748b;
    margin-right: 1px;
}

.card-countdown-pill .ccd-time {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    transition: color 0.3s ease;
    white-space: nowrap;
}

/* Elegant States — Neutral colors */
.card-countdown-pill.state-ok,
.card-countdown-pill.state-warn,
.card-countdown-pill.state-urgent {
    border-color: #e2e8f0;
    background: #ffffff;
}
.card-countdown-pill.state-ok .ccd-time,
.card-countdown-pill.state-warn .ccd-time,
.card-countdown-pill.state-urgent .ccd-time {
    color: #0f172a;
}
.card-countdown-pill.state-ok i,
.card-countdown-pill.state-warn i,
.card-countdown-pill.state-urgent i {
    color: #475569;
}

/* Dark Mode overrides */
[data-theme="dark"] .card-countdown-pill {
    background: #0f172a;
    border-color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] .card-countdown-pill i,
[data-theme="dark"] .card-countdown-pill [data-lucide] {
    color: #94a3b8;
}
[data-theme="dark"] .card-countdown-pill .ccd-label {
    color: #94a3b8;
}
[data-theme="dark"] .card-countdown-pill .ccd-time {
    color: #f8fafc;
}

[data-theme="dark"] .card-countdown-pill.state-ok,
[data-theme="dark"] .card-countdown-pill.state-warn,
[data-theme="dark"] .card-countdown-pill.state-urgent {
    border-color: #1e293b;
    background: #0f172a;
}
[data-theme="dark"] .card-countdown-pill.state-ok .ccd-time,
[data-theme="dark"] .card-countdown-pill.state-warn .ccd-time,
[data-theme="dark"] .card-countdown-pill.state-urgent .ccd-time {
    color: #f8fafc;
}
[data-theme="dark"] .card-countdown-pill.state-ok i,
[data-theme="dark"] .card-countdown-pill.state-warn i,
[data-theme="dark"] .card-countdown-pill.state-urgent i {
    color: #94a3b8;
}
/* Inactive Ad Banner */
.inactive-ad-banner {
    background: linear-gradient(135deg, #7e22ce 0%, #6b21a8 100%);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 10px 15px -3px rgba(126, 34, 206, 0.15), 0 4px 6px -2px rgba(126, 34, 206, 0.05);
    color: #fff;
    align-items: flex-start;
}



.inactive-ad-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.inactive-ad-icon {
    width: 24px;
    height: 24px;
    color: #e9d5ff;
    flex-shrink: 0;
    margin-top: 2px;
}

.inactive-ad-text h3 {
    margin: 0 0 4px 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #ffffff !important;
}

.inactive-ad-text p {
    margin: 0 !important;
    font-size: 14px !important;
    color: #e9d5ff !important;
    line-height: 1.4 !important;
}

.inactive-ad-action {
    background-color: #ffffff;
    color: #7e22ce;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    width: 100%;
}

.card-detail-favorite,
.card-detail-report,
.card-detail-print {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease;
    flex-shrink: 0;
}

.card-detail-print.loading {
    pointer-events: none;
    opacity: 0.7;
}

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

/* Photo loading spinner for gallery main */
.gallery-photo-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    background: transparent;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.detail-gallery-main.loaded .gallery-photo-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.pego-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.card-detail-favorite:hover {
    color: #ef4444;
    transform: scale(1.1);
}

.card-detail-report:hover {
    color: #f97316;
    transform: scale(1.1);
    background: var(--bg-secondary);
}

.card-detail-print:hover {
    color: #3b82f6;
    transform: scale(1.1);
    background: var(--bg-secondary);
}

.card-detail-favorite.active {
    color: #ef4444;
}

.card-detail-favorite svg,
.card-detail-report svg,
.card-detail-print svg {
    width: 22px;
    height: 22px;
}

.inactive-ad-action:hover {
    background-color: #f3e8ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.inactive-ad-action i {
    width: 18px;
    height: 18px;
}

/* ========================================
   SUFIJO DEL TÍTULO (Highlight & Shadow)
   ======================================== */
.smart-price-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    padding: 1px 0.375rem;
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

.smart-price-badge svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    flex-shrink: 0 !important;
}

[data-theme="dark"] .smart-price-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.ad-title-suffix {
    font-weight: inherit;
    background: transparent;
    border: 1px solid #cbd5e1; /* Borde gris suave para gratuitos */
    padding: 1px 5px;
    border-radius: 4px;
    display: inline-block;
    line-height: 1.1;
    vertical-align: baseline;
    margin-left: -6px; /* Desplazar a la izquierda para alinear texto con segundas líneas */
}

[data-theme="dark"] .ad-title-suffix {
    background: transparent;
    border: 1px solid #475569; /* Borde gris en modo oscuro */
    color: #94a3b8; /* Texto gris suave */
    text-shadow: none;
}

.card.premium .ad-title-suffix {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    border: none; /* Sin borde para premium */
    margin-left: -5px; /* Desplazar sin borde */
}

.detail-ad-title .ad-title-suffix {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: inherit !important;
    text-shadow: none !important;
    border: none !important; /* Sin borde en el modal */
    margin: 0 !important; /* Reset de margen para alinear con el texto del modal */
    font-size: inherit;
    vertical-align: inherit;
}

