/* assets/css/style.css */

/* =========================
   FONTES
   ========================= */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Montserrat:wght@300;400;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

/* =========================
   VARS
   ========================= */
:root {
  --primary: #d4a373;
  --secondary: #faedcd;
  --text: #4a4a4a;
  --dark: #2d3436;
  --white: #ffffff;
  --success: #27ae60;

  --ok-bg: #e8f5e9;
  --ok-tx: #1b5e20;

  --info-bg: #e3f2fd;
  --info-tx: #0d47a1;

  --warn-bg: #fff3e0;
  --warn-tx: #e65100;

  --shadow-soft: 0 8px 18px rgba(0,0,0,0.08);
}

/* =========================
   BASE (compatível com antigo)
   ========================= */
*{ box-sizing: border-box; }

html, body{
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  color: var(--text);
  background-color: #fdfbf7;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* Melhor toque em Android/iOS */
a, button, input, textarea { -webkit-tap-highlight-color: transparent; }
.btn-gift { touch-action: manipulation; }

/* =========================
   HERO
   ========================= */
header.hero {
  background: linear-gradient(rgba(0,0,0,0.32), rgba(0,0,0,0.52)), url('../img/capa.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: scroll; /* default (melhor em Android fraco) */
  height: 85vh;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--white);
  padding: 20px;
  position: relative;
}

/* Parallax só no desktop forte */
@media (min-width: 901px) {
  header.hero { background-attachment: fixed; }
}

header.hero h1 {
  font-family: 'Great Vibes', cursive;
  font-size: 5.5rem;
  margin: 0;
  line-height: 1.1;
  text-shadow: 2px 2px 15px rgba(0,0,0,0.6);
}

header.hero p.date {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  letter-spacing: 4px;
  margin-top: 15px;
  text-transform: uppercase;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
  background: rgba(0,0,0,0.22);
  padding: 6px 16px;
  border-radius: 999px;
}

/* CTA no HERO */
.hero-actions{
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-hero{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .4px;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.18);
  min-width: 220px;
}

.btn-hero-ghost{
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.35);
}

