/* === PRODUCT GRID === */
.rcs-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
}

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

@media (min-width: 1024px) {
  .rcs-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* === CENTERED TITLE === */
.rcs-grid-title,
h2,
h3,
h4 {
  text-align: center;
  font-weight: 700;
  color: #ffea00;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* === CARD === */
.rcs-card {
  position: relative;
  background: #0b0b0b;
  border-radius: 12px;
  overflow: hidden;
  width: 95%;
  max-width: 200px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* === PRODUCT IMAGE === */
.rcs-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* === PRODUCT TITLE === */
.rcs-card h4 {
  margin: 0;
  padding: 8px;
  background: #0b0b0b;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-align: center;
}

/* === OPTIMIZED RUNNING GLOW BORDER === */
.rcs-card::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  border-radius: 14px;
  background: linear-gradient(90deg, #ffea00, #fff45f, #ffea00);
  background-size: 300% 300%;
  animation: glow-move 3s linear infinite;
  z-index: 1;
  pointer-events: none;
  will-change: transform; /* Forces GPU acceleration */
  box-shadow: 0 0 10px rgba(255, 234, 0, 0.6);
}

/* === Smoother animation using translate instead of repaint === */
@keyframes glow-move {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 300% 50%;
  }
}

/* === HOVER EFFECT === */
.rcs-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(255, 234, 0, 0.8);
}
