/* ============================================
   Vitrine da Lê · estilos
   Paleta cottage / dopamine decor
   ============================================ */

@font-face {
  font-family: 'PP Editorial Old';
  src: url('../fonts/PPEditorialOld-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PP Editorial Old';
  src: url('../fonts/PPEditorialOld-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'PP Editorial Old';
  src: url('../fonts/PPEditorialOld-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PP Editorial Old';
  src: url('../fonts/PPEditorialOld-BoldItalic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  /* paleta oficial Vitrine da Lê */
  --bg: #EFEADC;            /* creme principal */
  --bg-alt: #E5DCC4;        /* creme médio */
  --bg-card: #FBF7EC;       /* creme claro (cards) */
  --ink: #3D2A12;           /* marrom profundo */
  --ink-soft: #6A4A20;      /* marrom médio */
  --line: #D8CDB3;

  --terracotta: #C97748;    /* acento quente (estrela, CTAs) */
  --terracotta-dark: #A85E33;
  --sage: #697C32;          /* verde oliva (acento frio) */
  --sage-dark: #526128;
  --pistachio: #C8D394;     /* verde pistache claro */
  --cream: #FBF3DD;         /* creme luminoso */

  --shadow-sm: 0 2px 10px rgba(61, 42, 18, .06);
  --shadow: 0 8px 24px rgba(61, 42, 18, .08);
  --shadow-lg: 0 20px 50px rgba(61, 42, 18, .14);

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 36px;

  --font-serif: 'PP Editorial Old', 'Playfair Display', Georgia, serif;
  --font-sans: 'Instrument Sans', -apple-system, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.container { width: min(1180px, 92%); margin-inline: auto; }

/* ================= NAV ================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(10px);
  background: rgba(250, 246, 240, .82);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 52px;
  color: var(--ink);
}
.brand-mark svg { width: 100%; height: 100%; }

.brand-horizontal {
  display: inline-block;
  color: var(--ink);
  line-height: 0;
}
.brand-horizontal svg {
  height: 52px;
  width: auto;
  display: block;
}
@media (max-width: 560px) {
  .brand-horizontal svg { height: 44px; }
}

.nav-links {
  display: flex; gap: 28px;
  font-weight: 500;
}
.nav-links a {
  position: relative;
  padding: 6px 2px;
  color: var(--ink-soft);
  transition: color .2s var(--ease);
}
.nav-links a:hover { color: var(--terracotta); }
.nav-links a::after {
  content: '';
  position: absolute;
  inset: auto 50% -4px 50%;
  height: 2px;
  background: var(--terracotta);
  border-radius: 2px;
  transition: inset .25s var(--ease);
}
.nav-links a:hover::after { inset: auto 0 -4px 0; }

.nav-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 44px; height: 44px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  gap: 4px; align-items: center; justify-content: center;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px; border-radius: 2px;
  background: var(--ink);
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ================= HERO ================= */
.hero {
  position: relative;
  padding-block: clamp(60px, 10vw, 110px) 60px;
  overflow: hidden;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .45;
  pointer-events: none;
  z-index: 0;
}
.blob-1 { width: 420px; height: 420px; background: var(--pistachio); top: -120px; left: -160px; animation: float 14s ease-in-out infinite; }
.blob-2 { width: 340px; height: 340px; background: var(--terracotta); top: 20px; right: -120px; opacity: .25; animation: float 16s ease-in-out infinite reverse; }
.blob-3 { width: 280px; height: 280px; background: var(--sage); bottom: -100px; left: 30%; opacity: .2; animation: float 18s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-24px) translateX(14px); }
}

.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 820px; margin-inline: auto; }
.pill {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: .88rem;
  color: var(--ink-soft);
  margin-bottom: 24px;
  letter-spacing: .02em;
}
.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.05;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-title .hl { color: var(--terracotta); font-style: italic; }
.hero-title .script {
  font-style: italic;
  color: var(--terracotta);
  display: inline-block;
}
.hero-sub {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 580px;
  margin: 0 auto 32px;
}
.hero-ctas { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-bottom: 56px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--terracotta);
  color: #fff;
  box-shadow: 0 10px 22px rgba(217, 119, 87, .3);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--terracotta-dark); box-shadow: 0 14px 28px rgba(217, 119, 87, .4); }
