:root {
  --bg: #faf7ff;
  --surface: #ffffff;
  --surface-2: #f3edff;
  --ink: #1f1729;
  --muted: #6b6475;
  --line: #e4dbf3;
  --primary: #6d28d9;
  --primary-dark: #5b21b6;
  --primary-soft: #ede7ff;
  --accent: #0f9f8e;
  --danger: #c2410c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(74, 39, 121, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2 { line-height: 1.15; letter-spacing: -0.02em; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(16px, calc((100% - 1160px) / 2));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
}

.brand img { border-radius: 10px; }

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
}

.cart-link b {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
}

.banner {
  padding: 10px 16px;
  text-align: center;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

.page {
  flex: 1;
  width: 100%;
  max-width: 1192px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.loading { color: var(--muted); text-align: center; padding: 80px 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.btn:hover { background: var(--primary-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #b8aecb; cursor: not-allowed; }
.btn-lg { min-height: 52px; padding: 12px 28px; font-size: 1.05rem; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-soft); }

.link-btn {
  border: 0;
  background: none;
  color: var(--primary);
  font-weight: 600;
  padding: 4px;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Vitrine */

.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 40px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, var(--surface-2));
  border: 1px solid var(--line);
  margin-bottom: 40px;
}

.hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin: 8px 0 12px; }
.hero p { color: var(--muted); font-size: 1.1rem; margin: 0 0 24px; max-width: 520px; }

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.steps li {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.steps b, .step-title b {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
}

.catalog h2 { font-size: 1.5rem; margin: 32px 0 16px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.product-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s;
}

.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-card.sold-out { opacity: 0.6; }

.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: var(--surface-2);
}

.product-media img, .product-media canvas { width: 100%; height: 100%; object-fit: cover; }
.product-media canvas { object-fit: contain; padding: 12px; background: #fff; }
.placeholder { font-size: 3rem; font-weight: 800; color: var(--primary); }

.tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.tag.muted { left: auto; right: 10px; background: var(--ink); }

.product-info { display: grid; gap: 2px; padding: 14px 16px 16px; }
.product-info span { color: var(--muted); font-size: 0.9rem; }
.product-info b { font-size: 1.15rem; margin-top: 4px; }

/* Produto */

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.preview-column { position: sticky; top: 84px; }

.preview-card {
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.mug-stage {
  aspect-ratio: 1 / 1;
  max-height: 520px;
  width: 100%;
  background: radial-gradient(circle at 50% 40%, #ffffff, var(--surface-2));
  display: grid;
  place-items: center;
}

.mug-stage canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; }
.mug-stage #flatFallback { width: 90%; height: auto; }

.preview-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
}

.product-photo { width: 100%; display: block; }

.flat-art { padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.flat-art span { display: block; color: var(--muted); font-size: 0.85rem; margin-bottom: 6px; }
.flat-art canvas { width: 100%; height: auto; display: block; border-radius: 8px; border: 1px dashed var(--line); }

.config-column h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 4px; }
.price { font-size: 1.6rem; font-weight: 800; color: var(--primary); margin: 0; }
.description { color: var(--muted); }
.stock-note { color: var(--accent); font-weight: 600; font-size: 0.92rem; }

.step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  margin: 28px 0 12px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.template-option {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 8px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.template-option canvas { width: 100%; height: auto; border-radius: 6px; background: #fff; }
.template-option strong { font-size: 0.92rem; }
.template-option span { font-size: 0.78rem; color: var(--muted); line-height: 1.3; }
.template-option.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.fields { display: grid; gap: 14px; }

.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-weight: 600; font-size: 0.92rem; }
.field i { font-style: normal; color: var(--muted); font-weight: 400; font-size: 0.8rem; }
.field small { color: var(--muted); font-size: 0.8rem; }

.field input, .field select, .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--ink); }
.swatch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 3px; }
.swatch em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.photo-input {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
}

.photo-input img, .photo-input b {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  font-size: 1.8rem;
}

.buy-row { display: flex; gap: 12px; flex-wrap: wrap; }
.buy-row .btn { flex: 1; }

.qty {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.qty button { width: 44px; height: 50px; border: 0; background: none; font-size: 1.3rem; }
.qty input { width: 52px; border: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty.small button { width: 34px; height: 34px; font-size: 1.1rem; }
.qty.small span { min-width: 26px; text-align: center; font-weight: 700; }

/* Carrinho */

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.cart-list { display: grid; gap: 12px; margin-bottom: 28px; }

.cart-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.cart-item canvas, .cart-item img, .cart-item .placeholder { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.cart-item-info { display: grid; gap: 4px; align-content: start; min-width: 0; }
.cart-item-info span { color: var(--muted); }
.cart-item-info small { color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }
.cart-item-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.cart-item-actions b { margin-left: auto; font-size: 1.05rem; }

.checkout-form {
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.checkout-form h2 { margin: 8px 0 0; font-size: 1.2rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field.narrow { max-width: 100px; }
.address-fields { display: grid; gap: 14px; }

.shipping-options { display: grid; gap: 8px; }

.shipping-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.shipping-option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.shipping-option span { display: grid; flex: 1; }
.shipping-option small { color: var(--muted); }
.shipping-option input { accent-color: var(--primary); width: 18px; height: 18px; }

.summary {
  position: sticky;
  top: 84px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.summary h2 { margin: 0 0 12px; font-size: 1.2rem; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 0 0 20px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-weight: 600; }
.summary .total { font-size: 1.25rem; font-weight: 800; color: var(--ink); padding-top: 8px; border-top: 1px solid var(--line); }
.summary .btn { width: 100%; }
.secure-note { color: var(--muted); font-size: 0.82rem; margin: 12px 0 0; }

.recent-orders { margin-top: 40px; display: grid; gap: 8px; max-width: 520px; }
.recent-orders h2 { font-size: 1.1rem; margin: 0 0 4px; }
.recent-orders a { display: flex; justify-content: space-between; padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.recent-orders span { color: var(--muted); }

/* Pedido */

.order-status {
  padding: 36px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, var(--surface-2));
  border: 1px solid var(--line);
  text-align: center;
}

.order-status.failed { background: #fff7ed; border-color: #fed7aa; }
.order-status h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 6px 0 10px; }
.order-status p { color: var(--muted); max-width: 560px; margin: 0 auto 20px; }
.order-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.timeline {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 0;
  margin: 32px 0 0;
  counter-reset: step;
}

.timeline li {
  position: relative;
  padding-top: 38px;
  font-size: 0.82rem;
  color: var(--muted);
  counter-increment: step;
}

.timeline li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--line);
  color: var(--muted);
  font-weight: 700;
}

.timeline li.done { color: var(--ink); font-weight: 600; }
.timeline li.done::before { content: "✓"; background: var(--accent); color: #fff; }
.tracking { margin-top: 20px !important; }

.order-detail {
  max-width: 560px;
  margin: 28px auto 0;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.order-detail h2 { margin: 0 0 8px; font-size: 1.15rem; }
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-line.total { border: 0; font-size: 1.15rem; font-weight: 800; }
.hint { color: var(--muted); font-size: 0.85rem; }

.empty-state { text-align: center; padding: 64px 16px; }
.empty-state p { color: var(--muted); }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px max(16px, calc((100% - 1160px) / 2));
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer > div:first-child { display: grid; }
.site-footer strong { color: var(--ink); }
.footer-links { display: flex; gap: 16px; align-items: center; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 30;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 28px 20px; }
  .product-layout, .checkout-layout { grid-template-columns: 1fr; }
  .preview-column { position: static; }
  .summary { position: static; }
}

@media (max-width: 560px) {
  .page { padding-top: 16px; }
  .cart-link span { display: none; }
  .cart-item { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .checkout-form { padding: 18px; }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 18px; }
  .buy-row .btn { flex-basis: 100%; }
  .order-status { padding: 28px 18px; }
}

/* Cabeçalho: conta e carrinho */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.account-link:hover {
  background: var(--surface-2);
}

.account-link b,
.badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Filtros de artes */
.template-filters {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.template-filters input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 6px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 600;
  font-size: 0.88rem;
}

.chip.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.template-option img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.template-option canvas {
  aspect-ratio: auto;
}

.fields textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  resize: vertical;
}

/* Checkout */
.login-hint {
  display: grid;
  gap: 4px;
  margin-bottom: 20px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--primary-soft);
}

.login-hint span {
  color: var(--muted);
}

.login-hint .btn {
  justify-self: start;
  margin-top: 8px;
}

.cep-row {
  display: flex;
  align-items: end;
  gap: 12px;
}

.cep-row .field {
  max-width: 220px;
  flex: 1;
}

.cep-row .hint {
  padding-bottom: 12px;
}

.free-note {
  margin: -8px 0 14px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.message {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.message p {
  margin: 4px 0 0;
}

.message small {
  color: var(--muted);
}

/* Entrar e conta */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr minmax(0, 440px);
  gap: 40px;
  align-items: center;
  max-width: 980px;
  margin: 24px auto;
}

.auth-intro h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 8px 0 16px;
}

.auth-intro ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 1.05rem;
}

.auth-intro li::before {
  content: "✓";
  margin-right: 10px;
  color: var(--accent);
  font-weight: 800;
}

.auth-card {
  padding: 24px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.auth-card.narrow {
  max-width: 440px;
  margin: 40px auto;
}

.auth-card h1 {
  font-size: 1.5rem;
  margin: 0 0 16px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-2);
}

.auth-tabs button {
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: none;
  font-weight: 700;
  color: var(--muted);
}

.auth-tabs button.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(74, 39, 121, 0.12);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.account-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}

.account-head h1 {
  margin: 4px 0 0;
}

.account-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.account-tabs a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.account-tabs a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.account-body {
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.purchase,
.notice {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.15s;
}

a.purchase:hover,
a.notice:hover {
  box-shadow: var(--shadow);
}

.purchase-head,
.purchase-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.purchase > span,
.purchase-foot span {
  color: var(--muted);
  font-size: 0.92rem;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.chip-status {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.chip-status.ok { background: #dcfce7; color: #166534; }
.chip-status.info { background: var(--primary-soft); color: var(--primary-dark); }
.chip-status.danger { background: #ffedd5; color: #9a3412; }

.notice {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.notice p {
  margin: 4px 0 0;
  color: var(--muted);
}

.notice small {
  color: var(--muted);
  white-space: nowrap;
}

.notice.unread {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.empty-state.small {
  padding: 32px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px dashed var(--line);
}

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 560px) {
  .account-link span {
    display: none;
  }

  .notice {
    grid-template-columns: 1fr;
  }

  .cep-row {
    flex-wrap: wrap;
  }
}

.cart-item canvas { max-height: 180px; object-fit: contain; }

/* Prévias protegidas: sem seleção, sem arrastar e sem o menu "salvar imagem" no toque longo */
.protected,
.protected canvas {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

.flat-art canvas {
  image-rendering: auto;
}

.preview-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

/* Promoções, selos e campanhas */
.tags {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags .tag {
  position: static;
}

.config-column .tags {
  position: static;
  margin: 8px 0;
}

.tag.sale {
  background: #dc2626;
}

.tag.warn {
  background: #b45309;
}

.price s,
.price-line s {
  color: var(--muted);
  font-size: 0.75em;
  font-weight: 600;
}

.price-line {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.price-label {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.85rem;
  vertical-align: middle;
}

.lead-time {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
}

.stock-note.out {
  color: var(--danger);
}

.hero.themed {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-soft), #ffffff 55%, var(--primary-soft));
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}

.hero.themed::after {
  content: attr(data-decor);
  position: absolute;
  right: -10px;
  bottom: -18px;
  font-size: clamp(3rem, 9vw, 6.5rem);
  letter-spacing: 0.3em;
  opacity: 0.22;
  pointer-events: none;
  transform: rotate(-8deg);
}

.hero.themed > * {
  position: relative;
  z-index: 1;
}

.hero-offer {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff !important;
}

.campaign-designs {
  margin: 0 0 32px;
}

.campaign-designs h2 {
  font-size: 1.5rem;
  margin: 0 0 14px;
}

.design-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 240px);
  gap: 14px;
  padding-bottom: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.design-tile {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  scroll-snap-align: start;
}

.design-tile img,
.design-tile canvas {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.design-tile span {
  color: var(--muted);
  font-size: 0.85rem;
}

.template-option {
  position: relative;
}

.template-flag {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Arte personalizada sob encomenda */
.custom-option { border-style: dashed; }
.custom-thumb {
  display: grid;
  place-items: center;
  gap: 2px;
  aspect-ratio: 200 / 95;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary-soft), #fff);
  color: var(--primary) !important;
  font-weight: 800;
  font-size: 0.85rem !important;
}
.custom-thumb b { font-size: 1.6rem; line-height: 1; }
.custom-request { display: grid; gap: 14px; }
.custom-description { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.custom-note { margin: 0; color: var(--muted); font-size: 0.88rem; }
.custom-photos { display: flex; flex-wrap: wrap; gap: 10px; }
.custom-photo { position: relative; width: 84px; height: 84px; }
.custom-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.custom-photo button { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: #1f1630; color: #fff; cursor: pointer; font-size: 1rem; line-height: 1; }
.photo-input.small { width: 84px; height: 84px; padding: 6px; flex-direction: column; justify-content: center; gap: 2px; font-size: 0.75rem; text-align: center; }
.photo-input.small b { width: auto; height: auto; font-size: 1.4rem; }
.custom-fee { margin: 8px 0 0; color: var(--primary-dark); font-weight: 600; font-size: 0.9rem; }

/* Aprovação de arte por link */
.proof-page { display: grid; gap: 18px; }
.proof-head h1 { margin: 4px 0 8px; }
.proof-message { margin: 0; font-size: 1.05rem; }
.proof-note { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.proof-banner { padding: 14px 16px; border-radius: 12px; font-weight: 600; }
.proof-banner.ok { background: #dcfce7; color: #166534; }
.proof-banner.warn { background: #ffedd5; color: #9a3412; }
.proof-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.proof-side { display: grid; gap: 14px; position: sticky; top: 84px; }
.proof-actions { display: grid; gap: 10px; }
.proof-actions .btn { width: 100%; }
.proof-form { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.proof-form h2 { margin: 0; font-size: 1.15rem; }
.proof-form p { margin: 0; }
.proof-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.proof-canvas-wrap { position: relative; }
.proof-canvas-wrap.marking { cursor: crosshair; touch-action: none; outline: 3px solid var(--primary-soft); border-radius: 8px; }
.proof-marks { position: absolute; inset: 0; pointer-events: none; }
.proof-mark { position: absolute; border: 2px solid #dc2626; background: rgba(220, 38, 38, 0.12); border-radius: 4px; }
.proof-mark b { position: absolute; top: -11px; left: -11px; width: 22px; height: 22px; border-radius: 50%; background: #dc2626; color: #fff; font-size: 0.75rem; display: grid; place-items: center; }
.mark-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mark-list li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 8px; }
.mark-number { width: 24px; height: 24px; border-radius: 50%; background: #dc2626; color: #fff; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; }
.mark-list input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.proof-sent { padding: 14px; border-radius: 12px; background: var(--surface-2); }
.proof-sent p, .proof-sent ol { margin: 6px 0 0; }
.proof-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; font-weight: 600; }
.chip-status.warn { background: #fef3c7; color: #92400e; }
@media (max-width: 860px) {
  .proof-layout { grid-template-columns: 1fr; }
  .proof-side { position: static; }
}

/* Cores do produto */
.variant-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.variant-swatch { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); font: inherit; font-weight: 600; cursor: pointer; color: inherit; }
.variant-swatch .dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); }
.variant-swatch small { color: var(--muted); font-weight: 500; }
.variant-swatch.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.variant-swatch.out { opacity: 0.55; }
.variant-swatch.out .dot { background-image: linear-gradient(135deg, transparent 45%, #6b6475 45%, #6b6475 55%, transparent 55%) !important; }
.stock-note:empty { display: none; }
.cart-variant { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.cart-variant i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); }

.cart-note { margin: 8px 0 0; font-size: 0.88rem; color: var(--muted); }
.cart-note a { font-weight: 600; }

/* Verso, alça e escolhas do kit */
.option-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.option-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1.5px solid var(--line, #e5def0); border-radius: 999px; cursor: pointer; font-weight: 600; }
.option-pill:has(input:checked) { border-color: var(--primary, #6d28d9); background: var(--primary-soft, #f3eefe); color: var(--primary, #6d28d9); }
.option-pill input { accent-color: var(--primary, #6d28d9); }
.handle-fields { display: grid; gap: 10px; }
.step-title small { font-weight: 500; opacity: 0.7; font-size: 0.8em; }
.cart-extras { display: block; color: var(--muted, #6b6478); }
.variant-swatch[disabled] { opacity: 0.45; cursor: not-allowed; }
