/* ==========================================================================
   Raw Fuel — Cart, Checkout & Thank You
   --------------------------------------------------------------------------
   Written against markup this theme owns (classic WooCommerce templates under
   woocommerce/), so no rule needs `!important`. Every offset uses logical
   properties (margin-inline, inset-inline, text-align: start) so RTL and LTR
   both work from the same source. The only `direction` declaration is on the
   phone input, where digits must stay LTR inside an Arabic form.

   Hand-authored — NOT part of the PostCSS build. Edit this file directly.

   1. Tokens
   2. Primitives (buttons, cards, badges, fields, notices)
   3. Cart page
   4. Coupon + totals
   5. Checkout page
   6. Payment
   7. Thank you
   8. Mobile sticky bars
   ========================================================================== */

/* ==========================================================================
   1. Tokens
   ========================================================================== */

.rf-cart,
.rf-checkout-page,
.rf-thankyou,
.rf-empty {
  /* All-white surfaces: hierarchy comes from borders, not tinted panels. */
  --rf-bg: #ffffff;
  --rf-paper: #ffffff;
  --rf-sunken: #fcfcfc;
  /* Subtle fill for icon chips / table heads / hover, which would otherwise
     disappear now that the page itself is white. */
  --rf-tint: #f4f4f4;
  --rf-border: #e6e6e6;
  --rf-border-strong: #cfcfcf;
  --rf-ink: #141414;
  --rf-muted: #5c5c5c;
  --rf-light: #8a8a8a;
  --rf-accent: #e63228;
  --rf-accent-dark: #c92018;
  --rf-success: #16a34a;
  --rf-success-bg: #dcfce7;
  --rf-error: #dc2626;
  --rf-error-bg: #fee2e2;
  --rf-warn: #b45309;
  --rf-warn-bg: #fef3c7;

  --rf-r: 16px;
  --rf-r-sm: 12px;
  --rf-r-xs: 8px;

  /* Barely-there shadows: on a white page a heavy shadow reads as dirt. */
  --rf-shadow: 0 1px 2px rgb(0 0 0 / 4%);
  --rf-shadow-lg: 0 6px 20px rgb(0 0 0 / 7%);

  --rf-gap: 20px;
  --rf-pad: 24px;

  /* Height of the mobile sticky bar, so page content can clear it. */
  --rf-sticky-h: 76px;

  color: var(--rf-ink);
}

body.rf-cart,
body.rf-checkout,
body.rf-thankyou-page {
  background: #fff;
}

/* The shop wrapper adds its own chrome that fights these full-bleed layouts. */
body.rf-checkout .stor-site-content > .woocommerce,
body.rf-cart .stor-site-content > .woocommerce {
  max-width: none;
  padding: 0;
  margin: 0;
}

/* ==========================================================================
   2. Primitives
   ========================================================================== */

/* ---- Buttons ---- */

.rf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 14px 24px;
  border: 2px solid transparent;
  border-radius: var(--rf-r-sm);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease;
}

.rf-btn:focus-visible {
  outline: 3px solid rgb(230 50 40 / 45%);
  outline-offset: 2px;
}

.rf-btn--primary {
  background: linear-gradient(135deg, var(--rf-accent) 0%, var(--rf-accent-dark) 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgb(230 50 40 / 25%);
}

.rf-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgb(230 50 40 / 35%);
}

.rf-btn--primary:active {
  transform: translateY(0);
}

.rf-btn--outline {
  background: transparent;
  color: var(--rf-ink);
  border-color: var(--rf-border-strong);
}

.rf-btn--outline:hover {
  border-color: var(--rf-ink);
  background: var(--rf-tint);
}

.rf-btn--block {
  display: flex;
  width: 100%;
}

.rf-btn--lg {
  min-height: 54px;
  padding: 16px 28px;
  font-size: 1rem;
}

.rf-btn[disabled],
.rf-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Arrows point along the reading direction. */
[dir="rtl"] .rf-btn__arrow,
[dir="rtl"] .rf-cart__continue svg {
  transform: scaleX(-1);
}

