.ajax-slider-menu {
  display: flex;
  flex-wrap: wrap;
  padding: 10px 0;
  gap: 6px;
  justify-content: center; /* center by default */
}

.menu-card {
  flex: 0 0 auto;
  background: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.menu-card .icon {
  font-size: 20px;
  margin-bottom: 5px;
}

.menu-card:hover {
  background: #f0f4ff;
}

.ajax-slider-target {
  margin-top: 16px; /* default for medium screens */
  position: relative;
  min-height: 600px;
}

.ajax-slider-content {
  position: relative;
  width: 100%;
}

.ajax-slider-iframe {
  width: 100%;
  height: 1000px;
  border: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.ajax-loader-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  border-radius: 10px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ccc;
  border-top: 4px solid #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── Responsive Behavior ───────────────────── */

@media (max-width: 768px) {
  .ajax-slider-menu {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .menu-card {
    flex: 0 0 auto;
  }
}

@media (max-width: 480px) {
  .ajax-slider-target {
    margin-top: 8px;
  }
}

@media (min-width: 1024px) {
  .ajax-slider-target {
    margin-top: 24px;
  }
}