.btn-ghost {
  background: var(--bg-card);
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--ink); box-shadow: var(--shadow); }
.btn-sm { padding: 10px 18px; font-size: .9rem; }

.hero-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 920px;
  margin: 0 auto;
}
.mini-card {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.mini-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--terracotta); }
.mini-card h3 { font-family: var(--font-sans); font-weight: 700; margin: 0 0 4px; font-size: 1.05rem; letter-spacing: -.005em; }
.mini-card p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.mini-emoji {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--cream); font-size: 1.4rem; flex-shrink: 0;
}

/* ================= SECTIONS ================= */
.section { padding-block: clamp(60px, 9vw, 100px); position: relative; }
.section-alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.eyebrow {
  display: inline-block;
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 600;
  margin-bottom: 10px;
}
.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.6vw, 3.2rem);
  font-weight: 400;
  margin: 0 0 14px;
  letter-spacing: -0.015em;
}
.section h2 .hl { color: var(--terracotta); }
.section h2 em { font-style: italic; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

/* ============ POST SEARCH ============ */
.post-search { max-width: 480px; margin: 0 auto 32px; }
.post-search input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  font-family: inherit;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.post-search input:focus { border-color: var(--terracotta); box-shadow: 0 0 0 4px rgba(217, 119, 87, .15); }

/* ============ POSTS GRID ============ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.post-card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  border: 1px solid var(--line);
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.post-card .cover {
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
  overflow: hidden;
  position: relative;
}
.post-card .cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.post-card:hover .cover img { transform: scale(1.06); }
.post-card .cover-ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-serif);
  color: var(--ink-soft);
  background: linear-gradient(135deg, var(--cream), var(--pistachio));
  font-size: 2.6rem;
}
.post-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--terracotta); color: #fff;
  padding: 6px 12px; border-radius: 999px;
  font-weight: 700; font-size: .85rem; font-family: var(--font-serif);
  box-shadow: var(--shadow-sm);
}
.post-type {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,.9); color: var(--ink);
  padding: 4px 10px; border-radius: 999px;
  font-weight: 600; font-size: .75rem;
  backdrop-filter: blur(4px);
}
.post-card .post-body { padding: 14px 16px 16px; }
.post-card h3 {
  font-family: var(--font-serif); font-size: 1.1rem; font-weight: 400;
  margin: 0 0 4px; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card .post-meta { color: var(--ink-soft); font-size: .85rem; margin: 0; }

/* ============ CATEGORY CHIPS ============ */
.chips {
  display: flex; gap: 10px; flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}
.chip {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink-soft);
  cursor: pointer;
  font-weight: 500;
  font-size: .95rem;
  transition: all .25s var(--ease);
  font-family: inherit;
}
.chip:hover { border-color: var(--terracotta); color: var(--terracotta); transform: translateY(-1px); }
.chip.active {
  background: var(--terracotta);
  color: #fff;
  border-color: var(--terracotta);
  box-shadow: 0 6px 16px rgba(217, 119, 87, .3);
}

/* ============ PRODUCTS GRID ============ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}
.product-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.product-card .img-wrap {
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}
.product-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.product-card:hover .img-wrap img { transform: scale(1.06); }
.product-card .img-ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 2.2rem;
  background: linear-gradient(135deg, var(--pistachio), var(--cream));
  opacity: .6;
}
.product-card .cat-tag {
  position: absolute; top: 10px; left: 10px;
  background: rgba(255,255,255,.95);
  color: var(--ink);
  padding: 4px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 600;
  backdrop-filter: blur(4px);
}
.product-body {
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.product-body h3 {
  font-family: var(--font-serif); font-size: 1.02rem; font-weight: 600;
  margin: 0; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-body .buy {
  margin-top: auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--sage);
  color: #fff;
  font-weight: 600; font-size: .9rem;
  transition: background .25s var(--ease), transform .2s var(--ease);
}
.product-body .buy:hover { background: var(--sage-dark); transform: translateY(-2px); }

/* ============ EMPTY ============ */
.empty-state {
  text-align: center;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  padding: 30px 0;
}

