:root {
  --bg: #f6f3ee;
  --surface: #fbfaf7;
  --photo: #e9e6e1;
  --ink: #1d1b19;
  --muted: #7a736b;
  --line: #e2ddd5;
  --accent: #a0714f;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", "Segoe UI", system-ui, sans-serif;
  --radius: 2px;
  --radius-img: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 300 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; }
[hidden] { display: none !important; }

.wrap { width: min(1280px, 100% - 48px); margin-inline: auto; }
.eyebrow { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border: 1px solid var(--ink); border-radius: var(--radius); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; background: none; transition: background .3s var(--ease), color .3s var(--ease); }
.btn--dark { background: var(--ink); color: var(--surface); }
.btn--dark:hover { background: #3a3632; }
.btn--ghost:hover { background: var(--ink); color: var(--surface); }
.btn--block { width: 100%; }
.icon-btn { width: 36px; height: 36px; border: 1px solid var(--line); background: var(--surface); border-radius: 50%; font-size: 18px; line-height: 1; display: inline-grid; place-items: center; }
.icon-btn:hover { border-color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Topo */
.topbar { background: var(--ink); color: #e9e4dc; text-align: center; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 9px 16px; }
.topbar strong { font-weight: 500; color: #fff; }
.header { position: sticky; top: 0; z-index: 20; background: rgba(246, 243, 238, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; gap: 32px; height: 72px; }
.logo { font: 400 22px/1 var(--sans); letter-spacing: .32em; text-decoration: none; margin: 0; white-space: nowrap; }
.logo span { font: italic 400 20px var(--serif); letter-spacing: .02em; color: var(--accent); margin-left: 4px; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.cart-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; background: none; border: 0; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; padding: 0; }
.cart-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.cart-count { position: absolute; top: 0; left: 14px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font: 500 11px/18px var(--sans); text-align: center; }
.cart-count.bump { animation: bump .4s var(--ease); }
@keyframes bump { 50% { transform: scale(1.35); } }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero__inner { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(44px, 6vw, 84px); letter-spacing: -.01em; }
.hero h1 em { color: var(--accent); }
.lead { font-size: 18px; color: var(--muted); max-width: 30em; margin: 24px 0 36px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__img { margin: 0; }
.hero__img img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--radius-img); background: var(--photo); }
.hero__img figcaption { font-size: 13px; color: var(--muted); padding: 12px 0 0; background: var(--bg); }
.hero__img s { margin: 0 6px; }

/* Vantagens */
.perks { list-style: none; padding: 28px 0; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.perks li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.perks li + li { border-left: 1px solid var(--line); }
.perks b { font: 400 22px var(--serif); }
.perks span { font-size: 13px; color: var(--muted); }

/* Catálogo */
.catalog { padding: 72px 0 24px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 56px; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 40px; padding: 9px 20px; font-size: 13px; letter-spacing: .08em; transition: all .25s var(--ease); }
.chip:hover { border-color: var(--ink); }
.chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.cat { margin-bottom: 96px; scroll-margin-top: 100px; }
.cat__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 32px; }
.cat__head h2 { font-size: clamp(32px, 4vw, 48px); }
.cat__head span { font-size: 13px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.grid { display: grid; gap: 48px 28px; grid-template-columns: repeat(4, 1fr); }
.grid--wide { grid-template-columns: repeat(2, 1fr); }

.card { cursor: pointer; }
.card__media { position: relative; overflow: hidden; background: var(--photo); aspect-ratio: 4 / 5; border-radius: var(--radius-img); isolation: isolate; }
.grid--wide .card__media { aspect-ratio: 5 / 4; }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s var(--ease), transform 1.2s var(--ease); }
.card__media img + img { opacity: 0; }
.card:hover .card__media img { transform: scale(1.03); }
.card:hover .card__media img + img { opacity: 1; }
.tag { position: absolute; top: 14px; left: 14px; background: var(--surface); padding: 4px 10px; font: 500 12px var(--sans); letter-spacing: .08em; font-style: normal; }
.card__quick { position: absolute; left: 14px; right: 14px; bottom: 14px; opacity: 0; transform: translateY(8px); transition: all .35s var(--ease); background: var(--surface); border-color: var(--surface); }
.card:hover .card__quick, .card:focus-within .card__quick { opacity: 1; transform: none; }
.card__quick:hover { background: var(--ink); color: var(--surface); }
.card__body { padding-top: 16px; }
.card h3 { font-size: 24px; }
.card .price { margin: 6px 0 0; }
.card .stock { font-size: 12px; color: var(--muted); letter-spacing: .06em; margin-top: 4px; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 15px; }
.price s { color: var(--muted); font-size: 13px; }
.price span { font-weight: 400; }
.price .tag { position: static; background: var(--ink); color: var(--surface); font-size: 11px; }

/* Como comprar */
.how { background: var(--surface); padding: 96px 0; border-top: 1px solid var(--line); }
.how h2 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 48px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.steps b { font: 400 15px var(--sans); color: var(--accent); letter-spacing: .1em; }
.steps h3 { font-size: 30px; margin: 10px 0; }
.steps p { color: var(--muted); margin: 0; }

.footer { padding: 72px 0 32px; background: var(--ink); color: #d9d3ca; font-size: 14px; }
.footer a { text-decoration: none; transition: color .2s; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }
.footer .logo { color: #fff; margin-bottom: 18px; }
.footer .logo span { color: #c9a184; }
.footer__brand p:not(.logo) { max-width: 26em; margin: 0 0 20px; color: #a9a196; }
.rating { display: inline-flex; align-items: baseline; gap: 8px; border: 1px solid #3d3933; padding: 8px 14px; }
.rating b { font: 400 22px var(--serif); color: #fff; }
.rating span { color: #c9a184; letter-spacing: .1em; }
.footer h3 { font: 400 12px var(--sans); letter-spacing: .22em; text-transform: uppercase; color: #8f877c; margin: 0 0 16px; }
.footer__col p, .footer address p { margin: 0 0 10px; }
.footer address { font-style: normal; }
.footer address a { color: #c9a184; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; }
.hours dt { color: #a9a196; }
.hours dd { margin: 0; }
.social { list-style: none; display: flex; gap: 12px; margin: 0 0 18px; padding: 0; }
.social a { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #3d3933; border-radius: 50%; color: #d9d3ca; transition: color .25s, border-color .25s, background .25s; }
.social a:hover { color: var(--ink); background: #f6f3ee; border-color: #f6f3ee; }
.social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.social .dot { fill: currentColor; stroke: none; }
.footer__phone { color: #fff; }
.footer__handle { color: #8f877c; font-size: 13px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid #3d3933; font-size: 12px; color: #8f877c; }
.footer__bottom p { margin: 0; }

/* Modal */
/* O modal recorta os cantos (overflow: hidden); quem rola é o conteúdo interno:
   no desktop a coluna de informações, no mobile o corpo inteiro. */
.modal { --modal-h: min(720px, calc(100vh - 32px)); width: min(1080px, 100% - 32px); max-height: none; padding: 0; border: 0; background: var(--surface); color: var(--ink); border-radius: var(--radius-img); overflow: hidden; }
@supports (height: 100dvh) { .modal { --modal-h: min(720px, calc(100dvh - 32px)); } }
.modal::backdrop { background: rgba(29, 27, 25, .45); backdrop-filter: blur(3px); }
.modal[open] { animation: rise .45s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.modal__close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.modal__body { display: grid; grid-template-columns: 1.15fr 1fr; height: var(--modal-h); }
.modal__gallery { position: relative; background: var(--photo); min-height: 0; }
.modal__main { width: 100%; height: 100%; object-fit: cover; }
.thumbs { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 8px; }
.thumb { width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: var(--photo); opacity: .75; transition: opacity .2s, border-color .2s; }
.thumb:hover, .thumb[aria-current="true"] { opacity: 1; border-color: var(--surface); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal__info { padding: 48px 40px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overscroll-behavior: contain; }
.modal__info h2 { font-size: 40px; }
.modal__info .price { font-size: 22px; margin: 8px 0 0; }
.modal__info p { margin: 0; }
.buy { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; align-items: center; }
.qty { display: flex; align-items: center; gap: 12px; }
.qty output { min-width: 20px; text-align: center; }

/* Sacola */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(440px, 100%); background: var(--surface); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .45s var(--ease); box-shadow: -20px 0 60px rgba(0, 0, 0, .08); }
.drawer.open { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 24px 28px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 30px; }
.drawer__items { list-style: none; margin: 0; padding: 8px 28px; overflow-y: auto; flex: 1; }
.drawer__empty { padding: 28px; color: var(--muted); flex: 1; }
.line { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line img { width: 76px; height: 76px; object-fit: cover; background: var(--photo); border-radius: 4px; }
.line h3 { font: 400 15px var(--sans); }
.line .price { font-size: 14px; }
.line .qty { gap: 8px; margin-top: 6px; }
.line .icon-btn { width: 28px; height: 28px; font-size: 15px; }
.line__rm { background: none; border: 0; color: var(--muted); font-size: 12px; text-decoration: underline; align-self: start; }
.drawer__foot { padding: 20px 28px 28px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.row { display: flex; justify-content: space-between; margin: 0; }
.save { color: var(--accent); }
.total { font-size: 20px; padding-top: 6px; }
.total b { font-weight: 400; }
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(29, 27, 25, .35); }

.toast { position: fixed; left: 50%; top: 88px; z-index: 50; width: max-content; max-width: calc(100% - 32px); text-align: center; transform: translate(-50%, -12px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--surface); padding: 12px 22px; font-size: 14px; transition: all .35s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Entrada suave dos cards */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 1024px) {
  .nav { display: none; }
  .cart-btn { margin-left: auto; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid--wide { grid-template-columns: repeat(2, 1fr); } /* repetido: senão a regra de 3 colunas acima vence */
  .hero__inner { gap: 40px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .lead { max-width: 36em; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .topbar { font-size: 11px; letter-spacing: .04em; padding-inline: 8px; }
  .header__inner { height: 60px; }
  .logo { font-size: 17px; letter-spacing: .26em; }
  .cart-btn span { display: none; }
  .hero { padding: 40px 0; }
  .modal__body { grid-template-columns: 1fr; height: auto; max-height: var(--modal-h); overflow-y: auto; overscroll-behavior: contain; }
  .modal__info { overflow: visible; }
  .perks { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
  .perks li:nth-child(3) { border-left: 0; }
  .chips { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .chip { flex: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 32px 14px; }
  .grid--wide { grid-template-columns: 1fr; }
  .card h3 { font-size: 20px; }
  .card__quick { display: none; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .footer { padding-top: 56px; }
  .footer__grid { grid-template-columns: 1fr; gap: 36px; }
  .modal__gallery { height: 46vh; min-height: 260px; }
  .thumb { width: 48px; height: 48px; }
  .modal__info { padding: 28px 22px 32px; }
  .modal__info h2 { font-size: 32px; }
  .cat { margin-bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
