/* ═══════════════════════════════════════════════════════════════════════════
   CITshop — Loja de afiliados Shopee · Identidade CITmax
   Righteous (display) + Montserrat (corpo) · Mobile-first
═══════════════════════════════════════════════════════════════════════════ */
:root {
  --c-primary: #00c896;   /* Inovação */
  --c-mid:     #008B87;
  --c-deep:    #036271;
  --c-white:   #ffffff;

  --c-bg:      #f4f7f6;
  --c-surface: #ffffff;
  --c-ink:     #0d1f1c;
  --c-ink-2:   #5b6b67;
  --c-ink-3:   #8a9794;
  --c-border:  #e4ebe9;
  --c-star:    #ffb300;
  --c-sale:    #ff4d4f;

  --grad:      linear-gradient(135deg, #00c896, #008B87);
  --grad-deep: linear-gradient(135deg, #008B87, #036271);

  --r-card: 16px;
  --r-btn:  12px;
  --r-pill: 999px;
  --max-w:  1240px;
  --header-h: 64px;

  --shadow-sm: 0 1px 3px rgba(3,98,113,.08);
  --shadow:    0 6px 20px rgba(3,98,113,.10);
  --shadow-lg: 0 14px 40px rgba(3,98,113,.16);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; border: none; background: none; }
ul { list-style: none; }
[hidden] { display: none !important; }
.display { font-family: 'Righteous', cursive; letter-spacing: .3px; }
.wrap { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }

/* ─── Header ─────────────────────────────────────────────────────────────── */
.shop-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}
.shop-header__bar {
  display: flex; align-items: center; gap: 12px;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 34px; width: auto; }
.brand__name { font-family: 'Righteous', cursive; font-size: 20px; color: var(--c-deep); line-height: 1; }
.brand__name b { color: var(--c-primary); }
.brand__tag { font-size: 10px; color: var(--c-ink-3); display: block; font-weight: 600; letter-spacing: .2px; }

.search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--c-bg); border: 1.5px solid var(--c-border);
  border-radius: var(--r-pill); padding: 8px 14px; transition: border-color .15s;
}
.search:focus-within { border-color: var(--c-primary); }
.search input { flex: 1; border: none; background: none; outline: none; color: var(--c-ink); }
.search input::placeholder { color: var(--c-ink-3); }
.search button { color: var(--c-mid); display: flex; }

.header-link {
  flex-shrink: 0; font-weight: 600; font-size: 13px; color: var(--c-mid);
  padding: 8px 12px; border-radius: var(--r-btn);
}
.header-link:hover { background: var(--c-bg); }

