/* ============================================================
   Achadinhos da Tia Rosa — página pública
   Identidade: menta suave + rosa floral + toques dourados
   (paleta do avatar da Tia Rosa — nada de laranja de marketplace)
   ============================================================ */

:root {
  --paper: #EFF6EF;        /* papel com leve tom de menta */
  --mint-band: #DEEFE3;    /* faixa menta do topo */
  --mint: #BCE3CA;         /* menta do avatar */
  --card: #FFFFFF;
  --ink: #2E3A32;          /* verde-carvão para textos */
  --ink-soft: #5C6E62;
  --ink-faint: #8CA093;
  --rosa: #BE5364;         /* rosa das flores da blusa — ação/CTA */
  --rosa-dark: #A64353;
  --rosa-soft: #F9E8EA;
  --green: #2F6B4F;        /* verde profundo — preços */
  --gold: #D9A63E;         /* dourado das joias — estrelas, coroas, cupons */
  --gold-soft: #F8EFDA;
  --line: #D6E7DA;
  --shadow: 0 2px 10px rgba(46, 74, 58, .06), 0 12px 32px rgba(46, 74, 58, .09);
  --shadow-lift: 0 4px 14px rgba(46, 74, 58, .1), 0 20px 44px rgba(46, 74, 58, .15);
  --radius: 20px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", -apple-system, sans-serif;
  --font-script: "Caveat", cursive;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* pontilhado sutil de papel artesanal + halos de menta */
  background-image:
    radial-gradient(rgba(47, 107, 79, .055) 1px, transparent 1.3px),
    radial-gradient(900px 460px at 88% -120px, rgba(188, 227, 202, .55), transparent 60%),
    radial-gradient(760px 420px at -8% 40px, rgba(249, 232, 234, .6), transparent 55%);
  background-size: 22px 22px, auto, auto;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------- topo */

.topbar { padding: 16px 0 10px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -.01em;
  text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.logo-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; object-position: top;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--mint), 0 3px 8px rgba(46, 74, 58, .18);
}

.socials { display: flex; gap: 8px; }
.socials a {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line);
  text-decoration: none; font-size: 1rem;
  transition: transform .18s ease, box-shadow .18s ease;
}
.socials a:hover { transform: translateY(-2px) rotate(-4deg); box-shadow: var(--shadow); }

/* ---------------------------------------------------------- herói */

.hero {
  position: relative;
  background: var(--mint-band);
  padding: 34px 0 42px;
  margin-bottom: 6px;
}
/* borda inferior em conchinhas — toque artesanal */
.hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 14px;
  background: radial-gradient(circle at 50% 100%, var(--paper) 0 7px, transparent 7.8px);
  background-size: 22px 14px;
}

.hero-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px;
}
.hero-text { max-width: 600px; }

.hero-eyebrow {
  font-family: var(--font-script);
  font-size: 1.35rem; font-weight: 600;
  color: var(--rosa);
  margin-bottom: 6px;
  transform: rotate(-1.2deg);
  transform-origin: left;
  animation: rise .6s ease both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.4vw, 3.3rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.02em;
  animation: rise .6s .08s ease both;
}
.hero-title em { font-style: italic; font-weight: 700; color: var(--rosa); }

.hero-sub {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 480px;
  animation: rise .6s .16s ease both;
}

.hero-avatar { flex-shrink: 0; text-align: center; animation: rise .6s .2s ease both; }
.avatar-ring {
  width: 168px; height: 168px; border-radius: 50%;
  overflow: hidden;
  border: 5px solid #fff;
  box-shadow: 0 0 0 3px var(--gold), 0 14px 30px rgba(46, 74, 58, .22);
  margin: 0 auto;
  transform: rotate(2deg);
}
.avatar-ring img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.avatar-note {
  font-family: var(--font-script);
  font-size: 1.3rem; font-weight: 500;
  color: var(--ink-soft);
  margin-top: 10px;
  transform: rotate(-2deg);
}
.avatar-note b { color: var(--rosa); font-weight: 700; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------- navegação fixa */

.navwrap {
  position: sticky; top: 0; z-index: 50;
  background: rgba(239, 246, 239, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.navbar { display: flex; align-items: center; gap: 12px; }

.chips {
  display: flex; gap: 8px; overflow-x: auto; flex: 1;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  font-size: .85rem; font-weight: 600;
  padding: 7px 14px; border-radius: 999px;
  transition: all .16s ease;
  white-space: nowrap;
}
.chip:hover { border-color: var(--rosa); color: var(--rosa); }
.chip.is-active { background: var(--green); border-color: var(--green); color: #fff; }

.searchbox {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--ink-faint);
  transition: border-color .16s ease;
}
.searchbox:focus-within { border-color: var(--rosa); }
.searchbox input {
  border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: .9rem; color: var(--ink);
  width: 130px;
}

/* ---------------------------------------------------------- seções */

.section { padding: 38px 0 6px; }

.section-head { margin-bottom: 18px; }
.eyebrow {
  font-family: var(--font-script);
  font-size: 1.15rem; font-weight: 600;
  color: var(--ink-faint);
  margin-bottom: 2px;
  transform: rotate(-.8deg);
  transform-origin: left;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 600; letter-spacing: -.015em;
}

/* ---------------------------------------------------------- grades */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 18px;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(300px, 78vw);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }

/* "Mais clicados" — cartões compactos na horizontal, sem roubar a cena */
.top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 440px));
  gap: 14px;
}

