:root {
  --apex-c48-red: #d92935;
  --apex-c48-red-hover: #ed3d49;
  --apex-c48-red-dark: #a91e28;
  --apex-c48-ink: #080809;
  --apex-c48-surface: #151416;
  --apex-c48-surface-raised: #1b191b;
  --apex-c48-line: #3e393b;
  --apex-c48-copy: #f5f2ee;
  --apex-c48-muted: #aaa39e;
  --apex-c48-ease: cubic-bezier(.22, 1, .36, 1);
}

/* Finance rail: compact enough for product cards, legible enough to drive decisions. */
.apex-mobicred-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-column: 1 / -1;
  gap: 10px;
  box-sizing: border-box;
  width: calc(100% - 16px);
  min-width: 0;
  margin: 9px auto -1px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #4a4447;
  border-radius: 6px;
  background: var(--apex-c48-surface);
  box-shadow: 0 13px 28px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .035);
  color: var(--apex-c48-copy);
  font-family: var(--apex-font-body, "Barlow", sans-serif);
  line-height: 1.25;
  letter-spacing: 0;
  transform: translateY(-4px);
  transition: border-color 240ms var(--apex-c48-ease), box-shadow 240ms var(--apex-c48-ease), transform 240ms var(--apex-c48-ease);
}

.apex-mobicred-card::before {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--apex-c48-red);
  content: "";
}

.apex-mobicred-card::after {
  position: absolute;
  z-index: 2;
  top: -30%;
  bottom: -30%;
  left: -32px;
  width: 22px;
  background: rgba(255, 255, 255, .16);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-80px) skewX(-15deg);
}

.apex-mobicred-card.is-revealed::after {
  animation: apex-c48-finance-signal 680ms var(--apex-c48-ease) 120ms both;
}

.apex-mobicred-card:hover {
  border-color: #62595d;
  box-shadow: 0 17px 34px rgba(0, 0, 0, .46), inset 0 1px 0 rgba(255, 255, 255, .05);
  transform: translateY(-7px);
}

.apex-mobicred-card__header {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.apex-mobicred-card__icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #594044;
  border-radius: 4px;
  background: #201719;
  color: #ff5962;
}

.apex-mobicred-card__icon .apex-c48-icon {
  width: 16px;
  height: 16px;
}

.apex-mobicred-card__brand {
  display: grid;
  grid-column: auto !important;
  gap: 1px;
  min-width: 0;
}

.apex-mobicred-card small {
  grid-column: auto !important;
}

