/* Checkout-only additions. The existing FUSO storefront remains untouched. */
#fuso-checkout-dialog,
.fuso-checkout-launcher,
.fuso-checkout-buy {
  --fuso-checkout-ink: #202521;
  --fuso-checkout-muted: #5b6158;
  --fuso-checkout-paper: #f6f4ef;
  --fuso-checkout-pearl: #e9e5dc;
  --fuso-checkout-line: #d9d5cc;
  --fuso-checkout-gold: #806936;
  color: var(--fuso-checkout-ink);
  font: 14px/1.6 FusoText, Arial, sans-serif;
}

.fuso-checkout-launcher {
  position: fixed;
  z-index: 45;
  top: calc(14px + env(safe-area-inset-top));
  right: calc(16px + env(safe-area-inset-right));
}

.fuso-checkout-open {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #b89b56;
  border-radius: 50%;
  background: #101110;
  color: #ebcd83;
  box-shadow: 0 3px 12px #0004;
  cursor: pointer;
}
.fuso-checkout-open .fuso-checkout-buy-icon { width: 25px; height: 25px; }
.fuso-checkout-open:hover { background: #29271f; border-color: #e9c56b; }
.fuso-checkout-open .fuso-checkout-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 19px;
  padding: 0 4px;
  border: 1px solid #101110;
  border-radius: 12px;
  background: #e9c56b;
  color: #17150e;
  font: 700 11px/17px FusoText, Arial, sans-serif;
  text-align: center;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.fuso-checkout-label {
  display: block;
  max-width: 100%;
  padding: 3px 7px;
  background: #f6f4eff5;
  color: #4e534b;
  border: 1px solid #dedad1;
  font: 10px/1.5 FusoText, Arial, sans-serif;
  overflow-wrap: anywhere;
}

.fuso-checkout-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  margin: 12px 0 0;
  padding: 13px 23px;
  border: 1px solid var(--fuso-checkout-ink);
  border-radius: 0;
  background: var(--fuso-checkout-ink);
  color: #fff;
  font-size: 14px;
  letter-spacing: .01em;
  cursor: pointer;
}
.fuso-checkout-buy:hover { background: #3b443d; }
.fuso-checkout-card-buy { width: 100%; margin-top: 16px; }
.fuso-checkout-product-buy { width: 100%; margin-bottom: 16px; }
.fuso-checkout-shop-note {
  max-width: 440px;
  margin: 18px 0 0;
  color: #e2e4dc;
  font: 12px/1.65 FusoText, Arial, sans-serif;
  letter-spacing: .01em;
}

#fuso-checkout-dialog {
  width: min(680px, calc(100vw - 28px));
  min-width: 0;
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  height: min(820px, calc(100vh - 28px));
  height: min(820px, calc(100dvh - 28px));
  margin: auto;
  padding: 0;
  border: 1px solid #d0c9bb;
  border-radius: 2px;
  background: var(--fuso-checkout-paper);
  box-shadow: 0 22px 80px #161a1740;
  overflow: hidden;
  overscroll-behavior: contain;
  text-align: left;
  color-scheme: light;
}
#fuso-checkout-dialog:not([open]) { display: none; }
#fuso-checkout-dialog::backdrop { background: #111813c9; }
#fuso-checkout-dialog *,
.fuso-checkout-launcher *,
.fuso-checkout-buy { box-sizing: border-box; }
.fuso-checkout-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  padding: 24px 28px 18px;
}
.fuso-checkout-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 22px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--fuso-checkout-line);
  flex-shrink: 0;
}
.fuso-checkout-header > div { min-width: 0; }
#fuso-checkout-dialog .fuso-checkout-eyebrow {
  margin: 0 0 8px;
  color: var(--fuso-checkout-gold);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
}
#fuso-checkout-title {
  margin: 0;
  color: var(--fuso-checkout-ink);
  font: 400 clamp(27px, 4vw, 34px)/1.15 Georgia, 'Times New Roman', serif;
  overflow-wrap: anywhere;
}
#fuso-checkout-title:focus { outline: none; }
.fuso-checkout-close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--fuso-checkout-line);
  border-radius: 0;
  color: var(--fuso-checkout-ink);
  background: var(--fuso-checkout-pearl);
  font: 28px/1 Arial, sans-serif;
  cursor: pointer;
}
.fuso-checkout-close:hover { background: #ddd7cb; }
#fuso-checkout-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y pinch-zoom;
  scrollbar-gutter: stable;
  padding-right: 5px;
  overflow-wrap: anywhere;
}
#fuso-checkout-body:focus-visible { outline: 2px solid var(--fuso-checkout-gold); outline-offset: -2px; }
#fuso-checkout-description { flex-shrink: 0; font-size: 12px; }
.fuso-checkout-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
  margin: 12px 0 0;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--fuso-checkout-line);
  background: var(--fuso-checkout-paper);
  color: var(--fuso-checkout-ink);
  text-align: center;
}
.fuso-checkout-footer[hidden] { display: none; }
.fuso-checkout-footer > :is(button, a) { width: 100%; margin: 0; }
#fuso-checkout-dialog h3 {
  margin: 0 0 12px;
  color: var(--fuso-checkout-ink);
  font: 400 24px/1.25 Georgia, 'Times New Roman', serif;
}
#fuso-checkout-dialog p { margin: 0 0 12px; }
#fuso-checkout-dialog button,
#fuso-checkout-dialog input,
#fuso-checkout-dialog select { font-family: FusoText, Arial, sans-serif; }
#fuso-checkout-dialog button { cursor: pointer; white-space: normal; }
#fuso-checkout-dialog button:disabled,
#fuso-checkout-dialog input:disabled,
#fuso-checkout-dialog select:disabled,
.fuso-checkout-buy:disabled,
.fuso-checkout-open:disabled { opacity: .55; cursor: not-allowed; }
#fuso-checkout-dialog :is(button, a, input, select):focus-visible,
.fuso-checkout-open:focus-visible,
.fuso-checkout-buy:focus-visible {
  outline: 3px solid #806936;
  outline-offset: 3px;
}
.fuso-checkout-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.fuso-checkout-progress {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  color: var(--fuso-checkout-muted);
  font-size: 11px;
}
.fuso-checkout-progress li { flex: 1; min-width: 0; padding: 10px 4px; border-bottom: 2px solid var(--fuso-checkout-line); text-align: center; }
.fuso-checkout-progress [aria-current='step'] { color: var(--fuso-checkout-ink); border-color: var(--fuso-checkout-gold); font-weight: 700; }
#fuso-checkout-dialog :is(.fuso-checkout-notice, .fuso-checkout-error) { margin: 18px 0; padding: 14px 16px; font-size: 12px; line-height: 1.65; }
.fuso-checkout-notice { background: #eae6dd; border: 1px solid #d8d0c1; color: #4e4b43; }
.fuso-checkout-error { background: #f6e8e3; border: 1px solid #d6b1a3; color: #783c2a; }
#fuso-checkout-dialog .fuso-checkout-proof { margin: 14px 0; color: #35563f; font-size: 12px; }
#fuso-checkout-dialog .fuso-checkout-loading { margin: 15px 0; color: var(--fuso-checkout-muted); font-size: 13px; }
.fuso-checkout-muted { color: var(--fuso-checkout-muted); font-size: 12px; }
#fuso-checkout-dialog .fuso-checkout-fineprint { margin: 16px 0 0; color: var(--fuso-checkout-muted); font-size: 11px; line-height: 1.7; }

.fuso-checkout-item {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--fuso-checkout-line);
}
.fuso-checkout-image { display: block; width: 80px; height: 100px; object-fit: contain; background: var(--fuso-checkout-pearl); }
#fuso-checkout-dialog .fuso-checkout-item h3 { margin: 0 0 5px; font-size: 18px; line-height: 1.3; }
#fuso-checkout-dialog .fuso-checkout-item p { margin: 4px 0; color: var(--fuso-checkout-muted); font-size: 11px; }
#fuso-checkout-dialog .fuso-checkout-item .fuso-checkout-item-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 7px 0; color: var(--fuso-checkout-ink); font-size: 14px; }
.fuso-checkout-item-price span { color: var(--fuso-checkout-muted); font-size: 10px; }
.fuso-checkout-price { color: var(--fuso-checkout-ink); font-size: 12px; font-weight: 600; padding-top: 3px; }
.fuso-checkout-quantity { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.fuso-checkout-quantity button { min-width: 44px; min-height: 44px; padding: 7px 11px; border: 1px solid var(--fuso-checkout-line); border-radius: 0; background: #eeebe3; color: var(--fuso-checkout-ink); font-size: 16px; }
.fuso-checkout-quantity button:hover { background: #e1dacc; }
.fuso-checkout-quantity button[data-fuso-remove] { font-size: 11px; text-decoration: underline; background: transparent; border-color: transparent; }
.fuso-checkout-quantity output { min-width: 18px; text-align: center; font-size: 13px; }
.fuso-checkout-summary { margin: 22px 0; }
.fuso-checkout-summary > div { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; margin: 11px 0; color: var(--fuso-checkout-muted); font-size: 13px; }
.fuso-checkout-summary > div > :last-child { flex-shrink: 0; text-align: right; }
.fuso-checkout-summary > .fuso-checkout-total { margin-top: 16px; padding-top: 17px; border-top: 1px solid var(--fuso-checkout-line); color: var(--fuso-checkout-ink); font-size: 16px; }
.fuso-checkout-summary > .fuso-checkout-discount { color: #35563f; }
.fuso-checkout-cart-summary { margin: 18px 0 10px; }
.fuso-checkout-cart-summary > .fuso-checkout-total { font-size: 20px; }

.fuso-checkout-primary,
.fuso-checkout-secondary,
.fuso-checkout-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  max-width: 100%;
  margin: 0;
  padding: 13px 18px;
  border: 1px solid var(--fuso-checkout-ink);
  border-radius: 0;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.fuso-checkout-primary { width: 100%; min-height: 52px; background: var(--fuso-checkout-ink); color: #fff; font-size: 15px; font-weight: 600; }
.fuso-checkout-primary:hover { background: #3b443d; }
.fuso-checkout-secondary { background: var(--fuso-checkout-pearl); border-color: #bbb3a5; color: var(--fuso-checkout-ink); }
.fuso-checkout-secondary:hover { background: #ded7ca; }
.fuso-checkout-text { min-height: 44px; border-color: transparent; padding: 10px 4px; background: transparent; color: #4f594e; text-decoration: underline; text-underline-offset: 3px; }
.fuso-checkout-text:hover { color: #191d19; }
.fuso-checkout-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.fuso-checkout-actions > * { flex: 1 1 180px; min-width: 0; }
.fuso-checkout-section { min-width: 0; margin: 22px 0; padding: 0; border: 0; }
#fuso-checkout-dialog .fuso-checkout-section :is(legend, h3) { margin: 0 0 12px; color: var(--fuso-checkout-ink); font: 600 13px/1.5 FusoText, Arial, sans-serif; }
.fuso-checkout-choice { display: flex; align-items: center; gap: 12px; min-height: 66px; margin: 8px 0; padding: 14px; border: 1px solid var(--fuso-checkout-line); background: #f9f7f2; cursor: pointer; }
.fuso-checkout-choice:has(input:checked) { border-color: #807252; background: #ece6da; }
.fuso-checkout-choice input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: #4b5447; }
.fuso-checkout-choice span { min-width: 0; }
.fuso-checkout-choice strong { display: block; font-size: 13px; font-weight: 600; }
.fuso-checkout-choice small { display: block; margin-top: 3px; color: var(--fuso-checkout-muted); font-size: 11px; line-height: 1.5; }
.fuso-checkout-select { min-width: 0; margin: 18px 0; padding: 16px; background: #eeebe3; border: 1px solid var(--fuso-checkout-line); }
.fuso-checkout-select label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 600; }
.fuso-checkout-select select { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 48px; padding: 11px 8px; border: 1px solid #958a75; border-radius: 0; background: #fffdf8; color: var(--fuso-checkout-ink); font-size: 12px; }
#fuso-checkout-dialog .fuso-checkout-select p { margin: 12px 0 0; font-size: 12px; }
.fuso-checkout-contact { padding: 16px; background: #eeebe3; border: 1px solid var(--fuso-checkout-line); }
.fuso-checkout-field { margin-top: 14px; }
.fuso-checkout-field label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; }
.fuso-checkout-field input { display: block; width: 100%; min-width: 0; min-height: 48px; padding: 11px 10px; border: 1px solid #958a75; border-radius: 0; background: #fffdf8; color: var(--fuso-checkout-ink); font-size: 16px; }
.fuso-checkout-field input::placeholder { color: #74796f; }

.fuso-checkout-state { padding: 7px 0 16px; }
.fuso-checkout-status { display: inline-block; max-width: 100%; margin: 0 0 15px; padding: 6px 10px; border: 1px solid #d2c8b2; background: #eae3d4; color: #64502d; font-size: 11px; font-weight: 600; }
/* Minimal checkout details; payment state lives at the provider. */
.fuso-checkout-unit { display:block; font-size:10px; font-weight:400; color:var(--fuso-checkout-muted); }
.fuso-checkout-review-items { margin:18px 0; padding:0; list-style:none; }
.fuso-checkout-review-items li { padding:12px 0; border-bottom:1px solid var(--fuso-checkout-line); }
.fuso-checkout-review-items span { display:block; margin-top:3px; color:var(--fuso-checkout-muted); font-size:11px; }
#fuso-checkout-dialog .fuso-checkout-order-reference { font-size:11px; color:var(--fuso-checkout-muted); overflow-wrap:anywhere; }
#fuso-checkout-dialog a.fuso-checkout-primary { text-decoration:none; }

@media (max-width: 500px) {
  .fuso-checkout-launcher { top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); }
  .fuso-checkout-open { width: 44px; height: 44px; }
  .fuso-checkout-label { font-size: 9px; }
  .fuso-checkout-buy { width: 100%; }
  #fuso-checkout-dialog { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .fuso-checkout-shell { padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .fuso-checkout-header { gap: 12px; margin-bottom: 12px; padding-bottom: 12px; }
  .fuso-checkout-item { grid-template-columns: 72px minmax(0, 1fr); gap: 10px 12px; }
  .fuso-checkout-image { width: 72px; height: 90px; }
  .fuso-checkout-price { grid-column: 2; margin-top: -6px; padding: 0; }
  #fuso-checkout-dialog .fuso-checkout-item h3 { font-size: 17px; }
  .fuso-checkout-summary > div { gap: 12px; font-size: 12px; }
  .fuso-checkout-summary > .fuso-checkout-total { font-size: 14px; }
  .fuso-checkout-cart-summary > .fuso-checkout-total { font-size: 20px; }
  .fuso-checkout-select { padding: 12px; }
  .fuso-checkout-select select { font-size: 11px; }
}

@media (max-height: 550px) {
  .fuso-checkout-shell { padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .fuso-checkout-header { margin-bottom: 8px; padding-bottom: 8px; }
  #fuso-checkout-title { font-size: 24px; }
  #fuso-checkout-dialog .fuso-checkout-eyebrow { margin-bottom: 3px; }
  .fuso-checkout-footer { margin-top: 8px; padding-top: 8px; }
}

@media (max-width: 350px) {
  .fuso-checkout-shell { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .fuso-checkout-header { gap: 8px; }
  .fuso-checkout-quantity { gap: 5px; }
  .fuso-checkout-quantity button { padding-inline: 9px; }
  .fuso-checkout-choice { padding: 12px 10px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  #fuso-checkout-dialog,
  #fuso-checkout-dialog *,
  .fuso-checkout-launcher,
  .fuso-checkout-launcher *,
  .fuso-checkout-buy { scroll-behavior: auto; animation: none; transition: none; }
}

body.fuso-checkout-opened { overflow: hidden; }

/* Purchase actions reuse the established dark green and gold palette. */
.fuso-checkout-product-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 22px; }
.fuso-checkout-product-actions .fuso-checkout-buy { flex: 1 1 180px; margin: 0; font-weight: 700; }
.fuso-checkout-product-actions .fuso-checkout-buy:last-child { background: #f6f4ef; color: #202521; }
.fuso-checkout-card-buy { width: 100%; margin-top: 16px; font-weight: 700; }
.fuso-checkout-buy[hidden] { display: none; }

/* Black and bright gold highlight only the primary Compre agora actions. */
.fuso-checkout-hero-buy.button,
.fuso-checkout-card-buy,
.fuso-checkout-product-actions .fuso-checkout-buy:first-child {
  gap: 9px;
  min-height: 50px;
  border: 2px solid #caa445;
  background: #080808;
  color: #e9c56b;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .035em;
  box-shadow: 0 4px 14px #00000024, inset 0 0 0 1px #f4d2831a;
}
.fuso-checkout-buy-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  pointer-events: none;
}
.fuso-checkout-hero-buy.button:hover,
.fuso-checkout-card-buy:not(:disabled):hover,
.fuso-checkout-product-actions .fuso-checkout-buy:first-child:not(:disabled):hover {
  border-color: #e9c56b;
  background: #e9c56b;
  color: #080808;
}
.fuso-checkout-hero-buy.button:focus-visible,
.fuso-checkout-card-buy:focus-visible,
.fuso-checkout-product-actions .fuso-checkout-buy:first-child:focus-visible {
  outline: 3px solid #caa445;
  outline-offset: 4px;
}