/* blur só se suportar */
@supports ((backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px))){
  .btn-hero-ghost{
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
}

.btn-hero:active{ transform: translateY(1px); filter: brightness(.98); }

/* Seta rolagem */
.scroll-down {
  position: absolute;
  bottom: 26px;
  color: white;
  font-size: 2rem;
  text-decoration: none;
  opacity: 0.85;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
  40% {transform: translateY(-10px);}
  60% {transform: translateY(-5px);}
}

@media (prefers-reduced-motion: reduce) {
  .scroll-down { animation: none; }
  .card { transition: none; }
  .card-img img { transition: none; }
}

/* =========================
   INTRO
   ========================= */
section.intro {
  padding: 70px 20px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

section.intro h2 {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  font-size: 2.5rem;
  margin-bottom: 25px;
  line-height: 1.2;
}

section.intro p {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 15px;
}

.verse {
  font-style: italic;
  font-family: 'Playfair Display', serif;
  color: #999;
  margin-top: 40px;
  display: block;
  font-size: 0.95rem;
  border-top: 1px solid #eee;
  padding-top: 20px;
  width: 60%;
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   TRUSTBAR
   ========================= */
.trustbar{
  background: #fff;
  border-top: 1px solid #f3f3f3;
  border-bottom: 1px solid #f3f3f3;
  padding: 18px 20px;
}

.trustbar-inner{
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@supports not (display:grid){
  .trustbar-inner{ display:flex; flex-wrap:wrap; }
  .trustitem{ flex:1 1 220px; }
}

.trustitem{
  background: #faf7f1;
  border: 1px solid rgba(212,163,115,.28);
  border-radius: 14px;
  padding: 12px 12px;
  text-align: center;
  color: var(--dark);
  box-shadow: 0 6px 14px rgba(0,0,0,.04);
}

.trustitem b{ display:block; font-size: .95rem; }
.trustitem small{ display:block; font-size: .78rem; color:#666; margin-top: 2px; }

/* =========================
   LISTA DE PRESENTES
   ========================= */
section.gifts {
  padding: 50px 20px 100px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  padding: 10px 0;
}

@supports not (display:grid){
  .grid{ display:flex; flex-wrap:wrap; }
  .grid .card{ flex:1 1 280px; }
}

/* =========================
   CARD
   ========================= */
.card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #f9f9f9;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Hover só em desktop */
@media (hover: hover) {
  .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  }
  .card:hover .card-img img {
    transform: scale(1.08);
  }
}

.card-img {
  height: 220px;
  overflow: hidden;
  position: relative;
  background: #eee;
  z-index: 1;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-body {
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.card-cat {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #aaa;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--dark);
  margin: 0 0 15px;
  line-height: 1.3;

  /* evita quebrar layout com nomes longos */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price {
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 15px;
}

.btn-gift {
  background-color: var(--primary);
  color: white;
  text-decoration: none;
  padding: 14px 0;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.25s ease, transform 0.12s ease;
  display: block;
  width: 100%;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(212, 163, 115, 0.3);
  border: none;
  cursor: pointer;
}

.btn-gift:hover { background-color: #b08d55; }
.btn-gift:active { transform: translateY(1px); }

/* =========================
   BADGE PARCELAMENTO
   ========================= */
.badge-parcela{
  position:absolute;
  top: 12px;
  left: 12px;
  display:inline-flex;
  flex-direction:column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1.15;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,0.65);
  max-width: calc(100% - 24px);
  z-index: 5;
}

.badge-parcela small{
  font-weight: 700;
  font-size: 0.72rem;
  opacity: 0.95;
}

.badge-3x{ background: var(--ok-bg); color: var(--ok-tx); }
.badge-2x{ background: var(--info-bg); color: var(--info-tx); }
.badge-off{ background: var(--warn-bg); color: var(--warn-tx); }

/* =========================
   OFERTA LIVRE
   ========================= */
.card-oferta{
  border: 2px solid var(--primary);
  background: #fffbf0;
}

.oferta-icon{
  font-size: 3rem;
  margin-bottom: 10px;
}

.oferta-desc{
  font-size: 0.92rem;
  color: #666;
  margin-bottom: 10px;
}

.oferta-inputwrap{
  position: relative;
  margin-bottom: 12px;
}

.oferta-currency{
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  font-weight: 800;
}

.oferta-input{
  width: 100%;
  padding: 12px 12px 12px 45px;
  font-size: 1.3rem;
  border: 1px solid rgba(212, 163, 115, 0.9);
  border-radius: 999px;
  text-align: center;
  color: var(--dark);
  font-weight: 800;
  background: #fff;
  outline: none;
}

.oferta-input:focus{
  box-shadow: 0 0 0 4px rgba(212, 163, 115, 0.18);
  border-color: var(--primary);
}

.oferta-hint{
  margin-top: 10px;
  font-size: 0.90rem;
  color: #444;
  background: #fff;
  border: 1px solid rgba(212,163,115,0.35);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
  line-height: 1.25;
}

.oferta-hint b{ color: #111; }

/* =========================
   FOOTER
   ========================= */
footer {
  background: var(--dark);
  color: #b6b6b6;
  text-align: center;
  padding: 40px 20px;
  font-size: 0.9rem;
}

/* =========================
   ACESSIBILIDADE (FOCO)
   ========================= */
a:focus-visible, button:focus-visible, input:focus-visible{
  outline: 3px solid rgba(212,163,115,.45);
  outline-offset: 2px;
  border-radius: 10px;
}

/* =========================
   MEDIA QUERIES
   ========================= */
@media (max-width: 900px) {
  header.hero h1 { font-size: 4rem; }
}

/* Celulares */
@media (max-width: 600px) {

  /* iPhone Safari às vezes estranha vh: deixa mais estável */
  header.hero{
    height: auto;
    min-height: 520px;
    padding-top: 28px;
    padding-bottom: 64px;
    background-position: center top;
  }

  header.hero h1 {
    font-size: 3.2rem;
  }

  header.hero p.date {
    font-size: 1rem;
    letter-spacing: 2px;
  }

  .hero-actions{ margin-top: 16px; }
  .btn-hero{ min-width: 240px; }

  section.intro {
    padding: 50px 20px;
  }

  section.intro h2 {
    font-size: 1.8rem;
  }

  .verse {
    width: 90%;
  }

  .grid {
    gap: 20px;
    grid-template-columns: 1fr;
  }

  .card-img {
    height: 200px;
  }

  .card-body {
    padding: 15px;
  }

  .badge-parcela{
    top: 10px;
    left: 10px;
    padding: 9px 11px;
    border-radius: 13px;
  }

  .scroll-down{ bottom: 18px; }
}

/* Trustbar em coluna no mobile */
@media (max-width: 700px){
  .trustbar-inner{ grid-template-columns: 1fr; }
}

/* =========================
   MOBILE CTA FIXA
   - NÃO mostra no topo
   - Só aparece depois que rolar (JS adiciona .is-visible)
   ========================= */
.mobile-cta{
  display:none; /* some por padrão */
}

@media (max-width: 600px){
  .mobile-cta{
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    gap: 10px;
    z-index: 999;
  }

  .mobile-cta.is-visible{
    display: flex;
  }

  .mobile-cta a{
    flex: 1;
    padding: 13px 12px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    text-align: center;
    letter-spacing: .3px;
    box-shadow: 0 10px 22px rgba(0,0,0,.18);
  }

  .mobile-cta .cta-lista{
    background: var(--primary);
    color: #fff;
  }

  .mobile-cta .cta-oferta{
    background: #ffffff;
    color: var(--dark);
    border: 1px solid rgba(0,0,0,.08);
  }

  /* só adiciona espaço quando a barra aparecer */
  body{ padding-bottom: 0; }
  body.has-mobile-cta{ padding-bottom: 96px; }
}