.top-grid .card {
  display: grid;
  grid-template-columns: 112px 1fr;
  grid-template-rows: auto 1fr;
}
.top-grid .top-ribbon { grid-column: 1 / -1; font-size: .74rem; padding: 7px 12px; }
.top-grid .card-media {
  grid-row: 2; aspect-ratio: auto; height: 100%; min-height: 148px;
}
.top-grid .card-body { grid-row: 2; padding: 11px 13px; gap: 5px; }
.top-grid .desc, .top-grid .coupon-inline { display: none; }
.top-grid .card-title { font-size: .86rem; min-height: 0; }
.top-grid .price { font-size: 1.12rem; }
.top-grid .price-old, .top-grid .price-range { font-size: .74rem; }
.top-grid .cta { padding: 8px 11px; font-size: .8rem; border-radius: 10px; }
.top-grid .play-badge { width: 36px; height: 36px; font-size: .85rem; }

/* ---------------------------------------------------------- card de produto */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--mint); }

/* moldura dourada nos "mais clicados" */
.card.is-top {
  border: 2px solid var(--gold);
  box-shadow: 0 4px 18px rgba(217, 166, 62, .22), var(--shadow);
}

.top-ribbon {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(100deg, #F1CE7E, var(--gold));
  color: #5A430E;
  font-size: .8rem; font-weight: 800;
  padding: 8px 14px;
}

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--mint-band);
  cursor: zoom-in;
  overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.card:hover .card-media img { transform: scale(1.045); }

.card-media video {
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none; /* o clique abre o lightbox */
}

.play-badge {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(46, 58, 50, .62);
  color: #fff; font-size: 1.05rem;
  display: grid; place-items: center;
  padding-left: 4px;
  backdrop-filter: blur(3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
  pointer-events: none;
  transition: transform .2s ease, background .2s ease;
}
.card:hover .play-badge { transform: translate(-50%, -50%) scale(1.12); background: var(--rosa); }

.media-ph {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 3.4rem;
}
.media-ph span { filter: drop-shadow(0 6px 14px rgba(46, 74, 58, .18)); }

.badge-discount {
  position: absolute; top: 10px; left: 10px;
  background: var(--rosa); color: #fff;
  font-size: .8rem; font-weight: 800;
  padding: 4px 10px; border-radius: 999px;
  box-shadow: 0 3px 10px rgba(166, 67, 83, .4);
}

.badge-media-count {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(46, 58, 50, .62); color: #fff;
  font-size: .72rem; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  backdrop-filter: blur(4px);
}

.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; gap: 8px; }

.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.chip-marketplace {
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--mint-band);
  padding: 3px 8px; border-radius: 6px;
}

.card-title {
  font-size: .98rem; font-weight: 700; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}