/* ---- Cards ---- */

.rf-card {
  background: var(--rf-paper);
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-r);
  box-shadow: var(--rf-shadow);
  padding: var(--rf-pad);
  margin-bottom: var(--rf-gap);
}

.rf-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rf-border);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--rf-ink);
}

.rf-card__title::before {
  content: "";
  flex: 0 0 auto;
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: var(--rf-accent);
}

.rf-card__hint {
  margin: 14px 0 18px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--rf-muted);
}

/* ---- Badges ---- */

.rf-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.6;
}

.rf-badge--save {
  background: var(--rf-success-bg);
  color: var(--rf-success);
}

.rf-badge--warn {
  background: var(--rf-warn-bg);
  color: var(--rf-warn);
}

/* ---- Notices ---- */

.rf-notice {
  padding: 14px 16px;
  border-radius: var(--rf-r-sm);
  border: 1px solid transparent;
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: var(--rf-gap);
  list-style: none;
}

.rf-notice--info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.rf-notice--warn {
  background: var(--rf-warn-bg);
  border-color: #fbbf24;
  color: var(--rf-warn);
}

/* ---- Form fields ---- */

.rf-fields {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px 14px;
  margin-top: 4px;
}

.rf-fields > p,
.rf-fields > .form-row {
  grid-column: span 12;
  margin: 0;
  padding: 0;
}

.rf-fields > .rf-col-6 {
  grid-column: span 6;
}

.rf-fields > .rf-col-12 {
  grid-column: span 12;
}

.rf-field-hidden,
.rf-fields > .rf-field-hidden {
  display: none;
}

/* WooCommerce wraps every control in an inline <span>; without this the
   inputs cannot take the full row width. */
.rf-fields .woocommerce-input-wrapper {
  display: block;
  width: 100%;
}

.rf-fields label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rf-muted);
  line-height: 1.3;
}

.rf-fields .required {
  color: var(--rf-accent);
  text-decoration: none;
  margin-inline-start: 2px;
}

.rf-fields .optional {
  color: var(--rf-light);
  font-weight: 400;
}

.rf-fields input[type="text"],
.rf-fields input[type="tel"],
.rf-fields input[type="email"],
.rf-fields input[type="password"],
.rf-fields select,
.rf-fields textarea,
.rf-coupon__input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 2px solid var(--rf-border);
  border-radius: var(--rf-r-sm);
  background: var(--rf-sunken);
  /* 16px keeps iOS Safari from zooming the viewport on focus. */
  font-size: 16px;
  font-family: inherit;
  color: var(--rf-ink);
  appearance: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.rf-fields textarea {
  min-height: 110px;
  padding-block: 14px;
  line-height: 1.55;
  resize: vertical;
}

.rf-fields select {
  /* Room for the chevron on the trailing side, in both directions. */
  padding-inline-end: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f5f5f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}

[dir="rtl"] .rf-fields select {
  background-position: left 16px center;
}

.rf-fields input:focus,
.rf-fields select:focus,
.rf-fields textarea:focus,
.rf-coupon__input:focus {
  outline: none;
  border-color: var(--rf-accent);
  box-shadow: 0 0 0 4px rgb(230 50 40 / 12%);
  background: var(--rf-paper);
}

.rf-fields input[aria-invalid="true"] {
  border-color: var(--rf-error);
}

.rf-fields ::placeholder {
  color: var(--rf-light);
  opacity: 1;
}

/* Phone reads left-to-right even inside an RTL form. */
#billing_phone {
  direction: ltr;
  text-align: start;
  letter-spacing: 1.2px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

[dir="rtl"] #billing_phone {
  text-align: end;
}

/* Inline validation feedback (slot rendered by form-billing.php). */
.rf-field-hint {
  margin: -6px 0 0;
  padding: 9px 12px;
  border-radius: var(--rf-r-xs);
  font-size: 0.82rem;
  line-height: 1.45;
}

