/* ── Provider pages ── */
.provider-page {
  padding: 0.5rem 0 1.5rem;
}

.provider-page__hero {
  position: relative;
  margin-bottom: 0.85rem;
  padding: 8px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(59, 158, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  width: fit-content;
}

.provider-page__glow {
  position: absolute;
  top: -40px;
  right: -20px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  pointer-events: none;
}

.provider-page__title {
  position: relative;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color:  #e7e7e7;
}

.provider-page__subtitle {
  position: relative;
  font-size: 0.78rem;
  color: #e7e7e7;
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.provider-card {
  min-width: 0;
}

.provider-card__button {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.provider-card__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

.provider-card__button:focus-visible {
  outline: 2px solid rgba(255, 193, 7, 0.75);
  outline-offset: 3px;
}

.provider-card__button:active {
  transform: translateY(-1px);
}

.catalog-maintenance {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.62);
  pointer-events: none;
}

.catalog-maintenance__icon {
  width: clamp(34px, 30%, 58px);
  height: auto;
  object-fit: contain;
}

.catalog-maintenance__text {
  color: #fff;
  font-size: clamp(0.52rem, 2vw, 0.72rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.1;
}

.provider-card--maintenance .provider-card__button {
  cursor: not-allowed;
}

.provider-card--maintenance .provider-card__button:hover,
.provider-card--maintenance .provider-card__button:active {
  transform: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.provider-card__media {
  position: relative;
  aspect-ratio: 440 / 500;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  background: linear-gradient(160deg, #2a2a2a, #111);
}

.provider-card__media img:not(.provider-card__image--fallback),
.provider-card__image:not(.provider-card__image--fallback) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.provider-card__media--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14% 12%;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 193, 7, 0.14), transparent 58%),
    linear-gradient(160deg, #2a2a2a, #111);
}

.provider-card__image--fallback {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0.95;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.provider-card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 30%, rgba(0, 0, 0, 0.08));
  pointer-events: none;
}

.provider-card__media--fallback .provider-card__overlay {
  height: 24%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.12) 60%,
    rgba(0, 0, 0, 0.28) 100%
  );
}

.provider-card__footer {
  display: flex;
  align-items: stretch;
  height: 30px;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  background: #fff;
  border: none;
}

.provider-card__footer-brand {
  flex: 0 0 35%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2e2e2e, #070707);
  clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%);
  padding: 0 0.45rem 0 0.35rem;
  position: relative;
  z-index: 2;
  border: none;
}

.provider-card__footer-name {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  margin-left: -10%;
  padding: 0 0.35rem 0 10%;
  border: none;
}

.provider-card__brand {
  width: auto;
  height: 22px;
  max-width: 90%;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.provider-card__name {
  font-size: clamp(0.48rem, 1.4vw, 0.72rem);
  font-weight: 800;
  line-height: 1.15;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.provider-page__loading,
.provider-page__empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 220px;
  padding: 2rem 1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  text-align: center;
}

.provider-page__loading p,
.provider-page__empty p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.provider-page__empty h2 {
  font-size: 1.05rem;
  font-weight: 700;
}

.provider-page__empty-icon {
  font-size: 2rem;
}

.provider-page__empty-tag {
  margin-top: 0.25rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 193, 7, 0.12);
  color: var(--accent-gold, #ffc107);
  font-size: 0.72rem;
  font-weight: 700;
}

.provider-page__empty--error {
  border-color: rgba(239, 68, 68, 0.25);
}

.provider-page__spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent-gold, #ffc107);
  border-radius: 50%;
  animation: providerSpin 0.8s linear infinite;
}

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

@media (min-width: 1024px) {
  .provider-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .provider-page {
    padding-top: 0.75rem;
  }

  .provider-card__footer {
    height: 40px;
  }

  .provider-card__brand {
    height: 32px;
  }
}