.apex-mobicred-card__brand b {
  color: var(--apex-c48-copy);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.apex-mobicred-card__brand small {
  color: var(--apex-c48-muted);
  font-size: 9px;
  line-height: 1.1;
}

.apex-mobicred-card__badge {
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid #4c4548;
  border-radius: 999px;
  color: #d5cfca;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.apex-mobicred-card__lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: end;
  padding-top: 10px;
  border-top: 1px solid #332f31;
}

.apex-mobicred-card__lead > span {
  grid-column: 1;
  color: var(--apex-c48-muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.apex-mobicred-card__lead > strong {
  grid-column: 1;
  color: var(--apex-c48-copy);
  font-family: var(--apex-font-heading, "Orbitron", sans-serif);
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.apex-mobicred-card__lead > strong .woocommerce-Price-amount {
  color: inherit !important;
  font: inherit !important;
}

.apex-mobicred-card__lead > strong small {
  margin-left: 3px;
  color: var(--apex-c48-muted);
  font-family: var(--apex-font-body, "Barlow", sans-serif);
  font-size: 9px;
  font-weight: 600;
}

.apex-mobicred-card__lead > em {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  color: #d4ceca;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  text-transform: uppercase;
}

.apex-mobicred-card__terms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
}

.apex-mobicred-card__terms > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px;
  border: 1px solid #302c2e;
  border-radius: 4px;
  background: #111012;
}

.apex-mobicred-card__terms > div.is-featured {
  border-color: #70434a;
  background: #1c1416;
}

.apex-mobicred-card__terms dt {
  color: var(--apex-c48-muted);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.apex-mobicred-card__terms dd {
  min-width: 0;
  margin: 0;
  color: var(--apex-c48-copy);
  font-size: clamp(9px, 1vw, 11px);
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.apex-mobicred-card__terms dd .woocommerce-Price-amount {
  color: inherit !important;
  font: inherit !important;
}

.apex-mobicred-card__terms dd small {
  margin-left: 2px;
  color: var(--apex-c48-muted);
  font-size: 7px;
  font-weight: 500;
}

.apex-mobicred-card__disclosure,
.apex-mobicred-card__message {
  margin: 0;
  color: #918a87;
  font-size: 8px;
  line-height: 1.35;
}

.apex-mobicred-card__message {
  padding-top: 10px;
  border-top: 1px solid #332f31;
  font-size: 11px;
}

/* The reassurance panel sits inside a narrow order column, even on desktop. */
body.woocommerce-checkout .apex-payfast-checkout-trust {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 13px !important;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 17px !important;
  overflow: hidden;
}

body.woocommerce-checkout .apex-payfast-checkout-trust__methods {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px !important;
  width: 100%;
  min-width: 0;
  justify-content: stretch !important;
}

body.woocommerce-checkout .apex-payfast-checkout-trust__methods b {
  display: grid;
  min-width: 0;
  min-height: 32px;
  place-items: center;
  box-sizing: border-box;
  padding: 6px !important;
  overflow-wrap: anywhere;
  text-align: center;
}

body.woocommerce-checkout .apex-payfast-checkout-trust > p {
  grid-column: auto !important;
}

body.woocommerce-checkout #payment .apex-payment-acceptance__marks {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  width: 100%;
  min-width: 0;
}

body.woocommerce-checkout #payment .apex-payment-mark {
  grid-column: auto !important;
  width: 100%;
  min-width: 0;
}

/* One clear action language from product card to payment. */
.woocommerce .apex-c48-action,
.woocommerce-page .apex-c48-action,
body.woocommerce-checkout #payment #place_order.apex-c48-action,
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button.apex-c48-action {
  position: relative;
  isolation: isolate;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 10px;
  align-items: center;
  justify-content: stretch;
  box-sizing: border-box;
  min-height: 52px;
  padding: 11px 13px 11px 18px !important;
  overflow: hidden;
  border: 1px solid var(--apex-c48-red-dark) !important;
  border-radius: 5px !important;
  background: var(--apex-c48-red) !important;
  background-image: none !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 10px 24px rgba(170, 25, 36, .2) !important;
  color: #fff !important;
  font-family: var(--apex-font-heading, "Orbitron", sans-serif) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase;
  transform: translateY(0);
  transition: background-color 220ms var(--apex-c48-ease), border-color 220ms var(--apex-c48-ease), box-shadow 220ms var(--apex-c48-ease), transform 220ms var(--apex-c48-ease) !important;
}

.woocommerce .apex-c48-action::before,
.woocommerce-page .apex-c48-action::before {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: -34px;
  width: 22px;
  background: rgba(255, 255, 255, .15);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: skewX(-16deg) translateX(0);
  transition: opacity 180ms ease, transform 440ms var(--apex-c48-ease);
}

.woocommerce .apex-c48-action:hover,
.woocommerce-page .apex-c48-action:hover,
.woocommerce .apex-c48-action:focus-visible,
.woocommerce-page .apex-c48-action:focus-visible,
body.woocommerce-checkout #payment #place_order.apex-c48-action:hover,
body.woocommerce-checkout #payment #place_order.apex-c48-action:focus-visible {
  border-color: #ff6069 !important;
  background: var(--apex-c48-red-hover) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 14px 30px rgba(180, 25, 37, .28) !important;
  color: #fff !important;
  transform: translateY(-2px);
}

.woocommerce .apex-c48-action:hover::before,
.woocommerce-page .apex-c48-action:hover::before,
.woocommerce .apex-c48-action:focus-visible::before,
.woocommerce-page .apex-c48-action:focus-visible::before {
  opacity: 1;
  transform: skewX(-16deg) translateX(360px);
}

.woocommerce .apex-c48-action:focus-visible,
.woocommerce-page .apex-c48-action:focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: 3px;
}

.woocommerce .apex-c48-action:disabled,
.woocommerce .apex-c48-action.disabled,
.woocommerce .apex-c48-action[aria-disabled="true"] {
  border-color: #4a4547 !important;
  background: #2b292a !important;
  box-shadow: none !important;
  color: #aaa5a1 !important;
  cursor: not-allowed;
  transform: none;
}

