/*
    Estilo base da source. Replicação fiel da estrutura da source
    antiga (header com cover vermelha + logo circular, banners
    Pague 1 Leve 2, cards de produto, contador, feedbacks no rodapé)
    com upgrades de sombra, motion e responsivo.

    Cor primária vinda de SITE_PRIMARY_COLOR do site.php (vermelho
    Cloudfy intenso #FF0004 default).
*/

/* TOKENS */
:root {
  --site-primary:       #FF0004;
  --site-primary-dark:  #cc0003;
  --site-primary-soft:  rgba(255, 0, 4, 0.08);
  --site-primary-glow:  rgba(255, 0, 4, 0.45);

  --site-success:       #077c22;
  --site-success-light: #d7fdd7;
  --site-success-glow:  rgba(7, 124, 34, 0.7);

  --badge-mv-bg:        #f1cdf2;
  --badge-mv-fg:        #5b0e5c;
  --bloco-comp-bg:      #e8e8e8;
  --bloco-comp-fg:      #474747;
  --alert-promo-bg:     rgb(255, 217, 217);

  --text-base:          #403f3f;
  --text-muted:         #676767;
  --border-soft:        #cecece;
  --bg-page:            #ffffff;

  --ease-out-expo:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth:        cubic-bezier(0.6, 0.01, 0.05, 0.95);
  --shadow-card:        0 4px 16px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  --shadow-card-hover:  0 12px 32px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.06);
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins','Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg-page);
  color: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

.container { max-width: 1024px; margin: 0 auto; padding: 0 16px; }

/* ============================================================
   HEADER COM BANNER + LOGO CIRCULAR
   ============================================================ */
header#topo { background: var(--bg-page); border-bottom: 1px solid #f8fafc; }

/* BANNER NO TOPO DO HEADER (acima da cover) */
.topo-banner { width: 100%; line-height: 0; background: #000; overflow: hidden; }
.topo-banner-img { width: 100%; height: auto; max-height: 220px; object-fit: cover; display: block; }
@media (max-width: 720px) { .topo-banner-img { max-height: 160px; } }
@media (max-width: 450px) { .topo-banner-img { max-height: 130px; } }

/* Cover branca discreta quando tem banner — só pra acomodar logo redondo flutuando */
header#topo .topo-banner + .cover {
  height: 80px;
  background: var(--bg-page);
}
header#topo .topo-banner + .cover .logo {
  top: -50px;
  width: 100px;
  height: 100px;
  left: calc(50% - 50px);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
header#topo .topo-banner + .cover .borda { display: none; }
header#topo .cover {
  height: 172px;
  position: relative;
  background-color: var(--site-primary);
  background-size: cover;
  background-position: center;
}
header#topo .borda {
  height: 65px;
  border-radius: 40px 40px 0 0;
  background: var(--bg-page);
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 1;
}
header#topo .cover .logo {
  position: absolute;
  top: 55px;
  left: calc(50% - 60px);
  z-index: 5;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px var(--site-primary-glow), 0 0 0 1px rgba(0,0,0,.04);
  background: #fff;
  overflow: hidden;
  transition: transform .35s var(--ease-out-expo), box-shadow .35s var(--ease-out-expo);
}
header#topo .cover .logo:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 32px var(--site-primary-glow); }
header#topo .cover .logo figure, header#topo .cover .logo img { width: 100%; height: 100%; object-fit: cover; }
header#topo .info { text-align: center; padding-top: 6px; }
header#topo .info h1 {
  font-weight: 900;
  font-size: clamp(20px, 4vw, 26px);
  color: var(--text-muted);
  letter-spacing: -.02em;
  margin-bottom: 8px;
}
/* (regras antigas dos icones removidas — use .icone-pill abaixo) */
header#topo .info .detalhe {
  display: inline-flex; align-items: center; gap: 8px;
  flex-wrap: wrap; justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
