:root {
  --checkout-ink: #101828;
  --checkout-muted: #667085;
  --checkout-line: #e1e6eb;
  --checkout-soft: #f5f7f9;
  --checkout-accent: #f0441e;
  --checkout-accent-dark: #d73714;
  --checkout-accent-soft: #fff0ea;
  --checkout-blue-soft: #eef6fc;
  --checkout-green: #16834d;
  --checkout-shadow: 0 14px 34px rgba(23, 32, 51, .065);
}

* { box-sizing: border-box; }
.checkout-page { min-height: 100vh; margin: 0; overflow-x: clip; background: #f4f6f8; color: var(--checkout-ink); font-family: "DM Sans", system-ui, sans-serif; }
.checkout-page [hidden] { display: none !important; }
.checkout-skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 9px 12px; border-radius: 8px; background: var(--checkout-ink); color: #fff; font-weight: 800; transform: translateY(-140%); }
.checkout-skip-link:focus { transform: translateY(0); }

.checkout-header { width: min(1440px, 100%); min-height: 62px; margin: 0 auto; padding: 0 14px; display: grid; grid-template-columns: 170px minmax(260px, 560px) auto; align-items: center; gap: 22px; border-bottom: 1px solid var(--checkout-line); background: rgba(255, 255, 255, .97); }
.checkout-brand { display: inline-flex; width: fit-content; align-items: center; }
.checkout-brand img { display: block; width: 126px; max-width: 100%; height: 53px; object-fit: contain; }
.checkout-search { min-width: 0; min-height: 40px; padding: 0 13px; display: flex; align-items: center; gap: 10px; border: 1px solid #e4e8ed; border-radius: 9px; background: #f1f4f7; }
.checkout-search svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: #384356; stroke-width: 2; }
.checkout-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--checkout-ink); font: inherit; font-size: 13px; }
.checkout-search input::placeholder { color: #778195; opacity: 1; }
.checkout-search:focus-within { border-color: var(--checkout-accent); box-shadow: 0 0 0 3px rgba(240, 68, 30, .13); background: #fff; }
.checkout-header-actions { min-width: 0; display: flex; justify-self: end; align-items: center; gap: 13px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.checkout-header-actions a { min-height: 40px; display: inline-flex; align-items: center; color: var(--checkout-ink); text-decoration: none; }
.checkout-header-actions a:hover, .checkout-header-actions a:focus-visible { color: var(--checkout-accent-dark); }
.checkout-help-link { color: var(--checkout-muted) !important; }
.checkout-account-link { color: var(--checkout-accent-dark) !important; }
.checkout-cart-link { width: 40px; justify-content: center; border: 1px solid var(--checkout-line); border-radius: 9px; }
.checkout-cart-link svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.checkout-layout { width: min(1240px, calc(100% - 28px)); margin: 10px auto 24px; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 12px 16px; align-items: start; }
.checkout-progress { grid-column: 1 / -1; min-height: 78px; padding: 9px 0 10px; border-bottom: 1px solid var(--checkout-line); }
.checkout-eyebrow { margin: 0; color: var(--checkout-accent-dark); font-size: 10px; font-weight: 950; letter-spacing: .09em; text-transform: uppercase; }
.checkout-progress .checkout-eyebrow { margin-bottom: 7px; }
.checkout-progress ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; }
.checkout-progress li { position: relative; min-width: 0; display: flex; align-items: center; gap: 8px; color: #637083; font-size: 12px; font-weight: 800; }
.checkout-progress li::after { content: ""; position: absolute; z-index: 0; top: 14px; left: 34px; right: 10px; height: 1px; background: #dce2e8; }
.checkout-progress li:last-child::after { display: none; }
.checkout-progress li > span { position: relative; z-index: 1; background: #f4f6f8; }
.checkout-progress li > span:first-child { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border: 1px solid #d8dee5; border-radius: 50%; font-size: 11px; }
.checkout-progress li[aria-current="step"] { color: var(--checkout-accent-dark); }
.checkout-progress li[aria-current="step"] > span:first-child { border-color: var(--checkout-accent); background: var(--checkout-accent); color: #fff; }
.checkout-progress li[aria-current="step"]::after { background: linear-gradient(90deg, var(--checkout-accent), #dce2e8); }
.checkout-progress-text { margin: 4px 0 0; color: var(--checkout-muted); font-size: 10px; }

.checkout-card, .checkout-persistent-summary { border: 1px solid var(--checkout-line); border-radius: 12px; background: #fff; box-shadow: var(--checkout-shadow); }
.checkout-card { grid-column: 1; grid-row: 2; min-width: 0; padding: 20px 22px 16px; outline: 0; }
.checkout-card [data-step] { scroll-margin-bottom: 88px; }
.checkout-card h1 { margin: 5px 0 5px; color: var(--checkout-ink); font-size: clamp(28px, 3vw, 34px); line-height: 1.05; letter-spacing: -.035em; }
.checkout-card [data-step] > p:not(.checkout-eyebrow, .checkout-confirmation) { margin: 7px 0 0; color: var(--checkout-muted); font-size: 12px; line-height: 1.45; }
.checkout-persistent-summary { grid-column: 2; grid-row: 2; position: sticky; top: 10px; min-width: 290px; max-width: 380px; width: 100%; padding: 17px; justify-self: end; }
.checkout-persistent-summary > summary { display: none; }
.checkout-summary-desktop-heading { display: grid; gap: 3px; }
.checkout-summary-desktop-heading strong { font-size: 16px; }
.checkout-summary-compact-line { display: flex; min-width: 0; align-items: baseline; gap: 7px; }
.checkout-summary-meta { min-width: 0; overflow: hidden; color: var(--checkout-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.checkout-summary-compact-total { flex: 0 0 auto; font-size: 12px; white-space: nowrap; }
.checkout-summary-toggle { color: var(--checkout-accent-dark); font-size: 11px; font-weight: 900; }
.checkout-summary-count, .checkout-summary-status { margin: 8px 0; color: var(--checkout-muted); font-size: 11px; line-height: 1.35; }
.checkout-summary-items { margin: 10px 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.checkout-summary-items li { min-width: 0; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 11px; }
.checkout-summary-items li > span { min-width: 0; line-height: 1.25; }
.checkout-summary-items li strong { white-space: nowrap; font-size: 11px; }
.checkout-summary-items small { color: var(--checkout-muted); }
.checkout-summary-total { margin: 12px 0 5px; padding-top: 12px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--checkout-line); font-size: 13px; }
.checkout-summary-total strong { font-size: 16px; }
.checkout-confidence { margin-top: 14px; padding-top: 12px; display: grid; gap: 9px; border-top: 1px solid var(--checkout-line); }
.checkout-confidence-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; align-items: center; }
.checkout-confidence-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--checkout-accent-soft); color: var(--checkout-accent); }
.checkout-confidence-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.checkout-confidence-item strong, .checkout-confidence-item span { display: block; }
.checkout-confidence-item strong { font-size: 11px; }
.checkout-confidence-item span { margin-top: 1px; color: var(--checkout-muted); font-size: 9px; line-height: 1.3; }

.checkout-items, .checkout-review { margin: 14px 0; display: grid; gap: 9px; }
.checkout-item { min-width: 0; min-height: 72px; padding: 9px 11px; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 11px; border: 1px solid var(--checkout-line); border-radius: 9px; }
.checkout-item-copy, .checkout-product-copy { min-width: 0; }
.checkout-item-copy strong, .checkout-product-copy strong { display: block; color: var(--checkout-ink); font-size: 12px; line-height: 1.3; }
.checkout-item-copy small, .checkout-product-copy small, .checkout-option small { display: block; margin-top: 3px; color: var(--checkout-muted); font-size: 10px; line-height: 1.35; }
.checkout-product-media { width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--checkout-line); border-radius: 8px; background: #f8fafb; color: var(--checkout-muted); font-size: 8px; text-align: center; }
.checkout-product-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.checkout-product-media:not(.is-missing) .checkout-product-image-fallback { display: none; }
.checkout-product-media.is-missing img { display: none; }
.checkout-product-image-fallback { padding: 3px; }

.checkout-review { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.checkout-review-row { min-width: 0; padding: 11px; display: block; border: 1px solid var(--checkout-line); border-radius: 9px; background: #fff; }
.checkout-review-row:first-child { grid-column: 1 / -1; }
.checkout-review-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; list-style: none; cursor: default; }
.checkout-review-heading::-webkit-details-marker { display: none; }
.checkout-review-title { min-width: 0; display: flex; align-items: center; gap: 8px; }
.checkout-review-title strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.checkout-review-icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 8px; background: var(--checkout-accent-soft); color: var(--checkout-accent); }
.checkout-review-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.checkout-review-content { min-width: 0; margin: 8px 0 0 38px; color: #344054; font-size: 10px; line-height: 1.4; }
.checkout-review-products { margin: 9px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.checkout-review-product { min-width: 0; padding: 7px; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 8px; border: 1px solid #edf0f2; border-radius: 8px; background: #fafbfc; }
.checkout-review-product .checkout-product-media { width: 44px; height: 44px; }
.checkout-review-editable { position: relative; }
.checkout-edit { min-height: 32px; padding: 5px 2px; border: 0; background: transparent; color: var(--checkout-accent-dark); font: inherit; font-size: 10px; font-weight: 900; text-decoration: none; cursor: pointer; }
.checkout-edit:hover, .checkout-edit:focus-visible { text-decoration: underline; }

.checkout-notice, .checkout-errors, .checkout-blocked { margin: 12px 0; padding: 11px 12px; border-radius: 9px; background: var(--checkout-accent-soft); color: #52362f; font-size: 11px; line-height: 1.4; }
.checkout-notice-strong { padding-left: 42px; position: relative; border-left: 3px solid var(--checkout-accent); }
.checkout-notice-strong::before { content: "i"; position: absolute; top: 11px; left: 12px; width: 19px; height: 19px; display: grid; place-items: center; border: 1px solid var(--checkout-accent); border-radius: 50%; color: var(--checkout-accent-dark); font-size: 11px; font-weight: 900; }
.checkout-errors { border: 1px solid #edb9ae; color: #8a2416; }
.checkout-form { margin: 14px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.checkout-form label { min-width: 0; display: grid; gap: 5px; color: var(--checkout-ink); font-size: 11px; font-weight: 800; }
.checkout-form input { width: 100%; min-height: 44px; padding: 0 11px; border: 1px solid #cfd6dd; border-radius: 8px; outline: 0; background: #f8fafb; color: var(--checkout-ink); font: inherit; font-size: 13px; }
.checkout-form input:hover { border-color: #aeb8c4; }
.checkout-form input:focus-visible { border-color: var(--checkout-accent); box-shadow: 0 0 0 3px rgba(240, 68, 30, .14); background: #fff; }
.checkout-options { margin: 14px 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; border: 0; }
.checkout-option { min-height: 84px; padding: 12px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid var(--checkout-line); border-radius: 9px; background: #fff; }
.checkout-option:has(input:checked) { border-color: var(--checkout-accent); box-shadow: 0 0 0 2px rgba(240, 68, 30, .1); background: #fff8f5; }
.checkout-option.is-disabled { background: #f5f7f9; opacity: .7; }
.checkout-payment-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #e7ebef; font-size: 11px; font-weight: 900; }
.checkout-ack { min-height: 42px; margin: 10px 0; padding: 9px 11px; display: flex; align-items: flex-start; gap: 9px; border-radius: 8px; background: var(--checkout-blue-soft); color: #35516f; font-size: 10px; line-height: 1.4; }
.checkout-ack input { width: 17px; height: 17px; flex: 0 0 auto; margin: 0; accent-color: var(--checkout-accent); }
.checkout-actions { margin-top: 11px; padding-top: 11px; display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--checkout-line); }
.checkout-primary, .checkout-secondary { min-height: 44px; padding: 10px 16px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--checkout-accent); border-radius: 8px; font: inherit; font-size: 12px; font-weight: 900; text-decoration: none; cursor: pointer; }
.checkout-primary { min-width: 168px; background: linear-gradient(135deg, var(--checkout-accent), #ff5b2f); color: #fff; box-shadow: 0 8px 18px rgba(240, 68, 30, .18); }
.checkout-secondary { min-width: 92px; background: #fff; color: var(--checkout-accent-dark); }
.checkout-primary:hover, .checkout-primary:focus-visible { background: var(--checkout-accent-dark); }
.checkout-secondary:hover, .checkout-secondary:focus-visible { background: var(--checkout-accent-soft); }
.checkout-primary:disabled { cursor: wait; opacity: .55; }
.checkout-actions[hidden] { display: none; }
.checkout-form input:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid rgba(240, 68, 30, .22); outline-offset: 2px; }
.checkout-confirmation { max-width: 650px; margin: 9px 0; color: var(--checkout-muted); font-size: 12px; line-height: 1.5; }
.checkout-confirmation-items { margin: 12px 0; display: grid; gap: 8px; }
.checkout-confirmation-item { min-width: 0; padding: 8px; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 9px; border: 1px solid var(--checkout-line); border-radius: 8px; }
.checkout-confirmation-item .checkout-product-media { width: 44px; height: 44px; }

@media (max-width: 980px) {
  .checkout-header { grid-template-columns: 150px minmax(220px, 1fr) auto; gap: 14px; }
  .checkout-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .checkout-review { grid-template-columns: 1fr; }
  .checkout-review-row:first-child { grid-column: 1; }
}

@media (max-width: 760px) {
  html { scroll-padding-bottom: 18px; }
  .checkout-header { min-height: 56px; padding: 0 8px; grid-template-columns: minmax(108px, 1fr) auto; gap: 8px; }
  .checkout-brand img { width: 108px; height: auto; }
  .checkout-search, .checkout-catalog-link, .checkout-help-link { display: none !important; }
  .checkout-header-actions { gap: 7px; }
  .checkout-cart-link { width: 40px; min-height: 40px !important; }
  .checkout-account-link { width: 40px; min-height: 40px !important; justify-content: center; border-radius: 50%; background: #e1e6ea; color: #344054 !important; font-size: 0; }
  .checkout-account-link::after { content: "Mi"; font-size: 10px; font-weight: 950; }
  .checkout-layout { width: calc(100% - 16px); margin: 6px auto 16px; grid-template-columns: 1fr; gap: 7px; }
  .checkout-progress { grid-column: 1; min-height: 104px; padding: 8px 3px; }
  .checkout-progress .checkout-eyebrow { margin: 0 4px 8px; }
  .checkout-progress li { min-width: 0; flex-direction: column; justify-content: flex-start; gap: 4px; font-size: 9px; text-align: center; }
  .checkout-progress li::after { top: 14px; left: calc(50% + 17px); right: calc(-50% + 17px); }
  .checkout-progress li > span:first-child { width: 27px; height: 27px; flex-basis: 27px; }
  .checkout-progress li > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .checkout-progress-text { margin-top: 6px; text-align: center; }
  .checkout-persistent-summary { grid-column: 1; grid-row: 2; position: static; min-width: 0; max-width: none; padding: 0; border-radius: 10px; }
  .checkout-persistent-summary > summary { min-height: 66px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 9px; list-style: none; cursor: pointer; }
  .checkout-persistent-summary > summary::-webkit-details-marker { display: none; }
  .checkout-persistent-summary > summary > span:first-child { min-width: 0; display: grid; gap: 2px; }
  .checkout-persistent-summary[open] > summary { border-bottom: 1px solid var(--checkout-line); }
  .checkout-persistent-summary[open] .checkout-summary-toggle { font-size: 0; }
  .checkout-persistent-summary[open] .checkout-summary-toggle::before { content: "Ocultar"; font-size: 11px; }
  .checkout-summary-desktop-heading { display: none; }
  #checkoutPersistentSummary { padding: 4px 12px 0; }
  .checkout-confidence { margin: 0 12px 12px; padding: 10px 0 0; }
  .checkout-card { grid-column: 1; grid-row: 3; padding: 15px 13px 12px; border-radius: 10px; }
  .checkout-card h1 { font-size: 27px; }
  .checkout-card [data-step] > p:not(.checkout-eyebrow, .checkout-confirmation) { font-size: 11px; }
  .checkout-form, .checkout-options { grid-template-columns: 1fr; }
  .checkout-item { grid-template-columns: 48px minmax(0, 1fr); gap: 7px 9px; }
  .checkout-item > strong { grid-column: 2; font-size: 12px; }
  .checkout-item .checkout-product-media { grid-row: 1 / span 2; width: 48px; height: 48px; }
  .checkout-review { grid-template-columns: 1fr; gap: 7px; }
  .checkout-review-row { padding: 9px; }
  .checkout-review-heading { cursor: pointer; }
  .checkout-review-heading::after { content: "+"; width: 22px; height: 22px; display: grid; place-items: center; margin-left: auto; border-radius: 50%; background: #f3f5f7; color: var(--checkout-muted); font-size: 14px; }
  .checkout-review-row[open] .checkout-review-heading::after { content: "−"; }
  .checkout-review-heading .checkout-edit { margin-left: auto; }
  .checkout-review-editable .checkout-review-heading::after { margin-left: 0; }
  .checkout-review-products { grid-template-columns: 1fr; }
  .checkout-review-content { margin-left: 38px; }
  .checkout-notice-strong { padding-left: 40px; }
  .checkout-actions { margin-inline: -13px; padding: 10px 13px 0; }
  .checkout-actions > * { flex: 1; }
  .checkout-primary { min-width: 0; }
}

@media (max-width: 380px) {
  .checkout-step-label { font-size: 8px; }
  .checkout-card h1 { font-size: 25px; }
  .checkout-primary, .checkout-secondary { padding-inline: 10px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