.rating { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-soft); }
.stars { position: relative; font-size: .85rem; letter-spacing: 1px; color: #D8E4D9; line-height: 1; }
.stars::before { content: "★★★★★"; }
.stars-fill {
  position: absolute; inset: 0; overflow: hidden; color: var(--gold); white-space: nowrap;
}
.stars-fill::before { content: "★★★★★"; letter-spacing: 1px; }
.rating b { color: var(--ink); }

.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price {
  font-family: var(--font-display);
  font-size: 1.42rem; font-weight: 700; letter-spacing: -.01em;
  color: var(--green);
}
.price-old { font-size: .85rem; color: var(--ink-faint); text-decoration: line-through; }
.price-range { font-size: .8rem; color: var(--ink-soft); }

.desc { font-size: .86rem; color: var(--ink-soft); }
.desc p {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.desc.is-open p { display: block; -webkit-line-clamp: unset; }
.desc-toggle {
  border: 0; background: none; padding: 2px 0 0;
  font-size: .8rem; font-weight: 700; color: var(--rosa);
}
.desc-toggle:hover { text-decoration: underline; }

.coupon-inline {
  display: flex; align-items: center; gap: 8px;
  background: var(--gold-soft);
  border: 1px dashed var(--gold);
  border-radius: 10px;
  font-size: .78rem; padding: 6px 10px;
}
.coupon-inline code { font-weight: 800; letter-spacing: .04em; }
.coupon-inline button {
  margin-left: auto; border: 0; background: var(--gold); color: #5A430E;
  font-size: .7rem; font-weight: 800; padding: 3px 9px; border-radius: 6px;
}

.cta {
  margin-top: auto;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--rosa); color: #fff;
  border: 0; border-radius: 12px;
  font-size: .95rem; font-weight: 800;
  padding: 12px 16px;
  text-decoration: none;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
  box-shadow: 0 4px 14px rgba(190, 83, 100, .3);
}
.cta:hover { background: var(--rosa-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(190, 83, 100, .42); }
.cta:active { transform: translateY(0); }
.cta .arrow { transition: transform .16s ease; }
.cta:hover .arrow { transform: translateX(3px); }

/* ---------------------------------------------------------- cupons */

.coupon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.coupon-card {
  position: relative;
  background: var(--card);
  border: 1.5px dashed var(--gold);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow);
}
/* recorte de "ticket" nas laterais */
.coupon-card::before, .coupon-card::after {
  content: ""; position: absolute; top: 50%; width: 18px; height: 18px;
  background: var(--paper); border: 1.5px dashed var(--gold);
  border-radius: 50%; transform: translateY(-50%);
}
.coupon-card::before { left: -10px; clip-path: inset(0 0 0 50%); }
.coupon-card::after { right: -10px; clip-path: inset(0 50% 0 0); }

.coupon-top { display: flex; align-items: center; gap: 8px; }
.coupon-code {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 700; letter-spacing: .02em;
}
.coupon-copy {
  margin-left: auto;
  border: 0; border-radius: 8px;
  background: var(--gold); color: #5A430E;
  font-size: .75rem; font-weight: 800; padding: 6px 12px;
  transition: transform .15s ease;
}
.coupon-copy:hover { transform: scale(1.05); }
.coupon-desc { font-size: .85rem; color: var(--ink-soft); }
.coupon-foot { display: flex; align-items: center; gap: 8px; font-size: .72rem; color: var(--ink-faint); }
.coupon-foot a { color: var(--rosa); font-weight: 700; }

/* ---------------------------------------------------------- rodapé */

.footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: var(--mint-band);
  padding: 36px 0 44px;
  text-align: center;
}
.footer-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; object-position: top;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--gold), 0 6px 14px rgba(46, 74, 58, .2);
  margin: 0 auto 12px;
}
.footer-logo { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; }
.footer-note { font-size: .84rem; color: var(--ink-soft); max-width: 560px; margin: 0 auto 16px; }
.footer .socials { justify-content: center; }

.empty { text-align: center; color: var(--ink-soft); padding: 30px 0; }

/* ---------------------------------------------------------- lightbox */

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(24, 32, 27, .92);
  display: flex; align-items: center; justify-content: center;
}
.lb-content { max-width: min(92vw, 760px); max-height: 82vh; }
.lb-content img, .lb-content video, .lb-content iframe {
  max-width: min(92vw, 760px); max-height: 82vh;
  border-radius: 12px;
  object-fit: contain;
}
.lb-content iframe { width: min(92vw, 760px); aspect-ratio: 16/9; border: 0; background: #000; }
.lb-close {
  position: absolute; top: 16px; right: 18px;
  background: rgba(255,255,255,.12); color: #fff;
  border: 0; border-radius: 50%; width: 40px; height: 40px; font-size: 1rem;
}
.lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); color: #fff;
  border: 0; border-radius: 50%; width: 44px; height: 44px; font-size: 1.6rem; line-height: 1;
}
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-arrow:hover, .lb-close:hover { background: rgba(255,255,255,.25); }
.lb-dots { position: absolute; bottom: 20px; display: flex; gap: 6px; }
.lb-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); }
.lb-dots i.on { background: #fff; }

/* ---------------------------------------------------------- voltar ao topo */

.back-top {
  position: fixed; bottom: 22px; right: 22px;
  width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--green); color: #fff;
  font-size: 1.2rem; font-weight: 700;
  box-shadow: var(--shadow-lift);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 90;
}
.back-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top:hover { background: var(--rosa); }

/* ---------------------------------------------------------- toast */

.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translate(-50%, 80px);
  background: var(--ink); color: #fff;
  font-size: .88rem; font-weight: 600;
  padding: 11px 20px; border-radius: 999px;
  box-shadow: var(--shadow-lift);
  opacity: 0; pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
  z-index: 120;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------------------------------------------------------- responsivo */

@media (max-width: 820px) {
  .avatar-ring { width: 132px; height: 132px; }
}

@media (max-width: 640px) {
  .hero { padding: 24px 0 34px; }
  .hero-inner { flex-direction: column-reverse; text-align: center; gap: 16px; }
  .hero-text { max-width: 100%; }
  .hero-eyebrow { transform: none; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .avatar-ring { width: 116px; height: 116px; }
  .avatar-note { font-size: 1.15rem; margin-top: 6px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .top-grid { grid-template-columns: 1fr; }
  .card-body { padding: 11px 12px 13px; }
  .card-title { font-size: .88rem; }
  .price { font-size: 1.22rem; }
  .cta { font-size: .86rem; padding: 10px 12px; }
  .searchbox input { width: 92px; }
  .section { padding: 30px 0 4px; }
}

@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
}
