/* ============================================================
   Farmácia Mais Que Popular — estilos (layout inspirado no
   e-commerce Pague Menos, adaptado à identidade da marca).
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&display=swap");

:root {
  --red: #e60023;
  --red-dark: #b8001c;
  --blue: #0d2b6b;
  --blue-soft: #eef2fb;
  --green: #0f9d58;
  --ink: #1c1c1c;
  --ink-2: #555;
  --line: #e6e8ec;
  --bg: #f4f6f9;
  --white: #fff;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 2px 10px rgba(18, 24, 40, .07);
  --shadow-lg: 0 14px 40px rgba(18, 24, 40, .14);
  --maxw: 1240px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 10px 18px;
  font-weight: 700; font-size: 14px; cursor: pointer;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease, color .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); box-shadow: 0 8px 20px rgba(230, 0, 35, .3); }
.btn-outline { background: #fff; color: var(--red); border: 1.5px solid var(--red); }
.btn-outline:hover { background: #fff2f4; }
.btn-dark { background: var(--blue); color: #fff; }
.btn-dark:hover { background: #0a2050; }
.btn-ghost { background: transparent; color: var(--blue); border: 1.5px solid var(--line); }
.btn-ghost:hover { background: var(--blue-soft); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  gap: 16px; padding: 8px 0;
}
.topbar > * { padding: 0 16px; }
.topbar-tagline { margin: 0; font-size: 13px; font-weight: 600; color: #cdd8f2; text-align: center; }

/* ---------- Header main ---------- */
.header-main {
  background: var(--white);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px 16px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-img {
  width: 46px; height: 46px; border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(230, 0, 35, .18);
}
.logo-text { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.05; }
.logo-text strong { font-family: "Poppins", "Inter", sans-serif; font-size: 22px; color: var(--blue); font-weight: 800; letter-spacing: -.5px; }
.logo-text small { font-family: "Poppins", "Inter", sans-serif; font-size: 18px; color: var(--red); font-weight: 700; letter-spacing: .3px; }

.search {
  display: flex; align-items: center; gap: 8px; flex: 1;
  background: var(--bg); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 5px 5px 5px 18px;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px rgba(230, 0, 35, .1); background: #fff; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 18px; }
.ha-user, .ha-cart { display: flex; align-items: center; gap: 10px; }
.ha-user .ha-ico, .ha-cart .ha-ico { font-size: 22px; position: relative; }
.ha-orders {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 999px;
  background: var(--bg); font-size: 20px; transition: background .15s, transform .15s;
}
.ha-orders:hover { background: var(--blue-soft); transform: translateY(-1px); }
.ha-txt { display: flex; flex-direction: column; line-height: 1.15; }
.ha-txt small { font-size: 11px; color: var(--ink-2); }
.ha-txt strong { font-size: 13px; color: var(--blue); font-weight: 700; max-width: 150px; }
.ha-user:hover strong, .ha-cart:hover strong { color: var(--red); }
.ha-cart { background: var(--bg); border-radius: 999px; padding: 6px 14px; }
.ha-cart:hover { background: var(--blue-soft); }
.cart-badge {
  position: absolute; top: -8px; right: -12px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; opacity: 0; transform: scale(.5);
  transition: transform .18s ease, opacity .18s;
}
.cart-badge.is-on { opacity: 1; transform: scale(1); }

/* ---------- Nav de categorias ---------- */
.catnav { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.catnav ul {
  max-width: var(--maxw); margin: 0 auto; padding: 0 16px;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  align-items: center;
}
@media (min-width: 900px) {
  .catnav ul { justify-content: space-between; }
}
.catnav ul::-webkit-scrollbar { display: none; }
.catnav a {
  display: block; padding: 14px 14px; font-size: 14px; font-weight: 600;
  color: var(--ink-2); white-space: nowrap; border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
}
.catnav a:hover { color: var(--red); border-bottom-color: var(--red); }
.catnav li:first-child a { color: var(--red); }

/* ---------- Faixa de benefícios ---------- */
.benefits {
  max-width: var(--maxw); margin: 16px auto 0; padding: 0 16px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
}
.benefit {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow);
}
.benefit .b-ico { font-size: 24px; }
.benefit strong { display: block; font-size: 13.5px; color: var(--blue); }
.benefit small { font-size: 11.5px; color: var(--ink-2); }

/* Listagens começam direto nos produtos, sem repetir atalhos da home. */
.catalog-page .catnav,
.catalog-page .benefits {
  display: none;
}

.catalog-page main.wrap {
  padding-top: 20px;
}

/* ---------- Carrossel institucional ---------- */
.carousel-hero {
  position: relative; overflow: hidden; width: 100%; margin: 18px 0 8px;
  border-radius: var(--radius-lg); background: #271f75; box-shadow: var(--shadow);
  user-select: none;
}
.carousel-track { display: flex; transition: transform .5s cubic-bezier(.77, 0, .18, 1); will-change: transform; }
.cslide { position: relative; min-width: 100%; aspect-ratio: 1600 / 533; overflow: hidden; background: #271f75; }
.cslide-banner { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.cslide-image-link { position: absolute; inset: 0; z-index: 2; }
.cslide-hotspot { position: absolute; left: 18.5%; top: 71%; width: 20%; height: 16%; z-index: 3; border-radius: 999px; }
.cslide-hotspot:focus-visible, .cslide-image-link:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.carousel-arrow {
  position: absolute; top: 50%; z-index: 5; width: 42px; height: 42px; padding: 0;
  transform: translateY(-50%); border: 1px solid rgba(255,255,255,.55); border-radius: 50%;
  background: rgba(13,43,107,.58); color: #fff; font-size: 30px; line-height: 1; cursor: pointer;
}
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-arrow:hover { background: rgba(13,43,107,.85); }
.carousel-dots { position: absolute; left: 50%; bottom: 12px; z-index: 5; display: flex; gap: 8px; transform: translateX(-50%); }
.cdot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.48); cursor: pointer; }
.cdot.active { background: #fff; transform: scale(1.3); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw); margin: 16px auto 0; padding: 0 16px;
  display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px;
}
.hero-main {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  min-height: 300px; padding: 40px;
  background: linear-gradient(120deg, #0d2b6b 0%, #e60023 100%);
  color: #fff; display: flex; flex-direction: column; justify-content: center;
}
.hero-main h1 { font-size: clamp(26px, 3.4vw, 42px); font-weight: 900; letter-spacing: -.8px; max-width: 12ch; }
.hero-main p { font-size: 16px; margin: 12px 0 22px; max-width: 40ch; color: rgba(255, 255, 255, .92); }
.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; }
.hero-card {
  border-radius: var(--radius-lg); padding: 22px; color: #fff;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  box-shadow: var(--shadow);
}
.hero-card.a { background: linear-gradient(120deg, #0f9d58, #0b7a43); }
.hero-card.b { background: linear-gradient(120deg, #f5a623, #e60023); }
.hero-card strong { font-size: 20px; font-weight: 900; }
.hero-card span { font-size: 13.5px; opacity: .95; }
.hero-card .mini-btn {
  margin-top: 10px; align-self: flex-start; background: #fff; color: var(--blue);
  padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: 13px;
}

/* ---------- Seções ---------- */
.section { max-width: var(--maxw); margin: 30px auto 0; padding: 0 16px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head .eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--red); }
.section-head h2 { font-size: 24px; font-weight: 900; color: var(--blue); letter-spacing: -.5px; }
.section-head a { font-size: 14px; font-weight: 700; color: var(--red); }
.section-head a:hover { text-decoration: underline; }

/* ---------- Departamento tiles ---------- */
.dept-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.dept {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 12px; text-align: center; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.dept:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.dept .d-ico { font-size: 34px; }
.dept span { display: block; margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--blue); }
.dept:hover span { color: var(--red); }
.dept .d-count { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-2); }

/* ---------- Grid de produtos ---------- */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.card {
  position: relative; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column;
  min-width: 0; overflow: hidden;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-off {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--green); color: #fff; font-size: 12px; font-weight: 800;
  padding: 3px 9px; border-radius: 999px;
}
.card-rx {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: var(--blue); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; max-width: calc(100% - 24px); text-align: center;
}
.card-thumb {
  height: 180px; flex: 0 0 180px; min-width: 0; overflow: hidden;
  display: grid; place-items: center; font-size: 62px;
  background: var(--bg); border-radius: var(--radius); margin-bottom: 12px;
}
.card-thumb img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: contain; border-radius: inherit; }
.card-name {
  font-size: 14px; font-weight: 600; color: var(--ink); min-height: 42px; max-height: 42px;
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-name:hover { color: var(--red); }
.card-tag { font-size: 11.5px; color: var(--ink-2); margin-top: 4px; min-height: 17px; }
.card-rating { color: #f5a623; font-size: 12.5px; margin: 6px 0; }
.card-rating small { color: var(--ink-2); }
.card-price { display: flex; flex-direction: column; margin: auto 0 12px; padding-top: 4px; }
.card-price strong { font-size: 21px; font-weight: 900; color: var(--blue); }
.card-price .price-free { color: var(--green); }
.price-old { font-size: 12.5px; color: #9aa1ad; text-decoration: line-through; }

/* ---------- Slider horizontal (vitrine) ---------- */
.rail { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rail .card { min-width: 236px; scroll-snap-align: start; }

/* ---------- Página de categoria ---------- */
.crumb { font-size: 13px; color: var(--ink-2); margin: 18px 0 12px; }
.crumb a:hover { color: var(--red); }
.cat-layout { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.cat-layout.no-filters { grid-template-columns: 1fr; }
.filters { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.filters h3 { font-size: 15px; color: var(--blue); margin-bottom: 12px; }
.filters ul li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.filters a { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.filters a:hover { color: var(--red); }
.filters a.active { color: var(--red); font-weight: 800; }
.filters-extra { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.filters-offers {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 14px; font-weight: 800;
  transition: filter .15s ease, transform .15s ease;
}
.filters-offers:hover { filter: brightness(.94); transform: translateY(-1px); }
.filters-offers span { font-weight: 700; opacity: .9; }
.filters-offers.active { outline: 2px solid var(--blue); outline-offset: 2px; }
.cat-head { margin-bottom: 16px; }
.cat-head h1 { font-size: 26px; font-weight: 900; color: var(--blue); }
.cat-head p { color: var(--ink-2); font-size: 14px; margin: 6px 0 0; }
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

/* ---------- Toolbar de filtros ---------- */
.cat-toolbar {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 18px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.tb-field { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.tb-field select {
  border: 1.5px solid var(--line); border-radius: 8px; padding: 7px 10px;
  font: inherit; font-size: 13.5px; color: var(--ink); background: #fff; cursor: pointer;
}
.tb-field select:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.tb-field input[type="range"] { accent-color: var(--red); width: 140px; }
.tb-field output { font-weight: 800; color: var(--blue); min-width: 76px; }
.tb-check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.tb-check input { accent-color: var(--red); width: 16px; height: 16px; }
.tb-check:has(input:disabled) { cursor: default; opacity: .85; }
.tb-check input:disabled { cursor: default; }
.tb-count { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--red); }

/* ---------- Paginação do catálogo ---------- */
/* Com ~2 mil itens o grid é paginado; os botões seguem a cor da marca
   e a página atual fica em destaque sólido. */
.pager {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap; margin: 26px 0 8px;
}
.pager button {
  min-width: 40px; height: 40px; padding: 0 12px;
  background: var(--white); color: var(--blue);
  border: 1.5px solid var(--line); border-radius: 10px;
  font-weight: 700; font-size: 14px;
  transition: background .15s, border-color .15s, color .15s;
}
.pager button:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.pager button.is-current {
  background: var(--red); border-color: var(--red); color: #fff;
  cursor: default;
}
.pager button:disabled { opacity: .4; cursor: default; }
.pager .pager-gap { color: var(--ink-2); padding: 0 2px; }

/* ---------- Formulário (login) ---------- */
.auth-wrap { max-width: 440px; margin: 24px auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 30px; }
.auth-wrap h1 { font-size: 26px; font-weight: 900; color: var(--blue); text-align: center; }
.auth-wrap .sub { text-align: center; color: var(--ink-2); font-size: 14px; margin: 8px 0 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--blue); margin-bottom: 6px; }
.field input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font: inherit; font-size: 15px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 4px rgba(230,0,35,.1); }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.coupon-row .btn { white-space: nowrap; }
.coupon-msg { display: block; margin-top: 8px; font-size: 12.5px; font-weight: 600; }
.coupon-msg.is-ok { color: var(--green); }
.coupon-msg.is-error { color: var(--red); }
.auth-tabs { display: flex; gap: 8px; background: var(--bg); border-radius: 999px; padding: 5px; margin-bottom: 22px; }
.auth-tabs button { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 10px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.auth-tabs button.active { background: var(--white); color: var(--red); box-shadow: var(--shadow); }
.auth-foot { text-align: center; font-size: 13px; color: var(--ink-2); margin-top: 16px; }
.auth-foot a { color: var(--red); font-weight: 700; }

/* ---------- Checkout ---------- */
.page-title { font-size: 28px; font-weight: 900; color: var(--blue); margin: 4px 0 18px; }
.steps { display: flex; gap: 10px; list-style: none; padding: 0; margin: 0 0 22px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.step-n { width: 26px; height: 26px; border-radius: 50%; background: var(--line); color: var(--ink-2); display: grid; place-items: center; font-size: 13px; }
.step.active { color: var(--red); }
.step.active .step-n { background: var(--red); color: #fff; }
.step:not(:last-child)::after { content: "›"; margin-left: 10px; color: var(--line); font-weight: 400; }

.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
/* Itens de grid têm min-width:auto: sem isto, campos longos esticam a coluna
   e o layout de 2 colunas quebra para 1 no desktop. */
.co-forms { min-width: 0; }
.co-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 22px; }
.co-card + .co-card { margin-top: 18px; }
.co-card h2 { font-size: 18px; font-weight: 800; color: var(--blue); margin: 0 0 16px; }
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.option, .pay-opt { cursor: pointer; }
.option input, .pay-opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-body, .pay-body { display: flex; flex-direction: column; gap: 3px; border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; height: 100%; transition: border-color .15s, background .15s; }
.option input:checked + .opt-body, .pay-opt input:checked + .pay-body { border-color: var(--red); background: #fff5f7; }
.opt-ico, .pay-ico { font-size: 22px; }
.opt-body strong, .pay-body strong { font-size: 14.5px; color: var(--blue); }
.opt-body small, .pay-body small { font-size: 12.5px; color: var(--ink-2); }
.opt-price { margin-top: 6px; font-size: 13px; font-weight: 800; }
.pay-list { display: flex; flex-direction: column; gap: 12px; }
.pay-body { flex-direction: row; align-items: center; gap: 12px; padding: 13px 16px; }
.pay-body .pay-ico { font-size: 20px; }
.pay-body small { margin-left: auto; }
.co-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.co-fields .field { margin: 0; min-width: 0; }
.co-fields .field-sm { max-width: 140px; }
.co-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 18px; }
/* Resumo do checkout reaproveita .summary (sticky/padding) com ajustes próprios. */
.summary .sum-note { line-height: 1.45; }
.summary .mini-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.mini-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); gap: 12px; }
.mini-row span:first-child { flex: 1; }
.sum-div { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.sum-note { font-size: 12.5px; color: var(--ink-2); margin: 12px 0 0; }

/* ---------- Confirmação ---------- */
.confirm-box { text-align: center; padding: 40px 20px 10px; }
.confirm-ico { font-size: 54px; }
.confirm-box h1 { font-size: 30px; font-weight: 900; color: var(--blue); margin: 14px 0 8px; }
.confirm-sub { color: var(--ink-2); font-size: 15px; }
.confirm-id { display: inline-block; margin-top: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 10px 22px; font-size: 14px; color: var(--ink-2); box-shadow: var(--shadow); }
.confirm-id strong { color: var(--red); }
.confirm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 900px; margin: 26px auto 0; align-items: start; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv:last-of-type { border-bottom: 0; }
.kv small { color: var(--ink-2); font-weight: 700; }
.kv span { text-align: right; color: var(--ink); }

/* `display:flex` acima venceria o atributo `hidden` do HTML: reforça o esconde. */
[hidden] { display: none !important; }

/* ---------- Meus pedidos ---------- */
#orders-list { display: flex; flex-direction: column; gap: 16px; }
.order-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px 20px; }
.oc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.oc-id { display: block; font-size: 15px; font-weight: 900; color: var(--blue); letter-spacing: .3px; }
.oc-date { font-size: 12.5px; color: var(--ink-2); }
.oc-status { font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.oc-status.s0 { background: #fff2f4; color: var(--red); }
.oc-status.s1 { background: #fff7e6; color: #b7791f; }
.oc-status.s2 { background: #e8f1ff; color: var(--blue); }
.oc-status.s3 { background: #e7f6ee; color: var(--green); }
.oc-status.sp { background: #fdecec; color: #b3261e; border: 1px solid #f3c2c2; }
.oc-pending { border: 1px solid #f3c2c2; }
.oc-alert { margin: 14px 0; padding: 10px 14px; border-radius: 10px; background: #fdecec; color: #8a1c1c; font-size: 13.5px; line-height: 1.5; }
.oc-track { display: flex; gap: 6px; margin: 16px 0 14px; flex-wrap: wrap; }
.oc-track .dot { font-size: 11.5px; font-weight: 700; color: var(--ink-2); background: var(--bg); border-radius: 999px; padding: 5px 12px; position: relative; }
.oc-track .dot.on { background: var(--blue-soft); color: var(--blue); }
.oc-items { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.oc-chip { font-size: 12.5px; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.oc-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.oc-meta { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; flex-wrap: wrap; }
.oc-total { font-size: 18px; font-weight: 900; color: var(--blue); }
.oc-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .checkout-layout, .confirm-grid { grid-template-columns: 1fr; }
  .option-grid, .co-fields { grid-template-columns: 1fr; }
  /* No celular o resumo vem depois do form; sticky não faz sentido. */
  .summary { position: static; }
  .co-fields .field-sm { max-width: none; }
}

@media (max-width: 720px) {
  .page-title { font-size: 23px; }
  .co-card { padding: 18px 16px; }
  /* Botões em largura cheia, alvo de toque confortável. */
  .co-actions { flex-direction: column-reverse; gap: 10px; }
  .co-actions .btn { width: 100%; justify-content: center; }
  .coupon-row { flex-wrap: wrap; }
  .coupon-row .btn { width: 100%; }
  .step { font-size: 12.5px; }
}

/* ---------- Página de produto ---------- */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; margin-top: 18px; }
.p-media {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  display: grid; place-items: center; min-height: 420px; font-size: 180px; box-shadow: var(--shadow);
}
.p-media img { width: 100%; max-height: 420px; object-fit: contain; border-radius: inherit; }
.p-info h1 { font-size: 30px; font-weight: 900; color: var(--blue); letter-spacing: -.5px; }
.p-tag { display: inline-block; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; margin: 10px 0; }
.p-rating { color: #f5a623; font-size: 14px; margin-bottom: 14px; }
.p-rating small { color: var(--ink-2); }
.p-price { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 4px; }
.p-price .now { font-size: 36px; font-weight: 900; color: var(--red); }
.p-price .was { font-size: 16px; color: #9aa1ad; text-decoration: line-through; }
.p-stock { color: var(--green); font-weight: 700; font-size: 14px; margin-bottom: 16px; }
.p-buy { display: flex; gap: 12px; align-items: center; margin: 18px 0; flex-wrap: wrap; }
.qty { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { border: 0; background: #fff; width: 40px; height: 44px; font-size: 20px; color: var(--blue); }
.qty button:hover { background: var(--blue-soft); }
.qty span { width: 46px; text-align: center; font-weight: 800; }
.p-note { background: var(--blue-soft); border-radius: var(--radius); padding: 16px; font-size: 13.5px; color: var(--blue); margin-top: 18px; }
.p-note strong { display: block; margin-bottom: 4px; }
.p-desc { margin-top: 18px; color: var(--ink-2); font-size: 14.5px; }

/* ---------- Carrinho ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; margin-top: 18px; }
.cart-list { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.cart-row { display: grid; grid-template-columns: 84px 1fr auto auto; gap: 16px; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: 0; }
.cart-thumb { height: 74px; border-radius: var(--radius); background: var(--bg); display: grid; place-items: center; font-size: 40px; }
.cart-info h4 { font-size: 15px; font-weight: 700; color: var(--ink); }
.cart-info small { color: var(--ink-2); }
.cart-remove { background: none; border: 0; color: #b8001c; font-size: 13px; font-weight: 700; margin-top: 6px; }
.cart-remove:hover { text-decoration: underline; }
.cart-sub { font-weight: 900; color: var(--blue); font-size: 17px; min-width: 90px; text-align: right; }
.summary { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 22px; position: sticky; top: 16px; }
.summary h3 { font-size: 18px; color: var(--blue); margin-bottom: 16px; }
.sum-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14.5px; color: var(--ink-2); }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 20px; font-weight: 900; color: var(--blue); }
.summary .btn { margin-top: 14px; }

/* ---------- Cupom de desconto ---------- */
.coupon-box { margin: 14px 0 4px; padding: 14px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg); }
.coupon-box label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.coupon-input { display: flex; gap: 8px; }
.coupon-input input {
  flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 9px 16px; font: inherit; font-size: 14px; outline: 0; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.coupon-input input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(13, 43, 107, .1); }
.coupon-box small { display: block; margin-top: 8px; font-size: 12.5px; font-weight: 600; min-height: 1em; }
.coupon-box small.ok { color: var(--green); }
.coupon-box small.err { color: var(--red-dark); }
.points-note { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
.points-note strong { color: var(--blue); }
.points-earned {
  margin-top: 14px; padding: 12px 18px; border-radius: 999px;
  background: #fff8e1; color: #7a5b00; font-size: 14px; display: inline-block;
}
.points-earned strong { color: #5c4500; }

.empty { text-align: center; padding: 60px 20px; color: var(--ink-2); }
.empty .e-ico { font-size: 64px; }

/* ---------- Rodapé ---------- */
footer { background: var(--blue); color: #cdd8f2; margin-top: 44px; padding: 40px 0 0; }
.foot-grid { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.foot-brand .brand-logo-img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; margin-bottom: 12px; }
.foot-brand strong { color: #fff; font-size: 18px; display: block; }
.foot-brand p { font-size: 13.5px; margin: 10px 0 0; }
.foot-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.foot-col a, .foot-col p { display: block; font-size: 13.5px; color: #b8c5e6; margin: 0 0 10px; }
.foot-col a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 34px; padding: 18px 16px; text-align: center; font-size: 12.5px; color: #9fb0d8; }
.foot-bottom .demo { color: #ffb3bf; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-weight: 700; font-size: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 999;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- WhatsApp flutuante ---------- */
.wpp-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 500;
  background: #25d366; color: #fff; border-radius: 999px; padding: 14px 20px;
  font-weight: 800; font-size: 14px; box-shadow: 0 12px 30px rgba(37, 211, 102, .4);
  display: flex; align-items: center; gap: 8px;
}
.wpp-float:hover { transform: translateY(-3px); }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .header-main { grid-template-columns: auto 1fr; grid-template-areas: "logo actions" "search search"; gap: 12px; }
  .logo { grid-area: logo; }
  .search { grid-area: search; }
  .header-actions { grid-area: actions; justify-content: flex-end; }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
  .dept-grid { grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-layout { grid-template-columns: 1fr; }
  .cat-layout > * { min-width: 0; }
  .product { grid-template-columns: 1fr; gap: 24px; }
  .cart-layout { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .carousel-hero { border-radius: 14px; }
  .cslide { aspect-ratio: auto; min-height: 180px; }
  .carousel-arrow { width: 34px; height: 34px; font-size: 24px; }
  .carousel-prev { left: 6px; }
  .carousel-next { right: 6px; }
  .carousel-dots { bottom: 7px; gap: 6px; }
  .cdot { width: 8px; height: 8px; }
  .cslide-hotspot { display: none; }
  .topbar .atalhos { display: none; }
  .topbar { justify-content: center; }
  .header-actions .ha-txt { display: none; }
  .benefits { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-thumb { height: 130px; flex-basis: 130px; }
  .dept-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-main { padding: 26px; min-height: 240px; }
  .foot-grid { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 64px 1fr; }
  /* Nav de categorias: deixa claro que há mais itens à direita */
  .catnav { position: relative; }
  .catnav::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 44px;
    pointer-events: none;
    background: linear-gradient(to right, rgba(255,255,255,0), #fff 75%);
  }
  .catnav ul { padding: 0 16px; scroll-padding-left: 16px; -webkit-overflow-scrolling: touch; }
  .catnav a { padding: 12px 12px; }
  .catnav.at-end::after { opacity: 0; }
  .catnav::after { transition: opacity .2s; }
  /* Filtros ocupam a largura toda e viram lista rolável horizontal */
  .filters { padding: 14px; min-width: 0; }
  .filters h3 { margin-bottom: 8px; }
  .filters ul { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .filters ul::-webkit-scrollbar { display: none; }
  .filters ul li { border-bottom: 0; padding: 0; flex: 0 0 auto; }
  .filters ul a {
    display: block; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px;
    white-space: nowrap; font-size: 13px;
  }
  .filters ul a.active { border-color: var(--red); background: #fff5f5; }
  .filters-extra { margin-top: 10px; padding-top: 10px; }
  .filters-offers { width: 100%; }
}
