/* Telegram CTAs + tap-first pedido / promo. Keeps v3 mobile fixes. */
:root {
  --telegram: #229ED9;
  --telegram-d: #1a7eae;
}

.tg-ic { flex: 0 0 auto; vertical-align: -2px; margin-right: 4px; }
.btn-tg {
  background: var(--telegram);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-tg:hover { background: var(--telegram-d); }
.sticky-tg {
  box-shadow: 0 10px 28px -8px rgba(34, 158, 217, 0.55);
}

/* ===== Telegram copy sheet ===== */
.tg-sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.tg-sheet[hidden] { display: none; }
.tg-scrim {
  position: absolute;
  inset: 0;
  background: rgba(44, 35, 38, 0.45);
}
.tg-panel {
  position: relative;
  z-index: 1;
  max-height: 92dvh;
  overflow: auto;
  background: var(--card, #fffaf8);
  border-radius: 24px 24px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(44, 35, 38, 0.16);
}
.tg-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.tg-kicker, .tg-panel .kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blush-deep);
  margin: 0;
}
.tg-panel h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  margin: 6px 0 0;
}
.tg-lead {
  font-size: 1rem;
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 34ch;
}
.tg-steps {
  margin: 12px 0 0 18px;
  padding: 0;
  font-size: 0.9rem;
  color: var(--ink);
  display: grid;
  gap: 4px;
}
.tg-status {
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 12px;
}
.tg-status.ok { background: #E7F2EA; color: #22543a; }
.tg-status.bad { background: #F8E6E6; color: #7a1626; }
.tg-status:empty { display: none; }
.tg-text {
  margin-top: 10px;
  white-space: pre-wrap;
  word-break: break-word;
  font: 13px/1.45 var(--sans);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  max-height: 34vh;
  overflow: auto;
  -webkit-user-select: text;
  user-select: text;
}
.tg-act { display: grid; gap: 8px; margin-top: 14px; }
.tg-act .btn { width: 100%; min-height: 52px; border-radius: 999px; }
.tg-fine { font-size: 0.75rem; color: var(--muted); margin: 10px 0 0; }
@media (min-width: 720px) {
  .tg-sheet { justify-content: center; }
  .tg-panel { width: 100%; max-width: 480px; margin: 0 auto; border-radius: 24px; }
}

/* ===== Tap-first pedido ===== */
.tap-pedido .tap-main { padding-bottom: 150px; }
.tap-pedido .tap-lead { max-width: 36ch; }
.tap-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 0 20px;
}
.tap-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e0cfc9;
  cursor: pointer;
}
.tap-dots button.is-done { background: var(--blush-soft); }
.tap-dots button.is-on { background: var(--ink); transform: scale(1.25); }
.tap-dots button:disabled { opacity: 0.45; cursor: default; }

.tap-pkgs, .tap-events { display: grid; gap: 10px; }
.tap-pkg, .tap-event {
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 16px 16px;
  cursor: pointer;
  min-height: 64px;
  -webkit-tap-highlight-color: transparent;
}
.tap-pkg strong, .tap-event strong { display: block; font-size: 1.15rem; }
.tap-pkg small { display: block; color: var(--muted); margin-top: 4px; font-size: 0.88rem; }
.tap-pkg[aria-pressed="true"],
.tap-event[aria-pressed="true"],
.tap-theme[aria-pressed="true"] {
  border-color: var(--ink);
  background: #fbf0ef;
  box-shadow: 0 0 0 1px var(--ink);
}
.tap-pkg.is-featured { position: relative; padding-top: 28px; }
.pkg-tag {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blush-deep);
}

