/* ============================================================================
   Conforta Colchões — HOME (premium). Carregada SOMENTE em index.html.
   Depende de tokens.css + base.css + components.css. Override sobre style.css.
   ========================================================================== */

/* ------------------------------- Página ----------------------------------- */
body { background: var(--cc-bg); color: var(--cc-text); }
.main { background: var(--cc-bg); padding-top: var(--cc-header-h); margin-top: 0; }
.container { width: 100%; max-width: var(--cc-container); margin-inline: auto; padding-inline: var(--cc-container-pad); }

/* ------------------------------- Header ----------------------------------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: var(--cc-z-header);
  height: var(--cc-header-h);
  background: rgba(16, 35, 56, 0.92);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-inner { height: var(--cc-header-h); display: flex; align-items: center; gap: var(--cc-sp-5); }
.logo { display: flex; align-items: center; gap: 0; color: #fff; flex-shrink: 0; max-width: min(220px, 48vw); background: transparent; }
.logo img { height: 52px; width: auto; max-width: 200px; object-fit: contain; object-position: left center; display: block; background: transparent; border: 0; box-shadow: none; }
.logo-text { display: none; }

.search-bar {
  flex: 1; max-width: 460px; display: flex; align-items: center; min-height: 42px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--cc-radius-pill); overflow: hidden; transition: border-color var(--cc-transition), background var(--cc-transition);
}
.search-bar:focus-within { border-color: var(--cc-sand); background: rgba(255,255,255,0.14); }
.search-bar input { flex: 1; min-width: 0; padding: 0 18px; background: transparent; color: #fff; font-size: var(--cc-fs-sm); border: 0; }
.search-bar input::placeholder { color: rgba(255,255,255,0.6); }
.search-bar button { width: 46px; height: 42px; display: grid; place-items: center; color: rgba(255,255,255,0.75); background: transparent; }
.search-bar button:hover { color: #fff; }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header-actions button, .header-actions a {
  position: relative; width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: var(--cc-radius-pill); color: rgba(255,255,255,0.85); background: transparent;
  transition: background var(--cc-transition), color var(--cc-transition);
}
.header-actions button:hover, .header-actions a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.cart-count {
  position: absolute; top: 0; right: 0; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: var(--cc-radius-pill); background: var(--cc-accent); color: #fff;
  font-size: 0.64rem; font-weight: 800; display: none; align-items: center; justify-content: center;
}
.cart-count.visible { display: flex; }
.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a { display: inline-flex; align-items: center; height: var(--cc-header-h); padding: 0 12px; color: rgba(255,255,255,0.82); font-weight: 700; font-size: var(--cc-fs-sm); }
.main-nav a:hover, .main-nav a.active { color: #fff; }
/* Parte 15: .header-whatsapp + .cc-btn--whatsapp (tw.css) */
.header-whatsapp.cc-btn {
  width: auto;
  min-width: auto;
  height: auto;
  min-height: 38px;
  padding: 0 16px;
  font-size: var(--cc-fs-sm);
  white-space: nowrap;
  box-shadow: none;
}
.mobile-menu-btn { display: none; }
.mobile-menu {
  display: none; position: fixed; top: var(--cc-header-h); left: 0; right: 0; z-index: var(--cc-z-dropdown);
  background: var(--cc-brand-800); border-bottom: 1px solid rgba(255,255,255,0.1); padding: 10px 20px 16px;
}
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 12px 6px; color: rgba(255,255,255,0.9); font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.07); }
.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu a:hover { color: #fff; }

/* ------------------------------- Hero ------------------------------------- */
.hero {
  position: relative; overflow: hidden; display: flex; align-items: center;
  min-height: min(560px, 82vh); margin-top: calc(-1 * var(--cc-header-h));
  padding: calc(var(--cc-header-h) + 40px) 0 56px; color: #fff; background: var(--cc-brand-800);
}
.hero-lcp-wrap { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--cc-brand-800); }
.hero-lcp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% center; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(102deg, rgba(16,35,56,0.95) 0%, rgba(16,35,56,0.84) 42%, rgba(16,35,56,0.45) 66%, rgba(16,35,56,0.12) 100%);
}
.hero .container { position: relative; z-index: 2; }
.hero-content { max-width: 640px; }
.hero-eyebrow { font-family: var(--cc-font-sans); font-size: var(--cc-fs-xs); font-weight: 800; letter-spacing: var(--cc-tracking-wide); text-transform: uppercase; color: var(--cc-sand); margin-bottom: 14px; }
.hero h1 { font-family: var(--cc-font-display); font-weight: 600; color: #fff; font-size: var(--cc-fs-3xl); line-height: 1.06; letter-spacing: -0.015em; margin-bottom: 16px; }
.hero-lead { font-size: var(--cc-fs-md); line-height: 1.6; color: rgba(255,255,255,0.9); max-width: 52ch; margin-bottom: 28px; }
.hero-lead strong { color: #fff; font-weight: 700; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
/* Parte 10: CTAs = .cc-btn* (tw.css). Hero escuro: primary invertido (branco). */
.hero-actions .cc-btn--primary {
  background: #fff;
  color: var(--cc-brand-700, #0f3a8e);
  box-shadow: var(--cc-shadow-lg, 0 20px 48px rgba(0, 0, 0, 0.15));
}
.hero-actions .cc-btn--primary:hover {
  background: var(--cc-sand-soft, #f3ead9);
  color: var(--cc-brand-700, #0f3a8e);
}

/* ------------------------------ Seções ------------------------------------ */
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section--warm { background: var(--cc-bg-warm); }
.section-title { font-family: var(--cc-font-display); color: var(--cc-ink); font-size: var(--cc-fs-xl); font-weight: 600; letter-spacing: var(--cc-tracking-tight); margin-bottom: 6px; }
.section-subtitle { color: var(--cc-muted); font-size: var(--cc-fs-sm); margin-bottom: 28px; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-header .section-title { margin-bottom: 0; }
.section-link { display: inline-flex; align-items: center; gap: 6px; color: var(--cc-brand-600); font-weight: 700; font-size: var(--cc-fs-sm); transition: gap var(--cc-transition); }
.section-link:hover { gap: 11px; }

/* Trust bar logo abaixo do hero (eleva o card) */
.cc-trust-wrap { margin-top: -40px; position: relative; z-index: 3; }

/* --------------------------- Produtos (grade) ----------------------------- */
/* O estilo do .product-card vive em components.css (sistema unificado). */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--cc-sp-5); }

/* ---------------------------- Por que comprar ----------------------------- */
.cc-why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--cc-sp-5); }
.cc-why-item { background: var(--cc-surface); border: 1px solid var(--cc-line); border-radius: var(--cc-radius-lg); padding: 24px 20px; box-shadow: var(--cc-shadow-xs); }
.cc-why-item__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--cc-success-tint); color: var(--cc-success-700); margin-bottom: 14px; }
.cc-why-item h3 { font-family: var(--cc-font-display); font-weight: 600; font-size: var(--cc-fs-md); color: var(--cc-ink); margin-bottom: 6px; }
.cc-why-item p { font-size: var(--cc-fs-sm); color: var(--cc-text); line-height: 1.55; }
@media (max-width: 1024px) { .cc-why-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cc-why-grid { grid-template-columns: 1fr; } }

