:root {
  color-scheme: dark;
  --background: #10121a;
  --panel: #181b26;
  --field: #11131e;
  --border: #3d4050;
  --text: #faf8f4;
  --muted: #c5c5d3;
  --violet: #c6a4ff;
  --lime: #d8fa60;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--background);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
p { margin: 0; }

.page-width {
  max-width: 1280px;
  width: calc(100% - 72px);
  margin-inline: auto;
}

.site-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}

.wordmark {
  font-family: "Archivo Black", system-ui, sans-serif;
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -.045em;
  text-decoration: none;
}

.back-link { color: var(--muted); font-size: .9rem; text-decoration: none; }
.back-link:hover { color: var(--text); text-decoration: underline; }
.checkout { padding: 30px 0 64px; }
.checkout h1, .checkout h2, .checkout h3 { margin: 0; line-height: 1.12; letter-spacing: -.032em; }
.checkout h1 { font-size: clamp(2rem, 4vw, 3.25rem); margin-bottom: 24px; }
.checkout h2 { font-size: clamp(1.35rem, 2.2vw, 1.9rem); }
.checkout h3 { font-size: 1.35rem; }

.notice, .form-status {
  padding: 12px 14px;
  background: #222035;
  border: 1px solid #5f537d;
  border-radius: 8px;
  color: #e7defc;
  font-size: .9rem;
}

.notice { margin-bottom: 20px; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; gap: 18px; }
.checkout-fields { display: grid; gap: 18px; min-width: 0; }
.panel { min-width: 0; padding: clamp(16px, 2.4vw, 28px); background: var(--panel); border: 1px solid var(--border); border-radius: 14px; }
.product { display: grid; grid-template-columns: minmax(104px, .5fr) minmax(0, 1fr); align-items: start; gap: clamp(16px, 3vw, 32px); }
.product-image-wrap { display: grid; place-items: center; align-self: stretch; background: radial-gradient(ellipse at center, #34234d, transparent 68%); }
.product-image { display: block; width: 100%; max-height: 260px; height: auto; object-fit: contain; }
.product-options { min-width: 0; }
.unit-price { margin-top: 7px; font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 850; letter-spacing: -.04em; }
.color-field { margin: 16px 0 0; padding: 0; border: 0; min-inline-size: 0; }
.color-field legend, .quantity-field > label { padding: 0; margin-bottom: 8px; font-size: .95rem; font-weight: 700; }
.color-options { display: flex; flex-wrap: wrap; gap: 7px; }
.color-option { position: relative; display: inline-flex; gap: 7px; align-items: center; padding: 7px 9px; min-height: 40px; cursor: pointer; background: var(--field); border: 1px solid var(--border); border-radius: 8px; font-size: .85rem; white-space: nowrap; }
.color-option:has(input:checked) { border-color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet); background: #292038; }
.color-option:has(input:focus-visible) { outline: 2px solid var(--lime); outline-offset: 3px; }
.color-option:has(input:disabled) { cursor: default; }
.color-option input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.swatch { width: 15px; height: 15px; border-radius: 4px; border: 1px solid #ffffff26; }
.purple { background: #aa7fe0; }
.blue { background: #54c5e1; }
.white { background: #f4f4f4; }
.yellow { background: #f4cf41; }
.black { background: #444650; }
.quantity-field { display: grid; justify-items: start; margin-top: 17px; }
.stepper { display: inline-flex; align-items: center; background: var(--field); border: 1px solid var(--border); border-radius: 8px; }
.stepper button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 7px; color: var(--text); background: transparent; font-weight: 700; font-size: 1.25rem; }
.stepper button:hover:not(:disabled) { background: #292038; }
.stepper button:disabled { opacity: .35; }
.stepper input { appearance: textfield; width: 4ch; min-width: 44px; color: var(--text); text-align: center; background: transparent; border: 0; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { appearance: none; margin: 0; }

.delivery { margin: 0; }
.delivery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.delivery-grid label { min-width: 0; font-weight: 650; font-size: .9rem; }
.span-two { grid-column: 1 / -1; }
.optional { font-weight: 400; color: var(--muted); }
.delivery input, .delivery select, .pix-details textarea { display: block; margin-top: 6px; min-width: 0; width: 100%; min-height: 44px; padding: 10px 12px; color: var(--text); background: var(--field); border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; }
.delivery input:focus, .delivery select:focus, .pix-details textarea:focus { border-color: var(--violet); }

.summary-product { display: flex; align-items: center; gap: 13px; margin: 20px 0 15px; }
.summary-product img { width: 56px; height: 66px; object-fit: contain; }
.summary-product p { margin-top: 3px; color: var(--muted); font-size: .9rem; }
.summary-shipping, .payment-method { display: flex; align-items: center; gap: 9px; font-size: .95rem; }
.small-indicator { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--lime); }
.total-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 10px; margin-top: 16px; padding: 16px 0; border-top: 1px solid var(--border); font-size: 1.18rem; }
.total-row strong:last-child { font-size: clamp(1.42rem, 2.7vw, 2.05rem); letter-spacing: -.04em; }
.payment-method { margin-bottom: 14px; }
.pix-mark { width: 13px; height: 13px; margin-inline: 3px; flex: 0 0 13px; background: #37d8c2; border-radius: 3px; transform: rotate(45deg); }
.primary-button, .secondary-button { width: 100%; min-height: 52px; padding: 12px 14px; border: 0; border-radius: 9px; font-weight: 850; }
.primary-button { background: var(--lime); color: #121611; font-size: 1.15rem; }
.primary-button:hover:not(:disabled) { background: #e8ff9c; }
.primary-button:disabled { opacity: .6; }
.secondary-button { margin-top: 10px; background: #28223d; color: var(--text); border: 1px solid #635480; }
.secondary-button:hover { background: #38304d; }
.form-status { margin-top: 12px; }
.pix-details { margin-top: 17px; border-top: 1px solid var(--border); padding-top: 17px; }
.pix-details p, .pix-details label { display: block; margin-top: 8px; font-size: .9rem; }
.pix-reference, .copy-status { color: var(--muted); overflow-wrap: anywhere; }
.copy-status:empty { display: none; }
.pix-qr { display: block; margin: 14px auto; width: min(100%, 180px); height: auto; background: white; border: 8px solid white; border-radius: 8px; }
.pix-details textarea { resize: vertical; font-family: ui-monospace, monospace; font-size: .85rem; }

@media (max-width: 960px) {
  .page-width { width: calc(100% - 42px); }
  .product { grid-template-columns: minmax(84px, .36fr) minmax(0, 1fr); gap: 15px; }
}

@media (max-width: 760px) {
  .page-width { width: calc(100% - 30px); }
  .site-header { min-height: 60px; }
  .checkout { padding-top: 24px; }
  .checkout-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .checkout-fields { gap: 14px; }
  .product-image { max-height: 185px; }
  .summary-product { margin-top: 15px; }
}

@media (max-width: 410px) {
  .panel { padding: 14px; }
  .product { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
  .product-options h2 { font-size: 1.25rem; }
  .color-options { gap: 6px; }
  .color-option { padding: 6px 7px; min-height: 36px; }
  .delivery-grid { gap: 10px; }
}
