/* ==========================================================================
   GLOBAL SKELETON LOADER - TAMIZMAS
   Prefijo exclusivo: tm-skeleton- / .tm-skeleton
   ========================================================================== */

.tm-skeleton-loader {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.tm-skeleton-loader[hidden] {
    display: none !important;
}

/* Elemento base de Skeleton con animación Shimmer */
.tm-skeleton {
    display: block;
    border-radius: 6px;
    background: linear-gradient(
        90deg,
        #edf1f3 25%,
        #f7f9fa 50%,
        #edf1f3 75%
    );
    background-size: 200% 100%;
    animation: tmSkeletonShimmer 1.3s infinite linear;
}

@keyframes tmSkeletonShimmer {
    from {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}

/* Modificadores y formas utilitarias */
.tm-skeleton--avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
}

.tm-skeleton--title {
    width: 60%;
    height: 18px;
}

.tm-skeleton--text {
    width: 80%;
    height: 12px;
}

.tm-skeleton--short {
    width: 40%;
    height: 12px;
}

.tm-skeleton--thumb {
    width: 100%;
    height: 56px;
    border-radius: 8px;
}

.tm-skeleton--img {
    width: 100%;
    height: 120px;
    margin-bottom: 16px;
}

.tm-skeleton--badge {
    width: 100px;
    height: 28px;
    border-radius: 8px;
}

.tm-skeleton--price {
    width: 50%;
    height: 20px;
}

.tm-skeleton--btn {
    width: 100%;
    height: 44px;
    border-radius: 8px;
}

.tm-skeleton--field {
    width: 100%;
    height: 44px;
    border-radius: 8px;
}

.tm-skeleton--row {
    width: 100%;
    height: 48px;
    border-radius: 8px;
}

.tm-skeleton--header {
    width: 40%;
    height: 20px;
    margin-bottom: 12px;
}

.tm-skeleton--body {
    width: 80%;
    height: 14px;
}

/* Layouts y Contenedores */
.tm-skeleton-card {
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tm-skeleton-grid--favorites {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.tm-skeleton-card--orders {
    display: grid;
    grid-template-columns: minmax(290px, 1.2fr) minmax(260px, 1fr) 215px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    gap: 16px;
}

.tm-skeleton-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Layout Perfil */
.tm-skeleton-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.tm-skeleton-profile-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.tm-skeleton-profile-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Layout Pedido Detalle */
.tm-skeleton-od-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tm-skeleton-od-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.tm-skeleton-od-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.tm-skeleton-od-panel {
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Responsive */
@media (max-width: 992px) {
    .tm-skeleton-card--orders {
        grid-template-columns: 1fr;
    }

    .tm-skeleton-grid--favorites {
        grid-template-columns: repeat(2, 1fr);
    }

    .tm-skeleton-od-cards {
        grid-template-columns: 1fr;
    }

    .tm-skeleton-od-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .tm-skeleton-grid--favorites {
        grid-template-columns: 1fr;
    }
}