/* --------------------------------- FAQ ------------------------------------ */
.cc-faq { max-width: 820px; margin-inline: auto; }
.cc-faq details { background: var(--cc-surface); border: 1px solid var(--cc-line); border-radius: var(--cc-radius); padding: 4px 20px; margin-bottom: 12px; box-shadow: var(--cc-shadow-xs); }
.cc-faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 700; color: var(--cc-ink); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cc-faq summary::-webkit-details-marker { display: none; }
.cc-faq summary::after { content: "+"; font-size: 1.4rem; color: var(--cc-brand-600); font-weight: 400; transition: transform var(--cc-transition); }
.cc-faq details[open] summary::after { transform: rotate(45deg); }
.cc-faq details p { padding: 0 0 18px; color: var(--cc-text); font-size: var(--cc-fs-sm); line-height: 1.6; }

/* ------------------------------ Final CTA --------------------------------- */
.cc-final-cta { text-align: center; max-width: 720px; margin-inline: auto; background: var(--cc-surface); border: 1px solid var(--cc-line); border-radius: var(--cc-radius-xl); padding: clamp(28px, 5vw, 52px); box-shadow: var(--cc-shadow-sm); }
.cc-final-cta h2 { font-family: var(--cc-font-display); font-weight: 600; font-size: var(--cc-fs-2xl); color: var(--cc-ink); margin-bottom: 10px; }
.cc-final-cta p { color: var(--cc-muted); margin-bottom: 24px; }
.cc-final-cta .hero-actions { justify-content: center; }
/* final CTA: library defaults (brand/outline) — sem override de .btn legado */