/* ============ FOOTER ============ */
.footer {
  position: relative;
  padding-top: 80px;
  background: var(--bg-alt);
}
.footer-wave { position: absolute; top: -1px; left: 0; right: 0; height: 60px; transform: translateY(-99%); }
.footer-wave svg { width: 100%; height: 100%; display: block; }
.footer-inner {
  padding-bottom: 50px;
  display: grid;
  gap: 40px;
  text-align: center;
}
.footer-title { font-family: var(--font-serif); color: var(--terracotta); font-size: 3rem; margin: 0 0 10px; font-weight: 400; font-style: normal; letter-spacing: -.02em; }
.footer-brand p { color: var(--ink-soft); margin: 0; max-width: 480px; margin-inline: auto; }

.socials {
  display: flex; gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.social {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  color: var(--ink);
  transition: all .25s var(--ease);
  box-shadow: var(--shadow-sm);
}
.social svg { width: 20px; height: 20px; }
.social:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.social.ig:hover { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }
.social.tt:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.social.pin:hover { background: var(--sage); color: #fff; border-color: var(--sage); }

.footer-note { color: var(--ink-soft); font-size: .92rem; }
.footer-note p { margin: 4px 0; }
.footer-note .tiny { font-size: .8rem; opacity: .75; max-width: 480px; margin-inline: auto; }
.admin-hint a { font-size: .82rem; color: var(--ink-soft); border-bottom: 1px dashed var(--ink-soft); padding-bottom: 1px; }
.admin-hint a:hover { color: var(--terracotta); border-color: var(--terracotta); }

/* ============ MODAL ============ */
.modal {
  position: fixed; inset: 0;
  z-index: 100;
  display: grid; place-items: center;
  padding: 20px;
  animation: fadeIn .2s var(--ease);
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(61, 48, 40, .45);
  backdrop-filter: blur(4px);
}
.modal-panel {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--r-xl);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: pop .3s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(12px); } to { opacity: 1; transform: none; } }

.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--bg-alt);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.modal-close:hover { background: var(--terracotta); color: #fff; transform: rotate(90deg); }

.modal-head {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.modal-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(135deg, var(--cream), var(--pistachio));
}
.modal-cover img { width: 100%; height: 100%; object-fit: cover; }
.modal-info h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem; font-weight: 600;
  margin: 6px 0 10px;
  line-height: 1.25;
}
.modal-info p { color: var(--ink-soft); margin: 0; font-size: .95rem; }

.modal-list { padding: 20px 24px 24px; overflow-y: auto; }
.modal-list h4 {
  font-family: var(--font-serif);
  font-size: 1.1rem; font-weight: 600;
  margin: 0 0 14px;
}
.modal-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.modal-list li {
  display: flex; align-items: center; gap: 14px;
  padding: 12px;
  background: var(--bg-alt);
  border-radius: var(--r-md);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.modal-list li:hover { background: var(--cream); transform: translateX(4px); }
.modal-list .thumb {
  width: 54px; height: 54px; border-radius: 12px;
  background: var(--bg-card); overflow: hidden; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 1.4rem; color: var(--ink-soft);
}
.modal-list .thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-list .pname { flex: 1; font-weight: 500; font-size: .95rem; }
.modal-list .go {
  padding: 8px 16px; border-radius: 999px;
  background: var(--terracotta); color: #fff;
  font-weight: 600; font-size: .85rem;
  transition: background .2s var(--ease), transform .2s var(--ease);
  white-space: nowrap;
}
.modal-list .go:hover { background: var(--terracotta-dark); transform: translateX(2px); }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: 20px;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    animation: slideDown .25s var(--ease);
  }
  @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

  .hero-cards { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; width: 100%; align-items: stretch; }
  .hero-ctas .btn { justify-content: center; }

  .modal-head { grid-template-columns: 1fr; }
  .modal-cover { max-width: 240px; margin: 0 auto; }
  .modal-info { text-align: center; }
}

@media (max-width: 560px) {
  .container { width: 94%; }
  .posts-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .post-card .post-body { padding: 10px 12px 12px; }
  .post-card h3 { font-size: .95rem; }
  .product-body h3 { font-size: .92rem; }
  .modal-panel { border-radius: var(--r-lg); max-height: 92vh; }
  .modal-head, .modal-list { padding: 18px; }
  .footer-title { font-size: 2rem; }
}

/* ============ FOCUS STATES ============ */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 2px;
  border-radius: 6px;
}
.btn:focus-visible { outline-offset: 4px; }

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============ TOAST ============ */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 500;
  font-size: .95rem;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  transition: transform .35s var(--ease);
}
.toast.show { transform: translateX(-50%) translateY(0); }
