/* ==========================================================================
   Da Praia Brownie — estilos gerais
   Paleta e tipografia aprovadas no Passo 1 (design)
   ========================================================================== */

:root {
  --color-bg: #FBEEB0;
  --color-brown: #613E1E;
  --color-brown-soft: #5C4526;
  --color-label: #8A6A45;
  --color-accent: #C1452B;
  --color-accent-soft: #FBE3DC;
  --color-border: #F1E6CE;
  --color-card-alt: #F7EFDA;
  --color-white: #FFFFFF;
  --color-cream-text: #FFF6E4;
  --color-whatsapp: #3FA65A;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 480px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-brown);
  font-family: var(--font-body);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  margin: 0;
}

p {
  margin: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: var(--color-accent);
}
a:hover {
  color: #9E3620;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 40px;
}

/* ---------- Cabeçalho ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 24px;
}

.site-header img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

/* ---------- Botão flutuante do WhatsApp ---------- */

.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-pill);
  background: var(--color-whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(97, 62, 30, 0.35);
  z-index: 50;
  text-decoration: none;
}

.whatsapp-float svg {
  width: 26px;
  height: 26px;
}

/* ---------- Vitrine / Hero ---------- */

.hero {
  padding: 8px 24px 0;
}

.hero-photo {
  border-radius: 20px;
  overflow: hidden;
  height: 280px;
  position: relative;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  padding: 24px 0;
}

.hero-content h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero-content p {
  font-size: 14px;
  color: var(--color-brown-soft);
  line-height: 1.5;
  margin-bottom: 20px;
}

.info-chips {
  display: flex;
  gap: 10px;
  padding: 0 24px 32px;
}

.info-chips .chip {
  flex: 1;
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  font-size: 11px;
  color: var(--color-label);
  line-height: 1.3;
}

.info-chips .chip b {
  color: var(--color-brown);
}

/* ---------- Botões ---------- */

.btn-primary {
  display: block;
  width: 100%;
  border: none;
  background: var(--color-brown);
  color: var(--color-cream-text);
  text-align: center;
  padding: 15px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
}

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: var(--color-whatsapp);
  color: var(--color-cream-text);
  text-align: center;
  padding: 15px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
}

/* ---------- Wizard: cabeçalho de etapa + stepper ---------- */

.wizard {
  padding: 0 24px;
}

.step {
  display: none;
}

.step.active {
  display: block;
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 16px;
  position: relative;
}

.step-back {
  background: none;
  border: none;
  padding: 4px;
  color: var(--color-brown);
  display: flex;
}

.step-progress {
  flex: 1;
}

.step-progress .labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-brown-soft);
  margin-bottom: 6px;
}

.progress-track {
  height: 6px;
  background: var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-pill);
}

.step-title {
  margin-bottom: 16px;
}

.step-title h2 {
  font-size: 22px;
  font-weight: 700;
}

.step-title p {
  font-size: 13px;
  color: var(--color-brown-soft);
  margin-top: 4px;
}

/* ---------- Cartões de produto ---------- */

.product-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.product-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border);
  padding: 14px;
  position: relative;
  text-align: left;
  width: 100%;
}

.product-card.selected {
  border-color: var(--color-accent);
}

.product-card .check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  display: none;
  align-items: center;
  justify-content: center;
}

.product-card.selected .check {
  display: flex;
}

.product-main {
  display: flex;
  gap: 14px;
  align-items: center;
}

.product-thumb {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  overflow: hidden;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info h3 {
  font-size: 15px;
  font-weight: 700;
}

.product-info p {
  font-size: 12px;
  color: var(--color-brown-soft);
  margin: 2px 0 6px;
}

.product-price {
  font-size: 13px;
  color: var(--color-accent);
  font-weight: 700;
}

.type-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-label);
  margin: 12px 0 6px;
}

.type-pills {
  display: flex;
  gap: 8px;
}

.type-pill {
  flex: 1;
  text-align: center;
  padding: 9px 6px;
  border-radius: var(--radius-sm);
  background: var(--color-card-alt);
  border: 1px solid var(--color-border);
}

.type-pill .name {
  font-size: 12px;
  font-weight: 600;
}

.type-pill .price {
  font-size: 12px;
  color: var(--color-accent);
  font-weight: 700;
}

.type-pill.selected {
  background: var(--color-brown);
  border-color: var(--color-brown);
}

.type-pill.selected .name {
  color: var(--color-cream-text);
}

.type-pill.selected .price {
  color: var(--color-bg);
}