/* ------------------------------ Responsivo -------------------------------- */
@media (max-width: 1024px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
  .search-bar { display: none; }
  .main-nav { display: none; }
  .mobile-menu-btn, #mobileMenuBtn, .mobile-menu { display: none !important; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--cc-sp-4); }
  .cc-trust-wrap { margin-top: -24px; }
  .hero { min-height: auto; padding: calc(var(--cc-header-h) + 28px) 0 40px; }
}
@media (max-width: 420px) { .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; } }

/* Conforto de leitura para usuários com motion reduzido já tratado em base.css */

/* CTA do bloco simulador sobre fundo escuro */
.cc-sim .cc-btn--primary { background: #fff; color: var(--cc-brand-700); box-shadow: var(--cc-shadow); }
.cc-sim .cc-btn--primary:hover { background: var(--cc-sand-soft); }


/* ============================================================
   Polimento comercial — visual direto, sem editorial/artístico
   ============================================================ */

/* Header: manter logo img visível; garantir font sans-serif */
.logo-text { font-family: var(--cc-font-sans); font-weight: 800; letter-spacing: -0.02em; }
.logo-text small { font-family: var(--cc-font-sans); font-weight: 700; letter-spacing: 0.16em; }

/* Hero: gradiente limpo, sem imagem de fundo, sem overlay pesado */
.hero {
  min-height: min(420px, 65vh);
  padding: calc(var(--cc-header-h) + 32px) 0 44px;
  background: linear-gradient(118deg, #0f2235 0%, #163558 55%, #1a4a7a 100%);
}
.hero-lcp-wrap { display: none !important; }
.hero::before { background: none; }
.hero-content { max-width: 680px; }
.hero h1 {
  font-family: var(--cc-font-sans);
  font-size: clamp(1.75rem, 3.8vw, 2.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.hero-eyebrow { letter-spacing: 0.1em; font-size: 0.7rem; }
.hero-lead { max-width: 58ch; font-size: clamp(0.95rem, 1.5vw, 1.08rem); margin-bottom: 24px; }
.hero-actions { gap: 10px; }
.hero-actions .cc-btn {
  font-weight: 700;
  font-size: var(--cc-fs-sm);
}
/* r10 mobile: CTAs empilháveis e touch-friendly */
@media (max-width: 420px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .cc-btn {
    width: 100%;
    justify-content: center;
  }
  .cc-final-cta .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .cc-final-cta .hero-actions .cc-btn {
    width: 100%;
  }
}

/* Trust bar: discreta, sem cartão elevado */
.cc-trust-wrap { margin-top: -20px; }
.cc-trustbar {
  box-shadow: none;
  border: 1px solid var(--cc-line-soft);
  padding: 8px 4px;
  border-radius: var(--cc-radius);
}
.cc-trustbar__icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--cc-brand-tint);
  color: var(--cc-brand);
}
.cc-trustbar__label { font-size: 0.78rem; font-weight: 700; }
.cc-trustbar__sub { font-size: 0.7rem; }

/* Headings gerais: sans-serif comercial */
.section-title,
.cc-why-item h3,
.cc-final-cta h2,
.filter-header h2 { font-family: var(--cc-font-sans); font-weight: 700; }
.section-title { font-size: var(--cc-fs-lg); }
.catalog-hero h1 { font-family: var(--cc-font-sans); }
