:root {
  --wine: #800020;
  --wine-600: #6a001b;
  --wine-50: #fbeef1;
  --gold: #f7b512;
  --gold-600: #dc9f06;
  --gold-50: #fff7e0;
  --whats: #1fa855;
  --whats-600: #178a45;
  --ink: #1f1a17;
  --ink-2: #5c534d;
  --line: #ece5dc;
  --bg: #ffffff;
  --bg-alt: #faf6f0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(60, 20, 10, .25);
  --shadow-sm: 0 2px 10px -4px rgba(60, 20, 10, .18);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.ico { width: 1.15em; height: 1.15em; flex: none; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .75em 1.2em; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--lg { padding: .95em 1.5em; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--gold); color: #2a1a00; box-shadow: 0 6px 18px -8px rgba(247, 181, 18, .9); }
.btn--primary:hover { background: var(--gold-600); }
.btn--whats { background: var(--whats); color: #fff; }
.btn--whats:hover { background: var(--whats-600); }
.btn--ghost { background: rgba(255,255,255,.12); color: #fff; border: 1.5px solid rgba(255,255,255,.55); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255,255,255,.22); }
.btn--soft { background: var(--bg-alt); color: var(--ink); border: 1px solid var(--line); }
.btn--soft:hover { background: #f3ece2; }
.link-btn { background: none; border: 0; color: var(--wine); font-weight: 600; cursor: pointer; padding: 4px; }
.link-btn:hover { text-decoration: underline; }

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .75rem;
}
.eyebrow--dark { color: var(--wine); }
.badge {
  display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .45em;
  border-radius: 999px; background: var(--wine); color: #fff; font-size: .8rem; font-weight: 700; vertical-align: middle;
}
.badge--light { background: #fff; color: var(--wine); }

/* ---------- Topbar / Header ---------- */
.topbar { background: var(--wine); color: #fff; font-size: .85rem; }
.topbar__inner { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.status__dot { width: 9px; height: 9px; border-radius: 50%; background: #aaa; box-shadow: 0 0 0 3px rgba(255,255,255,.15); }
.status.is-open .status__dot { background: #3ee07e; animation: pulse 2s infinite; }
.status.is-closed .status__dot { background: #ff8a8a; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(62, 224, 126, .15); } }

.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.header.is-scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand img { height: 56px; width: auto; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 999px; color: var(--ink-2); transition: .15s; }
.nav a:hover, .nav a.is-active { color: var(--wine); background: var(--wine-50); }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: var(--bg-alt); border-radius: 12px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.menu-btn span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(60, 0, 15, .92) 0%, rgba(90, 0, 22, .78) 45%, rgba(0,0,0,.25) 100%),
    url("https://www.mercadomontfer.com.br/mercado.png") center/cover no-repeat;
}
.hero__inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; padding: 96px 0 104px; }
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 800; }
.hero h1 span { color: var(--gold); }
.hero__text p { font-size: 1.15rem; max-width: 34em; color: rgba(255,255,255,.88); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__cards { display: grid; gap: 14px; }
.info-card {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius);
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(10px);
  text-decoration: none; color: #fff; transition: background .15s, transform .15s; cursor: pointer;
}
a.info-card:hover { background: rgba(255,255,255,.18); transform: translateX(4px); }
.info-card__ico { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--gold); font-size: 1.4rem; }
.info-card strong { display: block; font-size: 1.05rem; }
.info-card span { color: rgba(255,255,255,.8); font-size: .92rem; }

/* ---------- Seções ---------- */
.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section__head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; }
.section__head p { color: var(--ink-2); font-size: 1.05rem; }

/* Departamentos */
.depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.dept {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  font-weight: 700; transition: .2s; text-align: center;
}
.dept:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); }
.dept__ico { width: 64px; height: 64px; display: grid; place-items: center; font-size: 2rem; border-radius: 50%; background: var(--gold-50); transition: .2s; }
.dept:hover .dept__ico { background: var(--gold); }
.dept small { color: var(--ink-2); font-weight: 500; }

/* ---------- Lista de compras ---------- */
.shop { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
.shop__catalog { min-width: 0; }
.shop__tools { position: sticky; top: calc(var(--header-h) + 8px); z-index: 5; background: var(--bg-alt); padding: 4px 0 14px; }
.search {
  display: flex; align-items: center; gap: 10px; padding: 0 16px; background: #fff; border: 1.5px solid var(--line);
  border-radius: 999px; transition: border-color .15s;
}
.search:focus-within { border-color: var(--gold); }
.search .ico { color: var(--ink-2); }
.search input { flex: 1; border: 0; outline: 0; padding: 14px 0; background: transparent; min-width: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  cursor: pointer; font-weight: 600; font-size: .9rem; transition: .15s;
}
.chip:hover { border-color: var(--wine); }
.chip.is-active { background: var(--wine); border-color: var(--wine); color: #fff; }

.catalog { display: grid; gap: 22px; }
.cat h3 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; color: var(--wine); margin-bottom: 12px; }
.cat h3 small { color: var(--ink-2); font-weight: 500; font-size: .85rem; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; user-select: none;
  transition: border-color .15s, background .15s; font-weight: 500; min-height: 48px;
}
.item:hover { border-color: var(--gold); }
.item input { position: absolute; opacity: 0; pointer-events: none; }
.item__box { width: 22px; height: 22px; flex: none; border-radius: 6px; border: 2px solid #cfc5b9; display: grid; place-items: center; transition: .15s; }
.item__box::after { content: ""; width: 10px; height: 6px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.item input:checked + .item__box { background: var(--whats); border-color: var(--whats); }
.item input:checked + .item__box::after { opacity: 1; }
.item:has(input:checked) { border-color: var(--whats); background: #f0fbf4; }
.item input:focus-visible + .item__box { outline: 3px solid var(--gold); outline-offset: 2px; }
.empty { text-align: center; padding: 40px 16px; color: var(--ink-2); }

.custom { margin-top: 28px; padding: 20px; background: #fff; border: 1.5px dashed #d8cdbf; border-radius: var(--radius); }
.custom__label { display: block; font-weight: 700; margin-bottom: 10px; }
.custom__row { display: flex; gap: 10px; }
.custom__row input { flex: 1; min-width: 0; }

input[type="text"], input[type="tel"], input[type="number"], input:not([type]), select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .15s; outline: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
textarea { resize: vertical; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.field-row { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }

.cart {
  position: sticky; top: calc(var(--header-h) + 16px); background: #fff; border-radius: 20px; box-shadow: var(--shadow);
  border: 1px solid var(--line); display: flex; flex-direction: column; max-height: calc(100vh - var(--header-h) - 32px);
}
.cart__head { display: flex; align-items: center; gap: 8px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.cart__head h3 { margin: 0; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.cart__head .link-btn { margin-left: auto; }
.cart__close { display: none; background: var(--bg-alt); border: 0; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.cart__body { overflow-y: auto; padding: 8px 20px; flex: 1; min-height: 120px; }
.cart__empty { text-align: center; color: var(--ink-2); padding: 28px 8px; }
.cart__empty div { font-size: 2.4rem; margin-bottom: 6px; }
.cart__group { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--wine); margin: 14px 0 6px; }
.line { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.line__name { flex: 1; font-weight: 500; font-size: .95rem; min-width: 0; overflow-wrap: anywhere; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 30px; height: 30px; border: 0; background: var(--bg-alt); cursor: pointer; font-weight: 700; }
.qty button:hover { background: var(--gold-50); }
.qty span { min-width: 28px; text-align: center; font-weight: 700; font-size: .9rem; }
.line__rm { border: 0; background: none; color: #b3a79b; cursor: pointer; font-size: 1rem; width: 28px; height: 28px; border-radius: 50%; }
.line__rm:hover { color: var(--wine); background: var(--wine-50); }
.cart__foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.cart__foot .field { margin-bottom: 10px; }
.cart__foot input, .cart__foot textarea { padding: 9px 12px; }
.cart__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.cart__row .btn { padding: .6em .4em; font-size: .82rem; }

.cart-fab {
  display: none; position: fixed; left: 16px; right: 88px; bottom: 16px; z-index: 60;
  padding: 14px 18px; border: 0; border-radius: 999px; background: var(--wine); color: #fff; font-weight: 700;
  box-shadow: var(--shadow); cursor: pointer; align-items: center; justify-content: center; gap: 10px;
  transform: translateY(150%); transition: transform .25s ease;
}
.cart-fab.is-visible { transform: none; }

/* ---------- Promoções ---------- */
.promo { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: stretch; }
.promo__card {
  border-radius: 24px; padding: 48px 40px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(circle at 100% 0%, rgba(247,181,18,.35), transparent 50%), linear-gradient(135deg, var(--wine), #4a0013);
}
.promo__card h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.promo__card p { color: rgba(255,255,255,.85); margin-bottom: 26px; }
.promo__insta { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: #fff; font-weight: 600; text-decoration: none; opacity: .9; }
.promo__insta:hover { opacity: 1; text-decoration: underline; }
.promo__feed { border-radius: 24px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; min-height: 460px; }
.promo__feed iframe { width: 100%; height: 100%; min-height: 460px; border: 0; display: block; }

/* ---------- Vagas ---------- */
.jobs { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.jobs__text h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.jobs__text p { color: var(--ink-2); font-size: 1.05rem; }
.checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.checks li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.checks li::before { content: "✓"; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #2a1a00; font-size: .8rem; font-weight: 800; }
.card-form { background: #fff; padding: 28px; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }

/* ---------- Localização ---------- */
.visit { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
.visit__map { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); min-height: 420px; box-shadow: var(--shadow-sm); }
.visit__map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }
.visit__info { background: var(--bg-alt); border-radius: 20px; padding: 28px; }
.visit__info h3 { font-size: 1.1rem; margin-top: 4px; }
.visit__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.hours { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.hours td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; font-weight: 600; }
.hours tr.is-today td { background: var(--gold-50); color: var(--wine); font-weight: 800; }
.hours tr.is-today td:first-child { border-radius: 8px 0 0 8px; }
.hours tr.is-today td:last-child { border-radius: 0 8px 8px 0; }

/* ---------- Footer ---------- */
.footer { background: #1d0a0e; color: rgba(255,255,255,.8); padding: 56px 0 24px; }
.footer__inner { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.footer__logo { height: 52px; width: auto; margin-bottom: 12px; background: #fff; border-radius: 10px; padding: 4px 8px; }
.footer h4 { color: #fff; font-size: 1rem; }
.footer a { color: #fff; text-decoration: none; cursor: pointer; }
.footer a:hover { color: var(--gold); }
.footer__copy { text-align: center; font-size: .85rem; border-top: 1px solid rgba(255,255,255,.1); margin: 40px auto 0; padding-top: 20px; width: min(1180px, 100% - 32px); }

/* ---------- Flutuantes ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 16px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: var(--whats); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -6px rgba(31,168,85,.6);
  transition: transform .2s; cursor: pointer;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; z-index: 90;
  transition: .25s; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.backdrop { position: fixed; inset: 0; background: rgba(20, 5, 8, .5); z-index: 70; opacity: 0; pointer-events: none; transition: opacity .2s; }
.backdrop.is-visible { opacity: 1; pointer-events: auto; }

.print-area { display: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
  .shop { grid-template-columns: 1fr; }
  .cart {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 80; border-radius: 24px 24px 0 0;
    max-height: 88vh; transform: translateY(105%); transition: transform .3s ease;
  }
  .cart.is-open { transform: none; }
  .cart__close { display: grid; place-items: center; }
  .cart__head .link-btn { margin-left: auto; }
  .cart-fab { display: flex; }
}

@media (max-width: 900px) {
  :root { --header-h: 66px; }
  .brand img { height: 46px; }
  .menu-btn { display: flex; }
  .header__cta { display: none; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .2s;
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 14px 12px; border-radius: 10px; }
  .hero__inner, .promo, .jobs, .visit { grid-template-columns: 1fr; }
  .hero__inner { padding: 64px 0 72px; gap: 36px; }
  .section { padding: 64px 0; }
  .footer__inner { grid-template-columns: 1fr; }
  .topbar__addr { display: none; }
}

@media (max-width: 520px) {
  .hero__actions .btn { width: 100%; }
  .items { grid-template-columns: 1fr 1fr; }
  .item { font-size: .9rem; padding: 10px; }
  .promo__card { padding: 36px 24px; }
  .card-form, .visit__info { padding: 20px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .depts { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Impressão da lista ---------- */
@media print {
  body > *:not(.print-area) { display: none !important; }
  .print-area { display: block; color: #000; font-size: 12pt; }
  .print-area h1 { font-size: 18pt; margin-bottom: 4pt; }
  .print-area h2 { font-size: 12pt; margin: 14pt 0 4pt; border-bottom: 1px solid #999; padding-bottom: 2pt; }
  .print-area ul { list-style: none; padding: 0; margin: 0; columns: 2; }
  .print-area li { padding: 3pt 0; break-inside: avoid; }
  .print-area li::before { content: "☐  "; }
}