.rf-field-hint.is-hint {
  background: #f4f4f2;
  color: var(--rf-light);
}

.rf-field-hint.is-ok {
  background: var(--rf-success-bg);
  color: var(--rf-success);
  font-weight: 700;
}

.rf-field-hint.is-error {
  background: var(--rf-error-bg);
  color: var(--rf-error);
  font-weight: 700;
}

/* WooCommerce's own inline field errors. */
.rf-fields .woocommerce-invalid input,
.rf-fields .woocommerce-invalid select {
  border-color: var(--rf-error);
}

/* ---- Checkbox rows ---- */

.rf-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rf-ink);
  cursor: pointer;
}

.rf-checkbox__input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  accent-color: var(--rf-accent);
}

/* ---- Disclosure (collapsible panel) ---- */

/* The notes card is only a trigger until it is opened, so it drops the full
   card padding and reads as a single tappable row. */
.rf-card--notes {
  padding: 6px 16px;
}

.rf-disclosure {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--rf-ink);
  text-align: start;
  cursor: pointer;
}

.rf-disclosure__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid var(--rf-border);
  border-radius: 50%;
  color: var(--rf-muted);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease,
    color 0.2s ease;
}

.rf-disclosure:hover .rf-disclosure__icon {
  border-color: var(--rf-border-strong);
}

.rf-disclosure.is-open .rf-disclosure__icon {
  transform: rotate(45deg);
  background: var(--rf-accent);
  border-color: var(--rf-accent);
  color: #fff;
}

.rf-disclosure__panel {
  padding: 14px 0 16px;
  border-top: 1px solid var(--rf-border);
  margin-top: 2px;
}

/* The panel also carries `.rf-fields` (display: grid), and an author
   `display` declaration beats the UA rule for [hidden] — so the closed state
   has to be restated here or the panel would never collapse. */
.rf-disclosure__panel[hidden] {
  display: none;
}

/* The trigger above already names this field; keep the <label> for screen
   readers but drop the visible duplicate. */
.rf-card--notes .rf-disclosure__panel > p > label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   3. Cart page
   ========================================================================== */

.rf-cart {
  padding-block: 28px calc(var(--rf-sticky-h) + 32px);
}

.rf-cart__head {
  margin-bottom: 20px;
}

.rf-cart__title {
  margin: 0 0 4px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
}

.rf-cart__count {
  margin: 0;
  font-size: 0.9rem;
  color: var(--rf-muted);
}

.rf-cart__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rf-gap);
  align-items: start;
  margin-top: 20px;
}

.rf-cart__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

/* ---- Cart line ---- */

.rf-cart-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--rf-paper);
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-r);
  box-shadow: 0 2px 8px rgb(0 0 0 / 4%);
  transition: opacity 0.2s ease;
}

.rf-cart-item.is-updating {
  opacity: 0.55;
  pointer-events: none;
}

.rf-cart-item__media {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: var(--rf-r-sm);
  overflow: hidden;
  background: var(--rf-tint);
}

.rf-cart-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rf-cart-item__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rf-cart-item__name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

.rf-cart-item__name a {
  color: var(--rf-ink);
  text-decoration: none;
}

.rf-cart-item__name a:hover {
  color: var(--rf-accent);
}

.rf-cart-item__meta {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--rf-muted);
}

.rf-cart-item__meta dl,
.rf-cart-item__meta dt,
.rf-cart-item__meta dd,
.rf-cart-item__meta p {
  margin: 0;
  display: inline;
  font-size: inherit;
}

.rf-cart-item__meta dt {
  font-weight: 700;
}

.rf-cart-item__meta dd::after {
  content: " Â· ";
  color: var(--rf-light);
}

.rf-cart-item__meta dd:last-child::after {
  content: "";
}

.rf-cart-item__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.rf-cart-item__badges:empty {
  display: none;
}

.rf-cart-item__edit {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rf-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rf-cart-item__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

/* ---- Quantity stepper ---- */

.rf-qty {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--rf-border);
  border-radius: 999px;
  background: var(--rf-sunken);
  overflow: hidden;
}

