/*
 * Catálogo de Vehículos Seminuevos - estilos
 * Extraído de page-catalogo-vehiculos.php (refactor modular)
 * El color del gradiente se inyecta vía variables CSS (:root --cat-color/--cat-dark/--cat-darker)
 */
        /* Animación de gradiente */
        @keyframes gradient {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        
        .gradient-animate {
            background: linear-gradient(-45deg, var(--cat-color), var(--cat-dark), var(--cat-darker), var(--cat-color));
            background-size: 400% 400%;
            animation: gradient 15s ease infinite;
        }
        
        /* Glassmorphism */
        .glass {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        
        .glass-dark {
            background: rgba(0, 0, 0, 0.4);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        /* Efecto 3D en Cards */
        .card-3d {
            transform-style: preserve-3d;
            transition: transform 0.6s cubic-bezier(0.23, 1, 0.320, 1);
        }
        
        .card-3d:hover {
            transform: translateY(-12px) rotateX(5deg);
        }
        
        /* Sombras premium */
        .shadow-premium {
            box-shadow: 0 20px 60px -10px rgba(1, 165, 81, 0.3);
        }
        
        .shadow-premium:hover {
            box-shadow: 0 30px 70px -10px rgba(1, 165, 81, 0.4);
        }
        
        /* Shine effect */
        .shine {
            position: relative;
            overflow: hidden;
        }
        
        .shine::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
            transition: left 0.5s;
        }
        
        .shine:hover::before {
            left: 100%;
        }
        
        /* Pulse animation */
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.6; }
        }
        
        .pulse {
            animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }
        
        /* Fade in animation */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .fade-in-up {
            animation: fadeInUp 0.6s ease-out forwards;
        }
        
        /* Scroll reveal */
        .reveal {
            opacity: 0;
            transform: translateY(50px);
            transition: all 0.8s cubic-bezier(0.23, 1, 0.320, 1);
        }
        
        /* Force hidden state to override specific view styles */
        #vehiculos-grid .vehiculo-card.hidden {
            display: none;
        }
        
        .reveal.active {
            opacity: 1;
            transform: translateY(0);
        }
        
        /* Blob animation */
        @keyframes blob {
            0% { transform: translate(0px, 0px) scale(1); }
            33% { transform: translate(30px, -50px) scale(1.1); }
            66% { transform: translate(-20px, 20px) scale(0.9); }
            100% { transform: translate(0px, 0px) scale(1); }
        }
        
        .animate-blob {
            animation: blob 7s infinite;
        }
        
        .animation-delay-2000 {
            animation-delay: 2s;
        }
        
        .animation-delay-4000 {
            animation-delay: 4s;
        }
        
        /* Vista Lista: Layout Horizontal Compacto */
        .vehiculo-card.vista-lista {
            display: grid ;
            grid-template-columns: 180px 1fr ;
            height: auto ;
            max-height: 140px ;
        }
        
        /* Ocultar badges absolutos en vista lista */
        .vehiculo-card.vista-lista > .absolute {
            display: none ;
        }
        
        /* Contenedor de imagen */
        .vehiculo-card.vista-lista > div:not(.absolute) {
            height: 140px ;
        }
        
        .vehiculo-card.vista-lista img {
            object-fit: contain ;
            height: 100% ;
        }
        
        /* Contenedor de contenido */
        .vehiculo-card.vista-lista > div:last-child {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.5rem;
            gap: 1rem;
        }
        
        .vehiculo-card.vista-lista h3 {
            font-size: 1.125rem ;
            margin: 0 ;
            flex-shrink: 0;
        }
        
        .vehiculo-card.vista-lista .mb-2,
        .vehiculo-card.vista-lista .mb-4,
        .vehiculo-card.vista-lista .mb-5 {
            margin-bottom: 0 ;
        }
        
        /* Ocultar separador */
        .vehiculo-card.vista-lista .h-px {
            display: none ;
        }
        
        /* Info rápida inline */
        .vehiculo-card.vista-lista > div:last-child > div {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        /* Precio más compacto */
        .vehiculo-card.vista-lista p.text-3xl {
            font-size: 1.5rem ;
        }
        
        /* Botón en vista lista - Desktop (estilo normal) */
        .vehiculo-card.vista-lista a.btn-ver-detalles {
            padding: 0.625rem 1.25rem;
            font-size: 0.875rem;
            white-space: nowrap;
            border-radius: 0.5rem;
            min-width: 100px;
        }
        
        @media (max-width: 768px) {
            .vehiculo-card.vista-lista {
                grid-template-columns: 140px 1fr ;
                max-height: 120px ;
            }
            
            .vehiculo-card.vista-lista > div:not(.absolute) {
                height: 120px ;
            }
            
            .vehiculo-card.vista-lista > div:last-child {
                flex-direction: column ;
                align-items: flex-start ;
                justify-content: center ;
                padding: 0.75rem 1rem ;
                gap: 0.1rem ;

            }
            
            .vehiculo-card.vista-lista h3 {
                font-size: 1rem ;
                margin-bottom: 0.25rem ;
                line-height: 1.2 ;
            }
            
            .vehiculo-card.vista-lista .mb-2,
            .vehiculo-card.vista-lista .mb-4,
            .vehiculo-card.vista-lista .mb-5 {
                margin-bottom: 0 ;
            }
            
            /* Ocultar badges de info en mobile */
            .vehiculo-card.vista-lista > div:last-child > div:first-child {
                display: none ;
            }
            
            .vehiculo-card.vista-lista p.text-3xl {
                font-size: 1.25rem ;
                margin: 0 ;
            }
            
            .vehiculo-card.vista-lista p.text-xs {
                display: none ;
            }

            /* Fix for action buttons in list view */
            .vehiculo-card.vista-lista .action-buttons {
                flex-direction: row ;
                gap: 0.5rem ;
                width: auto ;
            }
            
            .vehiculo-card.vista-lista .action-buttons a {
                padding: 0.5rem 1rem ;
                font-size: 0.875rem ;
                white-space: nowrap ;
                min-width: auto ;
                width: auto ;
                flex: 0 0 auto ;
            }

            /* Botones como barras verticales delgadas en móvil */
            .vehiculo-card.vista-lista .action-buttons {
                position: absolute ;
                right: 8px ;
                top: 8px ;
                bottom: 8px ;
                display: flex ;
                flex-direction: column ;
                gap: 6px ;
            }
            
            .vehiculo-card.vista-lista .action-buttons a {
                width: 44px ;
                flex: 1 ;
                min-height: unset ;
                padding: 0 ;
                border-radius: 8px ;
                display: flex ;
                align-items: center ;
                justify-content: center ;
                font-size: 0 ;
                transition: all 0.2s ;
            }
            
            /* Efecto shine - quitar */
            .vehiculo-card.vista-lista a.btn-ver-detalles div {
                display: none ;
            }
            
            /* Ocultar botón móvil redundante */
            .vehiculo-card.vista-lista .btn-ver-mobile {
                display: none ;
            }
        }
        
        /* ===========
           RESPONSIVE 
           ============ */
        
        /* Tablets and below (768px) */
        @media (max-width: 768px) {
            /* Container adjustments */
            .max-w-\[1920px\] {
                padding: 0 1rem;
            }
            
            /* Grid responsive - 2 columns on tablet */
            #vehiculos-grid.vista-grid {
                grid-template-columns: repeat(2, 1fr) ;
                gap: 1rem ;
            }
            
            /* Hero/Featured cards */
            .h-80, .h-72, .h-96 {
                height: 18rem ;
            }
            
            /* Headings size */
            h1 {
                font-size: 2rem ;
            }
            
            h2 {
                font-size: 1.5rem ;
            }
            
            h3 {
                font-size: 1.125rem ;
            }
            
            /* Filter buttons */
            .filtro-btn, .category-tab {
                padding: 8px 14px;
                font-size: 0.8125rem;
            }
            
            /* Sidebar filters */
            #sidebar-filtros {
                width: 280px ;
            }
            
            /* Price text */
            .text-3xl {
                font-size: 1.5rem ;
            }
            
            .text-2xl {
                font-size: 1.25rem ;
            }
            
            /* Button sizes */
            .btn-primary, .btn-secondary {
                padding: 10px 18px ;
                font-size: 0.875rem ;
            }
        }
        
        /* Mobile (640px and below) */
        @media (max-width: 640px) {
            /* Force full width container */
            .max-w-\[1920px\] {
                max-width: 100% ;
                padding: 0 0.75rem;
            }
            
            /* Grid: Single column */
            #vehiculos-grid.vista-grid {
                grid-template-columns: 1fr ;
            }
            
            /* Hidden elements on mobile */
            .btn-filtros-float-mobile {
                display: flex ;
            }
            
            /* Sidebar: Full width overlay */
            #sidebar-filtros {
                width: 100% ;
                max-width: 100% ;
            }
            
            /* Hero section */
            .h-80, .h-72, .h-96 {
                height: 16rem ;
            }
            
            /* Typography mobile */
            h1 {
                font-size: 1.75rem ;
                line-height: 1.2 ;
            }
            
            h2 {
                font-size: 1.25rem ;
            }
            
            h3 {
                font-size: 1rem ;
            }
            
            /* Price */
            .text-3xl {
                font-size: 1.25rem ;
            }
            
            .text-2xl {
                font-size: 1.125rem ;
            }
            
            /* Badges and pills */
            .badge, .pill {
                font-size: 0.75rem ;
                padding: 4px 8px ;
            }
            
            /* Buttons mobile */
            .btn-primary, .btn-secondary {
                padding: 8px 14px ;
                font-size: 0.8125rem ;
            }
            
            /* Filter chips */
            .filter-chip {
                font-size: 0.75rem ;
                padding: 6px 10px ;
            }
            
            /* Card padding */
            .vehiculo-card {
                padding: 0.75rem ;
            }
            
            /* Hide non-essential info */
            .hidden-mobile {
                display: none ;
            }
        }
        
        /* Small tablets (641px - 1024px) */
        @media (min-width: 641px) and (max-width: 1024px) {
            /* 2 columns grid */
            #vehiculos-grid.vista-grid {
                grid-template-columns: repeat(2, 1fr) ;
            }
            
            /* Adjust sidebar */
            #sidebar-filtros {
                width: 260px ;
            }
            
            /* Hero height */
            .h-80, .h-96 {
                height: 20rem ;
            }
        }
        
        /* Large screens (1536px+) */
        @media (min-width: 1536px) {
            /* More columns */
            #vehiculos-grid.vista-grid {
                grid-template-columns: repeat(5, 1fr) ;
            }
            
            /* Larger hero */
            .h-96 {
                height: 28rem ;
            }
            
            /* Better spacing */
            .max-w-\[1920px\] {
                padding: 0 3rem;
            }
        }
        
        /* Landscape mobile */
        @media (max-width: 768px) and (orientation: landscape) {
            .h-80, .h-72, .h-96 {
                height: 14rem ;
            }
            
            /* Compact padding */
            .vehiculo-card {
                padding: 0.5rem ;
            }
        }
        
        /* Ultra-wide screens (1920px+) */
        @media (min-width: 1920px) {
            #vehiculos-grid.vista-grid {
                grid-template-columns: repeat(6, 1fr) ;
            }
        }
        
        /* ======================
           VIEW TOGGLE BUTTONS RESPONSIVE
           ====================== */
        
        /* Ensure view toggle buttons have proper sizing and visible icons on all screens */
        #btn-vista-grid,
        #btn-vista-lista {
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 2.5rem;
            min-height: 2.5rem;
        }
        
        #btn-vista-grid svg,
        #btn-vista-lista svg {
            width: 1.25rem;
            height: 1.25rem;
            flex-shrink: 0;
        }
        
        @media (max-width: 640px) {
            /* Mobile view controls bar */
            #btn-vista-grid,
            #btn-vista-lista {
                min-width: 2.75rem;
                min-height: 2.75rem;
                padding: 0.625rem;
            }
            
            #btn-vista-grid svg,
            #btn-vista-lista svg {
                width: 1.125rem;
                height: 1.125rem;
            }
        }
        
        /* ======================
           LIST VIEW ACTION BUTTONS ICONS (MOBILE)
           ====================== */
        
        @media (max-width: 768px) {
            /* Make action buttons show icons in list view on mobile */
            .vehiculo-card.vista-lista .action-buttons a {
                position: relative;
            }
            
            /* Add icons to buttons via pseudo-elements for mobile list view */
            .vehiculo-card.vista-lista .action-buttons .btn-ver-detalles::before {
                content: '';
                display: block;
                width: 1.25rem;
                height: 1.25rem;
                background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3E%3C/svg%3E");
                background-repeat: no-repeat;
                background-position: center;
                background-size: contain;
            }
            
            .vehiculo-card.vista-lista .action-buttons .btn-cotizar::before {
                content: '';
                display: block;
                width: 1.25rem;
                height: 1.25rem;
                background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z'/%3E%3C/svg%3E");
                background-repeat: no-repeat;
                background-position: center;
                background-size: contain;
            }
            
            /* Color adjustment for non-green button */
            .vehiculo-card.vista-lista .action-buttons .btn-ver-detalles::before {
                background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23374151' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3E%3C/svg%3E");
            }
            
            .vehiculo-card.vista-lista .action-buttons .btn-ver-detalles:hover::before {
                background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3E%3C/svg%3E");
            }
        }
        
        /* Better mobile list view layout for action buttons */
        @media (max-width: 640px) {
            .vehiculo-card.vista-lista .action-buttons {
                flex-direction: column;
                gap: 4px;
            }
            
            .vehiculo-card.vista-lista .action-buttons a {
                width: 40px;
                min-height: 44px;
                display: flex;
                align-items: center;
                justify-content: center;
                border-radius: 8px;
                padding: 0;
            }
            
            /* Hide text spans in buttons on mobile list view */
            .vehiculo-card.vista-lista .action-buttons a span {
                display: none;
            }
        }