.type-hint {
  font-size: 11px;
  color: var(--color-label);
  margin-top: 8px;
}

/* ---------- Sabores de recheio ---------- */

.flavor-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.flavor-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  width: 100%;
  text-align: left;
}

.flavor-option.selected {
  border: 2px solid var(--color-accent);
  padding: 12px 15px;
}

.flavor-option .name {
  font-weight: 600;
  font-size: 14px;
}

.flavor-option.selected .name {
  font-weight: 700;
}

.radio-dot {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-pill);
  border: 1.5px solid #E2CDAF;
  flex-shrink: 0;
}

.flavor-option.selected .radio-dot {
  border: none;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Personalização de cor ---------- */

.color-preview {
  border-radius: var(--radius-lg);
  background: var(--color-white);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.color-preview-box {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  background: linear-gradient(155deg, #5C3A25, var(--color-brown));
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
}

.color-preview-trim {
  width: 100px;
  height: 22px;
  border-radius: 6px;
  background: #D98CA0;
}

.color-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-brown-soft);
  margin-bottom: 12px;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px 8px;
  margin-bottom: 16px;
}

.color-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
}

.color-swatch .dot {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 3px solid transparent;
}

.color-swatch.selected .dot {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-bg);
}

.color-swatch .label {
  font-size: 10px;
  color: var(--color-brown-soft);
}

.color-swatch.selected .label {
  color: var(--color-brown);
  font-weight: 700;
}

.color-swatch.custom .dot {
  border: 2px dashed var(--color-label);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-label);
  font-size: 18px;
  font-weight: 700;
}

.custom-color-hint {
  font-size: 11px;
  color: var(--color-label);
  margin-bottom: 6px;
}

.input-field,
.custom-color-input {
  width: 100%;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--color-brown);
}

select.input-field {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23613E1E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.field-hint {
  font-size: 11px;
  color: var(--color-label);
  margin-top: 6px;
}

.custom-color-input::placeholder {
  color: var(--color-label);
}

/* ---------- Calculadora de quantidade ---------- */

.qty-control {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 20px 0;
}

.qty-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
}

.qty-btn.minus {
  background: var(--color-border);
  color: var(--color-brown);
}

.qty-btn.plus {
  background: var(--color-accent);
  color: var(--color-cream-text);
}

.qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qty-value {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 700;
  min-width: 70px;
  text-align: center;
}

.subtotal-display {
  text-align: center;
  margin-bottom: 100px;
}

.subtotal-display .label {
  font-size: 12px;
  color: var(--color-brown-soft);
}

.subtotal-display .value {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-accent);
}

/* ---------- Resumo do pedido ---------- */

.summary-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  font-size: 12px;
  color: var(--color-brown-soft);
  margin-bottom: 16px;
}

.summary-card .title {
  font-weight: 700;
  color: var(--color-brown);
  margin-bottom: 6px;
  font-size: 12px;
}

.summary-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  column-gap: 10px;
  margin-bottom: 4px;
}

.summary-row > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: break-word;
}

.summary-row > span:last-child {
  flex-shrink: 0;
  white-space: nowrap;
  text-align: right;
}

.summary-row.total {
  font-weight: 700;
  color: var(--color-brown);
  padding-top: 4px;
  border-top: 1px solid var(--color-border);
  margin-top: 4px;
}

.summary-sticky {
  position: sticky;
  bottom: 88px;
  box-shadow: 0 8px 20px rgba(97, 62, 30, 0.12);
}

/* ---------- Agendamento: calendário e horários ---------- */

.calendar-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}

.calendar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.calendar-title {
  text-align: center;
  font-weight: 700;
  font-size: 13px;
}

.calendar-nav {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.calendar-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.calendar-weekdays {
  font-size: 10px;
  color: var(--color-label);
  margin-bottom: 6px;
}

.calendar-days button {
  padding: 8px 0;
  border-radius: 8px;
  border: none;
  background: none;
  font-size: 12px;
  font-family: inherit;
  color: var(--color-brown);
}

.calendar-days button:disabled {
  color: #D8C7A8;
  cursor: not-allowed;
}

.calendar-days button.selected {
  background: var(--color-accent);
  color: var(--color-cream-text);
  font-weight: 700;
}

.calendar-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 10px;
  color: var(--color-label);
}

.calendar-legend .dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-border);
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-brown-soft);
  margin: 16px 0 10px;
}

.time-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.time-pill {
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  font-size: 12px;
  color: var(--color-brown-soft);
}

.time-pill.selected {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-cream-text);
  font-weight: 600;
}