.tap-events { grid-template-columns: 1fr 1fr; }
.tap-event { display: flex; align-items: center; gap: 10px; min-height: 76px; }
.tap-event:last-child { grid-column: 1 / -1; }
.ev-ic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
  background: #f3e4e2;
}
.ev-girl { background: radial-gradient(circle at 30% 30%, #fde2e8, #e8a0ae); }
.ev-boy { background: radial-gradient(circle at 30% 30%, #dceaf8, #8eb4d4); }
.ev-wed { background: radial-gradient(circle at 30% 30%, #f7f3ea, #d4bc96); }
.ev-baby { background: radial-gradient(circle at 30% 30%, #efe4f6, #c7b0e0); }
.ev-other { background: radial-gradient(circle at 30% 30%, #eee, #ccc); }

.tap-themes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tap-theme {
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 16px;
  padding: 0 0 10px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.tap-theme .art {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
}
.tap-theme strong {
  display: block;
  padding: 8px 10px 0;
  font-size: 0.92rem;
}
.art-princess { background: linear-gradient(160deg, #f8d4e0 0%, #e8b4c8 40%, #d4bc96 100%); }
.art-heroes { background: linear-gradient(160deg, #2a3a7a 0%, #c23b3b 55%, #f0c14b 100%); }
.art-dinos { background: linear-gradient(160deg, #7ea86a 0%, #3d6b3a 60%, #c4a574 100%); }
.art-unicorn { background: linear-gradient(160deg, #f7d6ef, #d6e4fb, #fbe6c8); }
.art-safari { background: linear-gradient(160deg, #e6d3a8, #c4a06a 50%, #6b8f5a); }
.art-soccer { background: linear-gradient(160deg, #3d8c4a, #f4f4f4 48%, #3d8c4a); }
.art-space { background: radial-gradient(circle at 20% 20%, #fff 0 1px, transparent 2px), radial-gradient(circle at 70% 40%, #fff 0 1px, transparent 2px), linear-gradient(160deg, #0e1530, #2a1b4a); }
.art-character { background: repeating-linear-gradient(90deg, #2c2326 0 8px, #f6eee9 8px 16px), linear-gradient(#c98991, #f3d6d8); background-size: 16px 18px, cover; }
.art-other { background: repeating-linear-gradient(45deg, #ead7d2, #ead7d2 8px, #fffaf8 8px, #fffaf8 16px); }

.chip-block {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
  min-height: 48px;
}
.tap-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.tap-swatches .chip { min-height: 48px; font-size: 1rem; padding: 10px 16px; }

.age-stepper {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  gap: 10px;
  margin: 8px 0 16px;
  max-width: 260px;
}
.age-stepper button {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}
.age-stepper span {
  text-align: center;
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 500;
}
.photo-note {
  background: #f8eef0;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.9rem;
  color: var(--ink);
  margin: 8px 0 16px;
}
#toggleDetails { width: 100%; margin-top: 4px; }
#moreDetails {
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.summary-card { display: grid; gap: 8px; }
.sum-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px;
  cursor: pointer;
}
.sum-row span { color: var(--muted); font-size: 0.8rem; }
.sum-row strong { font-weight: 650; text-align: right; }
.text-btn {
  background: none;
  border: 0;
  color: var(--gold-deep);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.tap-pedido .bar-steps.is-last { grid-template-columns: 1fr 2fr; }
.tap-pedido #submitBtn { min-height: 52px; }

/* Promo: details folded */
.tap-details {
  width: min(100%, 640px);
  margin: 16px auto 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px 16px;
}
.tap-details summary {
  cursor: pointer;
  font-weight: 650;
  padding: 14px 0;
  list-style: none;
}
.tap-details summary::-webkit-details-marker { display: none; }
.tap-details summary::after {
  content: "＋";
  float: right;
  color: var(--muted);
  font-weight: 400;
}
.tap-details[open] summary::after { content: "–"; }
.tap-details ul { margin: 0 0 14px; padding-left: 18px; color: var(--muted); }
.tap-details li { margin: 0 0 6px; }
.tap-promo .promo-cta .btn { width: 100%; min-height: 52px; }
.tap-promo .site-footer { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }

@media (min-width: 600px) {
  .tap-themes { grid-template-columns: repeat(3, 1fr); }
  .tap-events { grid-template-columns: repeat(3, 1fr); }
  .tap-event:last-child { grid-column: auto; }
}



/* Hide the sticky Telegram bar under the gallery and the order sheet. */
body.lb-open .sticky-wa,
body.lb-open .sticky-tg,
body:has(#tg-sheet:not([hidden])) .sticky-wa,
body:has(#tg-sheet:not([hidden])) .sticky-tg { display: none !important; }

/* Short phones: drop the repeated lead so the question and cards fit. */
@media (max-height: 740px) {
  .tap-pedido .tap-lead { display: none; }
  .tap-pedido .promo-banner { padding: 8px 12px; margin: 0 0 10px; font-size: 0.82rem; }
  .tap-pedido .pedido-main h1 { font-size: 1.7rem; margin: 4px 0 8px; }
  .tap-pedido .tap-dots { margin-bottom: 12px; }
  .tap-pedido .tap-main { padding-top: 12px; padding-bottom: 160px; }
  .tg-panel { max-height: 96dvh; padding-top: 16px; }
  .tg-panel h2 { font-size: 1.5rem; }
  .tg-lead { font-size: 0.95rem; }
  .tg-steps { font-size: 0.82rem; margin-top: 8px; }
  .tg-text { max-height: 22vh; }
  .tg-act { margin-top: 10px; }
  .tg-act .btn { min-height: 48px; }
}
.tap-pedido .tap-main { padding-bottom: 170px; }
