/* =========================
   SKELETON
========================= */

/* Skeleton animación */
@keyframes pulse {
  0% { background-color: #e0e0e0; }
  50% { background-color: #f0f0f0; }
  100% { background-color: #e0e0e0; }
}

/* Products grid skeleton */
.products.skeleton-grid {
  display: grid !important;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr); /* móvil */
  list-style: none;
  padding: 0 !important;
  margin: 0 !important;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 988px) {
  .products.skeleton-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1160px) {
  .products.skeleton-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Skeleton product card */
.skeleton-product {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
  margin: 0;
}

.skeleton {
  background-color: #e0e0e0;
  animation: pulse 1.5s infinite;
  border-radius: inherit;
}

.img-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
}

.title-placeholder {
  height: 20px;
  width: 70%;
  border-radius: 4px;
}

.price-placeholder {
  height: 18px;
  width: 40%;
  border-radius: 4px;
}

.button-placeholder {
  height: 36px;
  width: 100%;
  border-radius: 6px;
}

/* =========================
   GRID REAL (ANTI-WOO)
========================= */

#products-grid ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none;
  width: 100%;
  box-sizing: border-box;
}

#products-grid ul.products li.product {
  width: 100% !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  box-sizing: border-box;
  overflow: hidden;
}

/* 🔥 Sobrescribe media queries de WooCommerce */
@media (max-width: 968px) {
  #products-grid ul.products {
    grid-template-columns: repeat(2, 1fr);
  }

  #products-grid ul.products li.product {
    width: 100% !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
  }
}

@media (max-width: 1160px) and (min-width: 769px) {
  #products-grid ul.products {
    grid-template-columns: repeat(3, 1fr);
  }
}