header#topo .info .detalhe b { color: var(--text-base); }
header#topo .info .entrega-gratis { color: var(--site-success); font-weight: 700; }
header#topo .info .detalhe.local {
  display: inline-flex;
  border: 1.5px solid var(--site-primary);
  color: var(--site-primary);
  padding: 4px 12px;
  border-radius: 50px;
  font-weight: 600;
}
header#topo .info .detalhe.local .km { font-weight: 700; }
header#topo .info .detalhe.local a.trocar-loc { color: inherit; text-decoration: underline; font-size: 11px; margin-left: 6px; }
header#topo .info .detalhe.rating b { color: var(--text-base); }
header#topo .info .detalhe.rating i { color: goldenrod; }
.aberto {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--site-success-light); color: var(--site-success);
  font-weight: 700; padding: 4px 12px; border-radius: 12px;
  margin: 4px auto 0;
  font-size: 13px;
}
.btn-pisca { animation: btn-pisca .9s linear infinite; }
@keyframes btn-pisca { 0% { opacity: 0; } 50% { opacity: .5; } 100% { opacity: 1; } }

/* MENU CATEGORIAS - sem position fixed para evitar flutuação bugada */
header#topo #menuCategorias {
  background: var(--site-primary);
  padding: 12px 10px;
  margin-top: 14px;
}
header#topo .categorias {
  display: flex; gap: 8px; justify-content: center; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none;
}
header#topo .categorias::-webkit-scrollbar { display: none; }
header#topo .categorias a {
  color: #fff; font-size: 15px; font-weight: 700;
  padding: 8px 22px 6px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: border-color .2s;
}
header#topo .categorias a.ativo { border-bottom-color: #fff; }

/* ICONE PILL (Instagram / Avaliações) */
header#topo .info .icones { display: flex; justify-content: center; gap: 10px; margin: 0 0 12px; flex-wrap: wrap; }
.icone-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px;
  border: 1.5px solid var(--site-primary);
  border-radius: 50px;
  color: var(--site-primary);
  font-size: 13px; line-height: 1;
  font-weight: 700;
  text-decoration: none;
  background: #fff;
  transition: background .2s, color .2s, transform .15s;
  white-space: nowrap;
}
.icone-pill svg { flex-shrink: 0; display: block; }
.icone-pill span { display: inline-block; }
.icone-pill:hover { background: var(--site-primary); color: #fff; transform: translateY(-1px); }

/* (banner-gaucho-link antigo removido — banner agora fica só no topo do header) */

/* ============================================================
   BANNER HERO GAUCHO
   ============================================================ */
.gaucho-hero {
  position: relative; width: 100%;
  min-height: clamp(220px, 30vw, 360px);
  overflow: hidden; border-radius: 16px;
  margin: 16px 0; isolation: isolate;
}
.gaucho-hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.05); transition: transform 8s linear;
}
.gaucho-hero:hover .gaucho-hero__bg { transform: scale(1.12); }
.gaucho-hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg,
    rgba(0,0,0,.55) 0%,
    rgba(0,0,0,.35) 50%,
    rgba(255,0,4,.55) 100%);
}
.gaucho-hero__content {
  position: relative; z-index: 2; min-height: inherit;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: clamp(20px, 5vw, 48px);
  color: #fff; gap: 14px;
}
.gaucho-hero__eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(10px, 1.2vw, 13px); letter-spacing: .3em;
  text-transform: uppercase; color: #fff;
  background: rgba(255,0,4,.85);
  padding: 5px 12px; border-radius: 4px;
}
.gaucho-hero__title {
  font-weight: 900;
  font-size: clamp(24px, 5vw, 48px);
  line-height: .95; letter-spacing: -.025em;
  color: #fff; text-shadow: 0 4px 24px rgba(0,0,0,.4);
  max-width: 90%;
}
.gaucho-hero__cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: var(--site-primary);
  font-weight: 800; font-size: clamp(13px, 1.4vw, 16px);
  letter-spacing: .08em; padding: 14px 28px;
  border-radius: 999px; text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transition: transform .35s var(--ease-out-expo),
              box-shadow .35s var(--ease-out-expo);
  text-decoration: none;
}
.gaucho-hero__cta:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 36px var(--site-primary-glow);
}
.gaucho-hero__cta svg { transition: transform .35s var(--ease-out-expo); }
.gaucho-hero__cta:hover svg { transform: translateX(4px); }

