/* ==========================================
   STORE PLAN CARDS
   Cart icon, price, stat tiles, tags, checklist
========================================== */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.plan-card {
  position: relative;

  display: flex;
  flex-direction: column;

  padding: 26px;

  border: 1px solid rgba(192, 132, 252, .16);
  border-radius: 18px;

  background:
    linear-gradient(180deg, rgba(192, 132, 252, .06), rgba(22, 10, 38, .55) 38%),
    #250b29;

  transition: transform .25s ease, border-color .25s ease,
    box-shadow .25s ease;
}

.plan-card:hover {
  transform: translateY(-4px);
  border-color: rgba(192, 132, 252, .4);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .3);
}

.plan-card.featured {
  border-color: rgba(192, 132, 252, .5);
  box-shadow: 0 0 0 1px rgba(192, 132, 252, .12),
    0 18px 50px rgba(168, 85, 247, .16);
}

/* Header: cart icon + rank name */

.plan-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-head .plan-cart {
  width: 20px;
  height: 20px;
  flex-shrink: 0;

  color: #c084fc;

  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plan-head h3 {
  margin: 0;

  font-size: 17px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.plan-badge {
  margin-left: auto;
  padding: 5px 10px;

  border: 1px solid rgba(192, 132, 252, .45);
  border-radius: 7px;

  background: rgba(192, 132, 252, .12);
  color: #e879f9;

  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

/* Price */

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 8px;

  margin: 22px 0 20px;
}

.plan-price strong {
  color: #fbcfe8;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1;
}

.plan-price span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
}

/* Stat tiles */

.plan-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.plan-stat {
  padding: 13px 14px;

  border: 1px solid rgba(202, 148, 211, .12);
  border-radius: 12px;

  background: rgba(20, 4, 20, .55);
}

.plan-stat-label {
  display: flex;
  align-items: center;
  gap: 6px;

  color: var(--muted);

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.plan-stat-label svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;

  color: #c084fc;

  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plan-stat strong {
  display: block;
  margin-top: 7px;

  font-size: 21px;
  font-weight: 800;
  line-height: 1.1;
}

/* Tag chips */

.plan-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  margin: 18px 0 4px;
}

.plan-tag {
  padding: 5px 11px;

  border: 1px solid rgba(192, 132, 252, .35);
  border-radius: 999px;

  background: rgba(192, 132, 252, .08);
  color: #e879f9;

  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
}

/* Checklist */

.plan-features {
  display: grid;
  gap: 13px;

  margin: 20px 0 26px;
  padding: 0;

  list-style: none;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  color: #e1c3e6;

  font-size: 13.5px;
  line-height: 1.45;
}

.plan-features li::marker {
  content: "";
}

.plan-features svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;

  color: #c084fc;

  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Button pinned to the bottom of each card */

.plan-card .buy-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  width: 100%;
  min-height: 46px;
  margin-top: auto;
  padding: 0 18px;

  border: 1px solid rgba(192, 132, 252, .45);
  border-radius: 11px;

  background: rgba(192, 132, 252, .1);
  color: #fbcfe8;
  cursor: pointer;

  font-size: 13px;
  font-weight: 800;

  transition: background .2s ease, transform .2s ease,
    box-shadow .2s ease;
}

.plan-card .buy-button:hover {
  background: rgba(192, 132, 252, .2);
  transform: translateY(-1px);
}

.plan-card.featured .buy-button {
  border-color: transparent;
  background: linear-gradient(135deg, #c084fc, #a855f7);
  color: #14051f;
  box-shadow: 0 8px 24px rgba(168, 85, 247, .3);
}

.plan-card .buy-button svg {
  width: 16px;
  height: 16px;

  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Responsive */

@media (max-width: 960px) {
  .plan-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
    margin-inline: auto;
  }
}

@media (max-width: 420px) {
  .plan-card {
    padding: 22px 18px;
  }

  .plan-price strong {
    font-size: 36px;
  }
}

/* ---------- Monthly / Permanent switch on the rank grid ---------- */

.billing-toggle {
  display: inline-flex;
  gap: 6px;
  margin: 0 0 22px;
  padding: 5px;
  border: 1px solid var(--border, rgba(216, 180, 254, .18));
  border-radius: 999px;
  background: var(--surface, rgba(22, 10, 38, .8));
}

.billing-option {
  min-width: 128px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.billing-option.active {
  color: #14051f;
  background: linear-gradient(135deg, #f472b6, #a855f7);
  box-shadow: 0 5px 18px rgba(217, 70, 239, .3);
}

.billing-option:focus-visible {
  outline: 2px solid var(--pink, #f472b6);
  outline-offset: 3px;
}

.rank-grid[data-billing="monthly"] .price-perm,
.rank-grid[data-billing="perm"] .price-monthly {
  display: none !important;
}

/* ---------- Light mode: rank cards need dark feature text and a solid CTA ---------- */

body.light-theme .plan-features li {
  color: #4a2a63;
}

body.light-theme .rank-card .buy-button {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #f472b6, #a855f7);
  box-shadow: 0 8px 22px rgba(168, 85, 247, .28);
}
