/*
========================================
ESTILOS DEL PLUGIN MOTOCARROS
========================================
*/

/* Variables globales (Colores Motocarros) */
.moto-wrapper {
    --moto-primary: #ff6b00; /* Naranja principal */
    --moto-primary-hover: #e65f00;
    --moto-background: #ffffff;
    --moto-text-main: #0f172a;
    --moto-text-muted: #64748b;
    --moto-border-light: #e2e8f0;
    --moto-shadow-featured: 0 25px 50px -12px rgba(255, 107, 0, 0.15); /* Sombra naranja suave */
    
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 1. Estructura de Rejilla (Responsiva) */
.moto-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 columna por defecto */
    gap: 24px;
    max-width: 1280px; /* max-w-7xl */
    margin: 0 auto;
    padding: 20px 0;
}

/* Responsive: 3 columnas en pantallas medianas (md:grid-cols-3) */
@media (min-width: 768px) {
    .moto-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 2. Estilo base de la Tarjeta */
.moto-card {
    position: relative;
    border-radius: 16px; /* rounded-2xl */
    overflow: hidden;
    transition: all 0.3s ease; /* transition-all duration-300 */
    display: flex;
    flex-direction: column;
    height: 100%;
    
    /* Por defecto es la tarjeta estándar (blanca con borde gris) */
    border: 1px solid var(--moto-border-light);
    bg-color: var(--moto-background);
}

/* Efectos al pasar el ratón por encima (hover) */
.moto-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02); /* hover:shadow-xl */
    transform: translateY(-4px); /* hover:-translate-y-1 */
}

/* 3. Estilo Tarjeta DESTACADA (Naranja) */
.moto-card--featured {
    border: 2px solid var(--moto-primary); /* border-primary */
    /* Degradado de naranja suave a blanco */
    background: linear-gradient(to bottom, rgba(255, 107, 0, 0.05), var(--moto-background)); /* from-primary/5 to-white */
}

/* Efecto hover especial para la destacada */
.moto-card--featured:hover {
    box-shadow: var(--moto-shadow-featured); /* hover:shadow-2xl naranja */
}

/* 4. Etiqueta "Top Ventas" (Badge) */
.moto-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: var(--moto-primary);
    color: #ffffff;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 800; /* font-extrabold */
    padding: 6px 14px;
    border-radius: 9999px; /* rounded-full */
    z-index: 10;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 5. Contenedor de Imagen y Placeholder */
.moto-image-container {
    aspect-ratio: 4 / 3; /* aspect-[4/3] */
    background-color: #f8fafc; /* bg-gray-50 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.moto-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    /* Efecto mix-blend para limpiar fondos de fotos de producto */
    mix-blend-mode: multiply; 
    transition: transform 0.5s ease;
}

/* Animación de imagen en hover */
.moto-card:hover .moto-image {
    transform: scale(1.05); /* group-hover:scale-110 (un poco más suave) */
}

/* Placeholder si no hay foto */
.moto-placeholder {
    text-align: center;
    color: var(--moto-text-muted);
    font-size: 12px;
}

.moto-placeholder-icon {
    width: 96px; /* w-24 */
    height: 96px;
    margin: 0 auto 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Colores de placeholder distintos si es destacado o no */
.moto-card--featured .moto-placeholder-icon {
    background-color: rgba(255, 107, 0, 0.1); /* bg-primary/10 */
    color: var(--moto-primary); /* text-primary */
}

.moto-card:not(.moto-card--featured) .moto-placeholder-icon {
    background-color: #fff7ed; /* bg-orange-50 */
    color: var(--moto-primary);
}

/* 6. Cuerpo del Contenido (p-6) */
.moto-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.moto-title {
    font-size: 24px; /* text-2xl */
    font-weight: 800; /* font-extrabold */
    color: #111827; /* text-gray-900 */
    margin: 0 0 4px 0;
    letter-spacing: -0.025em; /* tracking-tight */
}

.moto-desc-marketing {
    color: var(--moto-text-muted);
    font-size: 14px;
    margin: 0 0 24px 0;
}

/* 7. Especificaciones Técnicas (space-y-4) */
.moto-specs {
    margin-bottom: 32px; /* mb-8 */
    flex-grow: 1; /* Empuja el footer hacia abajo */
}

.moto-spec-item {
    display: flex;
    align-items: center;
    gap: 12px; /* gap-3 */
    font-size: 14px;
    margin-bottom: 16px; /* Equivalente a space-y-4 */
}

.moto-spec-icon {
    width: 32px; /* w-8 */
    height: 32px;
    border-radius: 9999px; /* rounded-full */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Colores de iconos distintos */
.moto-card--featured .moto-spec-icon {
    background-color: rgba(255, 107, 0, 0.1); /* bg-primary/10 */
    color: var(--moto-primary);
}

.moto-card:not(.moto-card--featured) .moto-spec-icon {
    background-color: #fff7ed; /* bg-orange-50 */
    color: var(--moto-primary);
}

.moto-spec-label {
    color: var(--moto-text-muted);
}

.moto-spec-value {
    font-weight: 700; /* font-bold */
    color: #111827; /* text-gray-900 */
    margin-left: auto; /* ml-auto */
}

/* 8. Footer, Precio y Botón (border-t) */
.moto-footer {
    border-top: 1px solid var(--moto-border-light); /* border-border */
    padding-top: 16px; /* pt-4 */
    margin-top: auto;
}

.moto-price-ask {
    color: var(--moto-primary);
    font-weight: 800; /* font-extrabold */
    font-size: 20px; /* text-xl */
    margin: 0 0 16px 0;
}

.moto-btn-wa {
    display: block;
    width: 100%;
    background-color: var(--moto-primary);
    color: #ffffff !important; /* !important para sobreescribir estilos del tema */
    text-decoration: none !important;
    padding: 12px 0; /* py-3 */
    border-radius: 12px; /* rounded-xl */
    font-weight: 700; /* font-bold */
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(255, 107, 0, 0.1), 0 2px 4px -1px rgba(255, 107, 0, 0.06);
}

.moto-btn-wa:hover {
    background-color: var(--moto-primary-hover);
    transform: scale(1.02); /* hover:scale-[1.02] */
    color: #ffffff !important;
}