/* Becomy checkout funnel base styles. Section accents (button colors, etc.)
 * are injected per-section from theme editor settings. */

.becomy-checkout-body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--checkout-bg, #f8fafc);
  color: var(--checkout-text, #111827);
  line-height: 1.5;
  --checkout-rail: #e8eef3;
}

.becomy-checkout-main {
  padding-bottom: 64px;
  max-width: 1120px;
  margin: 0 auto;
}

.bc-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Two-column checkout on desktop: form left, order rail right. */
@media (min-width: 900px) {
  .becomy-checkout-main:has(.bc-section-summary),
  .becomy-checkout-main:has(.bc-checkout-rail) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 26rem;
    grid-template-areas:
      "header header"
      "form   rail"
      "bumps  rail";
    column-gap: 0;
    row-gap: 0;
    align-items: start;
    align-content: start;
    max-width: none;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(
      to right,
      var(--checkout-bg, #f8fafc) 0,
      var(--checkout-bg, #f8fafc) calc(100% - 26rem),
      var(--checkout-rail, #e8eef3) calc(100% - 26rem),
      var(--checkout-rail, #e8eef3) 100%
    );
  }
  .bc-section-header {
    grid-area: header;
    padding-left: clamp(1.5rem, 5vw, 4.5rem);
    padding-right: clamp(1.5rem, 5vw, 4.5rem);
    background: var(--checkout-bg, #f8fafc);
    border-bottom: 1px solid var(--checkout-border, rgba(17, 24, 39, 0.08));
    z-index: 2;
  }
  .bc-section-form {
    grid-area: form;
    padding: 1.75rem 2.75rem 0 clamp(1.5rem, 5vw, 4.5rem);
  }
  .bc-section-bumps {
    grid-area: bumps;
    padding: 0 2.75rem 3rem clamp(1.5rem, 5vw, 4.5rem);
  }
  .bc-section-header .bc-header {
    max-width: none;
    margin: 0;
    border-bottom: 0;
  }
  .bc-section-header .bc-header__inner {
    max-width: none;
    width: calc(100% - 26rem);
    box-sizing: border-box;
    margin: 0;
    padding-left: 0;
    padding-right: 2.75rem;
  }
  .bc-section-form .bc-container,
  .bc-section-bumps .bc-container {
    max-width: 36rem;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .bc-checkout-rail {
    grid-area: rail;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    box-sizing: border-box;
    min-height: 0;
    height: 100%;
    padding: 1.75rem 2.15rem 2.5rem;
    background: transparent;
    border-left: 1px solid var(--checkout-border, rgba(17, 24, 39, 0.08));
  }
  .bc-checkout-rail .bc-section-summary,
  .bc-checkout-rail .bc-section-trust {
    padding: 0;
    width: auto;
  }
  .bc-summary {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
  }
  .bc-summary__heading { font-size: 1.7rem; margin: 0 0 1.25rem; }
  .bc-checkout-rail .bc-trust { margin: auto 0 0; }
  .bc-trust__grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .bc-trust__item {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
  }
  .bc-trust__icon { margin-bottom: 0; }
  .bc-section-upsell,
  .bc-section-thanks { grid-column: 1 / -1; }
}

@media (max-width: 899px) {
  .becomy-checkout-main {
    display: flex;
    flex-direction: column;
    max-width: none;
    padding-bottom: 2.5rem;
  }
  .bc-checkout-rail { display: contents; }
  .bc-section-header { order: 1; }
  .bc-section-summary { order: 2; }
  .bc-section-form { order: 3; }
  .bc-section-bumps { order: 4; }
  .bc-section-trust { order: 5; }
  .bc-trust__grid { grid-template-columns: 1fr; gap: 8px; }
  .bc-form__row--split { grid-template-columns: 1fr; }
  .bc-header__inner { flex-wrap: wrap; justify-content: center; text-align: center; }
  .bc-header__right { align-items: center; width: 100%; }
  .bc-steps { justify-content: center; flex-wrap: wrap; }
}

/* Header */
.bc-header { background: transparent; border-bottom: 1px solid rgba(17, 24, 39, 0.08); margin-bottom: 28px; }
.bc-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 18px 0;
  max-width: 1120px;
  margin: 0 auto;
}
.bc-header .bc-container { max-width: none; width: 100%; }
.bc-header__logo { text-decoration: none; color: inherit; }
.bc-header__logo-img { max-height: 40px; display: block; }
.bc-header__logo-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.bc-header__tagline {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.65;
  text-align: center;
  flex: 1;
}
.bc-header__right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
.bc-header__secure {
  font-size: 0.78rem;
  opacity: 0.7;
}
.bc-steps { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; font-size: 13px; color: #9ca3af; }
.bc-steps__item--active { color: inherit; font-weight: 600; }
.bc-steps__item + .bc-steps__item::before { content: '›'; margin-right: 16px; color: #d1d5db; }

/* Form */
.bc-form__heading { font-size: 28px; margin: 0 0 24px; }
.bc-form__group { border: 0; padding: 0; margin: 0 0 28px; }
.bc-form__legend { font-size: 16px; font-weight: 600; margin-bottom: 12px; padding: 0; }
.bc-form__row { margin-bottom: 12px; }
.bc-form__row--split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 899px) {
  .bc-form__row--split { grid-template-columns: 1fr; }
}
.bc-form input,
.bc-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  background: #ffffff;
}
.bc-form__payment {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  min-height: 80px;
}
.bc-form__payment-placeholder { color: #9ca3af; text-align: center; margin: 24px 0; }
.bc-form__error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}
.bc-form__submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 22px;
  margin: 8px 0 4px;
  border: 0;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}
.bc-form__submit--busy { opacity: 0.6; cursor: wait; }
.bc-form__submit-total { font-weight: 700; }
.bc-form__shipping-options { display: grid; gap: 8px; margin-bottom: 8px; }
.bc-form__shipping-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
}
.bc-form__shipping-option:has(input:checked) { border-color: #2563eb; background: #eff6ff; }
.bc-form__shipping-hint { color: #6b7280; font-size: 14px; margin: 0; }
.bc-form__shipping-loading { color: #6b7280; font-size: 14px; margin-bottom: 8px; }

/* Order bumps */
.bc-bumps { margin: 28px auto 24px; }
.bc-bump {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px 18px;
  margin-bottom: 12px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.08);
  cursor: pointer;
}
.bc-bump__check input { width: 20px; height: 20px; }
.bc-bump__body { flex: 1; }
.bc-bump__title { font-weight: 700; margin: 0 0 4px; }
.bc-bump__product { margin: 0; font-size: 14px; }
.bc-bump__price s { color: #9ca3af; margin-right: 6px; }
.bc-bump__description { margin: 6px 0 0; font-size: 13px; color: #6b7280; }
.bc-bump__image { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }

/* Summary */
.bc-summary {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin: 24px auto;
  box-sizing: border-box;
}
.bc-summary__heading { font-size: 17px; margin: 0 0 16px; }
.bc-summary__lines { list-style: none; margin: 0 0 16px; padding: 0; }
.bc-summary__line { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.bc-summary__image { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex-shrink: 0; background: #efe3d0; }
.bc-summary__title { flex: 1; font-size: 14px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bc-summary__variant { display: block; font-size: 12px; color: rgba(43, 31, 20, 0.7); letter-spacing: 0.02em; }
  .bc-summary__line { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(17, 24, 39, 0.08); }
.bc-summary__qty { color: #9ca3af; }
.bc-summary__price { font-weight: 600; font-size: 14px; }
.bc-summary__totals { margin: 0; }
.bc-summary__total-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.bc-summary__total-row dd { margin: 0; }
.bc-summary__total-row--discount { color: #16a34a; }
.bc-summary__total-row--grand { font-size: 17px; font-weight: 700; border-top: 1px solid #e5e7eb; padding-top: 10px; margin-top: 6px; }

/* Trust */
.bc-trust { margin-top: 8px; margin-bottom: 24px; }
.bc-trust__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.bc-trust__item {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  font-size: 12px;
  color: inherit;
  margin: 0;
  opacity: 0.9;
}
.bc-trust__item p { margin: 0; }
.bc-trust__icon {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--checkout-accent, #2563eb);
}
.bc-trust__social,
.bc-trust__returns {
  margin: 6px 0 0;
  font-size: 13px;
  opacity: 0.75;
  text-align: center;
}

/* Upsell */
.bc-upsell { text-align: center; padding: 40px 0 24px; max-width: 920px; margin: 0 auto; }
.bc-upsell__brand {
  margin: 0 0 14px;
  font-size: 1.15rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}
.bc-upsell__steps {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  opacity: 0.7;
}
.bc-upsell__steps li.is-done,
.bc-upsell__steps li.is-active {
  color: var(--checkout-accent, #2563eb);
  opacity: 1;
  font-weight: 600;
}
.bc-upsell__heading { font-size: 34px; margin: 0 0 8px; }
.bc-upsell__subheading { color: #6b7280; margin: 0 0 16px; }
.bc-upsell__countdown { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.bc-upsell__offer {
  display: flex;
  gap: 28px;
  align-items: stretch;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 24px;
  margin: 24px 0;
  text-align: left;
}
.bc-upsell__image {
  width: min(42%, 360px);
  min-height: 280px;
  object-fit: cover;
  border-radius: 14px;
  flex-shrink: 0;
}
.bc-upsell__details { display: flex; flex-direction: column; justify-content: center; flex: 1; }
.bc-upsell__product { margin: 0 0 10px; font-size: 1.55rem; }
.bc-upsell__price { margin: 0 0 18px; font-size: 1.35rem; }
.bc-upsell__price s { color: #9ca3af; margin-right: 8px; }
.bc-upsell__badge {
  background: color-mix(in srgb, var(--checkout-accent, #2563eb) 18%, white);
  color: var(--checkout-accent, #2563eb);
  border-radius: 999px;
  font-size: 12px;
  padding: 3px 10px;
  margin-right: 8px;
  font-weight: 700;
}
.bc-upsell__accept {
  display: block;
  width: 100%;
  padding: 16px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 12px;
  background: var(--checkout-accent, #2563eb);
}
.bc-upsell__decline {
  background: none;
  border: 0;
  color: #6b7280;
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
}
.bc-upsell__empty { color: #9ca3af; }

/* Thank you */
.bc-thanks { text-align: center; padding: 48px 0 24px; max-width: 720px; margin: 0 auto; }
.bc-thanks__icon {
  width: 64px;
  height: 64px;
  line-height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--checkout-accent, #16a34a) 18%, white);
  color: var(--checkout-accent, #16a34a);
  font-size: 30px;
}
.bc-thanks__heading { font-size: 32px; margin: 0 0 8px; }
.bc-thanks__subheading { color: #6b7280; margin: 0 0 24px; }
.bc-thanks__order {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 24px;
  text-align: left;
}
.bc-thanks__order-number { font-weight: 700; margin: 0 0 12px; letter-spacing: 0.04em; }
.bc-thanks__lines { list-style: none; margin: 0; padding: 0; }
.bc-thanks__line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; border-bottom: 1px solid #f3f4f6; }
.bc-thanks__notes {
  margin: 0 0 24px;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-align: left;
  white-space: pre-wrap;
  color: #374151;
  font-size: 15px;
}
.becomy-checkout-body--inquiry .bc-form__submit {
  justify-content: center;
}
.bc-thanks__continue {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 999px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  background: var(--checkout-accent, #2563eb);
}

@media (max-width: 560px) {
  .bc-upsell__offer { flex-direction: column; text-align: center; }
  .bc-upsell__image { width: 100%; min-height: 220px; }
  .bc-header__inner { flex-direction: column; gap: 8px; text-align: center; }
  .bc-header__right { align-items: center; }
  .bc-trust__grid { grid-template-columns: 1fr; }
  .bc-header__tagline { display: none; }
}

@media (min-width: 900px) {
  .bc-checkout-rail .bc-summary {
    background: transparent;
    border: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
  }
  .bc-checkout-rail .bc-summary__heading {
    font-size: 1.7rem;
    margin: 0 0 1.25rem;
  }
  .bc-checkout-rail .bc-trust { margin: auto 0 0; }
  .bc-checkout-rail .bc-trust__grid { grid-template-columns: 1fr; gap: 0.85rem; }
  .bc-checkout-rail .bc-trust__item {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
  }
}

/* Capsule checkout brand overlay — light paper / coral */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=Outfit:wght@400;600&display=swap');

body.becomy-checkout-body {
  --checkout-accent: #E23A4A;
  --checkout-bg: #F7F0E4;
  --checkout-text: #1B1730;
  --checkout-card: #FFFBF4;
  --checkout-border: rgba(27, 23, 48, 0.12);
  --checkout-rail: #EDE3D2;
  background: var(--checkout-bg) !important;
  color: var(--checkout-text) !important;
}

body.becomy-checkout-body .bc-header__logo-text,
body.becomy-checkout-body .bc-form__heading,
body.becomy-checkout-body .bc-summary__heading,
body.becomy-checkout-body .bc-upsell__heading,
body.becomy-checkout-body .bc-upsell__product,
body.becomy-checkout-body .bc-thanks__heading {
  font-family: 'Fraunces', Georgia, serif;
}

body.becomy-checkout-body .bc-header {
  border-bottom-color: var(--checkout-border);
}

body.becomy-checkout-body .bc-form input,
body.becomy-checkout-body .bc-form textarea,
body.becomy-checkout-body .bc-form select {
  background: #FFFBF4 !important;
  color: var(--checkout-text) !important;
  border: 1px solid var(--checkout-border) !important;
  border-radius: 14px !important;
}

body.becomy-checkout-body .bc-form__payment,
body.becomy-checkout-body .bc-summary,
body.becomy-checkout-body .bc-upsell__offer,
body.becomy-checkout-body .bc-thanks__order {
  background: var(--checkout-card) !important;
  border-color: var(--checkout-border) !important;
  border-radius: 18px !important;
}

body.becomy-checkout-body .bc-form__submit,
body.becomy-checkout-body .bc-upsell__accept,
body.becomy-checkout-body .bc-thanks__continue {
  background: var(--checkout-accent) !important;
  color: #FFFBF4 !important;
  border-radius: 999px !important;
}

body.becomy-checkout-body .bc-trust__item {
  background: color-mix(in srgb, var(--checkout-card) 88%, transparent);
  border-color: var(--checkout-border);
}

body.becomy-checkout-body .bc-trust__icon,
body.becomy-checkout-body .bc-steps__item--active,
body.becomy-checkout-body .bc-summary__total-row--grand dd {
  color: var(--checkout-accent) !important;
}

body.becomy-checkout-body .bc-form__shipping-option:has(input:checked) {
  border-color: var(--checkout-accent) !important;
  background: color-mix(in srgb, var(--checkout-accent) 12%, var(--checkout-card)) !important;
}

body.becomy-checkout-body .bc-summary__line {
  border-bottom-color: var(--checkout-border) !important;
}

body.becomy-checkout-body .bc-summary__variant,
body.becomy-checkout-body .bc-summary__qty {
  color: rgba(27, 23, 48, 0.55) !important;
}

body.becomy-checkout-body .bc-summary__image {
  background: #EDE3D2 !important;
}

body.becomy-checkout-body .bc-summary__total-row--grand {
  border-top-color: var(--checkout-border) !important;
}

body.becomy-checkout-body .bc-header__secure,
body.becomy-checkout-body .bc-steps__item,
body.becomy-checkout-body .bc-upsell__steps li,
body.becomy-checkout-body .bc-thanks__subheading {
  color: rgba(27, 23, 48, 0.62);
}

body.becomy-checkout-body .bc-upsell__steps li.is-done,
body.becomy-checkout-body .bc-upsell__steps li.is-active {
  color: var(--checkout-accent) !important;
}

body.becomy-checkout-body .bc-upsell__decline {
  color: var(--checkout-text) !important;
}

@media (min-width: 900px) {
  body.becomy-checkout-body .bc-upsell {
    padding-top: 1.25rem;
  }
  body.becomy-checkout-body .bc-upsell__image {
    min-height: 160px;
    max-height: 200px;
    width: min(28%, 200px);
  }
  body.becomy-checkout-body .bc-upsell__offer {
    margin: 0.85rem 0;
    padding: 1rem 1.15rem;
  }
}
