/*
 * UKTU Affiliate Product Cards — Stylesheet
 * File: /assets/css/affiliate-cards.css
 *
 * Matches UKTU dark navy / teal command-centre aesthetic.
 * Include on any page that renders affiliate cards or carousels.
 */

/* ── Card ─────────────────────────────────────────────────── */
.aff-card {
  position: relative;
  background: #0d1b2a;
  border: 1px solid rgba(0, 210, 190, 0.18);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .22s ease, box-shadow .22s ease, transform .18s ease;
  max-width: 480px;
  margin: 1.5rem auto;
  font-family: 'Outfit', 'Segoe UI', sans-serif;
}

.aff-card:hover {
  border-color: rgba(0, 210, 190, 0.55);
  box-shadow: 0 0 18px rgba(0, 210, 190, 0.12);
  transform: translateY(-2px);
}

/* ── Badge ────────────────────────────────────────────────── */
.aff-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #00d2be;
  color: #0a0f1a;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  z-index: 2;
  font-family: 'JetBrains Mono', monospace;
}

/* ── Link wrapper ─────────────────────────────────────────── */
.aff-card-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  padding: 16px;
  color: inherit;
}

.aff-card-link:focus-visible {
  outline: 2px solid #00d2be;
  outline-offset: -2px;
}

/* ── Image ────────────────────────────────────────────────── */
.aff-card-img-wrap {
  flex: 0 0 90px;
}

.aff-card-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 6px;
  background: #111e2d;
  display: block;
}

.aff-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111e2d;
  color: #334455;
}

.aff-no-img svg {
  width: 38px;
  height: 38px;
}

/* ── Body ─────────────────────────────────────────────────── */
.aff-card-body {
  flex: 1;
  min-width: 0;
}

.aff-card-name {
  font-size: .95rem;
  font-weight: 700;
  color: #e8edf2;
  margin: 0 0 5px;
  line-height: 1.35;
}

.aff-card-desc {
  font-size: .8rem;
  color: #7a93a8;
  margin: 0 0 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.aff-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.aff-card-price {
  font-size: .78rem;
  font-weight: 600;
  color: #00d2be;
  font-family: 'JetBrains Mono', monospace;
}

.aff-cta {
  font-size: .75rem;
  font-weight: 700;
  color: #0a0f1a;
  background: #00d2be;
  padding: 4px 10px;
  border-radius: 5px;
  white-space: nowrap;
  transition: background .18s;
}

.aff-card:hover .aff-cta {
  background: #00f5e0;
}

/* ── Disclaimer ───────────────────────────────────────────── */
.aff-disclaimer-inline {
  font-size: .65rem;
  color: #3a4d5c;
  margin: 0;
  padding: 6px 16px 8px;
  border-top: 1px solid rgba(255,255,255,.04);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Carousel ─────────────────────────────────────────────── */
.aff-carousel-wrapper {
  margin: 1.5rem 0;
  overflow: hidden;
}

.aff-carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: #00d2be #111e2d;
}

.aff-carousel-track::-webkit-scrollbar       { height: 4px; }
.aff-carousel-track::-webkit-scrollbar-track { background: #111e2d; }
.aff-carousel-track::-webkit-scrollbar-thumb { background: #00d2be; border-radius: 4px; }

.aff-carousel-slide {
  flex: 0 0 280px;
  scroll-snap-align: start;
}

.aff-carousel-slide .aff-card {
  margin: 0;
  max-width: 100%;
  height: 100%;
}

.aff-carousel-wrapper > .aff-disclaimer {
  font-size: .65rem;
  color: #3a4d5c;
  margin: 6px 0 0;
  font-family: 'JetBrains Mono', monospace;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (min-width: 768px) {
  .aff-carousel-slide { flex: 0 0 320px; }
  .aff-card-img-wrap  { flex: 0 0 100px; }
  .aff-card-img       { width: 100px; height: 100px; }
}

@media (max-width: 480px) {
  .aff-card-link   { flex-direction: column; align-items: flex-start; }
  .aff-card-img    { width: 100%; height: 160px; }
  .aff-card-img-wrap { flex: unset; width: 100%; }
}