    /* Position Variants */
    .promo-ribbon.top_left {
        top: 10px;
        left: 10px;
    }

    .promo-ribbon.top_right {
        top: 10px;
        right: 10px;
        left: auto;
    }

    .promo-ribbon.bottom_left {
        bottom: 10px;
        left: 10px;
        top: auto;
    }

    .promo-ribbon.bottom_right {
        bottom: 30px;
        right: 10px;
        top: auto;
        left: auto;
    }

    /* For style_ribbon specific top positioning */
    .promo-ribbon.style_ribbon.top_left,
    .promo-ribbon.style_ribbon.top_right {
        top: 0;
    }

    .promo-ribbon.style_ribbon.bottom_left,
    .promo-ribbon.style_ribbon.bottom_right {
        bottom: 0;
    }

    /* Style: Burst (Star shape) */
    .promo-ribbon.style_burst {
        width: 85px;
        height: 85px;
        clip-path: polygon(100% 50%, 94.46% 60.84%, 93.3% 75%, 80.84% 79.46%, 75% 93.3%, 60.84% 94.46%, 50% 100%, 39.16% 94.46%, 25% 93.3%, 19.16% 79.46%, 6.7% 75%, 5.54% 60.84%, 0% 50%, 5.54% 39.16%, 6.7% 25%, 19.16% 20.54%, 25% 6.7%, 39.16% 5.54%, 50% 0%, 60.84% 5.54%, 75% 6.7%, 80.84% 20.54%, 93.3% 25%, 94.46% 39.16%);
        transform: rotate(-10deg);
        animation: promoPulseBurst 2s infinite ease-in-out;
    }

    /* Style: Seal (Warranty Rectangular) */
    .promo-ribbon.style_seal {
        width: auto;
        min-width: 100px;
        height: 45px;
        padding: 5px 15px;
        border-radius: 8px;
        border: 4px double rgba(255, 255, 255, 0.4);
        animation: promoPulseSeal 2.5s infinite ease-in-out;
    }

    /* Style: Circle premium */
    .promo-ribbon.style_circle {
        width: 85px;
        height: 85px;
        border-radius: 50%;
        border: 3px solid rgba(255, 255, 255, 0.3);
        box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2), 0 4px 15px rgba(0, 0, 0, 0.3);
        animation: promoPulseCircle 3s infinite ease-in-out;
    }

    /* Style: Ribbon Tag */
    .promo-ribbon.style_ribbon {
        width: 70px;
        height: 90px;
        padding-top: 10px;
        padding-bottom: 25px;
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 50% 85%, 0% 100%);
        box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    }

    @keyframes promoPulseBurst {
        0% {
            transform: rotate(-10deg) scale(1);
        }

        50% {
            transform: rotate(-10deg) scale(1.05);
        }

        100% {
            transform: rotate(-10deg) scale(1);
        }
    }

    @keyframes promoPulseSeal {
        0% {
            transform: scale(1);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        }

        50% {
            transform: scale(1.02);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
        }

        100% {
            transform: scale(1);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        }
    }

    @keyframes promoPulseCircle {
        0% {
            transform: rotate(0deg) scale(1);
        }

        50% {
            transform: rotate(5deg) scale(1.03);
        }

        100% {
            transform: rotate(0deg) scale(1);
        }
    }

    /* Override position for small cards */
    @media (max-width: 576px) {

        .promo-ribbon.style_burst,
        .promo-ribbon.style_circle {
            width: 70px;
            height: 70px;
            font-size: 9px;
        }

        .promo-ribbon.style_seal {
            min-width: 80px;
            height: 35px;
            font-size: 8px;
        }

        .promo-ribbon.style_ribbon {
            width: 50px;
            height: 70px;
            font-size: 8px;
        }

        /* Mobile specific positioning micro-adjustments */
        .promo-ribbon.top_left {
            top: 5px;
            left: 5px;
        }

        .promo-ribbon.top_right {
            top: 5px;
            right: 5px;
        }

        .promo-ribbon.bottom_left {
            bottom: 5px;
            left: 5px;
        }

        .promo-ribbon.bottom_right {
            bottom: 5px;
            right: 5px;
        }

        /* Seasonal mobile sizes */
        .promo-ribbon.style_christmas,
        .promo-ribbon.style_newyear,
        .promo-ribbon.style_halloween,
        .promo-ribbon.style_carnival,
        .promo-ribbon.style_summer,
        .promo-ribbon.style_autumn,
        .promo-ribbon.style_easter {
            width: 70px;
            height: 70px;
            font-size: 8px;
        }
    }

    /* =========================================
       SEASONAL PROMO BANNER STYLES
       ========================================= */

    /* Style: Christmas - Gift Box Shape */
    .promo-ribbon.style_christmas {
        width: 85px !important;
        height: 85px !important;
        clip-path: none !important;
        border-radius: 8px !important;
        transform: rotate(-5deg) !important;
        background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%) !important;
        border: 4px solid #ffd700 !important;
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6), inset 0 0 0 2px #ffd700 !important;
        animation: christmasGlow 2s ease-in-out infinite alternate !important;
        font-size: 9px !important;
    }

    .promo-ribbon.style_christmas::before {
        content: '🎁' !important;
        position: absolute !important;
        top: -15px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        font-size: 22px !important;
        text-shadow: 0 0 10px gold !important;
        z-index: 10 !important;
    }

    @keyframes christmasGlow {
        from {
            box-shadow: 0 0 15px rgba(255, 215, 0, 0.5), inset 0 0 0 2px #ffd700;
        }

        to {
            box-shadow: 0 0 30px rgba(255, 215, 0, 0.9), inset 0 0 0 2px #ffd700;
        }
    }

    /* Style: New Year - Celebration */
    .promo-ribbon.style_newyear {
        width: 90px !important;
        height: 90px !important;
        clip-path: polygon(50% 0%, 80% 10%, 100% 35%, 100% 70%, 80% 95%, 50% 100%, 20% 95%, 0% 70%, 0% 35%, 20% 10%) !important;
        border-radius: 0 !important;
        transform: none !important;
        background: linear-gradient(135deg, #ffd700 0%, #000000 50%, #ffd700 100%) !important;
        border: 3px solid gold !important;
        animation: newYearSparkle 1.5s ease-in-out infinite !important;
    }

    @keyframes newYearSparkle {

        0%,
        100% {
            filter: brightness(1);
        }

        50% {
            filter: brightness(1.3);
        }
    }

    /* Style: Halloween - Pumpkin Circle */
    .promo-ribbon.style_halloween {
        width: 90px !important;
        height: 90px !important;
        border-radius: 50% !important;
        clip-path: none !important;
        transform: none !important;
        background: linear-gradient(180deg, #ff7518 0%, #ff5500 50%, #cc4400 100%) !important;
        border: 4px solid #2d1a00 !important;
        box-shadow: 0 0 25px rgba(255, 102, 0, 0.7), inset 0 -20px 40px rgba(0, 0, 0, 0.4) !important;
        font-size: 9px !important;
        animation: halloweenPulse 2s ease-in-out infinite !important;
    }

    .promo-ribbon.style_halloween::before {
        content: '🎃' !important;
        position: absolute !important;
        top: -15px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        font-size: 22px !important;
        text-shadow: 0 0 10px rgba(255, 102, 0, 0.8) !important;
    }

    @keyframes halloweenPulse {

        0%,
        100% {
            box-shadow: 0 0 25px rgba(255, 102, 0, 0.7), inset 0 -20px 40px rgba(0, 0, 0, 0.4);
        }

        50% {
            box-shadow: 0 0 40px rgba(255, 102, 0, 0.9), inset 0 -20px 40px rgba(0, 0, 0, 0.4);
        }
    }

    /* Style: Carnival - Festive */
    .promo-ribbon.style_carnival {
        width: 88px;
        height: 88px;
        clip-path: polygon(25% 0%, 75% 0%, 100% 25%, 100% 75%, 80% 100%, 20% 100%, 0% 75%, 0% 25%);
        transform: rotate(5deg);
        background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff, #ffff00, #ff00ff) !important;
        background-size: 300% 300% !important;
        animation: carnivalColors 3s ease-in-out infinite;
        border: 3px solid white;
    }

    @keyframes carnivalColors {

        0%,
        100% {
            background-position: 0% 50%;
        }

        50% {
            background-position: 100% 50%;
        }
    }

    /* Style: Easter - Egg */
    .promo-ribbon.style_easter {
        width: 80px;
        height: 95px;
        clip-path: ellipse(45% 50% at 50% 50%);
        transform: none;
        background: linear-gradient(180deg, #ffb6c1 0%, #87ceeb 50%, #98fb98 100%) !important;
        border: 3px solid #fff;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    /* Style: Summer - Sun */
    .promo-ribbon.style_summer {
        width: 95px;
        height: 95px;
        clip-path: polygon(50% 0%, 63% 25%, 93% 25%, 73% 46%, 83% 75%, 50% 60%, 17% 75%, 27% 46%, 7% 25%, 37% 25%);
        transform: none;
        background: linear-gradient(135deg, #ffdd00 0%, #ff8800 100%) !important;
        border: none;
        box-shadow: 0 0 20px rgba(255, 200, 0, 0.6);
        animation: sunPulse 2s ease-in-out infinite;
    }

    @keyframes sunPulse {

        0%,
        100% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.05);
        }
    }

    /* Style: Autumn - Leaf */
    .promo-ribbon.style_autumn {
        width: 85px;
        height: 95px;
        clip-path: polygon(50% 0%, 80% 20%, 95% 50%, 85% 80%, 50% 100%, 15% 80%, 5% 50%, 20% 20%);
        transform: rotate(-15deg);
        background: linear-gradient(145deg, #ff6b35, #b8420f, #8b4513) !important;
        border: 2px solid #5c3317;
        box-shadow: 0 4px 10px rgba(139, 69, 19, 0.4);
    }

    /* =========================================
   TEMPLATE 1 CSS (Diseño Premium Rojo)
   ========================================= */
    .listing-item.template_1 {
        border: none;
        background: #fff;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
        overflow: hidden; /* recorta precio/combustible al borde de la card (igual que inicio) */
    }

    .listing-item.template_1:hover {
        transform: translateY(-5px);
    }

    /* Estado VENDIDO (rojo) / RESERVADO (naranja) — marco resaltando la tarjeta (Template 1).
       Usa outline con offset interior: visible también en móvil (no lo recorta el overflow). */
    .listing-item.template_1:has(.sold-badge-overlay) {
        outline: 3px solid #dc0000 !important;
        outline-offset: -3px;
        border-radius: 6px;
        box-shadow: 0 10px 28px rgba(220, 0, 0, 0.28) !important;
    }
    .listing-item.template_1:has(.reserved-badge-overlay) {
        outline: 3px solid #f39c12 !important;
        outline-offset: -3px;
        border-radius: 6px;
        animation: t1ReservedPulse 1.8s ease-in-out infinite;
    }
    @keyframes t1ReservedPulse {
        0%, 100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.55); }
        50%      { box-shadow: 0 0 18px 6px rgba(243, 156, 18, 0.50); }
    }

    .listing-item.template_1 .photo {
        position: relative;
        overflow: hidden;
        height: 250px;
        /* Fixed height for consistency */
    }

    .listing-item.template_1 .photo img {
        width: 100% !important;
        height: 250px !important; /* la imagen llena el .photo; precio/combustible quedan al borde */
        object-fit: cover;
    }

    /* Specs t1: caben 4 columnas (incluida Garantía) */
    .listing-item.template_1 .specs-row-t1 .spec-item i { font-size: 16px !important; margin-bottom: 5px; }
    .listing-item.template_1 .specs-row-t1 .spec-item small { font-size: 10.5px !important; }
    .listing-item.template_1 .spec-item-warranty small { line-height: 1.25; }
    .listing-item.template_1 .spec-item-warranty .spec-warranty-val { color: #dc0000; font-weight: 800; }

    .listing-item.template_1 .ribbon {
        position: absolute;
        top: 15px;
        right: -5px;
        background: var(--primary-color);
        opacity: 0.9;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        color: #fff;
        padding: 5px 15px;
        font-weight: 700;
        font-size: 12px;
        text-transform: uppercase;
        box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
        z-index: 10;
    }

    .listing-item.template_1 .ribbon::after {
        content: '';
        position: absolute;
        bottom: -5px;
        right: 0;
        border-top: 5px solid #8a0000;
        border-right: 5px solid transparent;
    }

    .listing-item.template_1 .price-box-t1 {
        position: absolute;
        bottom: 0;
        right: 0;
        left: auto;
        background: rgba(var(--primary-rgb), 0.82);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        color: #fff;
        padding: 5px 15px 5px 30px;
        font-weight: 700;
        font-size: 16px;
        clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
        box-shadow: -2px 2px 12px rgba(0, 0, 0, 0.35);
        text-align: right;
        border: 1px solid rgba(255, 255, 255, 0.15);
    }

    /* Force White Background for Standard Template Sections */
    body,
    .listing,
    .popular-city,
    .blog,
    .faq,
    .contact-area {
        background-color: #fff !important;
        color: #333;
    }

    .listing .heading h2,
    .listing .heading h3 {
        color: #111 !important;
    }

    .listing-item.template_1 .price-box-t1 .old-price {
        display: block;
        font-size: 12px;
        text-decoration: line-through;
        opacity: 0.8;
    }

    .listing-item.template_1 .price-box-t1 .current-price {
        display: block;
        font-size: 18px;
        font-weight: 800;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    }

    .listing-item.template_1 .fuel-badge-t1 {
        position: absolute;
        bottom: 0;
        left: 0;
        background: rgba(220, 0, 0, 0.8);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        color: #fff;
        padding: 6px 15px;
        font-weight: 800;
        font-size: 11px;
        text-transform: uppercase;
        border-top-right-radius: 15px;
        z-index: 30;
        display: flex;
        align-items: center;
        gap: 6px;
        line-height: 1;
    }


    .listing-item.template_1 .seats-badge-t1 {
        position: absolute;
        bottom: 35px;
        /* Above fuel */
        left: 0;
        background: #ffc107;
        /* Yellow */
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        color: #000;
        /* Black */
        padding: 6px 12px;
        font-weight: 700;
        font-size: 11px;
        text-transform: uppercase;
        border-top-right-radius: 8px;
        border-bottom-right-radius: 8px;
        z-index: 10;
        box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    }

    .listing-item.template_1 .text {
        padding: 20px;
    }

    .listing-item.template_1 .title {
        font-size: 18px;
        font-weight: 800;
        text-transform: uppercase;
        margin-bottom: 15px;
        color: #333;
    }

    .listing-item.template_1 .vehicle-details-grid {
        margin-bottom: 15px;
    }

    .listing-item.template_1 .vehicle-card-button {
        background: #111;
        color: #fff !important;
        display: block;
        text-align: center;
        padding: 10px;
        border-radius: 4px;
        font-weight: 700;
        font-size: 12px;
        text-transform: uppercase;
        transition: all 0.3s;
    }

    .listing-item.template_1 .vehicle-card-button:hover {
        background: var(--primary-hover);
        text-decoration: none;
    }

    /* =========================================
   TEMPLATE 2 CSS (Diseño Deportivo BMW)
   ========================================= */
    /* === VEHICLES GRID === */
    .vehicles-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 30px;
        margin-bottom: 40px;
    }

    @media (max-width: 1024px) {
        .vehicles-grid {
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
        }
    }

    @media (max-width: 640px) {
        .vehicles-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
        }
    }

    .listing-item.template_2 {
        border: none;
        background: #fff;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
        border-radius: 4px;
        overflow: hidden; /* recorta el recuadro de precio al borde de la card (igual que inicio) */
        font-family: 'Arial', sans-serif;
        /* Cleaner font */
    }

    .listing-item.template_2 .photo {
        position: relative;
        height: 250px;
        /* Fixed height for consistency */
        border-bottom: none;
        overflow: hidden;
    }

    .listing-item.template_2 .photo img:not(.env-badge-t2):not(.env-badge-item img) {
        width: 100% !important;
        height: 250px !important; /* la imagen llena el .photo; el precio queda al borde inferior */
        object-fit: cover;
    }

    .listing-item.template_2 .slider-progress-bar {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 4px;
        display: flex;
        gap: 2px;
        z-index: 10;
    }

    .listing-item.template_2 .slider-progress-bar .bar {
        height: 100%;
        flex: 1;
        background: #e0e0e0;
    }

    .listing-item.template_2 .slider-progress-bar .bar.active {
        background: var(--primary-color);
    }

    /* Etiquetas INTERNAS de imagen (Top Left) */
    .listing-item.template_2 .badge-container-t2 {
        position: absolute;
        top: 10px;
        left: 10px;
        z-index: 30;
    }
    .listing-item.template_2 .badge-internal {
        background: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(8px);
        color: #fff;
        padding: 4px 12px;
        font-size: 11px;
        font-weight: 700;
        border-radius: 6px;
        text-transform: uppercase;
        display: flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }

    /* Fixed size for environmental badges */
    .env-badge-t2, .env-badge-t3, .env-badge-item img {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        max-width: 30px !important;
        object-fit: contain !important;
        border-radius: 50% !important;
        background: white !important;
        padding: 1px !important;
    }
    .env-badge-t1 {
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }
    .env-badge-t1 img {
        width: 44px !important;
        height: 44px !important;
        border: none !important;
        background: transparent !important;
        border-radius: 0 !important;
        padding: 0 !important;
        filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    }

    .listing-item.template_1 .env-badge-above-price {
        position: absolute;
        top: 40px; /* justo debajo de la etiqueta tipo (top-right), fuera de las flechas del slider */
        right: 10px;
        bottom: auto;
        z-index: 4;
        pointer-events: none;
        width: 46px;
        height: 46px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.25);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 4px;
    }
    .listing-item.template_1 .env-badge-above-price .env-inline-badge {
        width: 38px;
        height: 38px;
        object-fit: contain;
        background: transparent;
        border-radius: 0;
    }

    .listing-item.template_2 .badge-internal i {
        color: var(--secondary-color);
    }

    /* Cuerpo Template 2 */
    .listing-item.template_2 .body-content {
        padding: 20px 15px;
        position: relative;
    }

    /* Flex Container for Title and Price */
    .listing-item.template_2 .top-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 5px;
        flex-wrap: nowrap;
        gap: 0;
    }

    .listing-item.template_2 .title {
        font-size: 15px;
        font-weight: 900;
        text-transform: uppercase;
        color: #111;
        line-height: 1.3;
        margin: 0;
        padding-right: 8px;
        flex: 1;
        min-width: 0;
        word-break: break-word;
        overflow-wrap: break-word;
        min-height: 40px; /* Aligns cards with different title lengths */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .listing-item.template_2 .title a {
        color: #111;
        text-decoration: none;
    }

    /* Caja Precio T2 (Overlapping Photo Bottom Right) */
    .listing-item.template_2 .price-box-t2 {
        position: absolute;
        bottom: 0;
        right: 0;
        background: var(--primary-color);
        color: white;
        padding: 8px 15px 8px 30px;
        text-align: right;
        font-weight: 900;
        clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
        min-width: 110px;
        z-index: 20;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }

    .listing-item.template_2 .price-box-t2 .old {
        font-size: 11px;
        text-decoration: line-through;
        opacity: 0.8;
        display: block;
        margin-bottom: 2px;
        font-weight: 600;
    }

    .listing-item.template_2 .price-box-t2 .current {
        font-size: 20px;
        display: block;
        line-height: 1.1;
    }

    .listing-item.template_2 .divider {
        height: 1px;
        background: #e5e5e5;
        margin: 15px 0;
        width: 100%;
    }

    .listing-item.template_2 .specs-grid-t2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 15px;
    }
    .listing-item.template_2 .spec-card-t2 {
        background: #f8f9fa;
        border-radius: 8px;
        padding: 10px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .listing-item.template_2 .spec-icon-circle {
        width: 32px;
        height: 32px;
        background: rgba(var(--primary-rgb),0.05);
        color: var(--primary-color);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 5px;
        font-size: 14px;
    }
    .listing-item.template_2 .spec-text-t2 {
        font-size: 12px;
        font-weight: 700;
        color: #333;
    }


    /* Responsive para tablets y móviles */
    @media (max-width: 768px) {
        .listing-item.template_2 .specs-row {
            grid-template-columns: 1fr !important;
            gap: 10px;
            font-size: 13px;
        }

        .listing-item.template_2 .specs-row span {
            padding: 10px 12px;
            justify-content: flex-start;
        }
    }

    /* Responsive para móviles pequeños */
    @media (max-width: 576px) {
        .listing-item.template_2 .body-content {
            padding: 15px 12px;
        }

        .listing-item.template_2 .specs-row {
            gap: 8px;
            font-size: 12px;
        }

        .listing-item.template_2 .specs-row span {
            padding: 8px 10px;
        }
    }

    /* Hide default button for T2 */
    .listing-item.template_2 .vehicle-card-button {
        display: none;
    }

    /* Hide Slider Arrows and Default Indicators for T2 */
    .listing-item.template_2 .carousel-control-prev,
    .listing-item.template_2 .carousel-control-next,
    .listing-item.template_2 .carousel-indicators {
        display: none !important;
    }

    /* =========================================
       TEMPLATE 3 CSS
       ========================================= */

    /* ---- Vehicle Comparator ---- */
    .btn-compare-toggle {
        background: none; border: none; padding: 0 6px; cursor: pointer;
        color: #9ca3af; font-size: 13px; transition: color .15s;
    }
    .btn-compare-toggle.active { color: var(--primary-color); }
    .btn-compare-toggle:hover { color: var(--primary-color); }

    /* ---- Card actions (comparar + favorito + compartir) — fondo transparente ---- */
    .card-actions-stack {
        display: flex; flex-direction: row; align-items: center; gap: 4px;
        background: transparent; box-shadow: none; padding: 0; border-radius: 0;
    }
    /* Variante en línea dentro del contenido (todas las plantillas) */
    .card-actions-inline { position: static; transform: none; z-index: 5; }

    /* Template 0: fila de acciones + garantía encima de los precios */
    .listing-item.template_0 .card-actions-bar {
        display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 8px;
    }
    /* Template 1: acciones a la derecha de VER DETALLES */
    .listing-item.template_1 .card-footer-row .card-actions-inline { margin-left: auto; }
    /* Template 2: acciones sobre los precios (esquina inferior derecha de la foto) */
    .listing-item.template_2 .card-actions-stack.t2-actions {
        position: absolute; bottom: 52px; right: 10px; z-index: 22;
    }
    .listing-item.template_2 .t2-actions .btn-compare-toggle,
    .listing-item.template_2 .t2-actions .btn-wish-toggle,
    .listing-item.template_2 .t2-actions .btn-share-toggle { color: #4b5563; text-shadow: 0 0 4px rgba(255,255,255,.95), 0 0 8px rgba(255,255,255,.7); }
    .listing-item.template_2 .t2-actions .btn-wish-toggle:hover,
    .listing-item.template_2 .t2-actions .btn-share-toggle:hover,
    .listing-item.template_2 .t2-actions .btn-compare-toggle:hover { color: var(--primary-color); }
    /* Template 3: acciones a la derecha de la garantía (fila de marca) */
    .listing-item.template_3 .brand-row-t3 .card-actions-inline { margin-left: auto; }
    /* Template 4: acciones en línea sobre la garantía */
    .listing-item.template_4 .card-actions-stack.t4-actions-inline { margin-bottom: 6px; align-self: flex-end; }
    .listing-item.template_4 .t4-actions-inline .btn-compare-toggle,
    .listing-item.template_4 .t4-actions-inline .btn-wish-toggle,
    .listing-item.template_4 .t4-actions-inline .btn-share-toggle { color: #fff; font-size: 17px; padding: 3px 5px; }
    .listing-item.template_4 .t4-actions-inline .btn-wish-toggle { color: #ff6b6b; }

    .card-actions-stack .btn-compare-toggle,
    .btn-wish-toggle, .btn-share-toggle {
        background: none; border: none; padding: 3px 6px; cursor: pointer;
        color: #6b7280; font-size: 16px; line-height: 1; transition: color .15s, transform .15s;
    }
    .btn-wish-toggle:hover, .btn-share-toggle:hover,
    .card-actions-stack .btn-compare-toggle:hover { color: var(--primary-color); transform: scale(1.12); }
    .btn-wish-toggle.active { color: var(--primary-color); }
    .btn-wish-toggle.active i { font-variation-settings: 'FILL' 1; }

    /* Línea de garantía (t0/t1) encima de precios/VER DETALLES */
    .card-warranty-line {
        display: inline-flex; align-items: center; gap: 5px;
        font-size: 11px; font-weight: 700; color: #555; margin: 0 0 6px;
    }
    .card-warranty-line i { color: var(--primary-color); font-size: 12px; }
    /* Template 0: fila garantía + distintivo en cuadros, acciones a la derecha */
    .listing-item.template_0 .meta-row-t0 { display: flex; align-items: stretch; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
    .listing-item.template_0 .meta-boxes-t0 { display: flex; gap: 8px; flex: 1; min-width: 0; }
    .listing-item.template_0 .meta-box-t0 { background: #f4f5f7; border: 1px solid rgba(0,0,0,0.04); border-radius: 10px; padding: 7px 10px; display: flex; align-items: center; gap: 6px; min-width: 0; }
    .listing-item.template_0 .meta-box-t0 .spec-icon-t0 i { color: #dc0000 !important; font-size: 16px !important; }
    .listing-item.template_0 .meta-box-t0 small { font-size: 10px; font-weight: 700; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .listing-item.template_0 .env-box-t0 img { width: 22px; height: 22px; flex-shrink: 0; object-fit: contain; background: #fff; border-radius: 50%; }
    .listing-item.template_0 .meta-row-t0 .card-actions-bar { margin: 0; flex: 0 0 auto; align-self: center; }

    /* Template 0 — VENDIDO/RESERVADO tipo cartel cruzado (banda diagonal) */
    .listing-item.template_0 .photo:has(.sold-badge-overlay) img,
    .listing-item.template_0 .photo:has(.reserved-badge-overlay) img {
        filter: brightness(0.45) blur(1px) grayscale(0.45) !important;
    }
    .listing-item.template_0:has(.sold-badge-overlay),
    .listing-item.template_0:has(.reserved-badge-overlay) {
        box-shadow: 0 12px 32px rgba(0,0,0,0.28); border-radius: 14px;
    }
    .listing-item.template_0:has(.sold-badge-overlay) { outline: 2px solid rgba(220,0,0,0.55); outline-offset: -2px; }
    .listing-item.template_0:has(.reserved-badge-overlay) { outline: 2px solid rgba(243,140,0,0.6); outline-offset: -2px; }
    .listing-item.template_0 .sold-badge-overlay,
    .listing-item.template_0 .reserved-badge-overlay {
        right: auto !important; bottom: auto !important;
        top: 50% !important; left: 50% !important; width: 150% !important; height: auto !important;
        transform: translate(-50%, -50%) rotate(-16deg) !important;
        display: flex !important; align-items: center !important; justify-content: center !important;
        animation: none !important;
        clip-path: none !important;
        padding: 11px 0 !important; border-radius: 0 !important;
        text-align: center; font-size: 20px !important; letter-spacing: 3px;
        backdrop-filter: none !important;
        border: none !important;
        border-top: 2px solid rgba(255,255,255,0.55) !important;
        border-bottom: 2px solid rgba(255,255,255,0.55) !important;
        box-shadow: 0 6px 20px rgba(0,0,0,0.45) !important;
    }
    .listing-item.template_0 .sold-badge-overlay {
        background: linear-gradient(135deg, rgba(229,9,59,0.96) 0%, rgba(160,3,38,0.96) 100%) !important;
    }
    .listing-item.template_0 .reserved-badge-overlay {
        background: linear-gradient(135deg, rgba(255,140,0,0.96) 0%, rgba(214,90,0,0.96) 100%) !important;
    }
    .listing-item.template_0 .sold-badge-overlay::before,
    .listing-item.template_0 .sold-badge-overlay::after,
    .listing-item.template_0 .reserved-badge-overlay::before,
    .listing-item.template_0 .reserved-badge-overlay::after { display: none !important; }
    /* Template 2: marca y modelo en la misma línea */
    .listing-item.template_2 .title .brand-name { display: inline; margin-bottom: 0; margin-right: 5px; font-size: inherit; font-weight: 800; letter-spacing: 0; }

    #compare-bar {
        position: fixed; bottom: 0; left: 0; right: 0; z-index: 9990;
        background: #1e293b; color: #fff;
        padding: 10px 90px;
        display: none;
        align-items: center; justify-content: center; gap: 12px;
        box-shadow: 0 -4px 20px rgba(0,0,0,.25);
        flex-wrap: wrap;
    }
    #compare-bar.visible { display: flex; }
    @media (max-width: 640px) { #compare-bar { padding: 10px 16px 76px; } }
    .compare-thumb {
        display: flex; align-items: center; gap: 8px;
        background: #334155; border-radius: 8px; padding: 6px 10px; font-size: 12px;
    }
    .compare-thumb img { width: 48px; height: 36px; object-fit: cover; border-radius: 5px; }
    .compare-thumb .remove-cmp { background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 14px; padding: 0 2px; }
    .compare-thumb .remove-cmp:hover { color: #f87171; }
    #compare-bar .cmp-actions { display: flex; gap: 8px; }
    #compare-bar .btn-cmp-go { background: var(--primary-color); color: #fff; border: none; border-radius: 8px; padding: 8px 18px; font-size: 13px; font-weight: 700; cursor: pointer; }
    #compare-bar .btn-cmp-go:hover { background: var(--primary-hover); }
    #compare-bar .btn-cmp-clear { background: #334155; color: #94a3b8; border: none; border-radius: 8px; padding: 8px 14px; font-size: 12px; cursor: pointer; }
