/* Marargila — base inspirada na estrutura do tema Astra. Seção por seção. */
@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:ital,wght@0,300;0,400;0,500;0,600;1,400;1,500;1,600&display=swap");

:root {
  --font-heading: "Inter Tight", sans-serif;
  --font-body: "Inter Tight", sans-serif;
  --c-primary: var(--color-primary);       /* #F08245 */
  --c-bg: #fcf7f1;
  --c-text: #3e3b51;
  --c-light: #fcf7f1;
  --ease-out: cubic-bezier(0, 0, 0.3, 1);  /* mesma curva do Astra */
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 3rem);
  --section-y: 100px; /* respiro vertical entre seções */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-weight: 300; font-size: 16px; line-height: 1.5; color: var(--c-text); background: var(--c-bg); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Botão (quadrado, uppercase — como no Astra) */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 32px; min-height: 48px; font: 400 12.6px/1 var(--font-body); letter-spacing: .02em; text-transform: uppercase; color: var(--c-light); background: var(--c-primary); border: 0; cursor: pointer; transition: background-color .25s, color .25s; }
.btn:hover { background: var(--color-brand-brown); }

/* Animações de entrada (scroll-trigger). JS adiciona .is-in */
@keyframes slideIn { from { opacity: 0; transform: translateY(2rem); } to { opacity: 1; transform: none; } }
@keyframes zoomOut { from { transform: scale(1.1); } to { transform: scale(1); } }
.js .reveal { opacity: 0; }
.js .is-in .reveal, .js .reveal.is-in { animation: slideIn .75s var(--ease-out) forwards; animation-delay: var(--d, 0s); }