.rf-qty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--rf-ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.rf-qty__btn svg {
  width: 15px;
  height: 15px;
}

.rf-qty__btn:hover:not(:disabled) {
  background: var(--rf-accent);
  color: #fff;
}

.rf-qty__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.rf-qty__value {
  min-width: 34px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.rf-cart-item__pricing {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-inline-end: auto;
}

.rf-cart-item__subtotal {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--rf-ink);
}

.rf-cart-item__unit {
  font-size: 0.75rem;
  color: var(--rf-light);
}

.rf-cart-item__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--rf-r-xs);
  background: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rf-light);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.rf-cart-item__remove:hover {
  color: var(--rf-error);
  background: var(--rf-error-bg);
}

.rf-cart__continue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rf-muted);
  text-decoration: none;
}

.rf-cart__continue:hover {
  color: var(--rf-accent);
}

/* ---- Free shipping bar on the cart page ---- */

.stor-freeship--cart {
  margin-bottom: 4px;
  padding: 14px 16px;
  background: var(--rf-paper);
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-r-sm);
}

.stor-freeship--cart.is-hidden {
  display: none;
}

/* ==========================================================================
   4. Coupon + totals
   ========================================================================== */

.rf-summary {
  padding: var(--rf-pad);
  background: var(--rf-paper);
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-r);
  box-shadow: var(--rf-shadow);
}

.rf-summary__title {
  margin: 0 0 18px;
  font-size: 1.05rem;
  font-weight: 800;
}

.rf-summary__actions {
  margin-top: 18px;
}

/* ---- Coupon ---- */

.rf-coupon {
  padding-bottom: 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--rf-border);
}

.rf-coupon__label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rf-muted);
}

.rf-coupon__row {
  display: flex;
  gap: 8px;
}

.rf-coupon__input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rf-coupon__btn {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 20px;
  border: 2px solid var(--rf-ink);
  border-radius: var(--rf-r-sm);
  background: var(--rf-ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.rf-coupon__btn:hover:not(:disabled) {
  background: var(--rf-accent);
  border-color: var(--rf-accent);
}

.rf-coupon__btn:disabled {
  opacity: 0.5;
  cursor: progress;
}

.rf-coupon__msg {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
}

.rf-coupon__msg:empty {
  display: none;
}

.rf-coupon__msg.is-ok,
.rf-coupon__msg.is-error,
.rf-coupon__msg.is-pending {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: var(--rf-r-xs);
  font-weight: 700;
}

.rf-coupon__msg.is-ok {
  background: var(--rf-success-bg);
  color: var(--rf-success);
}

.rf-coupon__msg.is-error {
  background: var(--rf-error-bg);
  color: var(--rf-error);
}

.rf-coupon__msg.is-pending {
  background: #f4f4f2;
  color: var(--rf-muted);
}

.rf-coupon__chips {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rf-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 12px;
  border: 1px dashed var(--rf-success);
  border-radius: 999px;
  background: var(--rf-success-bg);
  color: var(--rf-success);
  font-size: 0.8rem;
  font-weight: 700;
}

[dir="rtl"] .rf-chip {
  padding: 7px 12px 7px 8px;
}

.rf-chip__icon {
  flex: 0 0 auto;
}

.rf-chip__code {
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.rf-chip__value {
  font-variant-numeric: tabular-nums;
}

.rf-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(22 163 74 / 15%);
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.rf-chip__remove:hover {
  background: var(--rf-error);
  color: #fff;
}

/* ---- Totals list ---- */

.rf-totals {
  margin: 0;
  padding: 0;
}

.rf-totals__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rf-border);
  font-size: 0.9rem;
}

.rf-totals__row dt {
  margin: 0;
  color: var(--rf-muted);
  font-weight: 600;
}

.rf-totals__row dd {
  margin: 0;
  color: var(--rf-ink);
  font-weight: 700;
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.rf-totals__row--discount dt,
.rf-totals__row--discount dd {
  color: var(--rf-success);
}

.rf-totals__row--shipping {
  align-items: flex-start;
}

.rf-totals__note {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--rf-light);
}

.rf-totals__muted {
  color: var(--rf-light);
  font-weight: 500;
}

.rf-totals__free {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--rf-success);
}

