/* ============ Lar de Maria — PWA (mobile-first) ============ */
:root {
  --bordo: #732626;
  --bordo-escuro: #5A1D1D;
  --creme: #F1EDE4;
  --creme-escuro: #E9E2D2;
  --dourado: #E6D29A;
  --dourado-escuro: #B89B4E;
  --texto: #3A2A2A;
  --texto-suave: #6B5B4E;
  --branco: #FFFFFF;
  --sombra: 0 4px 14px rgba(58, 42, 42, .12);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: "Lora", serif;
  background: var(--creme);
  color: var(--texto);
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
}
#app { min-height: 100dvh; display: flex; flex-direction: column; }
button { font-family: "Poppins", sans-serif; cursor: pointer; border: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---- loading ---- */
.loading-screen { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 60dvh; }
.spinner {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid var(--creme-escuro); border-top-color: var(--bordo);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- header ---- */
.header {
  background: var(--bordo);
  color: var(--creme);
  padding: max(14px, env(safe-area-inset-top)) 18px 14px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
  border-bottom: 2px solid var(--dourado);
}
.header .brand { display: flex; align-items: center; gap: 10px; }
.header .brand .logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--creme); object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  color: var(--bordo); font-family: "Poppins", sans-serif; font-weight: 700;
}
.header .brand h1 { font-family: "Poppins", sans-serif; font-size: 17px; font-weight: 600; letter-spacing: .2px; }
.header .bell { background: none; color: var(--dourado); font-size: 20px; }

/* ---- conteúdo ---- */
.content { flex: 1; padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); }

/* ---- carrossel de banners ---- */
.banners { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 14px; margin-bottom: 18px; scrollbar-width: none; }
.banners::-webkit-scrollbar { display: none; }
.banner {
  flex: 0 0 100%; scroll-snap-align: start;
  border-radius: 14px; overflow: hidden; box-shadow: var(--sombra);
  aspect-ratio: 21/9; background: var(--bordo-escuro);
}
.banner img { width: 100%; height: 100%; object-fit: cover; }