.address-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.field-row {
  display: flex;
  gap: 10px;
}

.field-row > div {
  flex: 1;
}

.field-label {
  font-size: 11px;
  color: var(--color-label);
  margin-bottom: 4px;
  display: block;
}

/* ---------- Revisão e pagamento ---------- */

.review-card .review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-card-alt);
}

.review-card .review-row:last-child {
  border-bottom: none;
  align-items: flex-start;
}

.review-card .review-row span:first-child {
  color: var(--color-label);
  font-size: 13px;
}

.review-card .review-row span:last-child {
  font-weight: 600;
  font-size: 13px;
  text-align: right;
  max-width: 220px;
}

.totals-card {
  font-size: 13px;
}

.totals-card .summary-row {
  padding: 4px 0;
  margin-bottom: 0;
}

.totals-card .summary-row.total {
  padding: 8px 0;
}

.payment-question {
  font-size: 13px;
  font-weight: 700;
  margin: 18px 0 8px;
}

.payment-hint {
  font-size: 11px;
  color: var(--color-label);
  line-height: 1.5;
  margin-bottom: 12px;
}

.payment-option {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  position: relative;
  margin-bottom: 12px;
  text-align: left;
  width: 100%;
}

.payment-option.selected {
  border: 2px solid var(--color-accent);
}

.payment-option .check {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  display: none;
  align-items: center;
  justify-content: center;
}

.payment-option.selected .check {
  display: flex;
}

.payment-option .name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.payment-option .name-row .name {
  font-weight: 700;
  font-size: 14px;
}

.badge-required {
  font-size: 9px;
  font-weight: 700;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.payment-option .amount {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
}

.payment-option .note {
  font-size: 11px;
  color: var(--color-label);
  margin-top: 2px;
}

.pix-box {
  background: var(--color-white);
  border: 1px dashed #E2CDAF;
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
  margin-bottom: 16px;
}

.pix-box-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-brown-soft);
  margin-bottom: 12px;
}

.pix-after-hint {
  font-size: 11px;
  color: var(--color-label);
  text-align: center;
  margin-bottom: 14px;
}

.pix-qr {
  width: 224px;
  height: 224px;
  margin: 0 auto 10px;
  border-radius: var(--radius-sm);
  background: var(--color-card-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--color-label);
  overflow: hidden;
  padding: 8px;
}

.pix-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.pix-qr canvas {
  /* Tamanho exibido é definido via JS (style.width/height em px), em
     resolução real de pixels do aparelho — não usar % aqui: isso forçaria
     o navegador a redimensionar a imagem já pronta do QR Code, borrando/
     corrompendo os módulos e impedindo a leitura pela câmera. */
  display: block;
}

.pix-box .copy-hint {
  font-size: 12px;
  color: var(--color-brown-soft);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pix-box .copy-hint.copied {
  color: var(--color-whatsapp);
  text-decoration: none;
  font-weight: 700;
}

/* ---------- Confirmação ---------- */

.confirmation {
  text-align: center;
  padding-top: 20px;
}

.confirmation-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-pill);
  background: var(--color-whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto 18px;
}

.confirmation h2 {
  font-size: 24px;
  font-weight: 700;
}

.confirmation-text {
  font-size: 13px;
  color: var(--color-brown-soft);
  margin-top: 8px;
  line-height: 1.5;
}

.message-preview {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: left;
  margin: 20px 0;
}

.message-preview .title {
  font-size: 11px;
  color: var(--color-label);
  font-weight: 700;
  margin-bottom: 8px;
}

.message-preview .bubble {
  background: var(--color-card-alt);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--color-brown);
  white-space: pre-line;
}

.alert-warning {
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  text-align: left;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.alert-warning svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-warning p {
  font-size: 12px;
  line-height: 1.5;
}

.confirmation .helper-text {
  font-size: 11px;
  color: var(--color-brown-soft);
  margin-top: 10px;
}

/* ---------- Rodapé ---------- */

.site-footer {
  padding: 32px 24px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--color-brown-soft);
  border-top: 1px solid var(--color-border);
  margin-top: 24px;
}

.site-footer .footer-logo {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-brown);
  margin-bottom: 8px;
}

.site-footer p {
  margin-bottom: 6px;
  line-height: 1.6;
}

.site-footer .rules {
  font-size: 11px;
  color: var(--color-label);
  margin-top: 12px;
}

/* ---------- Responsivo (telas maiores) ---------- */

@media (min-width: 540px) {
  .page {
    padding-top: 24px;
  }

  .hero-photo {
    height: 340px;
  }
}