.rf-totals__note-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--rf-border);
}

.rf-totals__edit {
  font-size: 0.8rem;
  color: var(--rf-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rf-totals__row--grand {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 2px dashed var(--rf-border);
  border-bottom: 0;
}

.rf-totals__row--grand dt {
  font-size: 1rem;
  font-weight: 800;
  color: var(--rf-ink);
}

.rf-totals__row--grand dd {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--rf-accent);
  line-height: 1.15;
}

.rf-shipping-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.rf-shipping-options__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.rf-shipping-options__label input {
  accent-color: var(--rf-accent);
  width: 18px;
  height: 18px;
}

/* ---- Trust strip ---- */

.rf-trust {
  list-style: none;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--rf-border);
  display: grid;
  gap: 10px;
}

.rf-trust__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--rf-muted);
}

.rf-trust__item svg {
  flex: 0 0 auto;
  color: var(--rf-success);
}

/* ==========================================================================
   5. Checkout page
   ========================================================================== */

.rf-checkout-page {
  max-width: 1140px;
  margin-inline: auto;
  padding: 28px 16px calc(var(--rf-sticky-h) + 32px);
}

.rf-page-head {
  text-align: center;
  margin-bottom: 24px;
}

.rf-page-head__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rf-accent) 0%, var(--rf-accent-dark) 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgb(230 50 40 / 22%);
}

.rf-page-head__title {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 4vw, 1.9rem);
  font-weight: 800;
  line-height: 1.2;
}

.rf-page-head__sub {
  max-width: 480px;
  margin: 0 auto;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--rf-muted);
}

.rf-checkout__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rf-gap);
  align-items: start;
}

/* The summary comes first on mobile so the total is visible immediately. */
.rf-checkout__aside {
  order: -1;
}

.rf-checkout__main {
  min-width: 0;
}

/* ---- Collapsible summary ---- */

.rf-checkout__summary {
  background: var(--rf-paper);
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-r);
  box-shadow: var(--rf-shadow);
  overflow: hidden;
}

.rf-checkout__summary-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 16px var(--rf-pad);
  border: 0;
  background: none;
  font-family: inherit;
  text-align: start;
  cursor: pointer;
}

.rf-checkout__summary-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--rf-ink);
}

.rf-checkout__summary-chevron {
  flex: 0 0 auto;
  color: var(--rf-muted);
  transition: transform 0.2s ease;
}

.rf-checkout__summary.is-open .rf-checkout__summary-chevron {
  transform: rotate(180deg);
}

.rf-checkout__summary-total {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--rf-accent);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rf-checkout__summary-body {
  display: none;
  padding: 0 var(--rf-pad) var(--rf-pad);
  border-top: 1px solid var(--rf-border);
}

.rf-checkout__summary.is-open .rf-checkout__summary-body {
  display: block;
}

/* ---- Order review list ---- */

.rf-review__items {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
  display: grid;
  gap: 4px;
}

.rf-review__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rf-border);
}

.rf-review__item:last-child {
  border-bottom: 0;
}

.rf-review__thumb {
  position: relative;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: var(--rf-r-xs);
  overflow: visible;
}

.rf-review__thumb img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--rf-r-xs);
  background: var(--rf-tint);
  display: block;
}

