/* ============================
   OJC Ranking Cards - Front CSS
   ============================ */

.ojc-ranking {
  width: 100%;
  max-width: 100%;
}

/* Card shell */
.ojc-ranking .ojc-card {
  position: relative;
  display: flex;
  gap: 20px;
  padding: 20px 20px;
  margin: 0 0 18px;
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.10);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
  overflow: hidden;
}

/* Rank badge */
.ojc-ranking .ojc-card__rank {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: #0f172a;
  box-shadow: 0 10px 18px rgba(17, 24, 39, 0.12);
  z-index: 3;
}
.ojc-ranking .ojc-card__rank span { line-height: 1; }
.ojc-ranking .ojc-rank--1 { background: #f5c64f; }
.ojc-ranking .ojc-rank--2 { background: #cbd5e1; }
.ojc-ranking .ojc-rank--3 { background: #e1a36b; }

/* Left column */
.ojc-ranking .ojc-card__left {
  width: 220px;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 18px; /* clear rank badge overlap */
}

.ojc-ranking .ojc-card__logo {
  width: 100%;
  height: 132px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.ojc-ranking .ojc-card__logo-img {
  max-width: 100%;
  max-height: 108px;
  object-fit: contain;
  display: block;
}

.ojc-ranking .ojc-card__logo-placeholder {
  width: 100%;
  height: 108px;
  border-radius: 14px;
  border: 1px dashed rgba(17, 24, 39, 0.18);
  background: rgba(17, 24, 39, 0.02);
}

.ojc-ranking .ojc-card__stars {
  margin-top: 14px;
}

/* Star SVG */
.ojc-ranking .ojc-stars {
  display: inline-flex;
  gap: 8px;
}
.ojc-ranking .ojc-star__base { fill: rgba(148, 163, 184, 0.35); }
.ojc-ranking .ojc-star__fill { fill: #f5b301; }
.ojc-ranking .ojc-star__svg { display: block; }

/* Right column */
.ojc-ranking .ojc-card__right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 6px;
}

/* Top row: Brand LEFT + Ribbon RIGHT */
.ojc-ranking .ojc-card__toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.ojc-ranking .ojc-card__toprow-left {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

.ojc-ranking .ojc-card__toprow-right {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
}

/* Brand link */
.ojc-ranking .ojc-card__brandlink {
  display: inline-block;
  font-weight: 900;
  font-size: 22px;
  color: #0f172a;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.ojc-ranking .ojc-card__brandlink:hover {
  opacity: 0.9;
  text-decoration: underline;
}

/* Ribbon */
.ojc-ranking .ojc-card__ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-width: 280px;
  padding: 0 18px;
  border-radius: 14px;
  background: #b00606;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.12);
}
.ojc-ranking .ojc-card__ribbon span {
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.02em;
  line-height: 1;
}

/* Headline (optional) */
.ojc-ranking .ojc-card__headline {
  font-weight: 800;
  font-size: 15px;
  color: #0f172a;
}

/* Promo row (optional) */
.ojc-ranking .ojc-card__promo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #0f172a;
}
.ojc-ranking .ojc-card__promo-label {
  font-weight: 800;
  opacity: 0.8;
}
.ojc-ranking .ojc-card__promo-code {
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.06);
}
.ojc-ranking .ojc-card__promo-note { opacity: 0.8; }

/* Bullets */
.ojc-ranking .ojc-card__bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.ojc-ranking .ojc-card__bullets li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.ojc-ranking .ojc-card__bullets li::before {
  content: "✓";
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  font-weight: 900;
  margin-top: 1px;
}

/* Payment methods pills */
.ojc-ranking .ojc-card__payments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

/* Payment pill */
.ojc-ranking .ojc-pay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(17, 24, 39, 0.12);
}

.ojc-ranking .ojc-pay__ico {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
}
.ojc-ranking .ojc-pay__ico svg { display: block; }
.ojc-ranking .ojc-pay__txt { white-space: nowrap; }

/* Fine print */
.ojc-ranking .ojc-card__fineprint {
  font-size: 12px;
  opacity: 0.72;
  color: #0f172a;
}

/* CTA */
.ojc-ranking .ojc-card__cta-wrap {
  margin-top: 2px;
}

.ojc-ranking .ojc-card__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #29b34a;
  text-decoration: none;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.12);
}

.ojc-ranking .ojc-card__cta-text {
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  line-height: 1.1;
}

.ojc-ranking .ojc-card__cta-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.14);
  color: #fff;
  font-weight: 900;
  font-size: 26px;
}

/* Hover */
.ojc-ranking .ojc-card__cta:hover {
  filter: brightness(0.98);
}

/* ============================
   Responsive
   ============================ */

@media (max-width: 860px) {
  .ojc-ranking .ojc-card {
    flex-direction: column;
    padding: 18px 16px;
    gap: 16px;
  }

  .ojc-ranking .ojc-card__left {
    width: 100%;
    min-width: 0;
    padding-top: 54px;
  }

  .ojc-ranking .ojc-card__toprow {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .ojc-ranking .ojc-card__toprow-left {
    justify-content: flex-start;
  }

  .ojc-ranking .ojc-card__ribbon {
    min-width: 0;
    width: 100%;
    justify-content: center;
  }

  .ojc-ranking .ojc-card__brandlink {
    font-size: 20px;
  }

  .ojc-ranking .ojc-card__bullets li {
    font-size: 14px;
  }

  .ojc-ranking .ojc-card__cta-text {
    font-size: 16px;
  }
}