/* Magia dos Presentes — mobile-first styles. No build step. */

:root {
  --blue-900: #142A75;
  --blue-700: #1F3FAE;
  --blue-500: #3D5FD6;
  --blue-200: #C9D6FF;
  --blue-50: #EEF3FF;
  --white: #FFFFFF;
  --ink: #1B1F2E;
  --muted: #4A5170;

  /* Accents: brand blue by default, overridden by seasonal themes. */
  --accent: var(--blue-700);
  --accent-strong: var(--blue-900);
  --accent-soft: var(--blue-200);
  --on-dark-accent: var(--blue-200);

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 16px;
  --shadow: 0 6px 24px rgba(20, 42, 117, .10);
  --shadow-hover: 0 12px 32px rgba(20, 42, 117, .18);
  --header-h: 68px;
  --gutter: 16px;
}

/* Seasonal theme: Christmas. Remove `theme-natal` from <body> to disable. */
.theme-natal {
  --red: #C62828;
  --gold: #C9A227;
  --accent: var(--red);
  --accent-strong: #A51F1F;
  --accent-soft: #F7DADA;
  --on-dark-accent: var(--gold);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-700); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; color: var(--blue-900); margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 8vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 5.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul { padding: 0; margin: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--blue-900); color: var(--white); padding: 10px 16px; border-radius: 10px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; }
.section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 32px; }
.eyebrow {
  font-weight: 800; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .5em;
}
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font-weight: 800; font-size: 1rem; text-decoration: none; line-height: 1.2;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-primary { background: var(--blue-700); color: var(--white); }
.btn-primary:hover { background: var(--blue-900); }
.btn-outline { background: var(--white); color: var(--blue-700); border-color: var(--blue-700); }
.btn-outline:hover { background: var(--blue-50); }
.theme-natal .btn-natal { background: var(--red); }
.theme-natal .btn-natal:hover { background: var(--accent-strong); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--blue-50);
}
.theme-natal .site-header::before {
  content: ""; display: block; height: 4px;
  background: repeating-linear-gradient(90deg, var(--red) 0 24px, var(--white) 24px 32px, var(--gold) 32px 56px, var(--white) 56px 64px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--blue-900); font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border: 0; border-radius: 12px; background: var(--blue-50); cursor: pointer;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  display: block; width: 22px; height: 2.5px; border-radius: 2px; background: var(--blue-900);
  transition: transform .25s ease, background-color .25s ease;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav ul { display: flex; flex-direction: column; }
.site-nav a {
  display: block; padding: 14px 4px; text-decoration: none; font-weight: 700; color: var(--blue-900);
  border-bottom: 1px solid var(--blue-50);
}
.site-nav a:hover { color: var(--accent); }

/* Mobile menu: only collapsed when JS is available (html.js). */
@media (max-width: 899.98px) {
  .js .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white); box-shadow: var(--shadow);
    padding: 4px var(--gutter) 12px;
    display: none;
  }
  .js .site-nav.is-open { display: block; }
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .header-inner { flex-wrap: wrap; }
  html:not(.js) .site-nav { width: 100%; }
  html:not(.js) .site-nav ul { flex-direction: row; flex-wrap: wrap; gap: 4px 16px; }
  html:not(.js) .site-nav a { border: 0; padding: 6px 0; }
}

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--blue-50), var(--white)); padding: 40px 0 56px; }
.hero-inner { display: grid; gap: 32px; align-items: center; }
.hero-text { text-align: center; }
.hero-logo { margin: 0 auto 16px; }
.tagline { font-family: var(--font-head); font-size: clamp(1.2rem, 4vw, 1.5rem); color: var(--blue-700); font-weight: 600; }
.lead { color: var(--muted); max-width: 36em; margin-inline: auto; }
.hero .actions { justify-content: center; margin-top: 24px; }
.hero-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: .9rem;
  background: var(--white); box-shadow: var(--shadow); margin-bottom: 16px;
}
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.status.is-open { color: #146C2E; }
.status.is-closed { color: #9E1F1F; }
.status[hidden] { display: none; }
/* With JS the badge is filled right after load: reserve its space so the hero doesn't shift (CLS). */
.status { min-height: calc(.9rem * 1.6 + 12px); }
.js .status[hidden] { display: inline-flex; visibility: hidden; }

/* ---------- Natal ---------- */
.natal { background: var(--blue-900); color: var(--white); }
.natal h2 { color: var(--white); }
.natal .eyebrow { color: var(--on-dark-accent); }
.natal-inner { display: grid; gap: 32px; align-items: center; }
.natal-media img { border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0, 0, 0, .3); width: 100%; }
.checklist { margin: 0 0 24px; display: grid; gap: 8px; }
.checklist li { position: relative; padding-left: 30px; font-weight: 600; }
.checklist li::before {
  content: "✦"; position: absolute; left: 0; top: 0; color: var(--on-dark-accent);
}
.natal .btn-primary { background: var(--white); color: var(--blue-900); }
.theme-natal .natal .btn-natal { background: var(--red); color: var(--white); }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 20px; }
.card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; transition: transform .25s ease, box-shadow .25s ease;
  border-top: 4px solid var(--accent-soft);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-top-color: var(--accent); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { padding: 18px 20px 22px; }