.apex-c48-action__label {
  min-width: 0;
  color: inherit;
  text-align: center;
}

.apex-c48-action__motion {
  position: relative;
  display: grid;
  width: 30px;
  height: 26px;
  place-items: center;
  color: #fff;
}

.apex-c48-action__motion svg {
  position: absolute;
  width: 22px;
  height: 22px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: center;
}

.apex-c48-action__check {
  width: 18px !important;
  height: 18px !important;
  opacity: 0;
  transform: scale(.7);
}

.apex-c48-action--package.is-packing .apex-c48-action__package {
  animation: apex-c48-pack-box 420ms var(--apex-c48-ease) both;
}

.apex-c48-action--package.is-packed .apex-c48-action__package {
  opacity: 0;
  transform: scale(.7);
}

.apex-c48-action--package.is-packed .apex-c48-action__check {
  opacity: 1;
  transform: scale(1);
  transition: opacity 180ms ease, transform 260ms var(--apex-c48-ease);
}

.apex-c48-action--dispatch .apex-c48-action__motion::after {
  position: absolute;
  right: 2px;
  bottom: 1px;
  width: 25px;
  height: 1px;
  background: rgba(255, 255, 255, .55);
  content: "";
  opacity: .55;
  transform: scaleX(.65);
  transform-origin: right center;
}

.apex-c48-action--dispatch.is-dispatching .apex-c48-action__truck {
  animation: apex-c48-truck-depart 460ms cubic-bezier(.3, .1, .55, 1) both;
}

.apex-c48-action--dispatch.is-dispatching .apex-c48-action__motion::after {
  animation: apex-c48-road-depart 360ms ease-out both;
}

.woocommerce-cart .wc-proceed-to-checkout .apex-c48-action,
.woocommerce-checkout #place_order.apex-c48-action {
  width: 100% !important;
  float: none !important;
}

@keyframes apex-c48-finance-signal {
  0% { opacity: 0; transform: translateX(-80px) skewX(-15deg); }
  24% { opacity: .7; }
  100% { opacity: 0; transform: translateX(430px) skewX(-15deg); }
}

@keyframes apex-c48-pack-box {
  0% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
  45% { opacity: .9; transform: translateY(3px) scale(.82) rotate(-4deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes apex-c48-truck-depart {
  0% { opacity: 1; transform: translateX(0); }
  34% { opacity: 1; transform: translateX(5px); }
  100% { opacity: 0; transform: translateX(62px); }
}

@keyframes apex-c48-road-depart {
  0% { opacity: .55; transform: translateX(0) scaleX(.65); }
  100% { opacity: 0; transform: translateX(-20px) scaleX(.15); }
}

@media (max-width: 420px) {
  .apex-mobicred-card {
    width: calc(100% - 12px);
    padding: 11px;
  }

  .apex-mobicred-card__badge {
    padding-right: 6px;
    padding-left: 6px;
    font-size: 7px;
  }

  .apex-mobicred-card__lead > em {
    max-width: 70px;
  }

  .woocommerce .apex-c48-action,
  .woocommerce-page .apex-c48-action {
    min-height: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apex-mobicred-card,
  .apex-mobicred-card::after,
  .apex-c48-action,
  .apex-c48-action::before,
  .apex-c48-action__motion,
  .apex-c48-action__motion::after,
  .apex-c48-action__motion svg {
    animation: none !important;
    transition: none !important;
  }

  .woocommerce .apex-c48-action,
  .woocommerce-page .apex-c48-action,
  body.woocommerce-checkout #payment #place_order.apex-c48-action,
  body.woocommerce-cart .wc-proceed-to-checkout .checkout-button.apex-c48-action {
    animation: none !important;
    transition: none !important;
  }

  .apex-mobicred-card,
  .apex-mobicred-card:hover,
  .woocommerce .apex-c48-action,
  .woocommerce-page .apex-c48-action,
  .woocommerce .apex-c48-action:hover,
  .woocommerce-page .apex-c48-action:hover {
    transform: none !important;
  }

  .apex-c48-action--package.is-packed .apex-c48-action__package {
    opacity: 0;
  }

  .apex-c48-action--package.is-packed .apex-c48-action__check {
    opacity: 1;
    transform: none;
  }
}
