/* ==========================================================================
   Daniela Maia Cosméticos & Variedades — loja
   ========================================================================== */

:root {
  --plum: #6b2360;
  --plum-dark: #4d1846;
  --magenta: #c81e78;
  --magenta-dark: #a9165f;
  --pink: #f8cdd9;
  --pink-soft: #fdeef3;
  --cream: #fff7fa;
  --ink: #2b1e27;
  --muted: #7d6b76;
  --line: #f0dde5;
  --white: #ffffff;
  --green: #1faa59;
  --amber: #c98a00;
  --danger: #d13a3a;

  --brand-gradient: linear-gradient(100deg, var(--plum) 0%, var(--magenta) 100%);
  --shadow-sm: 0 1px 2px rgba(58, 20, 50, 0.06), 0 2px 8px rgba(58, 20, 50, 0.05);
  --shadow-md: 0 6px 24px rgba(58, 20, 50, 0.1);
  --shadow-lg: 0 18px 50px rgba(58, 20, 50, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 66px;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

/* Precisa vir antes das regras de display para o atributo hidden funcionar. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.container {
  width: min(1180px, 100% - 32px);
  margin-inline: auto;
}

.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;
}

/* ---------- Botões -------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand-gradient); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { box-shadow: var(--shadow-md); }
.btn--ghost { background: var(--white); color: var(--plum); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--pink); background: var(--pink-soft); }
.btn--wa { background: #25d366; color: #08351a; box-shadow: 0 6px 18px rgba(37, 211, 102, 0.32); }
.btn--wa:hover { background: #1fbe5b; color: #062a14; }
.btn--block { width: 100%; }
.btn--lg { padding: 15px 26px; font-size: 15px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- Convite para instalar o app ---------------------------------- */
.install-card {
  position: fixed;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 80;
  max-width: 520px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  transform: translateY(calc(-100% - 16px));
  transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease;
  opacity: 0;
}
.install-card.is-visible { transform: none; opacity: 1; }
.install-card img {
  width: 46px; height: 46px;
  border-radius: 13px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  object-fit: cover;
}
.install-card__text { flex: 1; min-width: 0; }
.install-card__text strong {
  display: block;
  font-size: 14.5px;
  color: var(--plum-dark);
  line-height: 1.25;
}
.install-card__text span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
}
.install-card__actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.install-card__actions .btn { padding: 10px 18px; font-size: 13.5px; }
.install-card__close {
  width: 34px; height: 34px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: background 0.2s, color 0.2s;
}
.install-card__close:hover { background: var(--pink-soft); color: var(--plum); }

@media (max-width: 430px) {
  .install-card { gap: 10px; padding: 10px; }
  .install-card__text span { display: none; }
  .install-card__actions .btn { padding: 10px 15px; font-size: 13px; }
}

/* ---------- Barra de aviso ----------------------------------------------- */
.announce {
  background: var(--brand-gradient);
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  letter-spacing: 0.02em;
}
.announce:empty { display: none; }

/* ---------- Cabeçalho ----------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; box-shadow: var(--shadow-sm); }
.brand__name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.05;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand__tag {
  display: block;
  font-family: var(--font-body);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.search {
  position: relative;
  flex: 1;
  max-width: 460px;
  margin-left: auto;
}
.search input {
  width: 100%;
  border: 1.5px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 11px 16px 11px 42px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(200, 30, 120, 0.08); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.header__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  position: relative;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--line);
  color: var(--plum);
  transition: background 0.2s, border-color 0.2s;
}
.icon-btn:hover { background: var(--pink-soft); border-color: var(--pink); }
.badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px;
  background: var(--magenta); color: #fff;
  font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
  border: 2px solid var(--white);
}
.badge[hidden] { display: none; }

/* ---------- Hero ---------------------------------------------------------- */
.hero {
  background:
    radial-gradient(1000px 380px at 82% -10%, rgba(200, 30, 120, 0.14), transparent 60%),
    linear-gradient(180deg, var(--pink-soft), var(--cream));
  padding: 44px 0 34px;
  border-bottom: 1px solid var(--line);
}
.hero__grid { display: grid; gap: 26px; align-items: center; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 46px);
  line-height: 1.1;
  margin: 0 0 12px;
  color: var(--plum-dark);
}
.hero h1 em { font-style: italic; color: var(--magenta); }
.hero p { margin: 0 0 22px; color: var(--muted); font-size: 15.5px; max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__art {
  position: relative;
  display: none;
  justify-self: center;
}
.hero__art img {
  width: min(320px, 70vw);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  border: 6px solid var(--white);
}
.hero__pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12.5px; font-weight: 600; color: var(--plum);
}