.rf-review__qty {
  position: absolute;
  inset-block-start: -7px;
  inset-inline-end: -7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--rf-ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.rf-review__info {
  flex: 1 1 auto;
  min-width: 0;
}

.rf-review__name {
  display: block;
  font-size: 0.87rem;
  font-weight: 700;
  line-height: 1.35;
}

.rf-review__meta {
  display: block;
  margin-top: 3px;
  font-size: 0.76rem;
  color: var(--rf-light);
}

.rf-review__meta dl,
.rf-review__meta dt,
.rf-review__meta dd,
.rf-review__meta p {
  display: inline;
  margin: 0;
  font-size: inherit;
}

.rf-review__price {
  flex: 0 0 auto;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   6. Payment
   ========================================================================== */

.rf-payment__methods {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.rf-payment__option {
  border: 1.5px solid var(--rf-border);
  border-radius: var(--rf-r-sm);
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.rf-payment__option:hover {
  border-color: var(--rf-border-strong);
}

.rf-payment__option:has(.rf-payment__radio:checked) {
  border-color: var(--rf-accent);
  box-shadow: inset 0 0 0 1px var(--rf-accent);
}

.rf-payment__option:focus-within {
  outline: 3px solid rgb(230 50 40 / 30%);
  outline-offset: 2px;
}

.rf-payment__label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  margin: 0;
  cursor: pointer;
}

.rf-payment__radio {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  accent-color: var(--rf-accent);
}

.rf-payment__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: var(--rf-r-xs);
  background: #f6f6f6;
  color: var(--rf-ink);
}

.rf-payment__option:has(.rf-payment__radio:checked) .rf-payment__icon {
  background: rgb(230 50 40 / 8%);
  color: var(--rf-accent);
}

/* Gateway-supplied logos vary wildly in size; cap them. */
.rf-payment__logo img {
  max-height: 26px;
  width: auto;
  display: block;
}

.rf-payment__text {
  flex: 1 1 auto;
  min-width: 0;
}

.rf-payment__name {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
}

.rf-payment__desc {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--rf-muted);
}

.rf-payment__desc p {
  margin: 0;
}

.rf-payment__box {
  padding: 0 18px 16px;
  font-size: 0.85rem;
  color: var(--rf-muted);
}

.rf-payment__submit {
  margin-top: 22px;
}

.rf-payment__reassure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: var(--rf-light);
  text-align: center;
}

.rf-payment__reassure svg {
  flex: 0 0 auto;
  color: var(--rf-success);
}

/* Terms checkbox (WooCommerce default markup). */
.woocommerce-terms-and-conditions-wrapper {
  margin-bottom: 16px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.woocommerce-terms-and-conditions-wrapper .woocommerce-form__label-for-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.woocommerce-terms-and-conditions-wrapper input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--rf-accent);
}

/* ==========================================================================
   7. Thank you
   ========================================================================== */

.rf-thankyou {
  max-width: 720px;
  margin-inline: auto;
  padding: 28px 16px 72px;
}

.rf-thankyou__hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 36px 20px;
  margin-bottom: 20px;
  background: var(--rf-paper);
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-r);
  box-shadow: var(--rf-shadow);
}

.rf-thankyou__hero--fail {
  background: #fef2f2;
  border-color: #fecaca;
}

.rf-thankyou__confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background-image:
    radial-gradient(circle, var(--rf-accent) 2px, transparent 2px),
    radial-gradient(circle, #16a34a 2px, transparent 2px),
    radial-gradient(circle, #eab308 2px, transparent 2px),
    radial-gradient(circle, #3b82f6 2px, transparent 2px);
  background-size: 60px 60px, 80px 80px, 70px 70px, 90px 90px;
  background-position: 0 0, 30px 40px, 15px 20px, 45px 10px;
  animation: rf-confetti 20s linear infinite;
}

@keyframes rf-confetti {
  from { background-position: 0 0, 30px 40px, 15px 20px, 45px 10px; }
  to   { background-position: 60px 60px, 110px 120px, 85px 90px, 135px 100px; }
}

.rf-thankyou__icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rf-success) 0%, #15803d 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgb(22 163 74 / 30%);
  animation: rf-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.rf-thankyou__icon--fail {
  background: linear-gradient(135deg, var(--rf-error) 0%, #b91c1c 100%);
  box-shadow: 0 8px 24px rgb(220 38 38 / 30%);
}

@keyframes rf-pop {
  0%   { transform: scale(0); opacity: 0; }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

.rf-thankyou__badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--rf-success-bg);
  color: var(--rf-success);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.rf-thankyou__title {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 5vw, 2.1rem);
  font-weight: 800;
  line-height: 1.2;
}

.rf-thankyou__sub {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--rf-muted);
}

