/* Skeleton loaders — pre-carga visual mientras llega la data AJAX */

@keyframes skeleton-shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton-shimmer {
    background: linear-gradient(90deg, #eaeaea 25%, #f5f5f5 50%, #eaeaea 75%);
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
    border-radius: 4px;
}

/* Grid contenedor para cards de camión/equipo */
.skeleton-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 0;
    width: 100%;
}

.skeleton-card {
    flex: 0 0 calc(33.333% - 16px);
    max-width: calc(33.333% - 16px);
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    padding: 12px;
}

@media (max-width: 991px) {
    .skeleton-card { flex: 0 0 calc(50% - 16px); max-width: calc(50% - 16px); }
}

@media (max-width: 600px) {
    .skeleton-card { flex: 0 0 100%; max-width: 100%; }
}

.skeleton-img {
    width: 100%;
    height: 200px;
    margin-bottom: 12px;
}

.skeleton-line {
    height: 12px;
    margin-bottom: 8px;
}

.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }

.skeleton-price {
    height: 22px;
    width: 45%;
    margin-top: 12px;
}

/* Galería de detalle */
.skeleton-gallery-main {
    width: 100%;
    height: 420px;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .skeleton-gallery-main { height: 260px; }
}

.skeleton-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.skeleton-gallery-thumb {
    flex: 1;
    height: 70px;
}

/* Specs rows del detalle */
.skeleton-specs-row {
    height: 16px;
    margin-bottom: 10px;
}

.skeleton-specs-row.w-70 { width: 70%; }
.skeleton-specs-row.w-55 { width: 55%; }

/* Contenedor de skeletons dentro de un target */
.skeleton-wrapper {
    width: 100%;
}