/* ---------- Filtros ------------------------------------------------------- */
.toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  background: var(--cream);
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--line);
}
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.chips::-webkit-scrollbar { height: 4px; }
.chips::-webkit-scrollbar-thumb { background: var(--pink); border-radius: 4px; }
.chip {
  flex: 0 0 auto;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--plum);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px; font-weight: 700;
  transition: all 0.18s ease;
}
.chip:hover { border-color: var(--pink); }
.chip.is-active { background: var(--brand-gradient); color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }

.toolbar__row {
  display: flex; align-items: center; gap: 12px;
  margin-top: 10px; flex-wrap: wrap;
}
.results-count { font-size: 13px; color: var(--muted); }

/* ---------- Ordenação (lista própria, não a nativa do sistema) ----------- */
.sortbox { position: relative; margin-left: auto; }
.sort {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1.5px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 13px; font-weight: 700; color: var(--plum);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.sort:hover { border-color: var(--pink); background: var(--pink-soft); }
.sort.is-set { border-color: var(--magenta); background: var(--pink-soft); }
.sort__chevron { transition: transform 0.22s ease; opacity: 0.7; }
.sort[aria-expanded="true"] .sort__chevron { transform: rotate(180deg); }

/* Fica preso ao body (não à barra sticky) para não ficar sob o fundo escuro. */
.sort-sheet {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 65;
  width: 232px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.sort-sheet.is-open { opacity: 1; transform: none; pointer-events: auto; }
.sort-sheet__grip { display: none; }
.sort-sheet__title {
  margin: 0;
  padding: 7px 12px 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.sort-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%;
  border: 0;
  background: none;
  border-radius: 11px;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  transition: background 0.15s;
}
.sort-opt:hover { background: var(--pink-soft); }
.sort-opt.is-active { color: var(--magenta); font-weight: 800; background: var(--pink-soft); }
.sort-opt.is-active::after {
  content: "";
  width: 15px; height: 9px;
  border-left: 2.4px solid currentColor;
  border-bottom: 2.4px solid currentColor;
  transform: rotate(-45deg) translate(2px, -2px);
  flex-shrink: 0;
}

/* ---------- Grade de produtos -------------------------------------------- */
main { padding: 26px 0 90px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 14px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--pink); }
.card__media { position: relative; aspect-ratio: 1 / 1; background: var(--pink-soft); cursor: pointer; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__flags { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 5px; }
.flag {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em;
  padding: 4px 9px; border-radius: 999px; color: #fff; text-transform: uppercase;
}
.flag--promo { background: var(--magenta); }
.flag--new { background: var(--plum); }
.flag--out { background: #6b6b6b; }
.card__body { padding: 11px 12px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__cat { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; }
.card__name {
  font-size: 14px; font-weight: 700; line-height: 1.3; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  cursor: pointer;
}
.card__price { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; margin-top: auto; }
.price { font-size: 17px; font-weight: 800; color: var(--plum-dark); }
.price--old { font-size: 12.5px; color: var(--muted); text-decoration: line-through; font-weight: 600; }
.card__stock { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.card__stock.is-low { color: var(--amber); }
.card__stock.is-out { color: var(--danger); }
.card .btn { margin-top: 8px; padding: 10px 14px; font-size: 13px; }

/* ---------- Estados ------------------------------------------------------- */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  grid-column: 1 / -1;
}
.empty h3 { font-family: var(--font-display); color: var(--plum); font-size: 22px; margin: 12px 0 6px; }
.skeleton {
  background: linear-gradient(90deg, #f5e7ee 25%, #fbf2f6 37%, #f5e7ee 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
  border-radius: var(--radius);
  height: 262px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- Drawer / modais ---------------------------------------------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(43, 20, 38, 0.5);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 50;
}
.overlay.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  background: var(--white);
  z-index: 60;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: var(--shadow-lg);
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.drawer__head h2 { font-family: var(--font-display); font-size: 20px; margin: 0; color: var(--plum-dark); }
.drawer__close {
  margin-left: auto; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: var(--pink-soft); color: var(--plum); display: grid; place-items: center;
}
.drawer__body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.drawer__foot { border-top: 1px solid var(--line); padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: var(--white); }

/* ---------- Carrinho ------------------------------------------------------ */
.cart-item {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item img { width: 68px; height: 68px; border-radius: 12px; object-fit: cover; background: var(--pink-soft); }
.cart-item__name { font-size: 14px; font-weight: 700; line-height: 1.3; margin: 0 0 2px; }
.cart-item__price { font-size: 13px; color: var(--muted); font-weight: 600; }
.cart-item__row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button {
  width: 32px; height: 32px; border: 0; background: var(--white); color: var(--plum);
  font-size: 17px; font-weight: 700; line-height: 1;
}
.qty button:hover { background: var(--pink-soft); }
.qty span { min-width: 30px; text-align: center; font-weight: 800; font-size: 14px; }
.cart-item__total { margin-left: auto; font-weight: 800; color: var(--plum-dark); }
.link-danger { background: none; border: 0; color: var(--danger); font-size: 12.5px; font-weight: 700; padding: 0; }

.totals { font-size: 14px; }
.totals__row { display: flex; justify-content: space-between; padding: 4px 0; color: var(--muted); font-weight: 600; }
.totals__row--grand {
  border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 10px;
  font-size: 19px; font-weight: 800; color: var(--plum-dark);
}
.free-ship-note {
  background: var(--pink-soft); border: 1px dashed var(--pink);
  border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12.5px;
  color: var(--plum); font-weight: 600; margin-bottom: 12px;
}

/* ---------- Modal --------------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 16px;
  opacity: 0; pointer-events: none; transition: opacity 0.22s ease;
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__box {
  background: var(--white);
  border-radius: 22px;
  width: min(880px, 100%);
  max-height: min(90vh, 760px);
  overflow: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
}
.modal.is-open .modal__box { transform: none; }
.modal__close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, 0.92); color: var(--plum);
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.product-view { display: grid; grid-template-columns: 1fr; }
.product-view__gallery { background: var(--pink-soft); }
.product-view__main { aspect-ratio: 1 / 1; }
.product-view__main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.thumbs img {
  width: 58px; height: 58px; border-radius: 10px; object-fit: cover;
  border: 2px solid transparent; cursor: pointer; flex: 0 0 auto; background: #fff;
}
.thumbs img.is-active { border-color: var(--magenta); }
.product-view__info { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.product-view__info h2 { font-family: var(--font-display); font-size: 25px; margin: 0; color: var(--plum-dark); line-height: 1.2; }
.product-view__desc { color: var(--muted); font-size: 14.5px; white-space: pre-line; }
.product-view__price { display: flex; align-items: baseline; gap: 10px; }
.product-view__price .price { font-size: 28px; }
.product-view__actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.product-view__actions .qty button { width: 40px; height: 42px; font-size: 19px; }
.product-view__actions .btn { flex: 1; min-width: 180px; }

/* ---------- Checkout ------------------------------------------------------ */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--plum); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  background: var(--white);
  outline: none;
  font-size: 14.5px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--pink); box-shadow: 0 0 0 4px rgba(200, 30, 120, 0.08);
}
.field textarea { resize: vertical; min-height: 74px; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.radio-card {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px;
  cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--plum);
  display: flex; align-items: center; gap: 8px; background: var(--white);
  transition: all 0.18s ease;
}
.radio-card input { accent-color: var(--magenta); margin: 0; }
.radio-card:has(input:checked) { border-color: var(--magenta); background: var(--pink-soft); }
.step-title {
  font-family: var(--font-display); font-size: 17px; color: var(--plum-dark);
  margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--line);
}
.step-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------- Rodapé -------------------------------------------------------- */
.footer {
  background: var(--plum-dark);
  color: #f3dfea;
  padding: 40px 0 28px;
}
.footer__grid { display: grid; gap: 26px; }
.footer h4 { font-family: var(--font-display); font-size: 18px; margin: 0 0 10px; color: #fff; }
.footer p, .footer li { font-size: 13.5px; color: #e0c4d5; margin: 0 0 7px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 26px; padding-top: 16px;
  font-size: 12.5px; color: #cfaec3;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
}
.credit {
  display: inline-flex; align-items: center; gap: 7px;
  color: #e7c9da;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.credit svg { color: #4ade80; flex-shrink: 0; }
.credit strong { color: #fff; font-weight: 700; }
.credit:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.4); text-decoration: none; }

.social { display: flex; gap: 10px; margin-top: 12px; }
.social a {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: grid; place-items: center; color: #fff;
  transition: background 0.2s;
}
.social a:hover { background: var(--magenta); }

/* ---------- Barra fixa mobile do carrinho -------------------------------- */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  transform: translateY(120%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.cart-bar.is-visible { transform: none; }
.cart-bar .btn { width: 100%; justify-content: space-between; }

/* ---------- WhatsApp flutuante ------------------------------------------- */
.wa-float {
  position: fixed; right: 16px; bottom: 84px; z-index: 44;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.06); }

/* ---------- Toasts -------------------------------------------------------- */
.toast-host {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: min(420px, calc(100% - 32px));
}
.toast {
  background: var(--plum-dark); color: #fff;
  padding: 11px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
  max-width: 100%;
}
.toast.is-visible { opacity: 1; transform: none; }
.toast--success { background: #15803d; }
.toast--error { background: var(--danger); }

/* ---------- Responsivo ---------------------------------------------------- */
@media (max-width: 640px) {
  .search { display: none; }
  .search.is-mobile-open {
    display: block; position: absolute; left: 16px; right: 16px; top: 100%;
    margin: 0; max-width: none; padding: 10px 0;
  }
  .header__inner { position: relative; }
  .brand__name { font-size: 17px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 11px; }

  /* No celular a ordenação vira uma gaveta que sobe de baixo. */
  .sort-sheet {
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0;
    width: auto;
    border-radius: 24px 24px 0 0;
    border: 0;
    padding: 8px 10px calc(14px + env(safe-area-inset-bottom));
    transform: translateY(101%);
    transform-origin: bottom center;
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s;
  }
  .sort-sheet.is-open { transform: none; }
  .sort-sheet__grip {
    display: block;
    width: 42px; height: 4px;
    border-radius: 4px;
    background: var(--line);
    margin: 6px auto 10px;
  }
  .sort-sheet__title { padding: 0 14px 6px; font-size: 11px; }
  .sort-opt { padding: 15px 14px; font-size: 15.5px; border-radius: 14px; }
}

@media (min-width: 641px) {
  .search-toggle { display: none; }
  /* No desktop a lista é um popover pequeno, não precisa escurecer a tela. */
  #sortBackdrop { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
  .cart-bar { display: none; }
  .wa-float { bottom: 24px; }
}

@media (min-width: 860px) {
  .hero { padding: 62px 0 52px; }
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; }
  .hero__art { display: block; }
  .product-view { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