/* ============================================================
   ALERTS + COUNTDOWN
   ============================================================ */
.alert {
  width: 100%; font-size: 14px;
  padding: 12px 14px; margin: 10px 0;
  text-align: center; border-radius: 12px;
  outline: 2px solid var(--text-base);
  background: #fff;
}
.alert-success { outline: 2px solid var(--site-success); color: var(--site-success); }
.alert-promo-destaque {
  color: var(--site-primary);
  outline: 2px solid var(--site-primary);
  background: var(--site-primary-soft);
  font-weight: 600;
}
.alert-countdown, .alert-cta-final {
  color: var(--site-primary);
  outline: 2px solid var(--site-primary);
  background: var(--alert-promo-bg);
  padding: 18px 14px;
}
.countdown { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 8px; }
.countdown .box { padding: .6rem 0; display: flex; flex-direction: column; align-items: center; }
.countdown .box p { margin: 4px 0 0; font-size: 12px; color: var(--text-base); font-weight: 600; }
.countdown .box span {
  font-size: 1.4rem; font-weight: 700;
  background: var(--site-primary); color: #fff;
  padding: 10px 16px; border-radius: 8px;
  min-width: 60px; text-align: center;
  box-shadow: 0 4px 12px var(--site-primary-glow);
  font-variant-numeric: tabular-nums;
  transition: transform .15s ease;
}
.countdown .box span.tick { transform: scale(1.08); }
.cta-promo-link {
  display: inline-block; background: #fff; border-radius: 8px;
  padding: 8px 16px; color: var(--badge-mv-fg);
  font-weight: 700; margin-top: 10px;
  transition: transform .25s var(--ease-out-expo), box-shadow .25s;
  text-decoration: none;
}
.cta-promo-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px var(--site-primary-glow);
}

/* ============================================================
   CATEGORIA + PRODUTOS
   ============================================================ */
.categoria { margin: 24px 0; }
.categoria h2 {
  font-weight: 800; font-size: 20px;
  color: var(--text-base);
  border-bottom: 2px solid var(--site-primary);
  padding-bottom: 8px; margin-bottom: 16px;
}
.produtos {
  display: grid; gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}
.produtos .item a {
  display: flex; flex-direction: row;
  justify-content: space-between; align-items: stretch;
  padding: 14px 16px; background: #fff;
  border-radius: 16px; border: 2px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease-out-expo),
              box-shadow .35s var(--ease-out-expo),
              border-color .25s ease;
  text-decoration: none; color: inherit;
  gap: 12px;
}
.produtos .item a:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: var(--site-primary);
  box-shadow: var(--shadow-card-hover);
}
.produtos .item .texto { flex: 1; min-width: 0; }
.produtos .item .texto h3 { font-size: 15px; font-weight: 700; color: var(--text-base); margin-bottom: 4px; line-height: 1.25; }
.produtos .item .complementos { display: block; font-size: 13px; color: var(--site-success); font-weight: 700; margin-bottom: 4px; }
.produtos .item .precoPromocao { color: var(--text-muted); text-decoration: line-through; font-size: 13px; }
.produtos .item .preco { font-size: 17px; font-weight: 800; color: var(--site-success); display: inline-block; }
.produtos .item .preco-selo {
  background: var(--site-success); color: #fff;
  border-radius: 8px; padding: 2px 8px;
}
.produtos .item .preco-destaque { font-size: 20px; }
.produtos .item .fotoProduto { flex-shrink: 0; }
.produtos .item .fotoProduto figure, .produtos .item .fotoProduto img { width: 110px; height: 110px; border-radius: 12px; overflow: hidden; }
.produtos .item .fotoProduto img { object-fit: cover; transition: transform .4s var(--ease-out-expo); }
.produtos .item a:hover .fotoProduto img { transform: scale(1.05); }

