.coche{
    width: 1440px;
    max-width:96vw;
    margin:32px auto;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    border-radius: 18px;
    padding: 0;

    h3{
        padding: 0 0 12px 0;
        font-size: 1.3rem;
        font-weight: 700;
        color: #2c3e50;
        position: relative;
        letter-spacing: -0.02em;
        text-transform: uppercase;
        font-size: 0.95rem;
    }

    .cont{
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 30px;
        > div{
            background: #fff;
            box-shadow: 0 1px 6px rgba(0,0,0,0.2);
            border-radius: 12px;
            padding: 18px 16px;
        }
        >div:has(>.pvp){
            display: grid;
            grid-template-rows: 1fr auto;
            gap: 18px;
        }
        >div:has(>.anunciante){
            display: block;
        }
        
        .encabezado{
            font-size: 1.8rem;
            font-weight: 700;
            color: #2c3e50;
            margin-bottom: 16px;
            padding-bottom: 16px;
            border-bottom: 2px solid #e9ecef;
            letter-spacing: -0.02em;
            line-height: 1.2;
            position: relative;
            
            &::after{
                content: '';
                position: absolute;
                bottom: -2px;
                left: 0;
                width: 100px;
                height: 2px;
                background: linear-gradient(90deg, #274198 0%, #0dafcc 100%);
            }
        }
        
        .caracteristicas{
            display: grid;
            grid-auto-flow: column;
            gap: 12px;
            margin-bottom: 20px;
            .carac{
                display: inline-flex;
                align-items: center;
                gap: 6px;
                padding: 8px 12px;
                background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
                border-radius: 20px;
                border: 1px solid #e9ecef;
                font-size: 0.85rem;
                font-weight: 500;
                color: #2c3e50;
                white-space: nowrap;
                transition: all 0.3s ease;
                box-shadow: 0 2px 4px rgba(0,0,0,0.04);
                
                &::before{
                    content: '•';
                    color: #0dafcc;
                    font-size: 1rem;
                    font-weight: 700;
                    line-height: 1;
                }
                
                &:hover{
                    background: linear-gradient(135deg, #e3f8fc 0%, #f8f9fa 100%);
                    border-color: #0dafcc;
                    transform: translateY(-2px);
                    box-shadow: 0 4px 12px rgba(13, 175, 204, 0.2);
                }
            }
        }
        div:has(>.descripcion){
            height: 408px;
            overflow-y: auto;
        }
        .descripcion{
            font-size: 0.95rem;
            line-height: 1.7;
            color: #495057;
            text-align: justify;

            .desc_idioma{
                img{
                    width: 24px;
                    height: 16px;
                    object-fit: cover;
                    margin-right: 8px;
                    vertical-align: middle;
                }
            }
        }
        .pvp{
            gap: 24px;
            display:flex;
            background: linear-gradient(90deg, #274198 0%, #0dafcc 100%);
            color: #fff;
            border-radius: 32px;
            box-shadow: 0 1px 6px rgba(0,0,0,0.2);
            padding: 14px 16px;
            font-size: 1.4rem;
            font-weight: 600;
            letter-spacing: 0.02em;
            text-align: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            
            &:hover{
                transform: translateY(-2px);
                box-shadow: 0 6px 20px rgba(39, 65, 152, 0.4);
                background: linear-gradient(90deg, #1e3278 0%, #0a8fa8 100%);
            }
            
            &:active{
                transform: translateY(0);
                box-shadow: 0 2px 8px rgba(39, 65, 152, 0.3);
            }
        }
        .galeria{
            display: flex;
            flex-direction: column;
            gap: 40px;
            height: 100%;
            .fotos{
                position: relative;
                width: 100%;
                height: 500px;
                border-radius: 12px;
                overflow: hidden;
                cursor: zoom-in;
                background: #f8f9fa;
                
                &.zoom-activa{
                    cursor: zoom-out;
                    
                    img{
                        transition: transform 0.1s ease-out;
                    }
                }
                
                img{
                    width: 100%;
                    height: 100%;
                    object-fit: contain;
                    display: none;
                    transition: none;
                    
                    &.active{
                        display: block;
                        animation: fadeInImage 0.4s ease;
                    }
                }
                
                @keyframes fadeInImage {
                    from { opacity: 0; }
                    to { opacity: 1; }
                }
            }
            
            .carousel-container {
                position: relative;
                display: flex;
                align-items: center;
                gap: 12px;
                justify-content: center;
            }
            
            .carousel-btn {
                flex-shrink: 0;
                width: 40px;
                height: 40px;
                border-radius: 50%;
                background: linear-gradient(135deg, #274198 0%, #0dafcc 100%);
                color: white;
                border: none;
                font-size: 28px;
                font-weight: bold;
                cursor: pointer;
                transition: all 0.3s ease;
                box-shadow: 0 2px 8px rgba(0,0,0,0.2);
                display: flex;
                align-items: center;
                justify-content: center;
                z-index: 2;
                user-select: none;
                &:hover {
                    transform: scale(1.1);
                    box-shadow: 0 4px 12px rgba(13, 175, 204, 0.4);
                }
                
                &:active {
                    transform: scale(0.95);
                }
                
                &:disabled {
                    opacity: 0.3;
                    cursor: not-allowed;
                    transform: none;
                }
            }
            
            .miniaturas-wrapper {
                flex: 1;
                overflow: hidden;
                position: relative;
                float: left;
                max-width: 710px;
            }
            
            .miniaturas {
                display: flex;
                gap: 12px;
                transition: transform 0.4s ease;
                
                img {
                    flex-shrink: 0;
                    height: 100px;
                    width: auto;
                    object-fit: contain;
                    border-radius: 8px;
                    cursor: pointer;
                    border: 3px solid transparent;
                    transition: all 0.3s ease;
                    opacity: 0.7;
                    user-select: none;
                    &:hover {
                        opacity: 1;
                        transform: scale(1.05);
                    }
                    
                    &.active {
                        border-color: #0dafcc;
                        opacity: 1;
                        box-shadow: 0 4px 8px rgba(13, 175, 204, 0.3);
                    }
                }
            }
        }
        .equipamiento{
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 12px;
            max-height: 340px;
            overflow-y: auto;
            
            .carac{
                display: flex;
                align-items: center;
                gap: 12px;
                padding: 8px;
                background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
                border-radius: 8px;
                font-size: 0.9rem;
                color: #2c3e50;
                border: 1px solid #e9ecef;
                transition: all 0.25s ease;
                position: relative;
                
                &::before{
                    content: '✓';
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    width: 18px;
                    height: 18px;
                    background: linear-gradient(135deg, #274198 0%, #0dafcc 100%);
                    color: white;
                    border-radius: 50%;
                    font-weight: bold;
                    font-size: 0.75rem;
                    flex-shrink: 0;
                }
                
                &:hover{
                    border-color: #0dafcc;
                    transform: translateY(-2px);
                    box-shadow: 0 4px 12px rgba(13, 175, 204, 0.2);
                    background: linear-gradient(135deg, #ffffff 0%, #e3f8fc 100%);
                }
            }
        }
        .anunciante{
            font-size: 0.95rem;
            line-height: 1.6;
            color: #495057;
            padding: 0;
            
            .anunciante-card{
                background: #ffffff;
                border-radius: 12px;
                overflow: hidden;
                border: 1px solid #e9ecef;
            }
            
            .anunciante-header{
                display: flex;
                align-items: flex-start;
                gap: 16px;
                padding: 20px;
                background: #f8f9fa;
                border-bottom: 1px solid #e9ecef;

                .anunciante-logo{
                    width: 55px;
                    height: 55px;
                    border-radius: 12px;
                    background: #274198;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    flex-shrink: 0;
                    align-self: flex-start;
                    img{
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                    }
                    i{
                        font-size: 28px;
                        color: white;
                    }
                }
                
                .anunciante-info{
                    flex: 1;
                    
                    h4{
                        margin: 0 0 6px 0;
                        font-size: 1.2rem;
                        font-weight: 700;
                        color: #2c3e50;
                        letter-spacing: -0.02em;
                    }
                    
                    .ubicacion{
                        margin: 0;
                        font-size: 0.9rem;
                        color: #6c757d;
                        display: flex;
                        align-items: center;
                        gap: 6px;
                        
                        i{
                            color: #0dafcc;
                            font-size: 0.85rem;
                        }
                    }
                    .anunciante-descripcion{
                        margin-top: 8px;
                        font-size: 0.8rem;
                        color: #495057;
                        line-height: 1.5;
                    }
                }
            }
            
            .anunciante-contacto{
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 12px;
                padding: 20px;
                border-bottom: 1px solid #e9ecef;
            }

            .anunciante-gmaps{
                iframe{
                    width: 100%;
                    height: 300px;
                }
            }
            
            .contacto-btn{
                display: flex;
                align-items: center;
                gap: 10px;
                padding: 12px 16px;
                border-radius: 8px;
                border: 1px solid #dee2e6;
                background: white;
                color: #2c3e50;
                text-decoration: none;
                font-weight: 500;
                font-size: 0.9rem;
                cursor: pointer;
                text-align: left;
                
                i{
                    font-size: 1.1rem;
                    flex-shrink: 0;
                    width: 20px;
                    text-align: center;
                }
                
                span{
                    flex: 1;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                }
                
                &.telefono{
                    i{
                    color: #28a745;
                    }
                    
                    &:hover{
                    border-color: #28a745;
                    }
                }
                
                &.email{
                    i{
                    color: #0dafcc;
                    }
                    
                    &:hover{
                        border-color: #0dafcc;
                    }
                }
                
                &.web{
                    i{
                    color: #6c757d;
                    }
                    
                    &:hover{
                        border-color: #6c757d;
                    }
                }
                
                &.whatsapp{
                    i{
                    color: #25D366;
                    }
                    
                    &:hover{
                        border-color: #25D366;
                    }
                }
                &.form-contacto{
                    grid-column: 2;
                    i{
                    color: #274198;
                    }
                    
                    &:hover{
                        border-color: #274198;
                    }
                }
            }
            .btn-lista-coches{
                display: flex;
                justify-content: center;
                align-items: center;
                gap: 10px;
                padding: 12px 16px;
                border-radius: 8px;
                border: 1px solid #274198;
                background: white;
                color: #274198;
                text-decoration: none;
                font-weight: 500;
                font-size: 0.9rem;
                cursor: pointer;
                text-align: left;
                margin: 20px;
                
                i{
                    font-size: 1.1rem;
                    flex-shrink: 0;
                    width: 20px;
                    text-align: center;
                }
                
                &:hover{
                    background: #f1f3f5;
                }
            }
        }
    }
}

/* Modal de pantalla completa */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.fullscreen-modal.active {
    display: flex;
}

.modal-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.modal-content img {
    max-width: 90%;
    max-height: 90dvh;
    object-fit: contain;
    user-select: none;
    animation: modalZoomIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 48px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    transform: scale(1.2) rotate(90deg);
    color: #0dafcc;
}

.modal-prev,
.modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 64px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal-prev {
    left: 30px;
}

.modal-next {
    right: 30px;
}

.modal-prev:hover,
.modal-next:hover {
    background: rgba(13, 175, 204, 0.8);
    border-color: #0dafcc;
    transform: translateY(-50%) scale(1.1);
}

.modal-prev:disabled,
.modal-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.05);
}

.modal-prev:disabled:hover,
.modal-next:disabled:hover {
    transform: translateY(-50%);
}

.modal-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    z-index: 10000;
}

/* Responsive */
@media (max-width: 1024px) {
    .coche .cont{
        grid-template-columns: 1fr;
        
        .caracteristicas{
            flex-wrap: wrap;
        }
        
        .equipamiento{
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        }
        
        .galeria{
            .miniaturas-wrapper{
                max-width: 600px;
            }
        }
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .coche{
        margin: 16px auto;
        
        .cont{
            gap: 16px;
            
            > div{
                padding: 14px 12px;
                border-radius: 8px;
                box-sizing: border-box;
                max-width: 100%;
                overflow: hidden;
            }
            
            .encabezado{
                font-size: 1.3rem;
                margin-bottom: 12px;
                padding-bottom: 12px;
                word-wrap: break-word;
                overflow-wrap: break-word;
                
                &::after{
                    width: 60px;
                }
            }
            
            .caracteristicas{
                gap: 6px;
                margin-bottom: 16px;
                grid-auto-flow: row;
                grid-template-columns: repeat(3, 1fr);
                
                .carac{
                    font-size: 0.75rem;
                    padding: 6px 10px;
                    gap: 4px;
                    
                    &::before{
                        font-size: 0.85rem;
                    }
                }
            }
            
            div:has(>.descripcion){
                height: auto;
                max-height: 300px;
            }
            
            .descripcion,
            .anunciante{
                font-size: 0.85rem;
                line-height: 1.6;
            }
            
            .pvp{
                flex-wrap: wrap;
                gap: 12px;
                padding: 12px 14px;
                font-size: 1.2rem;
                
                .precio{
                    min-width: 100px;
                }
            }
            
            .galeria{
                gap: 20px;
                
                .fotos{
                    height: 280px;
                    border-radius: 8px;
                }
                
                .carousel-container{
                    gap: 8px;
                }
                
                .carousel-btn{
                    width: 32px;
                    height: 32px;
                    font-size: 22px;
                    
                    &:hover{
                        transform: scale(1);
                    }
                    
                    &:active{
                        transform: scale(0.9);
                    }
                }
                
                .miniaturas-wrapper{
                    max-width: calc(100vw - 96px);
                }
                
                .miniaturas{
                    gap: 8px;
                    
                    img{
                        height: 70px;
                        border: 2px solid transparent;
                        border-radius: 6px;
                        
                        &:hover{
                            transform: scale(1);
                        }
                        
                        &.active{
                            border-color: #0dafcc;
                            box-shadow: 0 2px 6px rgba(13, 175, 204, 0.3);
                        }
                    }
                }
            }
            
            .equipamiento{
                grid-template-columns: 1fr;
                gap: 8px;
                
                .carac{
                    padding: 10px 12px;
                    font-size: 0.85rem;
                    
                    &:hover{
                        transform: none;
                    }
                }
            }
            div:has(>.anunciante){
                grid-row: 4;
            }
            .anunciante{
                .anunciante-header{
                    padding: 16px;
                    gap: 12px;
                    
                    .anunciante-logo{
                        width: 48px;
                        height: 48px;
                        
                        i{
                            font-size: 24px;
                        }
                    }
                    
                    .anunciante-info{
                        h4{
                            font-size: 1rem;
                            margin-bottom: 4px;
                        }
                        
                        .ubicacion{
                            font-size: 0.8rem;
                        }
                    }
                }
                
                .anunciante-contacto{
                    display: flex;
                    flex-direction: column;
                    gap: 10px;
                    padding: 16px;
                }
                
                .contacto-btn{
                    padding: 10px 14px;
                    font-size: 0.85rem;
                    
                    i{
                        font-size: 1rem;
                    }
                    
                    span{
                        font-size: 0.85rem;
                    }
                }
                
                .btn-lista-coches{
                    margin: 16px;
                    padding: 10px 14px;
                    font-size: 0.85rem;
                }
            }
        }
        
        h3{
            font-size: 0.8rem;
            padding-bottom: 10px;
        }
    }
    
    /* Modal responsive móvil */
    .modal-content img{
        max-width: 95%;
        max-height: 85dvh;
    }
    
    .modal-prev,
    .modal-next {
        width: 50px;
        height: 50px;
        font-size: 48px;
    }
    
    .modal-prev {
        left: 10px;
    }
    
    .modal-next {
        right: 10px;
    }
    
    .modal-close {
        top: 10px;
        right: 10px;
        font-size: 36px;
        width: 40px;
        height: 40px;
    }
    
    .modal-counter {
        bottom: 15px;
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* Responsive para móviles muy pequeños */
@media (max-width: 480px) {
    .coche{
        .cont{
            .encabezado{
                font-size: 1.1rem;
            }
            
            .pvp{
                font-size: 1.1rem;
                padding: 10px 12px;
            }
            
            .galeria{
                .fotos{
                    height: 220px;
                }
                
                .carousel-btn{
                    width: 28px;
                    height: 28px;
                    font-size: 20px;
                }
                
                .miniaturas-wrapper{
                    max-width: calc(100vw - 80px);
                }
                
                .miniaturas{
                    gap: 6px;
                    
                    img{
                        height: 60px;
                    }
                }
            }
            
            .anunciante{
                .anunciante-header{
                    .anunciante-logo{
                        width: 40px;
                        height: 40px;
                        
                        i{
                            font-size: 20px;
                        }
                    }
                }
            }
        }
    }
    
    .modal-prev,
    .modal-next {
        width: 40px;
        height: 40px;
        font-size: 36px;
    }
    
    .modal-prev {
        left: 5px;
    }
    
    .modal-next {
        right: 5px;
    }
}