.card-body p { color: var(--muted); margin: 0; }

.contact { padding: 28px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact p { color: var(--muted); flex: 1; }
.contact-icon {
  display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--blue-50); color: var(--blue-700); margin-bottom: 12px; font-size: 1.3rem;
}

/* ---------- Beleza ---------- */
.beleza { background: var(--blue-50); }
.beleza-inner { display: grid; gap: 32px; align-items: center; }
.beleza-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 480px; margin: 0 auto; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tags li { background: var(--white); color: var(--blue-900); border: 1px solid var(--blue-200); padding: 4px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem; }

/* ---------- Product showcase ("Temos opções para…") ---------- */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 32px; }
html:not(.js) .chips { display: none; } /* no JS: show every card, hide the filters */
.chip {
  min-height: 44px; padding: 8px 18px; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: .95rem;
  color: var(--blue-900); background: var(--white); border: 2px solid var(--blue-200);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.chip:hover { border-color: var(--blue-700); }
.chip[aria-pressed="true"] { background: var(--blue-700); border-color: var(--blue-700); color: var(--white); }

.products { grid-template-columns: 1fr; gap: 24px; }
.product { display: flex; flex-direction: column; }
.product[hidden] { display: none; }
.product img { aspect-ratio: 4 / 3; object-fit: cover; background: var(--blue-50); }
.product .card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 24px; }
.product h3 { margin-bottom: .35em; }
.product .card-body p:not(.product-cat) { margin-bottom: 20px; }
.product-cat { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-700); margin: 0 0 .4em; }
.product .btn { margin-top: auto; align-self: flex-start; }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: .95rem; }

/* Two contact cards: centered and balanced */
.cards-contact { max-width: 420px; margin: 0 auto; }

.not-found { min-height: 100vh; display: grid; align-items: center; }
.not-found .hero-logo { margin: 0 auto 16px; }

/* ---------- Sobre ---------- */
.sobre { text-align: center; }
.sobre p { font-size: 1.125rem; color: var(--muted); }

/* ---------- Visite ---------- */
.visite { background: var(--blue-50); }
.visite-inner { display: grid; gap: 32px; }
.info-line { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.info-line .icon { color: var(--blue-700); margin-top: .2em; }
.hours { width: 100%; border-collapse: collapse; margin: 8px 0 24px; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hours th, .hours td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--blue-50); }
.hours th { font-weight: 700; color: var(--blue-900); }
.hours td { text-align: right; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--blue-200); min-height: 320px; }
.map iframe { display: block; width: 100%; height: 100%; min-height: 320px; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-900); color: var(--white); padding: 48px 0 96px; }
.site-footer a { color: var(--white); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; }
.site-footer a:hover { text-decoration: underline; }
.footer-inner { display: grid; gap: 24px; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand p { margin: 0; color: var(--blue-200); }
.footer-brand .footer-name { color: var(--white); font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; }
.footer-links { display: grid; gap: 4px; }
.copy { color: var(--blue-200); font-size: .9rem; margin: 0; border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 20px; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: #1A7F3C; color: var(--white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}
.wa-float .icon { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.08); }

/* ---------- Entrance animation (only when JS + motion allowed) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Larger screens ---------- */
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .cards-cat { grid-template-columns: repeat(2, 1fr); }
  .cards-contact { grid-template-columns: repeat(2, 1fr); max-width: 760px; gap: 24px; }
  .products { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
  .copy { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  .section { padding: 96px 0; }
  .nav-toggle { display: none; }
  .site-nav ul { flex-direction: row; gap: 4px; }
  .site-nav a { border: 0; padding: 8px 12px; border-radius: 999px; }
  .site-nav a:hover { background: var(--blue-50); }
  .hero { padding: 72px 0 96px; }
  .hero-inner { grid-template-columns: 1.05fr 1fr; gap: 56px; }
  .hero-text { text-align: left; }
  .hero-logo { margin: 0 0 16px; }
  .lead { margin-inline: 0; }
  .hero .actions { justify-content: flex-start; }
  .natal-inner, .beleza-inner { grid-template-columns: 1fr 1fr; gap: 56px; }
  .visite-inner { grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: stretch; }
  .cards-cat { grid-template-columns: repeat(6, 1fr); }
  .cards-cat .card { grid-column: span 2; }
  .cards-cat .card:nth-child(4) { grid-column: 2 / span 2; }
}
@media (min-width: 600px) and (max-width: 899.98px) {
  /* 5 category cards in 2 columns: center the last one instead of leaving it alone on the left. */
  .cards-cat .card:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 10px); }
}
@media (min-width: 600px) and (max-width: 959.98px) {
  .chip { padding: 6px 12px; font-size: .875rem; } /* keeps all 7 chips on one row on tablets */
}
@media (min-width: 960px) {
  .products { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .cards-cat { grid-template-columns: repeat(5, 1fr); }
  .cards-cat .card, .cards-cat .card:nth-child(4) { grid-column: auto; }
}
@media (min-width: 1280px) {
  .produtos .container { max-width: 1320px; }
  .products { grid-template-columns: repeat(4, 1fr); }
}