/* ---- grid de produtos ---- */
.section-title {
  font-family: "Poppins", sans-serif; font-size: 12px; font-weight: 500;
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--dourado-escuro);
  margin: 6px 2px 12px;
}
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card {
  background: var(--branco); border-radius: 14px; overflow: hidden;
  box-shadow: var(--sombra); position: relative; text-align: left;
  padding: 0; display: flex; flex-direction: column;
}
.card .cover {
  aspect-ratio: 1/1; background: linear-gradient(160deg, var(--bordo), var(--bordo-escuro));
  display: flex; align-items: center; justify-content: center; position: relative;
}
.card .cover img { width: 100%; height: 100%; object-fit: cover; }
.card .cover .cover-title {
  color: var(--dourado); font-family: "Lora", serif; font-style: italic;
  font-size: 14px; text-align: center; padding: 12px; line-height: 1.45;
}
.card .name {
  font-family: "Poppins", sans-serif; font-size: 12.5px; font-weight: 500;
  color: var(--texto); padding: 10px 12px 12px; line-height: 1.4;
}
.card.locked .cover::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(58, 42, 42, .55); backdrop-filter: blur(1.5px);
}
.card.locked .lock {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%; z-index: 2;
  background: var(--dourado); color: var(--bordo);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.badge-free {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: var(--dourado); color: var(--bordo);
  font-family: "Poppins", sans-serif; font-size: 9.5px; font-weight: 600;
  letter-spacing: .8px; padding: 3px 8px; border-radius: 20px;
}
.badge-oferta {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: linear-gradient(180deg, #FFD700, #FFC107); color: var(--bordo-escuro);
  font-family: "Poppins", sans-serif; font-size: 9.5px; font-weight: 700;
  letter-spacing: .8px; padding: 3px 9px; border-radius: 20px;
  box-shadow: 0 2px 8px rgba(255, 193, 7, .5);
}

/* ---- card com oferta (bloqueado + preço) ---- */
.price-box { display: flex; align-items: baseline; gap: 7px; padding: 0 12px 8px; flex-wrap: wrap; }
.price-box .p-de {
  font-family: "Poppins", sans-serif; font-size: 11.5px;
  color: var(--texto-suave); text-decoration: line-through;
}
.price-box .p-por {
  font-family: "Poppins", sans-serif; font-size: 16.5px; font-weight: 700; color: var(--bordo);
}
.price-box.big { justify-content: center; padding: 2px 0 0; }
.price-box.big .p-de { font-size: 14px; }
.price-box.big .p-por { font-size: 24px; }
.price-sub {
  font-family: "Poppins", sans-serif; font-size: 11px; color: var(--texto-suave);
  text-align: center; margin: 2px 0 12px;
}
.unlock-strip {
  margin: 0 10px 12px; padding: 8px 6px; border-radius: 9px; text-align: center;
  background: linear-gradient(180deg, #FFD700, #FFC107); color: var(--bordo-escuro);
  font-family: "Poppins", sans-serif; font-size: 11.5px; font-weight: 700; letter-spacing: .3px;
  box-shadow: 0 3px 10px rgba(255, 193, 7, .35);
}

/* ---- página de produto ---- */
.product-hero {
  border-radius: 14px; overflow: hidden; box-shadow: var(--sombra);
  margin-bottom: 16px; background: linear-gradient(160deg, var(--bordo), var(--bordo-escuro));
  aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center;
}
.product-hero img { width: 100%; height: 100%; object-fit: cover; }
.product-hero .cover-title { color: var(--dourado); font-style: italic; font-size: 18px; text-align: center; padding: 16px; }
.product-title { font-family: "Poppins", sans-serif; font-size: 19px; font-weight: 700; color: var(--bordo); line-height: 1.3; margin-bottom: 8px; }
.product-desc { font-size: 14.5px; line-height: 1.65; color: var(--texto-suave); margin-bottom: 18px; }
.gold-rule { width: 44px; height: 2px; background: var(--dourado-escuro); border: none; margin: 0 0 14px; }

.module {
  background: var(--branco); border-radius: 12px; box-shadow: var(--sombra);
  padding: 14px 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
}
.module .m-ico {
  width: 40px; height: 40px; border-radius: 10px; flex: 0 0 40px;
  background: var(--creme-escuro); color: var(--bordo);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.module .m-title { font-family: "Poppins", sans-serif; font-size: 13.5px; font-weight: 500; }
.module .m-type { font-size: 11.5px; color: var(--texto-suave); }
.module-body {
  background: var(--branco); border-radius: 12px; box-shadow: var(--sombra);
  padding: 16px; margin: -4px 0 12px; font-size: 14.5px; line-height: 1.7;
}
.module-body iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 8px; }

.cta {
  display: block; width: 100%; text-align: center;
  background: linear-gradient(180deg, #FFD700, #FFC107);
  color: #5A1D1D; font-weight: 700; font-size: 15px; letter-spacing: .3px;
  padding: 15px; border-radius: 12px; box-shadow: 0 4px 14px rgba(255, 193, 7, .4);
  font-family: "Poppins", sans-serif;
}
.cta.secondary { background: var(--bordo); color: var(--creme); box-shadow: var(--sombra); }
.locked-box {
  background: var(--branco); border: 1.5px solid var(--dourado);
  border-radius: 14px; padding: 20px 16px; text-align: center; margin-bottom: 14px;
}
.locked-box .big-lock { font-size: 34px; margin-bottom: 8px; }
.locked-box p { font-size: 14px; color: var(--texto-suave); line-height: 1.6; margin-bottom: 14px; }

/* ---- login ---- */
.login-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 28px 24px calc(40px + env(safe-area-inset-bottom)); min-height: 80dvh; }
.login-logo { text-align: center; margin-bottom: 26px; }
.login-logo .mark {
  width: 74px; height: 74px; margin: 0 auto 14px; border-radius: 20px;
  background: var(--bordo); border: 2px solid var(--dourado);
  display: flex; align-items: center; justify-content: center;
  color: var(--dourado); font-size: 30px;
}
.login-logo h1 { font-family: "Poppins", sans-serif; color: var(--bordo); font-size: 24px; }
.login-logo p { font-style: italic; color: var(--texto-suave); font-size: 14px; margin-top: 4px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-family: "Poppins", sans-serif; font-size: 12px; font-weight: 500; color: var(--texto-suave); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 15px 16px; border-radius: 12px;
  border: 1.5px solid var(--creme-escuro); background: var(--branco);
  font-size: 16px; font-family: "Poppins", sans-serif; color: var(--texto);
  outline: none; text-align: center; letter-spacing: .5px;
}
.field input:focus { border-color: var(--dourado-escuro); }
.hint { font-size: 12.5px; color: var(--texto-suave); text-align: center; margin-top: 12px; line-height: 1.6; }
.error-msg { color: #A33; font-size: 13px; text-align: center; margin-top: 10px; min-height: 18px; }

/* ---- perfil / listas ---- */
.list-item {
  background: var(--branco); border-radius: 12px; box-shadow: var(--sombra);
  padding: 15px 16px; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: "Poppins", sans-serif; font-size: 13.5px; width: 100%; text-align: left;
}
.list-item .chev { color: var(--dourado-escuro); }
.profile-email {
  background: var(--bordo); color: var(--creme); border-radius: 14px;
  padding: 18px 16px; margin-bottom: 16px; text-align: center;
}
.profile-email .em { font-family: "Poppins", sans-serif; font-size: 14px; font-weight: 500; word-break: break-all; }
.profile-email .lbl { font-size: 11px; color: var(--dourado); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; font-family: "Poppins", sans-serif; }

/* ---- feed ---- */
.feed-post, .c-post {
  background: var(--branco); border-radius: 14px; box-shadow: var(--sombra);
  padding: 14px 16px 16px; margin-bottom: 12px;
}
.fp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fp-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 38px;
  background: var(--bordo); color: var(--dourado);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.fp-avatar:not(.equipe) { background: var(--creme-escuro); color: var(--bordo); }
.fp-avatar.equipe { background: var(--bordo); color: var(--dourado); }
.fp-author {
  font-family: "Poppins", sans-serif; font-size: 13.5px; font-weight: 600;
  color: var(--texto); display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.fp-date { font-size: 11.5px; color: var(--texto-suave); }
.fp-text { font-size: 14.5px; line-height: 1.65; color: var(--texto); white-space: pre-line; }
.fp-img { border-radius: 10px; margin-bottom: 10px; width: 100%; }
.badge-equipe, .badge-pendente {
  font-family: "Poppins", sans-serif; font-size: 8.5px; font-weight: 600;
  letter-spacing: .8px; padding: 2px 7px; border-radius: 20px;
}
.badge-equipe { background: var(--dourado); color: var(--bordo); }
.badge-pendente { background: var(--creme-escuro); color: var(--texto-suave); }
.c-post.pendente { opacity: .72; border: 1.5px dashed var(--dourado-escuro); box-shadow: none; }

/* ---- comunidade: formulário ---- */
.c-form {
  background: var(--branco); border-radius: 14px; box-shadow: var(--sombra);
  padding: 14px 16px 16px; margin-bottom: 16px;
}
.c-form input, .c-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--creme-escuro); background: var(--creme);
  font-size: 14.5px; font-family: "Poppins", sans-serif; color: var(--texto);
  outline: none; margin-bottom: 10px; resize: vertical;
}
.c-form textarea { font-family: "Lora", serif; line-height: 1.55; }
.c-form input:focus, .c-form textarea:focus { border-color: var(--dourado-escuro); }
.c-form .cta { padding: 12px; font-size: 13.5px; }
.c-form .error-msg { min-height: 0; margin-top: 6px; }

/* ---- placeholder (feed/comunidade fase 3) ---- */
.soon { text-align: center; padding: 60px 30px; color: var(--texto-suave); }
.soon .ico { font-size: 40px; margin-bottom: 12px; }
.soon h2 { font-family: "Poppins", sans-serif; color: var(--bordo); font-size: 17px; margin-bottom: 8px; }
.soon p { font-size: 14px; line-height: 1.6; }

/* ---- bottom nav ---- */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 30;
  background: var(--branco); border-top: 1px solid var(--creme-escuro);
  display: flex; justify-content: space-around;
  padding: 8px 0 max(10px, env(safe-area-inset-bottom));
}
.bottom-nav button {
  background: none; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; color: var(--texto-suave); font-weight: 500; min-width: 64px;
}
.bottom-nav button .n-ico { font-size: 20px; line-height: 1; }
.bottom-nav button.active { color: var(--bordo); }
.bottom-nav button.active .n-ico { transform: scale(1.08); }

/* ---- WhatsApp flutuante ---- */
.wa-fab {
  position: fixed; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom));
  width: 54px; height: 54px; border-radius: 50%; z-index: 25;
  background: #25D366; color: #fff; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 211, 102, .45);
}

/* ---- back ---- */
.back-btn {
  background: none; color: var(--bordo); font-family: "Poppins", sans-serif;
  font-size: 13.5px; font-weight: 500; margin-bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px;
}
