.idl-shop-tabs {
  max-width: 100%;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
  font-family: Arial, sans-serif;
}

/* Tabs */
.idl-shop-tabs .tabs-nav nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap; /* Cho phép xuống dòng khi nhiều tab */
}

.idl-shop-tabs .tab-link {
  font-family: "Geist", sans-serif;  
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  text-transform: uppercase;
  padding: 0.5rem 0;
  color: #484848;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.idl-shop-tabs .tab-link:hover {
  color: #000;
}

.idl-shop-tabs .tab-link.active {
  color: #000;
  font-weight: 600;
}

.idl-shop-tabs .tab-link.active::after {
  content: "";
  display: block;
  height: 2px;
  background: #000;
  margin-top: 4px;
  width: 100%;
}

/* Grid wrapper */
#idl-products-wrapper {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 cột desktop */
  gap: 20px;
  opacity: 0;                  /* trạng thái ban đầu */
  transform: translateY(20px); /* hiệu ứng slide xuống */
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Khi AJAX load xong → hiển thị */
#idl-products-wrapper.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  #idl-products-wrapper {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  #idl-products-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 374px) {
  #idl-products-wrapper {
    grid-template-columns: 1fr;
  }
}

/* Product card */
#idl-products-wrapper .product-card {
  overflow: hidden;
  background: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

#idl-products-wrapper .product-card img {
  width: 100%;
  aspect-ratio: 9/15;
  object-fit: cover;
  display: block;
}

#idl-products-wrapper .product-card h3 {
  line-height: 1.75rem;
  font-weight: 600;
  font-size: 1.125rem;
  padding: 0.75rem 1rem 0;
  margin: 0;
}

#idl-products-wrapper .price {
  padding: 0.5rem 1rem 1rem;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 2rem;
}

#idl-products-wrapper .product-card a,
#idl-products-wrapper .product-card a:visited,
#idl-products-wrapper .product-card h3,
#idl-products-wrapper .product-card .price {
  font-family: "Geist", sans-serif;  
  color: #000;
  text-decoration: none;
}

#idl-products-wrapper .old-price {
  text-decoration: line-through;
  color: #888;
  margin-right: 6px;
}

#idl-products-wrapper .sale-price {
  color: #000000;
  font-weight: 700;
}

/* ================= Hiệu ứng stagger ================= */
#idl-products-wrapper.loaded .product-card {
  opacity: 1;
  transform: translateY(0);
}

#idl-products-wrapper.loaded .product-card:nth-child(1) { transition-delay: 0.1s; }
#idl-products-wrapper.loaded .product-card:nth-child(2) { transition-delay: 0.2s; }
#idl-products-wrapper.loaded .product-card:nth-child(3) { transition-delay: 0.3s; }
#idl-products-wrapper.loaded .product-card:nth-child(4) { transition-delay: 0.4s; }
#idl-products-wrapper.loaded .product-card:nth-child(5) { transition-delay: 0.5s; }
#idl-products-wrapper.loaded .product-card:nth-child(6) { transition-delay: 0.6s; }
#idl-products-wrapper.loaded .product-card:nth-child(7) { transition-delay: 0.7s; }
#idl-products-wrapper.loaded .product-card:nth-child(8) { transition-delay: 0.8s; }

/* Loading text */
.idl-loading {
  font-family: "Geist", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #666;
  text-align: center;
  grid-column: 1 / -1;
}
