.step-indicator {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.step-completed {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
}

.step-completed .step-indicator {
  background-color: #d1fae5;
  border-color: #34d399;
  color: #065f46;
}

.step-completed p {
  color: #065f46;
}

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

.animate-spin {
  animation: spin 1s linear infinite;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(59, 130, 246, 0.35);
  border-top-color: rgba(59, 130, 246, 1);
  border-radius: 999px;
}

/* HTMX indicators */
.htmx-indicator {
  display: none;
  opacity: 0;
}

.htmx-indicator[data-initial-visible="1"] {
  display: flex;
  opacity: 1 !important;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: flex;
  opacity: 1 !important;
}

/* Bulk refresh (search results): show progress while fixing broken images */
.bulk-image-frame {
  position: relative;
}

.bulk-image-refresh-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border-radius: 0.5rem;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.35) 8%, rgba(255, 255, 255, 0.65) 18%, rgba(255, 255, 255, 0.35) 33%);
  background-size: 200% 100%;
  animation: bulk-shimmer 1.1s linear infinite;
}

@keyframes bulk-shimmer {
  to {
    background-position-x: -200%;
  }
}

.product-card.bulk-image-refreshing .bulk-image-refresh-overlay {
  display: flex;
}

.product-card.bulk-image-refreshing img {
  opacity: 0.35;
  transition: opacity 160ms ease;
}

/* Featured / collections (editorial) */
.featured-hero-pattern {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25), transparent 48%),
    radial-gradient(circle at 80% 15%, rgba(255, 255, 255, 0.18), transparent 52%),
    radial-gradient(circle at 50% 95%, rgba(255, 255, 255, 0.14), transparent 55%);
}

.featured-collage-frame {
  position: relative;
  width: 100%;
  height: clamp(320px, 46vw, 520px);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.featured-section-frame {
  position: relative;
  width: 100%;
  height: clamp(240px, 34vw, 420px);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.26);
  overflow: hidden;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
}

.featured-section-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.70), transparent 58%),
    radial-gradient(circle at 75% 20%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(circle at 50% 90%, rgba(255, 255, 255, 0.40), transparent 65%);
  opacity: 0.8;
  pointer-events: none;
}

.featured-collage {
  position: relative;
  width: 100%;
  height: 100%;
}

.featured-hover-portal {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 10px)) translateY(6px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.featured-hover-portal.is-visible {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 10px)) translateY(0);
}

.featured-hover-card {
  width: min(360px, calc(100vw - 48px));
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(10px);
  padding: 10px 12px;
}

.featured-hover-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  color: rgb(28, 25, 23);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-hover-row {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: rgb(87, 83, 78);
}

.featured-hover-price {
  font-weight: 700;
  color: rgb(37, 99, 235);
  white-space: nowrap;
}

.featured-hover-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-collage-item {
  position: absolute;
  width: clamp(120px, 18vw, 240px);
  transform: translate(-50%, -50%) rotate(var(--featured-rot, 0deg)) scale(var(--featured-scale, 1));
  transition: transform 180ms ease, filter 180ms ease;
}

.featured-section-frame .featured-collage-item {
  width: clamp(100px, 14vw, 190px);
}

.featured-cutout {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.22));
}

.featured-collage-item:hover {
  transform: translate(-50%, -52%) rotate(var(--featured-rot, 0deg)) scale(calc(var(--featured-scale, 1) * 1.04));
}

.featured-collage-item:hover .featured-cutout {
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.28));
}

.featured-shelf {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}

.featured-shelf-card {
  scroll-snap-align: start;
  width: 220px;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.featured-shelf-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.12);
}

.featured-shelf-image {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.70), rgba(255, 255, 255, 0.20));
}

.featured-cutout--shelf {
  width: 82%;
  max-height: 165px;
  object-fit: contain;
}
