/* Paginas internas (pedido, pagar, contato, privacidade), navegacao por links e scanner. */

/* nav por links (nav.js) */
.rail a.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--ink);
  border-radius: 20px;
  transition: background 0.15s;
}

.rail a.nav-item:hover,
.rail a.nav-item.active {
  background: var(--canvas);
}

.rail a.nav-item span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.rail a.nav-item svg,
.bottom-nav a.nav-item svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav a.nav-item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
  font-size: 0.7rem;
  color: var(--muted);
}

.bottom-nav a.nav-item.active {
  color: var(--ink);
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 32px 16px 8px;
  font-size: 0.75rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
}

/* cabecalho das paginas internas */
.subhead {
  display: flex;
  justify-content: center;
  padding: 28px 0 8px;
}

.subhead img {
  display: block;
  height: 30px;
}

.narrow {
  max-width: 720px;
}

.page-title {
  margin: 16px 0 6px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  text-align: center;
}

.page-lead {
  margin: 0 0 24px;
  color: var(--muted);
  text-align: center;
}

.card {
  padding: 20px;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.05em;
}

/* formularios */
.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.input {
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 24px;
  outline: none;
}

textarea.input {
  min-height: 110px;
  resize: vertical;
}

.input:focus {
  border-color: var(--blue);
}

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 560px) {
  .row {
    grid-template-columns: 1fr 1fr;
  }
}

.hp {
  position: absolute;
  left: -9999px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  background: var(--blue);
  border: 0;
  border-radius: 9999px;
  box-shadow: var(--shadow-blue);
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-ghost {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn:focus-visible,
.input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.msg {
  margin: 0;
  font-size: 0.9rem;
}

.msg.error {
  color: #d64545;
}

.msg.ok {
  padding: 20px;
  color: var(--success);
  text-align: center;
  background: rgba(26, 155, 91, 0.08);
  border-radius: 20px;
}

/* contato */
.channels {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.channel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  color: var(--ink);
  text-decoration: none;
  background: var(--canvas);
  border-radius: 20px;
}

.channel small {
  display: block;
  color: var(--muted);
}

/* pagar */
.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border-radius: 9999px;
  box-shadow: var(--shadow-sm);
}

.seg button {
  flex: 1;
  height: 40px;
  font-size: 0.9rem;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 9999px;
  cursor: pointer;
}

.seg button.active {
  color: #fff;
  background: var(--ink);
}

.pick-bar {
  display: flex;
  gap: 8px;
}

.pick-bar .input {
  flex: 1;
}

.icon-btn {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  cursor: pointer;
}

.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.results,
.cart {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 6px 6px;
  border-radius: 18px;
}

.results .line {
  width: 100%;
  text-align: left;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.results .line:hover {
  background: var(--canvas);
}

.line .s-price {
  font-size: 0.9rem;
}

.qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty button {
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  background: var(--canvas);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 8px 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.total strong {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.pix-result {
  align-items: center;
  text-align: center;
}

.qr {
  width: 240px;
  max-width: 70vw;
  height: auto;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
}

.pix-amount {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.06em;
}

.pix-code {
  width: 100%;
  padding: 12px;
  font-size: 0.7rem;
  color: var(--muted);
  word-break: break-all;
  background: var(--canvas);
  border-radius: 16px;
}

.hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.prose h2 {
  margin: 20px 0 6px;
}

.prose p,
.prose li {
  color: #333;
  line-height: 1.5;
}

/* botao de escanear na busca da home */
.scan-btn {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  background: var(--canvas);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.scan-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* overlay do scanner */
.scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: #000;
}

.scan-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  color: #fff;
}

.scan-close {
  width: 40px;
  height: 40px;
  font-size: 1.6rem;
  line-height: 1;
  color: #000;
  background: #fff;
  border: 0;
  border-radius: 50%;
}

.scan-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(80vw, 420px);
  height: 34vw;
  min-height: 130px;
  max-height: 200px;
  transform: translate(-50%, -50%);
  border: 3px solid var(--blue);
  border-radius: 24px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.45);
}

.scan-msg {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 32px;
  z-index: 2;
  margin: 0;
  color: #fff;
  text-align: center;
}

/* card de produto: article com botao principal + coracao */
.product-card {
  position: relative;
  padding: 8px;
  cursor: default;
}

.card-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  padding: 0;
  text-align: left;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.card-main:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
  border-radius: var(--r-inner);
}

.fav {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.fav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fav.on {
  color: #e0445a;
}

.fav.on svg {
  fill: currentColor;
}

.fav:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.fav-modal {
  top: 20px;
  right: 64px;
}

/* faixa horizontal "Mais consultados" */
#populares {
  margin-bottom: 40px;
}

.rail-scroll {
  display: flex;
  gap: 12px;
  padding: 4px 2px 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.rail-scroll::-webkit-scrollbar {
  display: none;
}

.rail-scroll .product-card {
  flex: none;
  width: 170px;
  scroll-snap-align: start;
}

@media (min-width: 700px) {
  .rail-scroll .product-card {
    width: 200px;
  }
}
