/* ==========================================================================
   Baratíssimo — Design system baseado em Material 3
   Tokens de cor (papéis M3) derivados da marca, tipografia Aspira, shape e elevação.
   ========================================================================== */

@font-face { font-family: 'Aspira'; src: url('../fonts/aspira/Aspira-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aspira'; src: url('../fonts/aspira/Aspira-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aspira'; src: url('../fonts/aspira/Aspira-Demi.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aspira'; src: url('../fonts/aspira/Aspira-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aspira'; src: url('../fonts/aspira/Aspira-Heavy.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  /* Marca */
  --brand-orange: #fa5222;
  --brand-purple: #a43ffd;
  --brand-ink: #21123b;
  --brand-cream: #fdf6f0;
  --brand-gradient: linear-gradient(135deg, #fe9b1c 0%, #fc3061 100%);
  --brand-gradient-coupon: linear-gradient(135deg, #e150f7 0%, #7233fc 100%);
  --brand-gradient-wide: linear-gradient(90deg, #fe9b1c 0%, #fc3061 50%, #a43ffd 100%);

  /* Papéis de cor M3 */
  --md-primary: #fa5222;
  --md-on-primary: #ffffff;
  --md-primary-container: #ffdbcf;
  --md-on-primary-container: #3a0b00;
  --md-secondary: #a43ffd;
  --md-on-secondary: #ffffff;
  --md-secondary-container: #f1dbff;
  --md-on-secondary-container: #2f0056;
  --md-tertiary: #1b7f4b;
  --md-tertiary-container: #c9f0d6;
  --md-on-tertiary-container: #00210f;
  --md-error: #ba1a1a;
  --md-on-error: #ffffff;
  --md-error-container: #ffdad6;
  --md-on-error-container: #410002;

  --md-background: #fdf6f0;
  --md-on-background: #21123b;
  --md-surface: #fdf6f0;
  --md-surface-dim: #e8ddd5;
  --md-surface-bright: #fffbf8;
  --md-surface-container-lowest: #ffffff;
  --md-surface-container-low: #fbf0e8;
  --md-surface-container: #f6eae2;
  --md-surface-container-high: #f0e4dc;
  --md-surface-container-highest: #eaded6;
  --md-on-surface: #21123b;
  --md-on-surface-variant: #5b4f68;
  --md-outline: #8c8097;
  --md-outline-variant: #ddd1d6;
  --md-inverse-surface: #21123b;
  --md-inverse-on-surface: #fdf6f0;
  --md-inverse-primary: #ffb59e;
  --md-scrim: rgba(17, 8, 33, .5);

  /* Shape */
  --md-shape-xs: 4px;
  --md-shape-sm: 8px;
  --md-shape-md: 12px;
  --md-shape-lg: 16px;
  --md-shape-xl: 28px;
  --md-shape-full: 999px;

  /* Elevação */
  --md-elev-1: 0 1px 2px rgba(33, 18, 59, .12), 0 1px 3px 1px rgba(33, 18, 59, .06);
  --md-elev-2: 0 1px 2px rgba(33, 18, 59, .12), 0 2px 6px 2px rgba(33, 18, 59, .08);
  --md-elev-3: 0 4px 8px 3px rgba(33, 18, 59, .08), 0 1px 3px rgba(33, 18, 59, .12);

  /* Movimento */
  --md-ease: cubic-bezier(.2, 0, 0, 1);
  --md-ease-emph: cubic-bezier(.05, .7, .1, 1);

  --font: 'Aspira', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --container: 1320px;
  --header-h: 64px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--md-on-background);
  background: var(--md-background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--md-secondary); outline-offset: 2px; border-radius: 4px; }
.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; }

.icon { width: 24px; height: 24px; fill: currentColor; flex: none; }
.icon-sm { width: 18px; height: 18px; }
.icon-xs { width: 16px; height: 16px; }

/* Tipografia M3 */
.display-sm { font-size: 36px; line-height: 44px; font-weight: 800; letter-spacing: -.02em; }
.headline-lg { font-size: 32px; line-height: 40px; font-weight: 800; letter-spacing: -.02em; }
.headline-md { font-size: 28px; line-height: 36px; font-weight: 800; letter-spacing: -.015em; }
.headline-sm { font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -.01em; }
.title-lg { font-size: 22px; line-height: 28px; font-weight: 700; }
.title-md { font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: .01em; }
.title-sm { font-size: 14px; line-height: 20px; font-weight: 700; letter-spacing: .01em; }
.body-lg { font-size: 16px; line-height: 24px; }
.body-md { font-size: 14px; line-height: 20px; }
.body-sm { font-size: 12px; line-height: 16px; }
.label-lg { font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: .01em; }
.label-md { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .03em; }
.muted { color: var(--md-on-surface-variant); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 840px) { :root { --gutter: 24px; } }

/* ----- Botões ----- */
.btn {
  --btn-bg: var(--md-primary); --btn-fg: var(--md-on-primary);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 24px; border: 0; border-radius: var(--md-shape-full);
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 14px; font-weight: 700; letter-spacing: .01em; line-height: 1; white-space: nowrap;
  cursor: pointer; overflow: hidden; isolation: isolate; user-select: none;
  transition: box-shadow .2s var(--md-ease), transform .1s;
}
.btn::after { content: ''; position: absolute; inset: 0; background: currentColor; opacity: 0; transition: opacity .15s; z-index: -1; pointer-events: none; }
.btn:hover::after { opacity: .08; }
.btn:active::after { opacity: .12; }
.btn:active { transform: scale(.98); }
.btn .icon { width: 18px; height: 18px; }
.btn--filled:hover { box-shadow: var(--md-elev-1); }
.btn--secondary { --btn-bg: var(--md-secondary); --btn-fg: var(--md-on-secondary); }
.btn--tonal { --btn-bg: var(--md-primary-container); --btn-fg: var(--md-on-primary-container); }
.btn--tonal-secondary { --btn-bg: var(--md-secondary-container); --btn-fg: var(--md-on-secondary-container); }
.btn--outlined { --btn-bg: transparent; --btn-fg: var(--md-primary); box-shadow: inset 0 0 0 1px var(--md-outline); }
.btn--outlined-neutral { --btn-bg: transparent; --btn-fg: var(--md-on-surface); box-shadow: inset 0 0 0 1px var(--md-outline-variant); }
.btn--text { --btn-bg: transparent; --btn-fg: var(--md-primary); padding: 0 12px; }
.btn--ink { --btn-bg: var(--md-inverse-surface); --btn-fg: var(--md-inverse-on-surface); }
.btn--whatsapp { --btn-bg: #1faa53; --btn-fg: #fff; }
.btn--danger { --btn-bg: var(--md-error); --btn-fg: var(--md-on-error); }
.btn--lg { min-height: 56px; padding: 0 32px; font-size: 16px; }
.btn--lg .icon { width: 22px; height: 22px; }
.btn--sm { min-height: 32px; padding: 0 14px; font-size: 13px; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 0; border-radius: 50%; background: transparent; color: var(--md-on-surface-variant); cursor: pointer;
  overflow: hidden; isolation: isolate;
}
.icon-btn::after { content: ''; position: absolute; inset: 0; background: currentColor; opacity: 0; transition: opacity .15s; z-index: -1; }
.icon-btn:hover::after { opacity: .08; }
.icon-btn:active::after { opacity: .12; }
.icon-btn--tonal { background: var(--md-surface-container-high); color: var(--md-on-surface); }
.icon-btn--outlined { box-shadow: inset 0 0 0 1px var(--md-outline-variant); }
.icon-btn.is-on, .fav-btn.is-on { color: #e8336b; }
.fav-btn.is-on .icon { animation: pop .35s var(--md-ease-emph); }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* ----- Chips ----- */
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 16px; flex: none;
  border-radius: var(--md-shape-sm); border: 1px solid var(--md-outline-variant); background: var(--md-surface-container-lowest);
  font-size: 14px; font-weight: 600; color: var(--md-on-surface-variant); white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { background: var(--md-surface-container); color: var(--md-on-surface); }
.chip.is-selected { background: var(--md-primary-container); border-color: transparent; color: var(--md-on-primary-container); }
.chip--coupon.is-selected { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.chip img { width: 18px; height: 18px; border-radius: 4px; object-fit: contain; }
.chip .emoji { font-size: 16px; line-height: 1; }

.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--md-shape-sm); font-size: 12px; font-weight: 700; letter-spacing: .02em; color: #fff; background: var(--md-primary); white-space: nowrap; }
.badge--discount { background: var(--md-inverse-surface); color: #fff; }
.badge--neutral { background: var(--md-surface-container-high); color: var(--md-on-surface-variant); }
.badge--success { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }
.badge--warn { background: #ffe0b2; color: #4a2800; }
.badge--error { background: var(--md-error-container); color: var(--md-on-error-container); }
.badge--purple { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }

/* ----- Campos de texto (outlined) ----- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field-label { font-size: 13px; font-weight: 700; color: var(--md-on-surface-variant); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: var(--md-shape-sm);
  border: 1px solid var(--md-outline); background: var(--md-surface-container-lowest); color: var(--md-on-surface);
  font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235b4f68'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 24px; padding-right: 40px; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--md-on-surface); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--md-primary); box-shadow: inset 0 0 0 1px var(--md-primary); }
.field-hint { font-size: 12px; color: var(--md-on-surface-variant); }
.field-error { font-size: 12px; color: var(--md-error); font-weight: 600; }
.check { display: flex; align-items: center; gap: 12px; min-height: 40px; cursor: pointer; font-size: 15px; }
.check input { width: 18px; height: 18px; accent-color: var(--md-primary); flex: none; }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } .form-grid--3 { grid-template-columns: repeat(3, 1fr); } .span-2 { grid-column: span 2; } .span-all { grid-column: 1 / -1; } }

/* ----- Cartões ----- */
.card { background: var(--md-surface-container-lowest); border-radius: var(--md-shape-lg); box-shadow: var(--md-elev-1); }
.card--outlined { box-shadow: none; border: 1px solid var(--md-outline-variant); }
.card--filled { background: var(--md-surface-container); box-shadow: none; }
.card-pad { padding: 24px; }

/* ==========================================================================
   Header (top app bar)
   ========================================================================== */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--md-surface-container-lowest); box-shadow: 0 1px 0 var(--md-outline-variant); transition: box-shadow .2s; }
.topbar.is-scrolled { box-shadow: var(--md-elev-2); }
.topbar__row { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.topbar__logo { display: block; flex: none; }
.topbar__logo img { height: 30px; width: auto; }
.topbar__menu-btn { margin-left: -8px; }
.search { position: relative; flex: 1; max-width: 560px; }
.search input {
  width: 100%; height: 48px; padding: 0 52px 0 20px; border-radius: var(--md-shape-full); border: 0;
  background: var(--md-surface-container-high); font-size: 15px; color: var(--md-on-surface);
}
.search input::placeholder { color: var(--md-on-surface-variant); }
.search input:focus { outline: none; background: var(--md-surface-container-lowest); box-shadow: inset 0 0 0 2px var(--md-primary); }
.search button { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--md-primary); color: #fff; display: grid; place-items: center; cursor: pointer; }
.search button .icon { width: 20px; height: 20px; }
.topnav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.topnav a { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: var(--md-shape-full); font-size: 14px; font-weight: 700; color: var(--md-on-surface-variant); white-space: nowrap; transition: background .15s, color .15s; }
.topnav a:hover { background: var(--md-surface-container); color: var(--md-on-surface); }
.topnav a.is-active { color: var(--md-primary); background: var(--md-primary-container); }
.topnav a.nav-coupon.is-active, .topnav a.nav-coupon:hover { color: var(--md-secondary); background: var(--md-secondary-container); }
.topnav a .icon { width: 18px; height: 18px; }
.topbar__account { flex: none; }
.topbar__search-row { display: none; padding-bottom: 12px; }
.catbar { border-top: 1px solid var(--md-outline-variant); }
.catbar__scroll { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.catbar__scroll::-webkit-scrollbar { display: none; }
.catbar .chip { height: 32px; border-radius: var(--md-shape-full); background: transparent; }
.catbar .chip.is-selected { background: var(--md-inverse-surface); color: #fff; }

@media (max-width: 1099px) {
  .topnav { display: none; }
  .topbar__row { justify-content: space-between; }
  .topbar__row .search { display: none; }
  .topbar__search-row { display: block; }
  .topbar__search-row .search { max-width: none; }
  .topbar__logo img { height: 26px; }
}
@media (min-width: 1100px) { .topbar__menu-btn { display: none; } }

/* ----- Navigation drawer (modal) ----- */
.drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__scrim { position: absolute; inset: 0; background: var(--md-scrim); opacity: 0; transition: opacity .25s; }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(340px, 86vw); background: var(--md-surface-container-low); border-radius: 0 var(--md-shape-lg) var(--md-shape-lg) 0; padding: 16px 12px 24px; overflow-y: auto; transform: translateX(-100%); transition: transform .3s var(--md-ease-emph); }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 16px 16px; }
.drawer__head img { height: 26px; }
.drawer__label { padding: 16px 16px 8px; font-size: 13px; font-weight: 700; color: var(--md-on-surface-variant); }
.drawer a.drawer__item { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px; border-radius: var(--md-shape-full); font-weight: 600; font-size: 15px; color: var(--md-on-surface-variant); }
.drawer a.drawer__item:hover { background: var(--md-surface-container-high); }
.drawer a.drawer__item.is-active { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.drawer a.drawer__item .emoji { width: 24px; text-align: center; font-size: 18px; }
.drawer hr { border: 0; border-top: 1px solid var(--md-outline-variant); margin: 12px 16px; }

/* ----- Navigation bar (mobile) ----- */
.navbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: none; height: calc(72px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--md-surface-container-lowest); box-shadow: 0 -1px 0 var(--md-outline-variant); }
.navbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--md-on-surface-variant); }
.navbar a span.ind { display: grid; place-items: center; width: 56px; height: 30px; border-radius: var(--md-shape-full); transition: background .2s; }
.navbar a.is-active { color: var(--md-on-surface); }
.navbar a.is-active span.ind { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.navbar a.nav-coupon.is-active span.ind { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
@media (max-width: 839px) {
  .navbar { display: flex; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* ==========================================================================
   Carrossel de banners
   ========================================================================== */
.carousel { position: relative; border-radius: var(--md-shape-xl); overflow: hidden; background: var(--md-surface-container); }
.carousel__track { display: flex; transition: transform .6s var(--md-ease-emph); will-change: transform; }
.carousel__slide { flex: 0 0 100%; display: block; }
.carousel__slide img { width: 100%; height: auto; aspect-ratio: 1280 / 400; object-fit: cover; }
.carousel--middle .carousel__slide img { aspect-ratio: 1280 / 200; }
@media (max-width: 639px) {
  .carousel { border-radius: var(--md-shape-lg); }
  .carousel__slide img { aspect-ratio: 8 / 5; }
  .carousel--middle .carousel__slide img { aspect-ratio: 8 / 3; }
}
.carousel__nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.92); color: var(--md-on-surface); box-shadow: var(--md-elev-2); opacity: 0; transition: opacity .2s; }
.carousel:hover .carousel__nav, .carousel__nav:focus-visible { opacity: 1; }
.carousel__nav--prev { left: 12px; }
.carousel__nav--next { right: 12px; }
.carousel__dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; }
.carousel__dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: rgba(255,255,255,.6); cursor: pointer; transition: width .3s var(--md-ease), background .3s; }
.carousel__dots button.is-active { width: 24px; background: #fff; }
@media (hover: none) { .carousel__nav { display: none; } }

/* ==========================================================================
   Layout de listagem: filtros + grade
   ========================================================================== */
.page { padding-top: 24px; padding-bottom: 56px; }
.section { margin-top: 32px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h1, .section-head h2 { display: flex; align-items: center; gap: 10px; }
.section-head .icon { color: var(--md-primary); }
.listing { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1100px) { .listing { grid-template-columns: 260px minmax(0, 1fr); } }

.filters { position: sticky; top: calc(var(--header-h) + 72px); }
.filters .card { padding: 20px; }
.filters h3 { font-size: 14px; font-weight: 800; margin: 0 0 8px; letter-spacing: .02em; }
.filters fieldset { border: 0; margin: 0 0 16px; padding: 0 0 16px; border-bottom: 1px solid var(--md-outline-variant); }
.filters fieldset:last-of-type { border-bottom: 0; margin-bottom: 8px; }
.filters .check { min-height: 36px; font-size: 14px; }
.filters .check .count { margin-left: auto; font-size: 12px; color: var(--md-on-surface-variant); }
.filters .store-dot { width: 20px; height: 20px; border-radius: 6px; flex: none; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; }
.filters-toggle { display: none; }
@media (max-width: 1099px) {
  .filters { position: fixed; inset: auto 0 0 0; z-index: 110; max-height: 85vh; transform: translateY(105%); transition: transform .3s var(--md-ease-emph); }
  .filters.is-open { transform: none; }
  .filters .card { border-radius: var(--md-shape-xl) var(--md-shape-xl) 0 0; max-height: 85vh; overflow-y: auto; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .filters .sheet-handle { width: 32px; height: 4px; border-radius: 2px; background: var(--md-outline); margin: -4px auto 16px; opacity: .5; }
  .filters-toggle { display: inline-flex; }
  .filters-scrim { position: fixed; inset: 0; z-index: 105; background: var(--md-scrim); }
}
@media (min-width: 1100px) { .filters .sheet-handle, .filters .sheet-close, .filters-scrim { display: none !important; } }

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .select { width: auto; min-height: 40px; padding: 8px 40px 8px 14px; font-size: 14px; border-radius: var(--md-shape-full); }
.toolbar .total { margin-right: auto; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid--5 { }
@media (min-width: 1280px) { .grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.grid__full { grid-column: 1 / -1; margin: 8px 0; }

/* ----- Card de oferta ----- */
.offer-card { position: relative; display: flex; flex-direction: column; background: var(--md-surface-container-lowest); border-radius: var(--md-shape-lg); box-shadow: var(--md-elev-1); overflow: hidden; transition: box-shadow .2s var(--md-ease), transform .2s var(--md-ease); }
.offer-card:hover { box-shadow: var(--md-elev-3); transform: translateY(-2px); }
.offer-card__media { position: relative; display: block; aspect-ratio: 1; background: #fff; padding: 12px; }
.offer-card__media img { width: 100%; height: 100%; object-fit: contain; }
.offer-card__tag { position: absolute; top: 10px; left: 10px; }
.offer-card__discount { position: absolute; top: 10px; right: 10px; }
.offer-card__fav { position: absolute; right: 6px; bottom: 6px; background: rgba(255,255,255,.92); box-shadow: var(--md-elev-1); }
.offer-card__body { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; flex: 1; }
.store-line { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--md-on-surface-variant); min-width: 0; }
.store-logo { width: 22px; height: 22px; border-radius: 6px; flex: none; object-fit: contain; background: #fff; box-shadow: inset 0 0 0 1px var(--md-outline-variant); }
.store-mark { width: 22px; height: 22px; border-radius: 6px; flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; }
.store-line .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-line .time { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-weight: 600; white-space: nowrap; }
.store-line .time .icon { width: 14px; height: 14px; }
.offer-card__title { font-size: 14px; line-height: 20px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.offer-card__title:hover { color: var(--md-primary); }
.prices { display: flex; flex-direction: column; gap: 0; margin-top: auto; }
.price-old { font-size: 13px; color: var(--md-on-surface-variant); text-decoration: line-through; min-height: 18px; }
.price-now { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-now strong { font-size: 22px; line-height: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--md-on-surface); }
.price-now .off { font-size: 13px; font-weight: 800; color: var(--md-tertiary); }
.offer-card__actions { display: flex; align-items: center; gap: 4px; }
.offer-card__actions .btn { flex: 1; min-height: 40px; padding: 0 12px; }
.offer-card.is-ended .offer-card__media img { filter: grayscale(1); opacity: .5; }
.ended-flag { position: absolute; inset: auto 0 0 0; padding: 6px; background: var(--md-inverse-surface); color: #fff; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 639px) {
  .offer-card__body { padding: 10px 10px 12px; gap: 6px; }
  .offer-card__title { font-size: 13px; line-height: 18px; min-height: 36px; }
  .price-now strong { font-size: 18px; line-height: 24px; }
  .store-line .time span { display: none; }
  .offer-card__actions .btn { font-size: 13px; min-height: 36px; }
  .offer-card__actions .icon-btn { width: 36px; height: 36px; }
  .offer-card__tag .badge, .offer-card__discount .badge { height: 22px; padding: 0 8px; font-size: 11px; }
}

.load-more { display: flex; justify-content: center; margin-top: 24px; }
.empty { text-align: center; padding: 56px 24px; }
.empty .icon { width: 56px; height: 56px; margin: 0 auto 16px; color: var(--md-outline); }
.empty p { color: var(--md-on-surface-variant); margin: 8px auto 20px; max-width: 420px; }

/* ----- Cupons ----- */
.coupon-hero { background: var(--brand-gradient-coupon); color: #fff; border-radius: var(--md-shape-xl); padding: 32px; position: relative; overflow: hidden; }
.coupon-hero h1 { color: #fff; }
.coupon-hero p { opacity: .9; margin-top: 8px; max-width: 560px; }
.coupon-hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; background: url('../brand/icon.svg') no-repeat center / contain; opacity: .12; transform: rotate(18deg); filter: grayscale(1) brightness(3); }
.chips-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.coupon-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .coupon-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .coupon-grid { grid-template-columns: repeat(3, 1fr); } }
.coupon-card { display: flex; flex-direction: column; background: var(--md-surface-container-lowest); border-radius: var(--md-shape-lg); box-shadow: var(--md-elev-1); overflow: hidden; }
.coupon-card__top { display: flex; gap: 16px; padding: 20px 20px 16px; align-items: flex-start; }
.coupon-card__logo { width: 52px; height: 52px; border-radius: var(--md-shape-md); flex: none; object-fit: contain; background: #fff; box-shadow: inset 0 0 0 1px var(--md-outline-variant); }
.coupon-card__logo.store-mark { width: 52px; height: 52px; font-size: 20px; border-radius: var(--md-shape-md); }
.coupon-card__value { font-size: 24px; line-height: 28px; font-weight: 800; color: var(--md-secondary); letter-spacing: -.02em; }
.coupon-card__title { font-size: 15px; font-weight: 600; margin-top: 2px; }
.coupon-card__meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--md-on-surface-variant); margin-top: 6px; }
.coupon-card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.coupon-card__meta .icon { width: 14px; height: 14px; }
.coupon-card details { padding: 0 20px; font-size: 13px; color: var(--md-on-surface-variant); }
.coupon-card summary { cursor: pointer; font-weight: 700; color: var(--md-secondary); list-style: none; display: inline-flex; align-items: center; gap: 2px; }
.coupon-card summary::-webkit-details-marker { display: none; }
.coupon-card details[open] summary .icon { transform: rotate(180deg); }
.coupon-card details p { padding: 6px 0 2px; white-space: pre-line; }
.coupon-card__foot { margin-top: auto; padding: 16px 20px 20px; border-top: 2px dashed var(--md-outline-variant); position: relative; margin-top: 16px; }
.coupon-card__foot::before, .coupon-card__foot::after { content: ''; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--md-background); }
.coupon-card__foot::before { left: -10px; } .coupon-card__foot::after { right: -10px; }
.code-box { display: flex; align-items: stretch; border-radius: var(--md-shape-full); overflow: hidden; border: 2px dashed var(--md-secondary); background: var(--md-secondary-container); }
.code-box code { flex: 1; display: flex; align-items: center; padding: 0 16px; font-family: var(--font); font-size: 17px; font-weight: 800; letter-spacing: .08em; color: var(--md-on-secondary-container); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-box .btn { border-radius: 0; min-height: 48px; }
.code-box.is-copied { border-style: solid; border-color: var(--md-tertiary); background: var(--md-tertiary-container); }
.code-box.is-copied .btn { --btn-bg: var(--md-tertiary); }

/* ----- Página da oferta ----- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--md-on-surface-variant); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--md-primary); text-decoration: underline; }
.offer-detail { display: grid; gap: 24px; }
@media (min-width: 900px) { .offer-detail { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; } }
.gallery { position: relative; }
.gallery__main { aspect-ratio: 1; background: #fff; border-radius: var(--md-shape-xl); box-shadow: var(--md-elev-1); padding: 24px; display: grid; place-items: center; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; }
.gallery__thumbs button { width: 72px; height: 72px; flex: none; border-radius: var(--md-shape-md); border: 2px solid transparent; background: #fff; padding: 6px; cursor: pointer; box-shadow: var(--md-elev-1); }
.gallery__thumbs button.is-active { border-color: var(--md-primary); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: contain; }
.offer-info { display: flex; flex-direction: column; gap: 16px; }
.offer-info h1 { font-size: 26px; line-height: 34px; font-weight: 800; letter-spacing: -.015em; }
@media (min-width: 900px) { .offer-info h1 { font-size: 30px; line-height: 38px; } }
.offer-info .meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--md-on-surface-variant); }
.offer-info .meta span { display: inline-flex; align-items: center; gap: 6px; }
.offer-info .meta .icon { width: 18px; height: 18px; }
.price-box { background: var(--md-surface-container-lowest); border-radius: var(--md-shape-xl); padding: 24px; box-shadow: var(--md-elev-1); display: flex; flex-direction: column; gap: 16px; }
.price-box .price-old { font-size: 15px; }
.price-box .price-now strong { font-size: 40px; line-height: 44px; }
.price-box .price-now .badge { height: 28px; font-size: 14px; }
.price-box .save { font-size: 14px; color: var(--md-tertiary); font-weight: 700; }
.action-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 480px) { .action-row { grid-template-columns: repeat(4, 1fr); } }
.action-row .btn { padding: 0 10px; min-height: 56px; flex-direction: column; gap: 4px; font-size: 12px; border-radius: var(--md-shape-lg); white-space: normal; text-align: center; line-height: 1.15; }
.ended-banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--md-shape-md); background: var(--md-error-container); color: var(--md-on-error-container); font-weight: 600; font-size: 14px; }
.disclaimer { font-size: 12px; color: var(--md-on-surface-variant); }
.prose { font-size: 15px; line-height: 1.7; }
.prose p { margin: 0 0 12px; }
.prose h2 { font-size: 20px; line-height: 28px; margin: 28px 0 8px; font-weight: 800; }
.prose h3 { font-size: 17px; margin: 20px 0 6px; font-weight: 700; }
.prose ul { padding-left: 20px; margin: 0 0 12px; }
.prose a { color: var(--md-primary); text-decoration: underline; }

/* ==========================================================================
   Dialog / bottom sheet / snackbar
   ========================================================================== */
dialog.dialog { border: 0; padding: 0; border-radius: var(--md-shape-xl); background: var(--md-surface-container-high); color: var(--md-on-surface); width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); box-shadow: var(--md-elev-3); }
dialog.dialog::backdrop { background: var(--md-scrim); }
dialog.dialog[open] { animation: dialog-in .3s var(--md-ease-emph); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.dialog__inner { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.dialog__head { display: flex; align-items: flex-start; gap: 12px; }
.dialog__head h2 { flex: 1; font-size: 22px; line-height: 28px; font-weight: 800; }
.dialog__head .hero-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--md-primary-container); color: var(--md-on-primary-container); flex: none; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
@media (max-width: 599px) {
  dialog.dialog { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: var(--md-shape-xl) var(--md-shape-xl) 0 0; padding-bottom: env(safe-area-inset-bottom); }
  dialog.dialog[open] { animation: sheet-in .35s var(--md-ease-emph); }
  .dialog__actions .btn { flex: 1; }
}
@keyframes sheet-in { from { transform: translateY(100%); } }
.share-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.share-options button, .share-options a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border: 0; border-radius: var(--md-shape-lg); background: var(--md-surface-container-lowest); font-size: 13px; font-weight: 700; cursor: pointer; }
.share-options .ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.message-preview { width: 100%; min-height: 180px; font-size: 15px; }
.list-picker { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.list-picker label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--md-shape-md); background: var(--md-surface-container-lowest); cursor: pointer; }
.list-picker input { accent-color: var(--md-primary); width: 18px; height: 18px; }

.snackbar-host { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(560px, calc(100vw - 32px)); pointer-events: none; }
@media (max-width: 839px) { .snackbar-host { bottom: calc(88px + env(safe-area-inset-bottom)); } }
.snackbar { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 16px; border-radius: var(--md-shape-xs); background: var(--md-inverse-surface); color: var(--md-inverse-on-surface); font-size: 14px; box-shadow: var(--md-elev-3); pointer-events: auto; animation: snack-in .3s var(--md-ease-emph); }
.snackbar a, .snackbar button { margin-left: auto; color: var(--md-inverse-primary); font-weight: 800; background: none; border: 0; cursor: pointer; }
.snackbar--error { background: #5c1010; }
.snackbar.is-leaving { opacity: 0; transform: translateY(8px); transition: all .2s; }
@keyframes snack-in { from { opacity: 0; transform: translateY(12px); } }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--brand-ink); color: rgba(253, 246, 240, .78); margin-top: 48px; position: relative; }
.footer::before { content: ''; display: block; height: 6px; background: var(--brand-gradient-wide); }
.footer__grid { display: grid; gap: 32px; padding: 48px 0 32px; }
@media (min-width: 840px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer__logo img { height: 32px; width: auto; }
.footer__slogan { margin-top: 12px; font-weight: 800; font-size: 18px; color: #fff; }
.footer h4 { color: #fff; font-size: 14px; font-weight: 800; margin: 0 0 12px; letter-spacing: .03em; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer a:hover { color: #fff; text-decoration: underline; }
.socials { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.socials a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #fff; transition: background .2s, transform .2s; }
.socials a:hover { background: var(--md-primary); transform: translateY(-2px); text-decoration: none; }
.socials .icon { width: 22px; height: 22px; }
.want-card { background: rgba(255,255,255,.06); border-radius: var(--md-shape-lg); padding: 20px; border: 1px solid rgba(255,255,255,.1); }
.want-card p { font-size: 14px; margin: 6px 0 14px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0 28px; font-size: 12px; line-height: 1.6; display: flex; flex-direction: column; gap: 8px; }

/* ==========================================================================
   Conta / auth
   ========================================================================== */
.auth-wrap { min-height: calc(100dvh - 200px); display: grid; place-items: center; padding: 32px 16px 64px; }
.auth-card { width: min(440px, 100%); padding: 32px; }
.auth-card .head { text-align: center; margin-bottom: 24px; }
.auth-card .head img { height: 48px; margin: 0 auto 16px; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; }
.auth-card .alt { text-align: center; margin-top: 20px; font-size: 14px; color: var(--md-on-surface-variant); }
.auth-card .alt a, .link { color: var(--md-primary); font-weight: 700; }
.alert { padding: 12px 16px; border-radius: var(--md-shape-md); font-size: 14px; font-weight: 600; }
.alert--error { background: var(--md-error-container); color: var(--md-on-error-container); }
.alert--success { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }
.alert--info { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }

.account { display: grid; gap: 24px; align-items: start; }
@media (min-width: 960px) { .account { grid-template-columns: 260px minmax(0, 1fr); } }
.account-nav { padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.account-nav .who { padding: 12px 16px 16px; }
.account-nav a, .account-nav button.linklike { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 16px; border-radius: var(--md-shape-full); font-weight: 600; font-size: 15px; color: var(--md-on-surface-variant); background: none; border: 0; width: 100%; cursor: pointer; text-align: left; }
.account-nav a:hover, .account-nav button.linklike:hover { background: var(--md-surface-container); }
.account-nav a.is-active { background: var(--md-primary-container); color: var(--md-on-primary-container); }
@media (max-width: 959px) {
  .account-nav { flex-direction: row; overflow-x: auto; padding: 6px; border-radius: var(--md-shape-full); scrollbar-width: none; }
  .account-nav .who, .account-nav hr { display: none; }
  .account-nav a, .account-nav button.linklike { height: 40px; white-space: nowrap; font-size: 14px; padding: 0 14px; }
  .account-nav a .icon, .account-nav button .icon { width: 18px; height: 18px; }
}
.list-cards { display: grid; gap: 16px; }
@media (min-width: 720px) { .list-cards { grid-template-columns: repeat(2, 1fr); } }
.list-card { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.list-card .occasion { align-self: flex-start; }
.list-card .row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.history-item { display: flex; gap: 16px; padding: 16px; align-items: flex-start; }
.history-item img { width: 72px; height: 72px; object-fit: contain; background: #fff; border-radius: var(--md-shape-md); flex: none; box-shadow: inset 0 0 0 1px var(--md-outline-variant); }
.history-item .msg { font-size: 13px; color: var(--md-on-surface-variant); white-space: pre-line; margin: 6px 0 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.gift-hero { border-radius: var(--md-shape-xl); padding: 32px; background: var(--brand-gradient); color: #fff; }
.gift-hero .badge { background: rgba(255,255,255,.22); }

/* Erro */
.error-page { text-align: center; padding: 72px 16px; }
.error-page .code { font-size: 96px; font-weight: 800; line-height: 1; background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Banner de instalação PWA */
.install-banner { position: fixed; left: 16px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: var(--md-shape-lg); background: var(--md-surface-container-lowest); box-shadow: var(--md-elev-3); max-width: 480px; margin: 0 auto; }
.install-banner img { width: 40px; height: 40px; }
.install-banner .txt { flex: 1; font-size: 14px; line-height: 1.3; }
@media (min-width: 840px) { .install-banner { bottom: 24px; left: auto; right: 24px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
