/* ===== Tokens ===== */
:root {
  --cream: #f7ecdc;
  --cream-deep: #e9d8bf;
  --paper: #fffdf9;
  --ink: #2a2522;
  --ink-soft: #5d544d;
  --teal: #4fb0b3;
  --teal-dark: #3a9194;
  --petrol: #2e5e66;
  --purple: #6b3e7c;
  --line: #e6d7c2;
  --radius: 10px;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }

/* ===== Botões ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .7rem 1.4rem;
  border: 2px solid transparent; border-radius: 999px; font: 700 .95rem var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s; }
.btn--sm { padding: .45rem 1rem; font-size: .85rem; }
.btn--block { display: flex; width: 100%; margin-top: .6rem; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--teal { background: var(--teal); color: #fff; }
.btn--teal:hover { background: var(--teal-dark); }
.btn--petrol { background: var(--petrol); color: #fff; }
.btn--petrol:hover { background: #234a51; }
.btn--outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }

/* ===== Navbar ===== */
.navbar { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.navbar__top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding-block: .75rem; }
.logo { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 800; font-size: 1.5rem; }
.logo__mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ink); color: var(--cream); font-size: 1.1rem; }
.search { display: flex; gap: .5rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .3rem .3rem 1.1rem; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; outline: none; }
.search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgb(79 176 179 / .25); }
.search--compact { max-width: 460px; justify-self: center; width: 100%; }
.navbar__links { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.5rem; padding-bottom: .6rem; font-size: .92rem; font-weight: 600; }
.navbar__links a { text-decoration: none; padding: .2rem 0; border-bottom: 2px solid transparent; }
.navbar__links a:hover, .navbar__links a[aria-current="page"] { border-color: var(--teal); }