/* Botão de favoritos no header */
.fav-toggle {
  position: relative; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; color: var(--c-ink-2);
  background: var(--c-bg); border: 1.5px solid var(--c-border); transition: .15s;
}
.fav-toggle:hover { color: var(--c-sale); border-color: var(--c-sale); }
.fav-toggle svg { width: 21px; height: 21px; }
.fav-toggle.is-active { color: #fff; background: var(--c-sale); border-color: var(--c-sale); }
.fav-toggle.is-active svg { fill: #fff; }
.fav-toggle__count {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: var(--r-pill); background: var(--c-sale); color: #fff;
  font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: var(--shadow-sm);
}

/* ─── Barra de categorias ───────────────────────────────────────────────── */
.cat-bar {
  position: sticky; top: var(--header-h); z-index: 49;
  background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--c-border);
  transition: box-shadow .2s;
}
/* Sombra que aparece quando a página rola (classe adicionada via JS) */
body.is-scrolled .shop-header { box-shadow: 0 4px 18px rgba(3,98,113,.10); }
body.is-scrolled .cat-bar { box-shadow: 0 6px 16px rgba(3,98,113,.06); }
.cat-bar__scroll {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 0;
  scrollbar-width: none;
}
.cat-bar__scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--r-pill);
  background: var(--c-bg); color: var(--c-ink-2);
  font-weight: 600; font-size: 13px; white-space: nowrap;
  border: 1.5px solid transparent; transition: .15s;
}
.cat-chip:hover { color: var(--c-deep); }
.cat-chip.is-active { background: var(--grad); color: #fff; box-shadow: var(--shadow-sm); }

/* ─── Cabeçalho da loja (/loja/l/:slug) ─────────────────────────────────── */
.loja-header { padding: 22px 0 6px; }
.loja-header__card {
  background: var(--loja-cor, var(--c-deep)); color: #fff; border-radius: var(--r-card);
  padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
  background-size: cover; background-position: center;
}
.loja-header__card.tem-banner { min-height: 200px; justify-content: flex-end; }
.loja-header__back { color: rgba(255,255,255,.9); font-weight: 600; font-size: 13px; align-self: flex-start; }
.loja-header__top { display: flex; align-items: center; gap: 14px; }
.loja-logo { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; border: 2px solid rgba(255,255,255,.7); background: #fff; flex-shrink: 0; }
.loja-header__nome { font-family: 'Righteous', cursive; font-size: clamp(22px, 4vw, 32px); line-height: 1.1; }
.loja-header__meta { color: rgba(255,255,255,.92); font-size: 14px; }
.loja-header__sel { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; background: rgba(255,255,255,.2); padding: 4px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; }
.loja-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.loja-chip { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,.18); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: var(--r-pill); }
a.loja-chip:hover { background: rgba(255,255,255,.3); }

/* Cor da marca da loja aplicada aos CTAs da página dela (fallback: verde CITmax) */
body.tem-loja-cor .card__buy--wa,
body.tem-loja-cor .mtg-add,
body.tem-loja-cor .cart-bar__btn,
body.tem-loja-cor .cart-enviar { background: var(--loja-cor, var(--c-primary)); }

/* ─── Hero / Carrossel ──────────────────────────────────────────────────── */
.hero { padding: 18px 0 6px; }
.hero__track {
  position: relative; border-radius: var(--r-card); overflow: hidden;
  box-shadow: var(--shadow); background: var(--grad-deep); min-height: 180px;
}
.hero__slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease;
  display: flex; align-items: flex-end;
  background-size: cover; background-position: center;
}
.hero__slide.is-active { opacity: 1; position: relative; }
.hero__slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(3,98,113,.85) 0%, rgba(0,139,135,.45) 50%, rgba(0,200,150,.05) 100%);
}
.hero__body { position: relative; z-index: 2; padding: 24px; max-width: 60%; }
.hero__kicker { color: #bff5e6; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.hero__title { font-family: 'Righteous', cursive; color: #fff; font-size: clamp(20px, 4vw, 34px); line-height: 1.1; margin: 6px 0 14px; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.hero__cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--c-deep); font-weight: 700;
  padding: 10px 20px; border-radius: var(--r-pill); box-shadow: var(--shadow);
}
.hero__dots { display: flex; gap: 6px; justify-content: center; padding: 10px 0 0; }
.hero__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-border); transition: .2s; }
.hero__dot.is-active { background: var(--c-primary); width: 22px; border-radius: var(--r-pill); }

/* ─── Toolbar (contagem + ordenação + filtro mobile) ────────────────────── */
.toolbar { display: flex; align-items: center; gap: 12px; padding: 16px 0 8px; }
.toolbar__count { font-size: 13px; color: var(--c-ink-2); font-weight: 600; }
.toolbar__count b { color: var(--c-deep); }
.toolbar__spacer { flex: 1; }
.select, .btn-filter {
  border: 1.5px solid var(--c-border); background: var(--c-surface);
  border-radius: var(--r-btn); padding: 9px 12px; font-weight: 600; font-size: 13px; color: var(--c-ink);
}
.select { outline: none; }
.btn-filter { display: none; align-items: center; gap: 6px; }

/* ─── Layout: filtros + grid ────────────────────────────────────────────── */
.layout { display: grid; grid-template-columns: 248px 1fr; gap: 22px; padding: 8px 0 40px; align-items: start; }