.rf-thankyou__sub strong {
  color: var(--rf-ink);
  font-weight: 700;
}

.rf-thankyou__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.rf-thankyou__card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--rf-paper);
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-r-sm);
  box-shadow: 0 2px 8px rgb(0 0 0 / 4%);
}

.rf-thankyou__card--highlight {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #fbbf24;
}

.rf-thankyou__card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: var(--rf-r-xs);
  background: var(--rf-tint);
  color: var(--rf-muted);
}

.rf-thankyou__card--highlight .rf-thankyou__card-icon {
  background: rgb(255 255 255 / 70%);
  color: var(--rf-warn);
}

.rf-thankyou__card-content {
  flex: 1 1 auto;
  min-width: 0;
}

.rf-thankyou__card-label {
  display: block;
  margin-bottom: 3px;
  font-size: 0.78rem;
  color: var(--rf-light);
}

.rf-thankyou__card-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  word-break: break-word;
}

.rf-thankyou__card-value--lg { font-size: 1.25rem; }
.rf-thankyou__card-value--price { font-size: 1.15rem; color: var(--rf-accent); }

.rf-thankyou__shipping {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  margin-bottom: 20px;
  background: var(--rf-paper);
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-r-sm);
}

.rf-thankyou__shipping-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: var(--rf-r-sm);
  background: #dbeafe;
  color: #2563eb;
}

.rf-thankyou__shipping-info { flex: 1 1 auto; min-width: 0; }

.rf-thankyou__shipping-title {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--rf-light);
}

.rf-thankyou__address {
  font-style: normal;
  font-size: 0.92rem;
  line-height: 1.6;
}

.rf-thankyou__items {
  margin-bottom: 20px;
  background: var(--rf-paper);
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-r-sm);
  overflow: hidden;
}

.rf-thankyou__items-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 14px 18px;
  background: var(--rf-tint);
  border-bottom: 1px solid var(--rf-border);
  font-size: 0.9rem;
  font-weight: 700;
}

.rf-thankyou__items-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--rf-accent);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
}

.rf-thankyou__products { list-style: none; margin: 0; padding: 0; }

.rf-thankyou__product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--rf-border);
}

.rf-thankyou__product:last-child { border-bottom: 0; }

.rf-thankyou__product-thumb {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: var(--rf-r-xs);
  overflow: hidden;
  background: var(--rf-tint);
}

.rf-thankyou__product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rf-thankyou__product-info { flex: 1 1 auto; min-width: 0; }

.rf-thankyou__product-name {
  display: block;
  margin-bottom: 3px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}

.rf-thankyou__product-meta { font-size: 0.78rem; color: var(--rf-light); }

.rf-thankyou__product-price {
  flex: 0 0 auto;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.rf-thankyou__btns,
.rf-thankyou__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.rf-thankyou__btns { margin-top: 20px; }

.rf-thankyou__footer {
  padding: 20px 0;
  border-top: 1px solid var(--rf-border);
}

.rf-thankyou__support {
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--rf-r-sm);
  background: var(--rf-tint);
  text-align: center;
}

.rf-thankyou__support p { margin: 0; font-size: 0.88rem; color: var(--rf-muted); }

.rf-thankyou__wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: 6px;
  color: #25d366;
  font-weight: 700;
  text-decoration: none;
}

.rf-thankyou__wa:hover { text-decoration: underline; }

/* Legacy default WooCommerce order-received output stays hidden. */
body.rf-thankyou-page .woocommerce-order-received-text,
body.rf-thankyou-page .woocommerce-order-overview,
body.rf-thankyou-page .woocommerce-order-details,
body.rf-thankyou-page .woocommerce-customer-details,
body.rf-thankyou-page .woocommerce-bacs-bank-details,
body.rf-thankyou-page .order_details {
  display: none;
}

