/* ================================================================
   css/catalogo.css
   Migrado desde el <style> inline de catalogo.php.
   ================================================================ */

    /* ============================================
       CANVAS GENERAL: LIENZO LIGHT PREMIUM
       ============================================ */
    body {
        background-color: #eef0f3 !important; /* Gris perlado neutro: contrasta con tarjeta blanca sin chocar con el naranja */
        color: #0f172a;
        min-height: 100vh;
    }

    /* ============================================
       LAYOUT ENGINE: VISTA CUADRÍCULA (GRID)
       ============================================ */
    .view-grid-active {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 1rem !important;
    }
    @media (min-width: 768px) {
        .view-grid-active { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 1.5rem !important; }
    }
    @media (min-width: 1280px) {
        .view-grid-active { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    }

    /* Ajustes dinámicos de grilla (modo cuadrícula compacta) */
    .view-grid-active .moto-card .card-body { padding: 0.75rem !important; }
    .view-grid-active .moto-card .card-title { font-size: 0.95rem !important; }
    .view-grid-active .moto-card .card-brand { font-size: 0.65rem !important; }
    .view-grid-active .moto-card .card-specs { font-size: 0.7rem !important; margin-bottom: 0.5rem !important; }
    .view-grid-active .moto-card .card-footer { padding-top: 0.5rem !important; flex-direction: column !important; align-items: flex-start !important; gap: 0.35rem !important; }
    .view-grid-active .moto-card .card-price { font-size: 1.15rem !important; }
    .view-grid-active .moto-card .card-price span { font-size: 0.8rem !important; }
    .view-grid-active .moto-card .card-old-price { font-size: 0.65rem !important; }
    .view-grid-active .moto-card .card-cta { font-size: 0.65rem !important; align-self: flex-end; }
    .view-grid-active .moto-card .btn-fav,
    .view-grid-active .moto-card .btn-share { width: 2rem !important; height: 2rem !important; }
    .view-grid-active .moto-card .btn-fav i,
    .view-grid-active .moto-card .btn-share i { font-size: 0.8rem !important; }

    .moto-card > a { text-decoration: none; color: inherit; }
    .moto-card > a:focus-visible { outline: 2px solid #ea580c; outline-offset: -2px; border-radius: 1.5rem; }

    /* ============================================
       ANIMACIONES DE ENTRADA SPRING (PC & MOBILE)
       ============================================ */
    .moto-card.invisible-card { opacity: 0; transform: translateY(30px) scale(0.98); }
    .moto-card.visible-card {
        opacity: 1; transform: translateY(0) scale(1);
        transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    }

    @media (max-width: 1024px) {
        body { background-color: #eef0f3 !important; }
        .moto-card { contain: layout paint style; content-visibility: auto; contain-intrinsic-size: 0 460px; }
    }

    @media (hover: none) and (pointer: coarse) {
        .moto-card { transition: none !important; }
        .moto-card .group-hover\:scale-105 { transform: none !important; transition: none !important; }
        .btn-fav:hover, .moto-card button:hover { transform: none !important; }
    }
    
    /* Estados Favorito Súper Claros */
    .btn-fav.active i { font-weight: 900; color: #ea580c; }
    .btn-fav.active { background-color: #fff7ed; border-color: #ffedd5; color: #ea580c !important; }
    
    .custom-scrollbar::-webkit-scrollbar { width: 6px; }
    .custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
    .custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
    .custom-scrollbar:hover::-webkit-scrollbar-thumb { background: #94a3b8; }


/* ================================================================
   MIGRADO DESDE detalle.css
   ================================================================ */
            /* Atributos destacados — tiles blancos con accent naranja sutil en activos.
               Lenguaje coherente con el resto de detalle.php (cards blancas, borde
               orange-100, sombra suave). */
            .attr-card {
                position: relative;
                background: #ffffff;
                border: 1px solid #f3f4f6;
                box-shadow: 0 1px 2px 0 rgba(0,0,0,0.03);
            }
            .attr-card .attr-icon {
                width: 42px; height: 42px; border-radius: 12px;
                display: flex; align-items: center; justify-content: center;
                font-size: 18px; flex-shrink: 0;
                background: #f9fafb;
                border: 1px solid #f3f4f6;
                color: #9ca3af;
            }
            .attr-card .attr-pill {
                display: inline-flex; align-items: center; gap: 4px;
                padding: 3px 8px; border-radius: 999px;
                font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.14em;
                background: #f9fafb; color: #9ca3af; border: 1px solid #e5e7eb;
            }
            .attr-card--on {
                border-color: #fed7aa;
                background: linear-gradient(160deg, #fff7ed, #ffffff 70%);
            }
            .attr-card--on:hover {
                border-color: #fdba74;
                transform: translateY(-2px);
                box-shadow: 0 8px 20px -8px rgba(249,115,22,0.18);
            }
            .attr-card--on .attr-icon {
                background: linear-gradient(135deg, #fff7ed, #ffffff);
                border-color: #fed7aa;
                color: #ea580c;
                box-shadow: 0 4px 12px -4px rgba(249,115,22,0.25);
            }
            .attr-card--on .attr-pill {
                background: #ecfdf5; color: #059669; border-color: #a7f3d0;
            }
            .attr-card--off { opacity: 1; }
            .attr-card-glow {
                position: absolute; top: 0; right: 0;
                width: 90px; height: 90px; margin: -45px -45px 0 0;
                border-radius: 999px;
                background: radial-gradient(circle, rgba(249,115,22,0.14) 0%, transparent 70%);
                opacity: 0; transition: opacity .3s ease;
                pointer-events: none;
            }
            .attr-card--on:hover .attr-card-glow { opacity: 1; }


/* ================================================================
   MIGRADO DESDE vender.css
   ================================================================ */
        html { scroll-behavior: smooth; }
        body{padding-bottom: 0px!important}

        /* Badges de plan — mismos tokens que comunidad/layout.php */
        .foro-badge-base {
            background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
            color: #fff;
            border: 1px solid rgba(251, 146, 60, 0.6);
            box-shadow: 0 1px 2px rgba(194, 65, 12, 0.3);
        }
        .foro-badge-pro {
            background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 45%, #d97706 100%);
            color: #78350f;
            border: 1px solid rgba(253, 224, 71, 0.8);
            box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255,255,255,0.4);
            position: relative;
            overflow: hidden;
        }
        .foro-badge-pro::after {
            content: '';
            position: absolute;
            top: 0; left: -100%;
            width: 50%; height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
            animation: proShimmer 3.5s ease-in-out infinite;
        }
        @keyframes proShimmer { 0% { left: -100%; } 60%, 100% { left: 200%; } }
        .foro-badge-plus {
            background: linear-gradient(115deg, #d946ef 0%, #8b5cf6 35%, #3b82f6 70%, #d946ef 100%);
            background-size: 220% 220%;
            animation: plusShift 4s ease-in-out infinite;
            color: #fff;
            border: 1px solid rgba(232, 121, 249, 0.7);
            box-shadow: 0 0 10px rgba(217, 70, 239, 0.45), 0 0 20px rgba(139, 92, 246, 0.25), inset 0 1px 0 rgba(255,255,255,0.3);
            text-shadow: 0 1px 2px rgba(0,0,0,0.25);
        }
        @keyframes plusShift {
            0%, 100% { background-position: 0% 50%; }
            50%      { background-position: 100% 50%; }
        }
        @media (prefers-reduced-motion: reduce) {
            .foro-badge-pro::after { animation: none; display: none; }
            .foro-badge-plus { animation: none; }
        }