/* ===== Mensagens ===== */
.messages { width: min(1120px, 100% - 2rem); margin: 1rem auto 0; }
.message { margin: 0 0 .5rem; padding: .75rem 1rem; border-radius: var(--radius); background: var(--cream); }
.message--error { background: #fde8e6; color: #8a2a20; }

/* ===== Hero ===== */
.hero { position: relative; min-height: min(62vh, 520px); display: grid; place-items: center; color: #fff; text-align: center;
  background: linear-gradient(rgb(30 20 12 / .55), rgb(30 20 12 / .55)), var(--hero-img) center / cover no-repeat, #4a3524; }
.hero__inner { display: grid; justify-items: center; gap: 1.5rem; padding-block: 3rem; }
.hero__title { font-size: clamp(2rem, 5.5vw, 3.6rem); max-width: 18ch; text-wrap: balance; margin: 0; text-shadow: 0 2px 16px rgb(0 0 0 / .4); }
.search--hero { width: min(560px, 100%); padding: .4rem .4rem .4rem 1.3rem; color: var(--ink); }

/* ===== Seções ===== */
.section { padding-block: 3rem; }
.section__title { text-align: center; font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 1.75rem; }
.section__title--left { text-align: left; }
.lead { color: var(--ink-soft); margin: -.5rem 0 1.5rem; max-width: 60ch; }
.empty { text-align: center; padding: 2.5rem 1rem; display: grid; gap: 1rem; justify-items: center; color: var(--ink-soft); }
.cta { background: var(--cream-deep); padding-block: 3.5rem; }
.cta__inner { text-align: center; display: grid; gap: .75rem; justify-items: center; }
.cta h2 { margin: 0; font-size: 1.8rem; }
.cta p { margin: 0 0 .5rem; max-width: 46ch; }

/* ===== Categorias circulares ===== */
.cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem 2.5rem; }
.cat { display: grid; justify-items: center; gap: .7rem; text-decoration: none; width: 148px; }
.cat__circle { position: relative; display: grid; place-items: center; width: 132px; height: 132px; border-radius: 50%; overflow: hidden;
  background: var(--cream); box-shadow: 0 0 0 0 var(--teal); transition: box-shadow .25s, transform .25s; }
.cat__circle img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.cat__initial { font-size: 2.6rem; font-weight: 800; color: var(--purple); }
.cat__veil { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(42 37 34 / .62); color: #fff;
  font-size: .85rem; font-weight: 700; opacity: 0; transition: opacity .25s; }
.cat__name { font-weight: 700; text-align: center; }
.cat:hover .cat__circle, .cat:focus-visible .cat__circle { box-shadow: 0 0 0 5px var(--teal); transform: translateY(-4px); }
.cat:hover img, .cat:focus-visible img { transform: scale(1.1); }
.cat:hover .cat__veil, .cat:focus-visible .cat__veil { opacity: 1; }

/* ===== Cards de produto ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.5rem; }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card__media { display: block; aspect-ratio: 1; background: var(--cream); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__placeholder { display: grid; place-items: center; width: 100%; height: 100%; min-height: 200px; font-size: 3.5rem; font-weight: 800; color: var(--purple); background: var(--cream); }
.card__body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem; flex: 1; }
.badge { margin: 0; font-size: .75rem; font-weight: 700; color: var(--teal-dark); }
.badge a { text-decoration: none; }
.card__title { font-size: 1rem; margin: 0; }
.card__title a { text-decoration: none; }
.card__title a:hover { text-decoration: underline; }
.card__text { margin: 0; font-size: .88rem; color: var(--ink-soft); }
.card__price { margin: .25rem 0 .5rem; font-weight: 800; font-size: 1.1rem; }
.card__price--lg { font-size: 1.6rem; }
.card__actions { display: flex; gap: .5rem; margin-top: auto; }
.card__actions .btn { flex: 1; }
.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem; }

/* ===== Detalhe do produto ===== */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.product__media { border-radius: var(--radius); overflow: hidden; background: var(--cream); }
.product__media img { width: 100%; }
.product__info h1 { font-size: 2rem; }
.prose { max-width: 62ch; margin-bottom: 1.5rem; }
.prose p { margin: 0 0 .8em; }
.order { display: grid; gap: 1rem; padding: 1.25rem; background: var(--cream); border-radius: var(--radius); }
.field { display: grid; gap: .3rem; }
.field label { font-weight: 700; font-size: .9rem; }
.req { font-weight: 400; color: var(--ink-soft); }
.field input, .field select { width: 100%; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.field input:focus, .field select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgb(79 176 179 / .25); }
.form-error { margin: .25rem 0 0; font-size: .85rem; color: #a3291d; }

/* ===== Sobre ===== */
.about { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 460px; }
.about__text { background: var(--purple); color: #fff; display: flex; align-items: center; justify-content: flex-end; padding: 3rem 2rem; }
.about__copy { max-width: 520px; }
.about__copy h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.about__copy p { margin: 0 0 1rem; }
.about__photo { background: var(--teal); display: grid; place-items: center; padding: 2rem; }
.about__photo img { width: min(320px, 100%); height: auto; aspect-ratio: 320 / 380; object-fit: cover; border-radius: 18px;
  background: var(--cream-deep); box-shadow: 0 18px 40px rgb(0 0 0 / .25); }
.pill { display: inline-block; padding: .45rem 1rem; border-radius: 999px; background: rgb(255 255 255 / .16); font-weight: 700; font-size: .9rem; }
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.value { padding: 1.5rem; background: var(--cream); border-radius: var(--radius); border-top: 5px solid var(--teal); }
.value:nth-child(2) { border-top-color: var(--purple); }
.value:nth-child(3) { border-top-color: var(--ink); }
.value h3 { font-size: 1.15rem; }
.value p { margin: 0; color: var(--ink-soft); }

/* ===== Login ===== */
.page-login { background: var(--cream); }
.login { width: min(380px, 100% - 2rem); margin: 8vh auto; padding: 2rem; background: var(--paper); border-radius: 14px; box-shadow: 0 10px 30px rgb(42 37 34 / .1); }
.login h1 { color: var(--petrol); margin-bottom: .25rem; }
.login__sub { margin: 0 0 1.25rem; color: var(--ink-soft); font-size: .92rem; }
.login form { display: grid; gap: 1rem; }
.login__or { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0 .5rem; color: var(--ink-soft); font-size: .85rem; }
.login__or::before, .login__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login__back { text-align: center; font-size: .88rem; margin: 1rem 0 0; }

/* ===== Rodapé ===== */
.footer { background: var(--ink); color: #eadfce; padding-top: 3rem; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 2rem; }
.footer__brand { font-size: 1.4rem; font-weight: 800; margin: 0 0 .4rem; color: #fff; }
.footer__title { font-size: 1rem; color: #fff; }
.footer li + li { margin-top: .35rem; }
.pay { display: flex; flex-wrap: wrap; gap: .5rem; }
.pay li { margin: 0 !important; padding: .35rem .85rem; border: 1px solid rgb(255 255 255 / .35); border-radius: 999px; font-weight: 700; font-size: .85rem; color: #fff; }
.footer__legal { margin: 2.5rem auto 0; padding-block: 1.25rem; border-top: 1px solid rgb(255 255 255 / .15); font-size: .85rem; }

/* ===== Responsivo ===== */
@media (max-width: 820px) {
  .navbar__top { grid-template-columns: 1fr auto; }
  .search--compact { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .product { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about__text { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
