/* CZ Fotos — visual claro, preto e dourado */
:root {
  --bg: #ffffff;
  --surface: #f6f6f4;
  --surface-2: #fafaf8;
  --line: #e6e6e2;
  --line-strong: #d5d5d0;
  --text: #111111;
  --muted: #5f6368;
  --gold: #d4a017;
  --gold-text: #8c6a00;
  --danger: #b3261e;
  --ok: #1e7a3c;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--text); }
a:hover { color: var(--gold-text); }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* Topo */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.brand .divider { width: 1px; height: 30px; background: var(--line-strong); }
.brand span { font-weight: 600; font-size: 16px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav a { padding: 10px 12px; text-decoration: none; font-weight: 500; border-radius: 10px; }
.cart-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px !important; border: 1px solid var(--line-strong); border-radius: 999px !important; font-weight: 600 !important; }
.cart-link .badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: #111; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }

/* Botões e campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; text-decoration: none; transition: filter .15s; }
.btn:hover { filter: brightness(0.96); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-gold { background: var(--gold); color: #111; }
.btn-dark { background: #111; color: #fff; }
.btn-dark:hover { color: #fff; }
.btn-line { background: #fff; border-color: var(--line-strong); color: var(--text); }
.btn-danger { background: #fff; border-color: #e7c2bf; color: var(--danger); }
.btn-block { width: 100%; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input { height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff; width: 100%; min-width: 0; }
.input:focus, .btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid rgba(212,160,23,.45); outline-offset: 2px; }
.chip { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-text); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.notice { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; }
.alert-error { background: #fdf0ef; color: var(--danger); border: 1px solid #f1cfcb; }
.alert-ok { background: #eef7f1; color: var(--ok); border: 1px solid #cfe7d7; }

/* Home */
.hero { padding: 72px 0 56px; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { margin: 0; max-width: 820px; font-size: clamp(36px, 6vw, 64px); font-weight: 700; }
.hero p.lead { margin: 0; max-width: 560px; font-size: 18px; color: var(--muted); }
.search { display: flex; align-items: center; gap: 10px; max-width: 620px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.search input { flex: 1; min-width: 0; height: 54px; border: 0; background: transparent; outline: none; }
.section { padding: 24px 0 72px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font-size: 32px; }
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.event-card { display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.event-card .cover { position: relative; aspect-ratio: 3 / 2; background: #d9d9d4; overflow: hidden; }
.event-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.event-card .cover .chip { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.94); }
.event-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; }
.event-card .name { font-size: 18px; font-weight: 600; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.step .num { font-size: 44px; font-weight: 700; line-height: 1; color: var(--gold-text); }
.step h3 { margin: 10px 0 6px; font-size: 20px; }
.step p { margin: 0; color: var(--muted); }
.band { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 64px 0; }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 36px; border-radius: 20px; background: #111; color: #fff; }
.cta h2 { margin: 0 0 6px; font-size: 28px; }
.cta p { margin: 0; color: #c9c9c4; }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 16px; }
.site-footer { border-top: 1px solid var(--line); }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 24px; font-size: 14px; color: var(--muted); }

/* Evento */
.event-head { padding: 32px 0 20px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.event-head h1 { margin: 8px 0 6px; font-size: clamp(30px, 5vw, 48px); }
.price-box { text-align: right; }
.price-box strong { display: block; font-size: 30px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
@media (max-width: 520px) { .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.photo { position: relative; padding: 0; border: 3px solid transparent; border-radius: 14px; overflow: hidden; background: #e8e8e4; aspect-ratio: 4 / 5; }
.photo img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.photo.selected { border-color: var(--gold); }
.photo .tick { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255,255,255,.9); background: rgba(17,17,17,.35); display: flex; align-items: center; justify-content: center; color: #111; }
.photo.selected .tick { background: var(--gold); border-color: var(--gold); }
.photo .tick svg { opacity: 0; }
.photo.selected .tick svg { opacity: 1; }
.photo .code { position: absolute; left: 10px; bottom: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.94); font-size: 12px; font-weight: 600; }
.photo { display: block; width: 100%; }
.zoom { position: absolute; right: 8px; bottom: 8px; width: 44px; height: 44px; border-radius: 10px; border: 0; background: rgba(255,255,255,.94); display: flex; align-items: center; justify-content: center; }
@media (max-width: 520px) {
  .brand img { height: 38px; }
  .brand span:not(.divider) { font-size: 14px; }
  .site-header .container { flex-wrap: nowrap; }
  .cart-link { padding: 8px 12px !important; }
  .cart-link .cart-text { display: none; }
  .price-box { text-align: left; }
  .item img { width: 72px; height: 72px; }
  .item .info .muted { display: none; }
  .header-note { display: none !important; }
}
.notice svg { flex: 0 0 auto; }
.sticky-bar { position: sticky; bottom: 0; z-index: 15; border-top: 1px solid var(--line-strong); background: rgba(255,255,255,.97); }
.sticky-bar .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.protect { user-select: none; -webkit-user-select: none; }
dialog.lightbox { border: 0; padding: 0; max-width: min(96vw, 1200px); background: transparent; }
dialog.lightbox::backdrop { background: rgba(0,0,0,.82); }
dialog.lightbox img { max-height: 86vh; width: auto; margin: 0 auto; border-radius: 10px; pointer-events: none; }
dialog.lightbox .lb-bar { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }

/* Carrinho */
.checkout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; padding-bottom: 72px; }
.checkout .items { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.checkout aside { flex: 1 1 340px; padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.item { display: flex; align-items: center; gap: 14px; padding: 12px; }
.item img { width: 104px; height: 78px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; }
.item .info { flex: 1 1 auto; min-width: 0; }
.icon-btn { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.totals { display: flex; flex-direction: column; gap: 8px; }
.totals .row { display: flex; justify-content: space-between; gap: 12px; }
.totals .total { padding-top: 10px; border-top: 1px solid var(--line-strong); font-size: 20px; font-weight: 700; }
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 4px; border-radius: 12px; background: #ececea; }
.segmented button { height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; }
.segmented button[aria-pressed="true"] { background: #111; color: #fff; }
.pix-box { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.pix-box img { width: 220px; height: 220px; border: 2px solid #111; border-radius: 12px; padding: 6px; background: #fff; }
.pix-code { width: 100%; font-size: 12px; word-break: break-all; padding: 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line-strong); max-height: 84px; overflow: auto; text-align: left; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--gold); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Pedido */
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.download { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.download img { aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; width: 100%; }

/* Painel */
.admin { display: flex; flex-wrap: wrap; min-height: 100vh; }
.admin-nav { flex: 1 1 260px; padding: 20px 16px; border-right: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.admin-nav .brand { padding: 0 6px 16px; }
.admin-nav h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 16px 8px 6px; }
.event-link { display: flex; flex-direction: column; align-items: flex-start; gap: 0; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: transparent; text-align: left; }
.event-link small { color: var(--muted); }
.event-link[aria-current="true"] { background: #ececea; font-weight: 600; }
.admin-main { flex: 999 1 640px; min-width: 0; padding: 28px 20px 64px; }
.admin-main > .inner { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-size: 26px; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 20px; border-radius: 18px; border: 2px dashed var(--line-strong); background: var(--surface-2); text-align: center; cursor: pointer; }
.dropzone.drag { border-color: var(--gold); background: #fffaf0; }
.dropzone .circle { width: 56px; height: 56px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; color: #111; }
.two-cols { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.two-cols > * { flex: 1 1 360px; min-width: 0; }
.panel { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.panel h3 { margin: 0; font-size: 18px; }
.presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.preset { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border-radius: 12px; border: 2px solid var(--line-strong); background: #fff; text-align: left; }
.preset small { color: var(--muted); }
.preset[aria-pressed="true"] { border-color: var(--gold); }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--gold); }
.progress { height: 10px; border-radius: 999px; background: #eaeae6; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.queue { display: flex; flex-direction: column; max-height: 360px; overflow: auto; }
.queue .row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.queue .row .name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue .row .st { font-weight: 600; white-space: nowrap; }
.queue .row .st.ok { color: var(--gold-text); }
.queue .row .st.err { color: var(--danger); }
.admin-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.admin-photo { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 5; background: #e8e8e4; }
.admin-photo img { width: 100%; height: 100%; object-fit: cover; }
.admin-photo button { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border-radius: 8px; border: 0; background: rgba(255,255,255,.94); color: var(--danger); display: flex; align-items: center; justify-content: center; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login form { width: 100%; max-width: 380px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.preview-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.preview-compare figure { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.preview-compare canvas { width: 100%; height: auto; border-radius: 10px; background: #e8e8e4; }
