/* =========================================================================
   Checkout no padrão visual do checkout Shopify (medido no original):
   topo 65px, coluna do formulário 499px, painel cinza #F5F5F5 à direita,
   fonte do sistema 14px, campos 49px / cantos 12px / borda #DEDEDE,
   rótulo flutuante, cor de ação #005BD1, quebra para celular em 1000px.
   ========================================================================= */
:root {
  --ck-text: #000;
  --ck-text-2: #707070;
  --ck-border: #dedede;
  --ck-panel: #f5f5f5;
  --ck-accent: #005bd1;
  --ck-accent-hover: #004aab;
  --ck-accent-soft: #f0f5fe;
  --ck-error: #dd1d1d;
  --ck-radius: 12px;
  --ck-left: 499px;
  --ck-right: 400px;
  --ck-gutter-in: 41px;    /* do conteúdo até a divisão das colunas */
  --ck-gutter-out: 40px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ck {
  margin: 0; background: #fff; color: var(--ck-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 14px; line-height: 1.35; -webkit-font-smoothing: antialiased;
}
:where(.ck) a { color: var(--ck-accent); }
.ck img { max-width: 100%; display: block; }
.ck [hidden] { display: none !important; }
:where(.ck) :where(button, input, select) { font: inherit; color: inherit; }

/* ---------- Topo ---------- */
.ck-header { border-bottom: 1px solid var(--ck-border); background: #fff; }
.ck-header__inner {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  max-width: calc(var(--ck-left) + var(--ck-right) + var(--ck-gutter-in) + var(--ck-gutter-out));
  margin: 0 auto; padding: 0 14px;
}
.ck-header__brand { color: var(--ck-text) !important; text-decoration: none; font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.ck-header__brand img { max-height: 40px; width: auto; }
.ck-header__cart { color: var(--ck-accent); display: flex; padding: 6px; margin-right: -6px; }
.ck-header__cart svg { width: 24px; height: 24px; }
@media (min-width: 1000px) {
  .ck-header__inner { padding: 0; height: 64px; }
}

/* ---------- Colunas ---------- */
.ck-layout { display: grid; grid-template-columns: 1fr; }
.ck-main__inner { padding: 21px 14px 0; }
@media (min-width: 1000px) {
  .ck-layout {
    grid-template-columns: minmax(0, calc(50% + 50px)) minmax(0, 1fr);
    grid-template-areas: "main summary";
    min-height: calc(100vh - 65px);
  }
  .ck-main { grid-area: main; }
  .ck-main__inner { max-width: calc(var(--ck-left) + var(--ck-gutter-in) + 14px); margin-left: auto; padding: 40px var(--ck-gutter-in) 0 14px; }
  .ck-summary { grid-area: summary; }
}

/* ---------- Tipografia ---------- */
.ck-section { margin-bottom: 32px; }
.ck-h2 { font-size: 21px; font-weight: 600; line-height: 1.2; margin: 0 0 14px; }
.ck-h3 { font-size: 16px; font-weight: 600; line-height: 1.2; margin: 0 0 14px; }
.ck-sub { color: var(--ck-text-2); margin: -10px 0 14px; }
.ck-link { background: none; border: 0; padding: 0; color: var(--ck-accent); text-decoration: underline; cursor: pointer; }

/* ---------- Campos com rótulo flutuante ---------- */
.ck-fields { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.ck-fields:disabled { opacity: .6; }
.ck-row { display: grid; gap: 10px 11px; grid-template-columns: 1fr; }
@media (min-width: 750px) {
  .ck-row { grid-template-columns: 1fr 1fr; }
  .ck-row--3 { grid-template-columns: 1fr 1fr 1fr; }
}
.ck-field { position: relative; min-width: 0; }
.ck-field input, .ck-field select {
  display: block; width: 100%; height: 49px; margin: 0;
  padding: 13.5px 11px; border: 1px solid var(--ck-border); border-radius: var(--ck-radius);
  background: #fff; font-size: 14px; line-height: 1.35; outline: none;
  transition: border-color .15s, box-shadow .15s, padding .15s;
  -webkit-appearance: none; appearance: none;
}
.ck-field label {
  position: absolute; left: 12px; top: 15px; right: 12px; pointer-events: none;
  color: var(--ck-text-2); font-size: 14px; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: top .15s, font-size .15s, transform .15s;
}
/* preenchido: rótulo sobe e encolhe, texto desce */
.ck-field input:not(:placeholder-shown) { padding: 21px 11px 6px; }
.ck-field input:not(:placeholder-shown) + label,
.ck-field--filled label, .ck-field--select.is-chosen label { top: 6px; font-size: 12px; }
.ck-field input:focus, .ck-field select:focus {
  border-color: var(--ck-accent); box-shadow: 0 0 0 1px var(--ck-accent);
}
.ck-field input::placeholder { color: transparent; }

/* selects (Paese, Provincia) */
.ck-field--select select { padding: 21px 32px 6px 11px; cursor: pointer; }
.ck-field--select:not(.is-chosen):not(.ck-field--filled) select { padding: 13.5px 32px 13.5px 11px; color: transparent; }
.ck-field--select::after {
  content: ""; position: absolute; right: 15px; top: 19px; width: 7px; height: 7px;
  border-right: 1.4px solid var(--ck-text-2); border-bottom: 1.4px solid var(--ck-text-2); transform: rotate(45deg); pointer-events: none;
}
.ck-field--select select:disabled { color: var(--ck-text); opacity: 1; cursor: default; background: #fff; }

/* ícone de ajuda no telefone, como no original */
.ck-field--help input { padding-right: 40px; }
.ck-field--help::after {
  content: "?"; position: absolute; right: 13px; top: 15px; width: 18px; height: 18px;
  border: 1.4px solid var(--ck-text-2); border-radius: 50%; color: var(--ck-text-2);
  font-size: 11px; font-weight: 600; line-height: 15px; text-align: center; pointer-events: none;
}

/* erro */
.ck-field.is-invalid input, .ck-field.is-invalid select { border-color: var(--ck-error); box-shadow: 0 0 0 1px var(--ck-error); }
.ck-error { display: flex; gap: 6px; align-items: center; margin: 6px 0 0; color: var(--ck-error); font-size: 12px; }
.ck-error::before {
  content: "!"; flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--ck-error); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 14px; text-align: center;
}

/* checkbox */
.ck-check { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-top: 2px; }
.ck-check input {
  -webkit-appearance: none; appearance: none; flex: none; width: 18px; height: 18px; margin: 0;
  border: 1px solid var(--ck-border); border-radius: 5px; background: #fff; cursor: pointer;
  display: grid; place-content: center; transition: background .15s, border-color .15s;
}
.ck-check input:checked { background: var(--ck-accent); border-color: var(--ck-accent); }
.ck-check input:checked::after {
  content: ""; width: 9px; height: 5px; margin-top: -2px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg);
}
.ck-check input:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ck-accent); }

/* ---------- Opções (frete, pagamento) ---------- */
.ck-placeholder { background: var(--ck-panel); border-radius: var(--ck-radius); padding: 16px; color: var(--ck-text-2); }
.ck-options { border: 1px solid var(--ck-border); border-radius: var(--ck-radius); overflow: hidden; }
.ck-option { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 14px; cursor: pointer; }
.ck-option.is-selected { background: var(--ck-accent-soft); box-shadow: inset 0 0 0 1px var(--ck-accent); border-radius: var(--ck-radius); }
.ck-options .ck-option.is-selected:not(:only-child) { border-radius: var(--ck-radius) var(--ck-radius) 0 0; }
.ck-option input[type=radio], .ck-radio {
  -webkit-appearance: none; appearance: none; flex: none; width: 18px; height: 18px; margin: 0;
  border-radius: 50%; border: 1px solid var(--ck-border); background: #fff;
}
.ck-option.is-selected input[type=radio], .ck-option.is-selected .ck-radio { border: 6px solid var(--ck-accent); }
.ck-option__label { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ck-option__label small { color: var(--ck-text-2); font-size: 12px; }

.ck-pay .ck-pay__head { cursor: default; }
.ck-cards { display: flex; gap: 4px; }
.ck-card {
  width: 38px; height: 24px; border: 1px solid var(--ck-border); border-radius: 4px; background: #fff;
  display: grid; place-content: center; font-size: 8.5px; font-weight: 800; letter-spacing: .02em;
}
.ck-card--visa { color: #1a1f71; font-style: italic; font-size: 10px; }
.ck-card--amex { background: #1f72cd; color: #fff; border-color: #1f72cd; font-size: 8px; }
.ck-card--mc { display: flex; justify-content: center; align-items: center; }
.ck-card--mc i { width: 12px; height: 12px; border-radius: 50%; background: #eb001b; display: block; }
.ck-card--mc i + i { background: #f79e1b; margin-left: -5px; mix-blend-mode: multiply; }
.ck-card--more { color: var(--ck-text-2); font-size: 11px; font-weight: 600; }
@media (max-width: 420px) { .ck-card--amex, .ck-card--mc { display: none; } }
.ck-pay__body { background: var(--ck-panel); border-top: 1px solid var(--ck-border); padding: 16px; text-align: center; color: var(--ck-text); }
.ck-pay__icon { width: 64px; height: 40px; color: #a3a3a3; margin: 6px auto 10px; display: block; }
.ck-pay__body p { margin: 0 auto 6px; max-width: 300px; }
.ck-pay__sdk { text-align: left; min-height: 80px; }
.ck-pay__edit { margin-top: 12px; font-size: 13px; }

/* ---------- Botão e avisos ---------- */
.ck-btn {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 56px; margin: 0;
  border: 0; border-radius: var(--ck-radius); background: var(--ck-accent); color: #fff;
  font-size: 19px; font-weight: 600; cursor: pointer; transition: background .15s;
}
.ck-btn:hover { background: var(--ck-accent-hover); }
.ck-btn:disabled { background: var(--ck-panel); color: var(--ck-text-2); box-shadow: inset 0 0 0 1px var(--ck-border); cursor: not-allowed; }
.ck-btn.is-loading span { visibility: hidden; }
.ck-btn.is-loading { position: relative; pointer-events: none; }
.ck-btn.is-loading::after {
  content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid #fff; border-right-color: transparent; animation: ck-spin .7s linear infinite;
}
@keyframes ck-spin { to { transform: rotate(360deg); } }
.ck-alert { border: 1px solid var(--ck-error); background: #fff4f4; color: var(--ck-error); border-radius: var(--ck-radius); padding: 14px; margin-bottom: 16px; }
.ck-legal { color: var(--ck-text-2); font-size: 12px; margin: 14px 0 0; }

.ck-footer {
  display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 64px; padding: 16px 0 24px;
  border-top: 1px solid var(--ck-border); font-size: 13px;
}

/* ---------- Resumo (painel cinza) ---------- */
.ck-summary { background: var(--ck-panel); }
.ck-summary__inner { padding: 21px 14px; }
@media (min-width: 1000px) {
  .ck-summary { border-left: 1px solid var(--ck-border); }
  .ck-summary__inner {
    position: sticky; top: 0; max-width: calc(var(--ck-right) + var(--ck-gutter-out) + 14px);
    padding: 40px 14px 40px var(--ck-gutter-out);
  }
}
.ck-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.ck-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; }
.ck-line__thumb {
  position: relative; width: 64px; height: 64px; border-radius: 10px; background: #fff;
  border: 1px solid rgba(0, 0, 0, .1);
}
.ck-line__thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; }
.ck-line__qty {
  position: absolute; top: -9px; right: -9px; min-width: 21px; height: 21px; padding: 0 6px;
  border-radius: 11px; background: #000; color: #fff; font-size: 12px; font-weight: 600; line-height: 21px; text-align: center;
}
.ck-line__title { line-height: 1.35; }
.ck-line__price { white-space: nowrap; text-align: right; }

.ck-totals { margin: 24px 0 0; display: grid; gap: 8px; }
.ck-totals div { display: flex; justify-content: space-between; align-items: baseline; }
.ck-totals dt, .ck-totals dd { margin: 0; }
.ck-totals dd.is-muted { color: var(--ck-text-2); font-size: 13px; }
.ck-totals__total { margin-top: 8px; font-size: 19px; font-weight: 600; }
.ck-totals__total abbr { text-decoration: none; font-size: 12px; font-weight: 400; color: var(--ck-text-2); margin-right: 4px; }

/* Barra "Riepilogo ordine" (só celular) */
.ck-toggle {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  min-height: 64px; padding: 0 14px; border: 0; border-bottom: 1px solid var(--ck-border);
  background: var(--ck-panel); cursor: pointer; text-align: left;
}
.ck-toggle__label { display: flex; align-items: center; gap: 6px; color: var(--ck-accent); }
.ck-toggle__label svg { width: 14px; height: 14px; transition: transform .2s; }
.ck-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.ck-toggle strong { font-size: 19px; font-weight: 600; }
@media (max-width: 999px) {
  .ck-summary { display: none; border-bottom: 1px solid var(--ck-border); }
  .ck-summary.is-open { display: block; }
}
@media (min-width: 1000px) { .ck-toggle { display: none; } }

/* ---------- Página "Grazie" ---------- */
.ck-thanks__head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.ck-thanks__icon { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--ck-accent); color: var(--ck-accent); display: grid; place-content: center; }
.ck-thanks__icon svg { width: 22px; height: 22px; }
.ck-thanks__icon--wait { border-color: #b98900; color: #b98900; }
.ck-thanks__icon--err { border-color: var(--ck-error); color: var(--ck-error); }
.ck-thanks__head p { margin: 0; color: var(--ck-text-2); }
.ck-thanks__head h1 { margin: 2px 0 0; font-size: 21px; font-weight: 600; }
.ck-box { border: 1px solid var(--ck-border); border-radius: var(--ck-radius); padding: 18px; margin-bottom: 16px; }
.ck-box h2 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.ck-box p { margin: 0; color: var(--ck-text-2); line-height: 1.5; }
.ck-details { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 14px; }
@media (min-width: 750px) { .ck-details { grid-template-columns: 1fr 1fr; } }
.ck-details h3 { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.ck-details p { color: var(--ck-text); }
.ck-thanks__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ck-thanks__foot .ck-btn { width: auto; height: 50px; padding: 0 24px; font-size: 15px; text-decoration: none; color: #fff; }