.filters { position: sticky; top: calc(var(--header-h) + 12px); }
.filters__card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-card); padding: 16px; box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.filters__title { font-family: 'Righteous', cursive; font-size: 14px; color: var(--c-deep); margin-bottom: 10px; }
.filter-item {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 10px;
  color: var(--c-ink-2); font-weight: 600; font-size: 13px; transition: .12s;
}
.filter-item:hover { background: var(--c-bg); color: var(--c-deep); }
.filter-item.is-active { background: var(--grad); color: #fff; }
/* Filtro segmentado por marketplace */
.seg-group { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.seg {
  flex: 1 1 auto; min-width: 64px; text-align: center;
  padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--c-border);
  background: var(--c-surface); color: var(--c-ink-2); font-weight: 600; font-size: 12px; transition: .12s;
}
.seg:hover { border-color: var(--c-primary); color: var(--c-deep); }
.seg.is-active { background: var(--grad); color: #fff; border-color: transparent; }

.price-row { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.price-row input { width: 100%; border: 1.5px solid var(--c-border); border-radius: 10px; padding: 8px 10px; outline: none; }
.price-row input:focus { border-color: var(--c-primary); }
.btn-apply { width: 100%; margin-top: 10px; background: var(--grad); color: #fff; font-weight: 700; padding: 10px; border-radius: var(--r-btn); }
.btn-clear { width: 100%; margin-top: 8px; color: var(--c-ink-2); font-weight: 600; font-size: 12px; }

/* ─── Faixas de preço prontas ───────────────────────────────────────────── */
.price-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.price-preset {
  font-size: 12px; font-weight: 600; color: var(--c-ink-2);
  padding: 6px 11px; border-radius: var(--r-pill);
  background: var(--c-bg); border: 1.5px solid transparent; transition: .12s;
}
.price-preset:hover { color: var(--c-deep); border-color: var(--c-primary); }
.price-preset.is-active { background: var(--grad); color: #fff; }

/* ─── Grid de produtos ──────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.card { animation: cardIn .26s ease both; }
@keyframes cardIn { from { opacity: 0; } to { opacity: 1; } }
.card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-card);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s; position: relative;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card__media { position: relative; aspect-ratio: 1/1; background: var(--c-bg); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s cubic-bezier(.2,.7,.3,1); }
.card:hover .card__media img { transform: scale(1.07); }
.card__badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 5px; z-index: 2; }
/* Coração de favorito no card */
.fav-btn {
  position: absolute; bottom: 8px; right: 8px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.92); color: var(--c-ink-3); box-shadow: var(--shadow-sm);
  backdrop-filter: blur(2px); transition: transform .12s, color .12s;
}
.fav-btn svg { width: 18px; height: 18px; }
.fav-btn:hover { transform: scale(1.12); color: var(--c-sale); }
.fav-btn.is-on { color: var(--c-sale); }
.fav-btn.is-on svg { fill: var(--c-sale); }
/* Botão de visualização rápida (aparece no hover, desktop) */
.qv-btn {
  position: absolute; left: 50%; bottom: 8px; transform: translate(-50%, 14px);
  z-index: 3; opacity: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: rgba(13,31,28,.82); color: #fff; font-size: 12px; font-weight: 700;
  padding: 7px 13px; border-radius: var(--r-pill); backdrop-filter: blur(3px);
  transition: opacity .18s, transform .18s;
}
.qv-btn svg { width: 14px; height: 14px; }
.card:hover .qv-btn { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
/* Selo discreto do marketplace de origem */
.card__src {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.92); color: var(--c-deep); box-shadow: var(--shadow-sm);
  backdrop-filter: blur(2px);
}
.card__src.src--shopee     { color: #ee4d2d; }
.card__src.src--aliexpress { color: #e62e04; }
.card__src.src--local      { color: var(--c-deep); background: rgba(0,200,150,.16); }
.card__src.src--citmax     { color: #fff; background: var(--grad); }
.card__commission--citmax  { color: var(--c-deep); font-weight: 700; }
.card__buy--wa             { background: #25d366; }
.card__buy--wa:hover       { filter: brightness(1.05); }
.card__buy--det            { background: var(--grad-deep); }
.card__marca               { font-family: 'Righteous', cursive; color: var(--c-deep); font-size: 15px; margin-top: auto; }
.card--detalhe             { cursor: pointer; }

/* ─── Modal de detalhe (produtos indicados pela CITmax) ─────────────────────── */
.det-scrim { position: fixed; inset: 0; background: rgba(13,31,28,.55); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.det-modal { position: relative; background: var(--c-surface); border-radius: var(--r-card); max-width: 720px; width: 100%; max-height: 92vh; overflow: auto; box-shadow: var(--shadow-lg); }
.det-close { position: absolute; top: 10px; right: 14px; z-index: 2; font-size: 26px; line-height: 1; color: var(--c-ink-2); background: rgba(255,255,255,.85); border-radius: 50%; width: 36px; height: 36px; }
.det-load { padding: 60px 20px; text-align: center; color: var(--c-ink-2); }
.det-body { display: grid; grid-template-columns: 1fr 1fr; }
.det-img { width: 100%; height: 100%; max-height: 92vh; object-fit: cover; background: var(--c-bg); }
.det-info { padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.det-selo { align-self: flex-start; background: var(--grad); color: #fff; font-weight: 700; font-size: 12px; padding: 4px 12px; border-radius: var(--r-pill); }
.det-titulo { font-family: 'Righteous', cursive; color: var(--c-deep); font-size: 22px; line-height: 1.15; }
.det-preco { font-family: 'Righteous', cursive; color: var(--c-mid); font-size: 22px; }
.det-marca { color: var(--c-ink-2); font-weight: 600; }
.det-desc { color: var(--c-ink); font-size: 14px; line-height: 1.6; }
.det-desc p { margin-bottom: 10px; }
.det-comprar { margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--grad); color: #fff; font-weight: 700; padding: 14px; border-radius: var(--r-btn); }
.det-comprar:hover { filter: brightness(1.06); }
.det-comprar svg { width: 18px; height: 18px; }
.det-aviso { font-size: 12px; color: var(--c-ink-3); text-align: center; }
@media (max-width: 620px) { .det-body { grid-template-columns: 1fr; } .det-img { max-height: 240px; } }

/* ─── Card de loja restaurante no grid ──────────────────────────────────────── */
.card__src.src--rest { color: #fff; background: var(--grad-deep); }
.card--loja { cursor: pointer; }
.card__lojadesc { font-size: 12px; color: var(--c-ink-2); margin: 2px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__fechado { font-size: 11px; font-weight: 700; color: var(--c-sale); }

/* ─── Cardápio (página do restaurante) ──────────────────────────────────────── */
.grid.cardapio { display: block; }
.cdp-nav {
  position: sticky; top: var(--header-h); z-index: 30;
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; margin-bottom: 6px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border); scrollbar-width: none;
}
.cdp-nav::-webkit-scrollbar { display: none; }
.cdp-nav__chip {
  flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--c-ink-2);
  padding: 7px 14px; border-radius: var(--r-pill); background: var(--c-bg);
  border: 1.5px solid transparent; white-space: nowrap; transition: .12s;
}
.cdp-nav__chip:hover { color: var(--c-deep); }
.cdp-nav__chip.is-active { background: var(--loja-cor, var(--grad)); color: #fff; }
body.tem-loja-cor .cdp-nav__chip.is-active { background: var(--loja-cor); }
.cdp-secao { margin: 0 0 22px; scroll-margin-top: calc(var(--header-h) + 56px); }
.cdp-secao__nome { font-family: 'Righteous', cursive; color: var(--c-deep); font-size: 19px; margin: 10px 0 12px; border-bottom: 2px solid var(--c-border); padding-bottom: 6px; }
.cdp-itens { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.cdp-item { display: flex; gap: 12px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-card); padding: 12px; cursor: pointer; transition: box-shadow .15s; align-items: flex-start; }
.cdp-item:hover { box-shadow: var(--shadow); }
.cdp-item--off { opacity: .5; cursor: not-allowed; filter: grayscale(1); }
.cdp-item__info { flex: 1; min-width: 0; }
.cdp-item__nome { font-size: 15px; font-weight: 700; color: var(--c-ink); }
.cdp-item__desc { font-size: 13px; color: var(--c-ink-2); margin: 4px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cdp-item__preco { font-family: 'Righteous', cursive; color: var(--c-mid); font-size: 16px; }
.cdp-item__img { width: 116px; height: 116px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
@media (max-width: 520px) { .cdp-item__img { width: 96px; height: 96px; } }

/* ─── Modal de montagem ─────────────────────────────────────────────────────── */
.mtg-scrim { position: fixed; inset: 0; background: rgba(13,31,28,.55); z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.mtg-modal { position: relative; background: var(--c-surface); border-radius: var(--r-card) var(--r-card) 0 0; max-width: 560px; width: 100%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.mtg-close { position: absolute; top: 10px; right: 14px; font-size: 26px; color: var(--c-ink-2); z-index: 2; }
.mtg-body { padding: 22px; overflow-y: auto; }
.mtg-titulo { font-family: 'Righteous', cursive; color: var(--c-deep); font-size: 20px; }
.mtg-desc { color: var(--c-ink-2); font-size: 13px; margin: 4px 0 14px; }
.mtg-grupo { border-top: 1px solid var(--c-border); padding: 12px 0; }
.mtg-grupo__head { margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.mtg-grupo__regra { font-size: 11px; font-weight: 700; color: var(--c-ink-3); background: var(--c-bg); padding: 2px 8px; border-radius: var(--r-pill); }
.mtg-opt { display: flex; align-items: center; gap: 10px; padding: 9px 0; cursor: pointer; font-size: 14px; }
.mtg-opt input { width: 18px; height: 18px; accent-color: var(--c-primary); }
.mtg-opt span:first-of-type { flex: 1; }
.mtg-opt__add { color: var(--c-mid); font-weight: 600; font-size: 13px; }
.mtg-obs { margin-top: 12px; }
.mtg-obs label { display: block; font-weight: 600; font-size: 13px; color: var(--c-ink-2); margin-bottom: 5px; }
.mtg-obs input { width: 100%; border: 1.5px solid var(--c-border); border-radius: var(--r-btn); padding: 10px 12px; outline: none; }
.mtg-qtd { display: flex; align-items: center; gap: 16px; margin-top: 14px; justify-content: center; }
.mtg-qtd button { width: 40px; height: 40px; border-radius: 50%; background: var(--c-bg); font-size: 20px; font-weight: 700; color: var(--c-deep); }
.mtg-qtd span { font-size: 18px; font-weight: 700; min-width: 24px; text-align: center; }
.mtg-msg { color: var(--c-sale); font-size: 13px; font-weight: 600; padding: 0 22px 8px; }
.mtg-add { margin: 0 22px 22px; padding: 14px; background: var(--grad); color: #fff; font-weight: 700; border-radius: var(--r-btn); }

/* ─── Carrinho ──────────────────────────────────────────────────────────────── */
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; padding: 10px 16px; background: transparent; display: flex; justify-content: center; }
.cart-bar__btn { background: var(--grad); color: #fff; font-weight: 700; padding: 14px 24px; border-radius: var(--r-pill); box-shadow: var(--shadow-lg); max-width: var(--max-w); width: 100%; }
.cart-scrim { position: fixed; inset: 0; background: rgba(13,31,28,.5); z-index: 95; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cart-modal { position: relative; background: var(--c-surface); border-radius: var(--r-card); max-width: 460px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 22px; box-shadow: var(--shadow-lg); }
.cart-close { position: absolute; top: 10px; right: 14px; font-size: 24px; color: var(--c-ink-2); }
.cart-titulo { font-family: 'Righteous', cursive; color: var(--c-deep); font-size: 19px; margin-bottom: 12px; }
.cart-item { border-bottom: 1px solid var(--c-border); padding: 10px 0; }
.cart-item__top { display: flex; justify-content: space-between; font-size: 14px; }
.cart-item__op { font-size: 12px; color: var(--c-ink-2); margin-top: 3px; }
.cart-item__rm { color: var(--c-sale); font-size: 12px; font-weight: 600; margin-top: 4px; }
.cart-total { text-align: right; font-size: 16px; margin: 12px 0; color: var(--c-deep); }
.cart-field { margin-bottom: 10px; }
.cart-field label { display: block; font-weight: 600; font-size: 13px; color: var(--c-ink-2); margin-bottom: 5px; }
.cart-field input { width: 100%; border: 1.5px solid var(--c-border); border-radius: var(--r-btn); padding: 11px 13px; outline: none; }
.cart-field input:focus { border-color: var(--c-primary); }
.cart-opt { font-weight: 500; color: var(--c-ink-3); font-size: 12px; }
.cart-msg { font-size: 13px; font-weight: 600; color: var(--c-mid); margin: 6px 0; }
.cart-enviar { width: 100%; background: #25d366; color: #fff; font-weight: 700; padding: 14px; border-radius: var(--r-btn); }
.cart-enviar:hover { filter: brightness(1.05); }
.cart-enviar[disabled] { opacity: .5; cursor: default; }
/* Extras do carrinho: entrega/retirada + agendar */
.cart-extra { margin: 12px 0; }
.cart-lbl { display: block; font-size: 12px; font-weight: 700; color: var(--c-ink-2); margin-bottom: 5px; }
.cart-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.cart-seg__b { flex: 1; min-width: 120px; border: 1.5px solid var(--c-border); background: var(--c-surface); color: var(--c-ink-2); font-weight: 600; font-size: 13px; padding: 9px 10px; border-radius: var(--r-btn); }
.cart-seg__b.is-on { background: var(--loja-cor, var(--grad)); color: #fff; border-color: transparent; }
body.tem-loja-cor .cart-seg__b.is-on { background: var(--loja-cor); }
.cart-inp { width: 100%; margin-top: 8px; border: 1.5px solid var(--c-border); border-radius: var(--r-btn); padding: 11px 13px; outline: none; }
.cart-inp:focus { border-color: var(--loja-cor, var(--c-primary)); }
.cart-total--sub { font-size: 13px; color: var(--c-ink-2); margin: 2px 0; }
.cart-aviso-min { margin-top: 8px; background: #fff2e8; color: #d4380d; font-weight: 700; font-size: 13px; padding: 8px 10px; border-radius: var(--r-btn); text-align: center; }

/* ─── Avaliações da loja ─────────────────────────────────────────────────── */
.reviews { margin: 22px auto; }
.rv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rv-title { font-size: 20px; color: var(--c-deep); }
.rv-media { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--c-ink-2); margin-top: 2px; }
.rv-media b { color: var(--c-deep); }
.rv-media--vazio { color: var(--c-ink-3); }
.rv-media .stars svg, .rv-item .stars svg { width: 15px; height: 15px; }
.rv-btn { background: var(--loja-cor, var(--grad)); color: #fff; font-weight: 700; padding: 10px 18px; border-radius: var(--r-pill); }
body.tem-loja-cor .rv-btn { background: var(--loja-cor); }
.rv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 14px; }
.rv-item { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-card); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.rv-item__top { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--c-ink); }
.rv-item__txt { font-size: 13px; color: var(--c-ink-2); margin-top: 5px; line-height: 1.5; }
.rv-form { margin-top: 14px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-card); padding: 16px; box-shadow: var(--shadow-sm); max-width: 460px; }
.rv-form input, .rv-form textarea { width: 100%; border: 1.5px solid var(--c-border); border-radius: var(--r-btn); padding: 11px 13px; outline: none; margin-bottom: 10px; }
.rv-form input:focus, .rv-form textarea:focus { border-color: var(--loja-cor, var(--c-primary)); }
.rv-stars { display: flex; gap: 4px; margin-bottom: 12px; }
.rv-star { font-size: 30px; line-height: 1; color: #e4ebe9; transition: color .1s; }
.rv-star.is-on { color: #ffb300; }
.rv-msg { font-size: 13px; font-weight: 600; color: var(--c-mid); margin-bottom: 8px; min-height: 1em; }
.rv-enviar { width: 100%; background: var(--loja-cor, var(--grad)); color: #fff; font-weight: 700; padding: 13px; border-radius: var(--r-btn); }
body.tem-loja-cor .rv-enviar { background: var(--loja-cor); }
.rv-enviar[disabled] { opacity: .6; }

/* ─── Modal de pedido (lojas locais) ────────────────────────────────────── */
.ped-scrim { position: fixed; inset: 0; background: rgba(13,31,28,.5); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ped-modal { position: relative; background: var(--c-surface); border-radius: var(--r-card); max-width: 440px; width: 100%; padding: 24px; box-shadow: var(--shadow-lg); }
.ped-close { position: absolute; top: 12px; right: 14px; font-size: 24px; color: var(--c-ink-3); line-height: 1; }
.ped-modal__title { font-family: 'Righteous', cursive; color: var(--c-deep); font-size: 20px; margin-bottom: 8px; }
.ped-modal__prod { font-size: 15px; margin-bottom: 4px; }
.ped-modal__preco { color: var(--c-mid); font-weight: 700; }
.ped-modal__hint { font-size: 13px; color: var(--c-ink-2); margin: 6px 0 14px; line-height: 1.5; }
.ped-field { margin-bottom: 12px; }
.ped-field label { display: block; font-weight: 600; font-size: 13px; color: var(--c-ink-2); margin-bottom: 5px; }
.ped-field input { width: 100%; border: 1.5px solid var(--c-border); border-radius: var(--r-btn); padding: 11px 13px; outline: none; }
.ped-field input:focus { border-color: var(--c-primary); }
.ped-field input[readonly] { background: var(--c-bg); color: var(--c-ink-2); }
.ped-opt { font-weight: 500; color: var(--c-ink-3); font-size: 12px; }
.ped-enviar { width: 100%; margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 8px; background: #25d366; color: #fff; font-weight: 700; padding: 13px; border-radius: var(--r-btn); }
.ped-enviar:hover { filter: brightness(1.05); }
.ped-enviar[disabled] { opacity: .6; cursor: default; }
.ped-alert { padding: 10px 12px; border-radius: var(--r-btn); font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.ped-alert--err { background: #fff1f0; color: #cf1322; }
.ped-alert--ok { background: rgba(0,200,150,.12); color: var(--c-mid); }
.badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: var(--r-pill); color: #fff; box-shadow: var(--shadow-sm); }
.badge--sale { background: var(--c-sale); }
.badge--best { background: var(--grad); }
.card__body { padding: 12px; display: flex; flex-direction: column; flex: 1; gap: 7px; }
.card__name {
  font-size: 13px; font-weight: 600; color: var(--c-ink); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 35px;
}
.card__rate { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--c-ink-2); }
.stars { display: inline-flex; gap: 1px; }
.stars svg { width: 13px; height: 13px; }
.card__sold { color: var(--c-ink-3); font-size: 11px; }
.card__price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.card__price .now { font-family: 'Righteous', cursive; color: var(--c-deep); font-size: 18px; }
.card__price .from { color: var(--c-ink-3); font-size: 11px; text-decoration: line-through; }
.card__save { font-size: 11px; font-weight: 700; color: #d4380d; background: #fff2e8; border-radius: var(--r-pill); padding: 2px 8px; align-self: flex-start; }
.card__commission { font-size: 11px; color: var(--c-mid); font-weight: 600; }
.card__buy {
  margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 13px;
  padding: 10px; border-radius: var(--r-btn); transition: filter .15s;
}
.card__buy:hover { filter: brightness(1.06); }
.card__buy svg { width: 16px; height: 16px; }

/* ─── Skeleton / estados ────────────────────────────────────────────────── */
.skel { background: linear-gradient(90deg, #eef3f1 25%, #e2eae7 37%, #eef3f1 63%); background-size: 400% 100%; animation: sk 1.3s infinite; border-radius: var(--r-card); }
.skel-card { aspect-ratio: .72; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.empty, .error-state { text-align: center; padding: 60px 20px; color: var(--c-ink-2); grid-column: 1/-1; }
.empty__emoji { font-size: 42px; margin-bottom: 8px; }

.load-more-wrap { display: flex; justify-content: center; padding: 26px 0; }
.btn-load {
  background: var(--c-surface); border: 1.5px solid var(--c-primary); color: var(--c-deep);
  font-weight: 700; padding: 12px 28px; border-radius: var(--r-pill); box-shadow: var(--shadow-sm);
}
.btn-load:hover { background: var(--c-primary); color: #fff; }
.btn-load[disabled] { opacity: .5; cursor: default; }

/* ─── Captação de lojas parceiras ───────────────────────────────────────── */
.partner-cta { background: var(--grad); color: #fff; }
.partner-cta__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 16px; flex-wrap: wrap; }
.partner-cta__title { font-size: 20px; }
.partner-cta__sub { font-size: 14px; color: rgba(255,255,255,.9); margin-top: 2px; }
.partner-cta__btn { flex-shrink: 0; background: #fff; color: var(--c-deep); font-weight: 700; padding: 12px 22px; border-radius: var(--r-pill); box-shadow: var(--shadow); }
.partner-cta__btn:hover { filter: brightness(1.04); }

/* ─── Aviso de afiliado + Footer ────────────────────────────────────────── */
.affiliate-strip {
  background: rgba(0,200,150,.08); border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border);
  font-size: 12px; color: var(--c-mid); text-align: center; padding: 8px 16px; font-weight: 600;
}
.shop-footer { background: var(--c-deep); color: rgba(255,255,255,.85); padding: 30px 0; margin-top: 10px; }
.shop-footer .display { color: #fff; font-size: 18px; }
.shop-footer__tag { color: #bff5e6; font-size: 13px; margin: 6px 0 14px; }
.shop-footer__note { font-size: 12px; color: rgba(255,255,255,.6); line-height: 1.6; max-width: 760px; }
.shop-footer a { color: #fff; font-weight: 600; }

/* ─── Barra "Como funciona" (confiança) ─────────────────────────────────── */
.trust-bar { border-bottom: 1px solid var(--c-border); background: linear-gradient(180deg, #fff, var(--c-bg)); }
.trust-bar__in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 14px 16px; }
.trust { display: flex; align-items: center; gap: 11px; }
.trust__ico {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; font-size: 20px;
  background: rgba(0,200,150,.12); box-shadow: inset 0 0 0 1px rgba(0,200,150,.18);
}
.trust__t { display: block; font-family: 'Righteous', cursive; font-size: 13px; color: var(--c-deep); line-height: 1.1; }
.trust__s { display: block; font-size: 11.5px; color: var(--c-ink-2); line-height: 1.35; margin-top: 2px; }
@media (max-width: 720px) {
  .trust-bar__in { grid-template-columns: 1fr; gap: 8px; padding: 12px 16px; }
  .trust__ico { width: 34px; height: 34px; font-size: 17px; }
}

/* ─── Botão flutuante "voltar ao topo" ──────────────────────────────────── */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 65;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--c-surface); color: var(--c-deep);
  box-shadow: var(--shadow-lg); border: 1.5px solid var(--c-border);
  display: grid; place-items: center;
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none;
  transition: opacity .22s, transform .22s, background .15s, color .15s;
}
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--grad); color: #fff; border-color: transparent; }
.to-top svg { width: 22px; height: 22px; }
/* Sobe acima da barra do carrinho quando ela estiver visível */
body:has(.cart-bar:not([hidden])) .to-top { bottom: 84px; }

/* ─── Quick view (preview rápido) ───────────────────────────────────────── */
.qv-scrim { position: fixed; inset: 0; background: rgba(13,31,28,.55); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.qv-modal { position: relative; background: var(--c-surface); border-radius: var(--r-card); max-width: 680px; width: 100%; max-height: 92vh; overflow: auto; box-shadow: var(--shadow-lg); animation: qvIn .2s ease; }
@keyframes qvIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.qv-close { position: absolute; top: 10px; right: 14px; z-index: 2; font-size: 26px; line-height: 1; color: var(--c-ink-2); background: rgba(255,255,255,.85); border-radius: 50%; width: 36px; height: 36px; }
.qv-body { display: grid; grid-template-columns: 1fr 1fr; }
.qv-img { width: 100%; height: 100%; max-height: 92vh; object-fit: cover; background: var(--c-bg); }
.qv-info { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.qv-selo { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: var(--r-pill); background: var(--c-bg); color: var(--c-deep); }
.qv-titulo { font-family: 'Righteous', cursive; color: var(--c-deep); font-size: 21px; line-height: 1.2; }
.qv-rate { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--c-ink-2); }
.qv-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.qv-price .now { font-family: 'Righteous', cursive; color: var(--c-deep); font-size: 26px; }
.qv-price .from { color: var(--c-ink-3); font-size: 13px; text-decoration: line-through; }
.qv-save { align-self: flex-start; font-size: 12px; font-weight: 700; color: #d4380d; background: #fff2e8; border-radius: var(--r-pill); padding: 3px 10px; }
.qv-cta { margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--grad); color: #fff; font-weight: 700; padding: 14px; border-radius: var(--r-btn); }
.qv-cta--wa { background: #25d366; }
.qv-cta:hover { filter: brightness(1.06); }
.qv-cta svg { width: 18px; height: 18px; }
.qv-aviso { font-size: 12px; color: var(--c-ink-3); text-align: center; }
@media (max-width: 620px) { .qv-body { grid-template-columns: 1fr; } .qv-img { max-height: 230px; } }

/* ─── Selo de confiança (números) ───────────────────────────────────────── */
.shop-stats { background: var(--c-surface); border-top: 1px solid var(--c-border); }
.shop-stats__in { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px; padding: 20px 16px; }
.shop-stat { display: flex; align-items: center; gap: 10px; }
.shop-stat__n { font-family: 'Righteous', cursive; font-size: 24px; color: var(--c-deep); line-height: 1; }
.shop-stat__l { font-size: 12.5px; color: var(--c-ink-2); font-weight: 600; }
.shop-stat__ico { font-size: 22px; }

/* ─── Busca dentro do cardápio ──────────────────────────────────────────── */
.cdp-search { position: relative; margin: 4px 0 14px; }
.cdp-search input { width: 100%; border: 1.5px solid var(--c-border); border-radius: var(--r-pill); padding: 12px 16px 12px 42px; outline: none; background: var(--c-surface); }
.cdp-search input:focus { border-color: var(--loja-cor, var(--c-primary)); }
.cdp-search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--c-ink-3); }
.cdp-secao[hidden], .cdp-item[hidden] { display: none !important; }

/* ─── Drawer de filtros (mobile) ────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; background: rgba(13,31,28,.45); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.is-open { opacity: 1; pointer-events: auto; }

/* ─── Responsivo ────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .btn-filter { display: inline-flex; }
  .header-link { display: none; }
  .filters {
    position: fixed; top: 0; left: 0; height: 100%; width: 84%; max-width: 320px;
    background: var(--c-surface); z-index: 70; padding: 18px; overflow-y: auto;
    transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg);
  }
  .filters.is-open { transform: translateX(0); }
  .filters__close { display: block; float: right; font-size: 22px; color: var(--c-ink-2); }
}
@media (min-width: 861px) { .filters__close { display: none; } }
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .brand__name { font-size: 17px; }
  .brand__tag { display: none; }
  .hero__body { max-width: 100%; padding: 16px; }
}
