/* ============================================================
   front.css — vitrine pública da loja (minimalista, edge-to-edge)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --f-bg:     #ffffff;
  --f-text:   #111111;
  --f-muted:  #8a8a8a;
  --f-line:   #e4e4e4;
  --f-accent: #111111;
  --f-promo:  #c0392b;
  --f-pad:    60px;   /* margem geral em volta do site */
}

html, body {
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--f-text);
  background: var(--f-bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
body { padding: var(--f-pad); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ============================================================
   TOPO — pílulas | logo central | pílulas
   ============================================================ */
.store-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin-bottom: 56px;
}
.nav-left  { display: flex; gap: 10px; justify-self: start; }
.nav-right { display: flex; gap: 10px; justify-self: end; }

.brand-logo { justify-self: center; }
.brand-logo img { height: 56px; width: auto; }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 18px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  border: 1.5px solid var(--f-text); border-radius: 999px;
  white-space: nowrap; transition: background 0.15s, color 0.15s;
}
.pill:hover { background: var(--f-text); color: #fff; }
.pill-dark { background: var(--f-text); color: #fff; }
.pill-dark:hover { opacity: 0.82; background: var(--f-text); color: #fff; }

/* ============================================================
   HOME — grade de produtos 3 por linha, full width
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.cardp {
  position: relative;
  display: flex;
  flex-direction: column;
}

.cardp-img {
  position: relative;
  aspect-ratio: 3 / 4;
  width: 100%;
  background: #000;
  overflow: hidden;
}
.cardp-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.cardp:hover .cardp-img img { transform: scale(1.03); }
.cardp-img.ph { display: flex; align-items: center; justify-content: center; color: #555; font-size: 40px; }

.cardp-body { padding: 18px 4px 0; }
.cardp-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cardp-cat {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 12px;
  background: var(--f-text); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  border-radius: 999px;
}
.cardp-preco { font-size: 16px; font-weight: 500; }
.cardp-preco .old { color: var(--f-muted); text-decoration: line-through; font-weight: 400; margin-right: 8px; }
.cardp-preco .promo { color: var(--f-text); }

.cardp-nome {
  font-size: 30px; font-weight: 700; line-height: 1.05;
  text-transform: uppercase; letter-spacing: -0.01em;
  margin-bottom: 18px;
}
.cardp-rule { display: block; height: 2px; background: var(--f-text); width: 100%; }

.tag-esgotado {
  position: absolute; top: 14px; right: 14px;
  background: #fff; color: #111;
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}

.empty-front { text-align: center; padding: 80px 20px; color: var(--f-muted); }

/* ============================================================
   PRODUTO — galeria + infos
   ============================================================ */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.prod {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  padding: 44px 0 60px;
}
.prod-gallery .main-img {
  width: 100%; aspect-ratio: 1 / 1; background: #f4f4f4;
  border-radius: 8px; overflow: hidden; margin-bottom: 12px;
}
.prod-gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-gallery .main-img.ph { display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 48px; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumbs img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--f-line); cursor: pointer; opacity: 0.7; transition: opacity 0.15s, border-color 0.15s;
}
.thumbs img.active, .thumbs img:hover { opacity: 1; border-color: var(--f-text); }

.prod-info h1 { font-size: 26px; font-weight: 600; margin-bottom: 14px; }
.prod-price { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.prod-price .old { color: var(--f-muted); text-decoration: line-through; font-weight: 400; font-size: 17px; margin-right: 10px; }
.prod-price .promo { color: var(--f-promo); }
.prod-badge { display:inline-block; font-size: 12px; color: var(--f-muted); margin-bottom: 18px; }
.prod-desc { color: #444; font-size: 15px; line-height: 1.7; white-space: pre-wrap; margin: 18px 0 26px; border-top: 1px solid var(--f-line); padding-top: 22px; }

.video-embed { margin: 22px 0; }
.video-embed iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; }

/* ---- Botões ---- */
.btn-buy {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; padding: 15px; font-size: 15px; font-weight: 600;
  background: var(--f-accent); color: #fff; border: none; border-radius: 8px; cursor: pointer;
  transition: opacity 0.15s;
}
.btn-buy:hover { opacity: 0.85; }
.btn-buy:disabled { background: #bbb; cursor: not-allowed; }
.btn-ghost {
  display: inline-block; margin-top: 14px; font-size: 13px; color: var(--f-muted);
}

/* ============================================================
   FINALIZAR — checkout
   ============================================================ */
.checkout { max-width: 520px; margin: 0 auto; padding: 44px 20px 70px; }
.checkout h1 { font-size: 22px; font-weight: 600; margin-bottom: 24px; }
.resumo {
  display: flex; gap: 14px; align-items: center;
  border: 1px solid var(--f-line); border-radius: 10px; padding: 14px; margin-bottom: 24px;
}
.resumo img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; background: #f4f4f4; flex-shrink: 0; }
.resumo .r-nome { font-weight: 500; }
.resumo .r-preco { color: var(--f-muted); font-size: 14px; }

.qtd-row { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.qtd-ctrl { display: flex; align-items: center; border: 1px solid var(--f-line); border-radius: 8px; overflow: hidden; }
.qtd-ctrl button { width: 38px; height: 38px; border: none; background: #fff; font-size: 18px; cursor: pointer; }
.qtd-ctrl button:hover { background: #f4f4f4; }
.qtd-ctrl span { width: 44px; text-align: center; font-weight: 600; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: #444; }
.field input {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--f-line); border-radius: 8px; outline: none; transition: border-color 0.15s;
}
.field input:focus { border-color: var(--f-text); }

.entrega-box {
  border-top: 1px solid var(--f-line);
  margin-top: 22px; padding-top: 18px;
}
.entrega-titulo { font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.grid2 { display: flex; gap: 12px; }
.grid2 .field { margin-bottom: 16px; }

.total-line {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 18px; font-weight: 700; margin: 26px 0 18px;
  border-top: 1px solid var(--f-line); padding-top: 20px;
}
.co-msg { font-size: 13px; padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; display: none; }
.co-msg.err { background: #fceaea; color: #a32d2d; display: block; }
.co-note { font-size: 12px; color: var(--f-muted); text-align: center; margin-top: 14px; }

/* ============================================================
   ACOMPANHAR PEDIDO — rastreio
   ============================================================ */
.track { max-width: 620px; margin: 0 auto; padding: 10px 0 60px; }
.track-title { font-size: 30px; font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em; }
.track-sub { color: var(--f-muted); font-size: 14px; margin: 6px 0 28px; }

.track-form { margin-bottom: 16px; }
.track-form .btn-buy { margin-top: 6px; }

.track-msg { font-size: 14px; padding: 14px 16px; border-radius: 10px; margin-top: 18px; }
.track-msg.err { background: #fceaea; color: #a32d2d; }

.track-card {
  border: 1px solid var(--f-line); border-radius: 14px;
  padding: 22px; margin-top: 22px;
}
.track-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.track-ped { font-weight: 600; }
.track-data { color: var(--f-muted); font-size: 13px; margin-top: 2px; }
.track-total { font-weight: 700; font-size: 17px; }

.track-pendente {
  background: #fff7e6; color: #8a6d1f; font-size: 14px;
  padding: 12px 14px; border-radius: 10px; margin-bottom: 8px;
}

.track-steps { display: flex; align-items: flex-start; margin-bottom: 6px; }
.track-step { display: flex; flex-direction: column; align-items: center; gap: 7px; flex-shrink: 0; }
.track-dot {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; background: #eee; color: #aaa;
}
.track-lbl { font-size: 12px; color: var(--f-muted); }
.track-step.done .track-dot { background: #16a34a; color: #fff; }
.track-step.atual .track-dot { background: var(--f-text); color: #fff; }
.track-step.atual .track-lbl { color: var(--f-text); font-weight: 600; }
.track-bar { flex: 1; height: 2px; background: #eee; margin-top: 16px; }
.track-bar.on { background: #16a34a; }

.track-itens { border-top: 1px solid var(--f-line); margin-top: 22px; padding-top: 16px; }
.track-item { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; }

/* ---- Responsivo ---- */
@media (max-width: 1100px) {
  :root { --f-pad: 32px; }
  .cardp-nome { font-size: 24px; }
}
@media (max-width: 820px) {
  :root { --f-pad: 20px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .store-top { margin-bottom: 36px; }
  .brand-logo img { height: 44px; }
  .prod { grid-template-columns: 1fr; gap: 24px; padding: 24px 0 50px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .store-top {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;
  }
  .nav-left, .nav-right { justify-self: center; flex-wrap: wrap; justify-content: center; }
  .brand-logo { order: -1; }
}