.badge-mais-vendido {
  display: inline-block;
  color: var(--badge-mv-fg);
  background: var(--badge-mv-bg);
  padding: 3px 10px; margin-bottom: 4px;
  border-radius: 8px; font-size: 12px;
  font-weight: 700;
  animation: pulseBadge 2.2s var(--ease-smooth) infinite;
}
.bloco-comparativo {
  display: block;
  color: var(--bloco-comp-fg);
  background: var(--bloco-comp-bg);
  padding: 8px 10px; margin: 4px 0;
  border-radius: 8px; font-size: 12px;
  text-align: left; line-height: 1.4;
}
.estoque { margin-top: 4px; display: block; font-size: 12px; color: var(--text-muted); }
.estoque-badge { background: var(--site-primary); color: #fff; border-radius: 8px; padding: 2px 8px; font-weight: 700; }

.disponivel.pulsar {
  border: 2px solid var(--site-success) !important;
  animation: pulseCard 2s var(--ease-smooth) infinite;
}
@keyframes pulseCard {
  0%   { box-shadow: 0 0 0 0 var(--site-success-glow); }
  70%  { box-shadow: 0 0 0 14px rgba(7, 124, 34, 0); }
  100% { box-shadow: 0 0 0 0 rgba(7, 124, 34, 0); }
}
@keyframes pulseBadge { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) {
  .pulsar, .badge-mais-vendido { animation: none; }
  .produtos .item a, .gaucho-hero__bg, .gaucho-hero__cta { transition: none; }
  .gaucho-hero:hover .gaucho-hero__bg { transform: scale(1.05); }
}

/* ============================================================
   FEEDBACKS RODAPÉ
   ============================================================ */
.feedback-header {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 20px 14px;
}
.feedback-header .rating-mega { display: flex; align-items: center; gap: 12px; }
.feedback-header .nota { font-size: 36px; font-weight: 900; color: var(--site-success); line-height: 1; }
.feedback-header .estrelas-grandes i { color: goldenrod; font-size: 20px; }
.feedback-header .total { font-size: 13px; color: var(--text-muted); }

.feedback-list { grid-template-columns: 1fr; }
.feedback-card {
  display: flex; flex-direction: row; align-items: center; gap: 14px;
  padding: 14px 16px; background: #fff;
  border-radius: 14px; border: 1px solid #ebebeb;
  transition: background .25s, transform .35s var(--ease-out-expo);
}
.feedback-card:hover { background: #fafafa; transform: translateX(2px); }
.feedback-card .avaliacao { flex: 1; min-width: 0; }
.feedback-card .avaliacao h3 { font-size: 15px; color: var(--text-base); margin-bottom: 4px; }
.feedback-card .meta { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.feedback-card .nota-mini { font-weight: 700; font-size: 13px; color: var(--text-base); }
.feedback-card .estrelas i { color: goldenrod; font-size: 12px; }
.feedback-card .data { margin-left: auto; font-size: 11px; color: #888; }
.feedback-card p { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.feedback-card .fotoProduto img {
  width: 70px; height: 70px; border-radius: 8px; object-fit: cover;
  cursor: zoom-in; transition: transform .35s var(--ease-out-expo);
}
.feedback-card .fotoProduto img:hover { transform: scale(1.08); }

/* ============================================================
   FOOTER LEGAL
   ============================================================ */
.site-footer { background: #1f2937; color: #d1d5db; padding: 24px 16px 16px; margin-top: 24px; }
.site-footer-inner { max-width: 1024px; margin: 0 auto; text-align: center; }
.site-footer .footer-brand { font-weight: 800; color: #fff; font-size: 15px; margin-bottom: 4px; }
.site-footer .footer-tag { font-size: 12px; opacity: .65; margin-bottom: 12px; }
.site-footer .footer-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.site-footer .footer-link-btn {
  background: transparent; border: 1px solid rgba(255,255,255,.18);
  padding: 5px 14px; border-radius: 50px; font-size: 12px; color: #d1d5db;
  transition: all .2s;
}
.site-footer .footer-link-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.site-footer .footer-meta { font-size: 11px; opacity: .55; margin-top: 10px; line-height: 1.5; }
.site-footer .footer-empresa { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); padding: 14px 18px; border-radius: 12px; margin: 14px auto; max-width: 560px; }
.site-footer .footer-empresa-row { font-size: 12px; color: #e2e8f0; line-height: 1.55; padding: 2px 0; }
.site-footer .footer-empresa strong { color: #fff; }

/* POLICY MODAL */
.policy-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.7); backdrop-filter: blur(4px); z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; }
.policy-overlay.open { display: flex; }
.policy-card { background: #fff; max-width: 640px; width: 100%; max-height: 86vh; border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 14px 40px rgba(15,23,42,.14); }
.policy-head { padding: 18px 22px 14px; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; }
.policy-head h2 { font-size: 1.1rem; }
.policy-close { width: 32px; height: 32px; border-radius: 50%; background: #f1f5f9; color: #475569; display: flex; align-items: center; justify-content: center; }
.policy-body { padding: 20px 22px; overflow-y: auto; font-size: .9rem; line-height: 1.7; color: #334155; }
.policy-body h3 { margin: 16px 0 6px; color: var(--text-base); font-size: 1rem; }
.policy-body p { margin-bottom: 8px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
  .produtos { grid-template-columns: 1fr; }
  header#topo .info h1 { font-size: 22px; }
  .feedback-list { grid-template-columns: 1fr; }
}
@media (max-width: 450px) {
  header#topo .cover { height: 152px; }
  header#topo .cover .logo { top: 50px; width: 100px; height: 100px; left: calc(50% - 50px); }
  header#topo .borda { height: 55px; }
  header#topo .info { padding-top: 4px; }
  header#topo .info h1 { font-size: 20px; }
  header#topo .info .detalhe { font-size: 12px; gap: 6px; }
  header#topo .info .icones a.icone-pill { width: auto; height: auto; padding: 7px 16px; }
  .gaucho-hero { border-radius: 12px; margin: 12px 0; }
  .gaucho-hero__content { align-items: center; text-align: center; padding: 24px 16px; }
  .gaucho-hero__title { max-width: 100%; }
  .gaucho-hero__cta { width: 100%; justify-content: center; padding: 14px 20px; }
  .feedback-card { padding: 12px 10px; gap: 10px; }
  .feedback-card .fotoProduto img { width: 56px; height: 56px; }
  .alert-promo-destaque, .alert-countdown { padding: 12px 10px; }
  .countdown { gap: 12px; }
  .countdown .box span { font-size: 1.2rem; padding: 8px 12px; min-width: 50px; }
}
@media (max-width: 360px) {
  header#topo .info h1 { font-size: clamp(18px, 5vw, 22px); }
  header#topo .info .detalhe { flex-wrap: wrap; }
  .countdown { gap: 8px; }
  .countdown .box span { font-size: 1.05rem; padding: 6px 10px; min-width: 40px; }
}

/* SwAlert customização */
.swal2-popup { border-radius: 20px !important; padding: 24px !important; }
.swal2-title { font-family: 'Poppins', sans-serif !important; }
.swal2-confirm { border-radius: 12px !important; padding: 12px 24px !important; font-weight: 700 !important; }