/* 1. Barra de anúncio */
/* Faixa rolante (estilo Guday): grupo repetido por JS, animação de -50% em loop */
@keyframes marquee { to { transform: translateX(-50%); } }
.announce { position: relative; z-index: 31; height: 44px; overflow: hidden; background: var(--c-primary); color: #fff; display: flex; align-items: center; }
.announce__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.announce:hover .announce__track { animation-play-state: paused; }
.announce__group { display: flex; align-items: center; flex-shrink: 0; }
.announce__item { padding-inline: 1.5rem; white-space: nowrap; font: 500 12.6px/1 var(--font-body); letter-spacing: .02em; }
.announce__item--lead { font: 600 15px/1 var(--font-body); letter-spacing: .02em; text-transform: uppercase; }
.announce__star { width: 16px; height: 16px; flex-shrink: 0; fill: #fff; }

/* 2. Header (sólido, porque os banners são claros) */
/* Estados: transparente no topo → sólido no hover/scroll/dropdown; esconde ao descer, volta ao subir */
.header { --hdr-top: 44px; position: fixed; inset: var(--hdr-top) 0 auto; z-index: 30; background: rgba(252, 247, 241, .08); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--color-brand-brown); border-bottom: 1px solid rgba(118, 66, 45, .14); transition: transform .3s ease-in-out, background-color .25s ease-in-out, border-color .25s; }
.header:hover, .header.is-solid, .header.is-open { background: var(--c-bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
.header.is-hidden { transform: translateY(-110%); }
.header-overlay { position: fixed; inset: 0; z-index: 29; background: rgba(40, 20, 10, .1); opacity: 0; pointer-events: none; transition: opacity .3s; }
.header-overlay.is-on { opacity: 1; }
/* Header separado do banner: o carrossel começa abaixo dele */
.header { background: var(--c-bg); border-bottom-color: rgba(118, 66, 45, .14); }
.carousel { margin: 105px var(--gutter) 0; border-radius: 28px; isolation: isolate; }
.header__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 88px; padding-inline: var(--gutter); }
.header__logo img { width: 92px; height: auto; }
.nav ul { display: flex; gap: clamp(1.25rem, 2.2vw, 2.25rem); }
.nav a { font: 500 14px/1 var(--font-body); letter-spacing: .02em; color: var(--color-brand-orange); transition: color .2s; }
.nav a { position: relative; display: block; padding-block: 34px; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 28px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out); }
.nav a:hover, .nav a.is-active { color: var(--color-brand-brown); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.header__tools { display: flex; align-items: center; justify-content: flex-end; gap: 0; }
.icon-btn { background: none; border: 0; color: inherit; width: 48px; height: 44px; padding: 10px 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
.icon-btn svg { width: 24px; height: 24px; }
.cart-count { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--c-primary); color: #fff; font: 500 10px/16px var(--font-body); text-align: center; }

/* Mega dropdown */
.header.is-open { background: #fff; }
.mega { position: absolute; inset: 100% 0 auto; background: #fff; border-top: 1px solid rgba(118, 66, 45, .12); clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .35s var(--ease-out), visibility 0s .35s; }
.header.is-open .mega { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .35s var(--ease-out); }
.mega__inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; width: min(100% - 2 * var(--gutter), 960px); margin-inline: auto; padding: 1.75rem 0 2rem; }
.mega__card { display: block; opacity: 0; }
.header.is-open .mega__card { animation: slideIn .6s var(--ease-out) forwards; animation-delay: calc(var(--i) * .075s + .05s); }
.mega__media { aspect-ratio: 1; background: #fff; overflow: hidden; display: grid; place-items: center; }
.mega__media img { width: 100%; height: 100%; object-fit: contain; transition: transform .6s var(--ease-out); }
.mega__card:hover .mega__media img { transform: scale(1.06); }
.mega__name { display: block; margin-top: .8rem; font: 400 14px/1.3 var(--font-body); color: var(--c-text); text-align: center; }
.mega__cta { display: block; margin-top: .2rem; text-align: center; font: 500 11px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--color-brand-orange); }

/* 3. Carrossel de banners */
.carousel { position: relative; overflow: hidden; background: #e9e4de; }
.carousel__track { display: flex; transition: transform .6s var(--ease-out); will-change: transform; }
.carousel__slide { flex: 0 0 100%; display: block; overflow: hidden; }
.carousel__slide img { width: 100%; height: auto; aspect-ratio: 1920 / 667; object-fit: cover; }
.carousel__slide.is-active img { animation: zoomOut .85s var(--ease-out) both; }
.carousel__arrow { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(252, 247, 241, .9); color: var(--color-brand-brown); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .25s, background-color .25s, color .25s; }
.carousel:hover .carousel__arrow, .carousel__arrow:focus-visible { opacity: 1; }
.carousel__arrow:hover { background: var(--c-primary); color: #fff; }
.carousel__arrow--prev { left: var(--gutter); }
.carousel__arrow--next { right: var(--gutter); }
.carousel__arrow svg { width: 20px; height: 20px; }
.carousel__dots { position: absolute; inset: auto 0 18px; z-index: 2; display: flex; justify-content: center; gap: 10px; }
.carousel__dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 5px; background: rgba(118, 66, 45, .35); cursor: pointer; transition: background-color .25s, width .25s var(--ease-out); }
.carousel__dot[aria-current="true"] { width: 28px; background: var(--c-primary); }

@media (max-width: 900px) {
  .header__row { grid-template-columns: auto 1fr; height: 68px; }
  .carousel { margin: 73px 12px 0; border-radius: 20px; }
  .announce { height: 40px; }
  .announce__item { padding-inline: 1rem; font-size: 12px; }
  .announce__item--lead { font-size: 13px; }
  .header__row { height: 60px; padding-inline: 16px; gap: 8px; }
  .header__logo img { width: 64px; }
  .icon-btn { width: 40px; height: 40px; padding: 8px; }
  .icon-btn svg { width: 22px; height: 22px; }
  .cart-count { top: 2px; right: 2px; }
  .header__tools { margin-right: -8px; }
  .nav, .mega { display: none; }
  .carousel__arrow { display: none; }
  /* Slide 1 usa a arte vertical 3:4; os demais (sem arte mobile) cortam para caber */
  .carousel__slide { display: flex; }
  .carousel__slide img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: 30% center; }
  .carousel__slide picture { display: block; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; animation: none !important; }
  .announce__track { animation: none; }
  .carousel__track, .header, .mega { transition: none; }
  .header.is-open .mega__card { animation: none; opacity: 1; }
  .carousel__slide.is-active img { animation: none; }
}