/* ==========================================================================
   8. Empty cart
   ========================================================================== */

.rf-empty {
  max-width: 520px;
  margin-inline: auto;
  padding: 56px 20px 80px;
  text-align: center;
}

.rf-empty__icon { color: var(--rf-border-strong); margin-bottom: 18px; }

.rf-empty__title {
  margin: 0 0 10px;
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  font-weight: 800;
}

.rf-empty__text {
  margin: 0 0 26px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--rf-muted);
}

.rf-empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ==========================================================================
   9. Mobile sticky bars
   ========================================================================== */

.rf-cart__sticky,
.rf-checkout__sticky {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--rf-paper, #fff);
  border-top: 1px solid var(--rf-border, #e5e2db);
  box-shadow: 0 -6px 24px rgb(0 0 0 / 10%);
}

.rf-cart__sticky-total,
.rf-checkout__sticky-total {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.rf-cart__sticky-label,
.rf-checkout__sticky-label {
  font-size: 0.72rem;
  color: var(--rf-light, #8c8c8c);
}

.rf-cart__sticky-value,
.rf-checkout__sticky-total strong {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--rf-accent, #e63228);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rf-cart__sticky-cta,
.rf-checkout__sticky-cta {
  flex: 1 1 auto;
  min-height: 50px;
}

/* ==========================================================================
   10. Breakpoints
   ========================================================================== */

/* ---- Small phones ---- */
@media (max-width: 599px) {
  .rf-cart,
  .rf-checkout-page {
    --rf-pad: 18px;
    --rf-gap: 14px;
  }

  .rf-cart-item {
    padding: 12px;
    gap: 12px;
  }

  .rf-cart-item__media {
    width: 68px;
    height: 68px;
  }

  .rf-cart-item__controls {
    gap: 8px;
  }

  .rf-cart-item__remove span {
    /* Icon-only on narrow screens; the aria-label carries the meaning. */
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .rf-thankyou {
    padding: 18px 14px 64px;
  }

  .rf-thankyou__footer,
  .rf-empty__actions {
    flex-direction: column;
  }

  .rf-thankyou__footer .rf-btn,
  .rf-empty__actions .rf-btn {
    width: 100%;
  }
}

/* ---- Tablets ---- */
@media (min-width: 600px) {
  .rf-thankyou__cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .rf-thankyou__card--highlight {
    grid-column: span 2;
  }
}

/* ---- Desktop: two columns, sticky summary, no sticky bar ---- */
@media (min-width: 900px) {
  .rf-cart,
  .rf-checkout-page {
    --rf-sticky-h: 0px;
  }

  .rf-cart {
    padding-block: 40px 80px;
  }

  .rf-checkout-page {
    padding: 40px 24px 90px;
  }

  .rf-cart__layout,
  .rf-checkout__layout {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 32px;
  }

  .rf-cart__summary,
  .rf-checkout__aside {
    position: sticky;
    top: 24px;
  }

  /* On desktop the summary is a normal panel, always expanded. */
  .rf-checkout__aside {
    order: 0;
  }

  .rf-checkout__summary-toggle {
    cursor: default;
    pointer-events: none;
    padding-bottom: 14px;
  }

  .rf-checkout__summary-chevron {
    display: none;
  }

  .rf-checkout__summary-body {
    display: block;
  }

  .rf-cart__sticky,
  .rf-checkout__sticky {
    display: none;
  }

  .rf-cart-item__media {
    width: 96px;
    height: 96px;
  }
}

/* ==========================================================================
   11. Motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .rf-thankyou__confetti,
  .rf-thankyou__icon {
    animation: none;
  }

  .rf-btn,
  .rf-btn--primary:hover,
  .rf-disclosure__icon,
  .rf-checkout__summary-chevron {
    transition: none;
    transform: none;
  }
}
