/* ============================================================
   RODRIGUES MATERIAL PARA CONSTRUÇÃO - CSS
   Para mudar cores, edite as variáveis na seção :root
   ============================================================ */

:root {
  --primary:        #E8590C;
  --primary-dark:   #C2410C;
  --accent:         #f97316;
  --accent-dark:    #ea6317;
  --secondary:      #0E1B31;
  --sec-light:      #1B2A44;
  --sec-lighter:    #2A3B5A;
  --bg:             #F4F6FA;
  --white:          #ffffff;
  --gray-100:       #f3f4f6;
  --gray-200:       #E6EAF1;
  --gray-400:       #9ca3af;
  --gray-500:       #6b7280;
  --green:          #1B9E4B;
  --green-dark:     #158040;
  --sidebar-w:      230px;
  --header-h:       78px;       /* Altura da linha principal do header */
  --header-total:   78px;       /* Vira 94px no mobile (linha 1 + busca) */
  --shadow:         0 1px 3px rgba(0,0,0,.10);
  --shadow-md:      0 4px 16px rgba(0,0,0,.14);
  --radius:         8px;
  --radius-lg:      12px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- Animações ---- */
@keyframes slideIn {
  from { transform: translateX(400px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Instrument Sans', -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--secondary);
  line-height: 1.5;
}
h1, h2, h3, h4, .logo-name, .hero-title, .sec-title,
.prod-name, .cart-hdr h3, .price-main, .pprice {
  font-family: 'Archivo', 'Instrument Sans', sans-serif;
}
a  { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ============================================================
   HEADER  (flex-wrap permite 2 linhas no mobile)
   ============================================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  background: var(--secondary);
  display: flex; align-items: center;
  flex-wrap: wrap;                       /* permite quebrar para 2 linhas */
  gap: 8px;
  padding: 0 14px;
  z-index: 1000;
  box-shadow: 0 2px 14px rgba(0,0,0,.35);
}

/* Grupo esquerdo: menu + logo */
.hdr-left {
  display: flex; align-items: center; gap: 8px;
  height: var(--header-h);
  flex-shrink: 0;
}

/* Pesquisa — fica no centro no desktop, vira linha própria no mobile */
.search-wrap {
  flex: 1;
  min-width: 200px;   /* nunca fica muito pequeno */
  max-width: 420px;
  position: relative;
  order: 0;
}

/* Grupo direito: wa + carrinho (nav agora é irmão, ver .hdr-nav) */
.hdr-right {
  display: flex; align-items: center; gap: 4px;
  height: var(--header-h);
  flex-shrink: 0;
  order: 2;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 14px;
  letter-spacing: -.5px; flex-shrink: 0;
}
.logo-img {
  height: 46px; width: auto;
  max-width: 160px;
  object-fit: contain; flex-shrink: 0;
}
.logo-name { color: #fff; font-size: 15px; font-weight: 800; line-height: 1.2; white-space: nowrap; letter-spacing: -.01em; }
.logo-tag  {
  color: #fff; background: var(--primary);
  font-size: 8px; font-weight: 800; letter-spacing: .07em;
  padding: 2px 6px; border-radius: 3px;
  display: inline-block; white-space: nowrap; margin-top: 2px;
}

/* Campo de pesquisa */
.search-icon-svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); pointer-events: none; font-size: 14px;
}
#search-input {
  width: 100%; height: 42px;
  background: var(--sec-light);
  border: 1px solid var(--sec-lighter);
  border-radius: 10px;
  padding: 0 10px 0 34px;
  color: #fff; font-size: 14px; outline: none;
  font-family: 'Instrument Sans', sans-serif;
  transition: border-color .2s;
}
#search-input::placeholder { color: var(--gray-400); }
#search-input:focus { border-color: var(--primary); }

/* Dropdown de pesquisa */
.search-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  z-index: 2000;
  display: none;
}

/* Seções */
.sd-section { border-bottom: 1px solid var(--gray-100); }
.sd-section:last-child { border-bottom: none; }
.sd-section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px 4px;
}
.sd-section-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--gray-400);
}
.sd-ver-tudo {
  font-size: 12px; font-weight: 600; color: var(--primary);
  cursor: pointer;
}
.sd-ver-tudo:hover { text-decoration: underline; }

/* Itens de produto */
.sd-product-list { }
.sd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; cursor: pointer;
  transition: background .15s;
  border-top: 1px solid var(--gray-100);
}
.sd-item:first-child { border-top: none; }
.sd-item:hover { background: var(--gray-100); }
.sd-icon {
  width: 52px; height: 52px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0; overflow: hidden;
}
.sd-icon img { width: 100%; height: 100%; object-fit: cover; }
.sd-info { flex: 1; min-width: 0; }
.sd-name  { font-size: 13px; font-weight: 600; color: var(--secondary); line-height: 1.3; }
.sd-name mark { background: none; color: var(--primary); font-weight: 800; }
.sd-price { font-size: 13px; color: var(--primary); font-weight: 700; margin-top: 2px; }
.sd-add-btn {
  flex-shrink: 0;
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius);
  padding: 6px 10px; font-size: 11px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: background .15s;
}
.sd-add-btn:hover { background: var(--primary-dark); }
.sd-empty { padding: 14px; text-align: center; color: var(--gray-400); font-size: 13px; }

/* Navegação — no desktop fica entre a busca e o WhatsApp/carrinho (era
   filho de .hdr-right; virou filho direto de .header pra poder ganhar
   linha própria no mobile sem desalinhar a altura de .hdr-right).
   .hdr-left/.search-wrap ficam em order:0 (padrão); order:1 aqui garante
   que o nav vem depois da busca, e .hdr-right (order:2) fecha por último. */
.hdr-nav { display: flex; align-items: center; gap: 2px; order: 1; flex-shrink: 0; }
.hdr-link {
  color: #d1d5db; padding: 6px 9px;
  border-radius: 6px; font-size: 13px; font-weight: 500;
  transition: all .2s; white-space: nowrap;
}
.hdr-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.hdr-link.active { color: var(--primary); }

/* Instagram */
.btn-ig {
  background: none; border: none;
  padding: 5px; border-radius: 6px;
  display: flex; align-items: center; transition: all .2s;
}
.btn-ig:hover { background: rgba(255,255,255,.08); }
.ig-icon { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }

/* WhatsApp Header */
.btn-wa-hdr {
  background: var(--green); color: #fff; border: none;
  height: 42px; padding: 0 15px; border-radius: 10px;
  font-size: 13px; font-weight: 700; font-family: 'Instrument Sans', sans-serif;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; transition: background .2s;
  flex-shrink: 0;
}
.btn-wa-hdr:hover { background: var(--green-dark); }

/* Carrinho */
.btn-cart {
  position: relative; background: var(--sec-light); border: none;
  color: #fff; width: 42px; height: 42px; border-radius: 10px;
  font-size: 19px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background .2s;
}
.btn-cart:hover { background: var(--sec-lighter); }
.cart-badge {
  position: absolute; top: -5px; right: -5px;
  background: var(--primary); color: #fff;
  border-radius: 50%; width: 19px; height: 19px;
  font-size: 10px; font-weight: 800; font-family: 'Archivo', sans-serif;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--secondary);
  transition: transform .2s;
}

/* Botão menu — abre/fecha a sidebar de categorias (drawer), em qualquer
   tamanho de tela: o layout novo é full-width, sem coluna lateral fixa. */
.btn-menu {
  display: flex; align-items: center; justify-content: center;
  background: var(--sec-light); border: none;
  color: #fff; font-size: 19px; width: 42px; height: 42px; border-radius: 10px;
  flex-shrink: 0; line-height: 1; transition: background .2s;
}
.btn-menu:hover { background: var(--sec-lighter); }

/* ============================================================
   LAYOUT
   ============================================================ */
.layout {
  display: block;
  padding-top: var(--header-total);   /* ajustado por variável */
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR — drawer que fica escondida por padrão e desliza por cima
   do conteúdo ao clicar no botão de menu (☰) do header.
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--secondary);
  position: fixed; top: var(--header-total); left: 0; bottom: 0;
  overflow-y: auto; z-index: 950;
  display: flex; flex-direction: column;
  transform: translateX(calc(-1 * var(--sidebar-w)));
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: none;
}
.sidebar.open {
  transform: translateX(0);
  box-shadow: 4px 0 24px rgba(0,0,0,.35);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--sec-lighter); border-radius: 2px; }

/* Fundo escurecido atrás da sidebar quando aberta */
.sidebar-overlay {
  display: none;
  position: fixed; top: var(--header-total); left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.4);
  z-index: 940;
}
.sidebar-overlay.open { display: block; }

.sb-label {
  color: var(--gray-400); font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 16px 16px 8px;
}

.cat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin: 0 8px 4px; cursor: pointer;
  color: #d1d5db; font-size: 13px; font-weight: 600;
  border-radius: 10px;
  transition: all .15s;
}
.cat-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.cat-item.active {
  background: var(--primary); color: #fff;
}
.cat-icon {
  font-size: 27px; width: 48px; height: 48px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  border-radius: 9px; background: rgba(255,255,255,.06);
}
.cat-item.active .cat-icon { background: rgba(255,255,255,.18); }
.cat-icon-img {
  width: 48px; height: 48px; padding: 9px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 9px; background: rgba(255,255,255,.06);
  filter: brightness(0.8) saturate(1.1);
}
.cat-item.active .cat-icon-img { background: rgba(255,255,255,.18); }
.sb-cat-img {
  width: 48px; height: 48px; padding: 9px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 9px; background: rgba(255,255,255,.06);
  box-sizing: border-box;
}
.cat-item.active .sb-cat-img { background: rgba(255,255,255,.18); }
/* Apenas imagens JPEG/PNG precisam de blending (fundo branco) */
.sb-cat-img[src$=".jpeg"],
.sb-cat-img[src$=".jpg"],
.sb-cat-img[src$=".png"] {
  mix-blend-mode: multiply;
  filter: brightness(1.6) contrast(1.1);
}

.sb-footer {
  margin-top: auto; padding: 14px;
  border-top: 1px solid var(--sec-light);
}
.sb-footer-lbl { color: var(--gray-400); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.sb-phone a { color: #4ade80; font-size: 14px; font-weight: 700; }

/* ============================================================
   CONTEÚDO PRINCIPAL
   ============================================================ */
.main {
  margin-left: 0;
  flex: 1;
  min-width: 0;
}

/* ============================================================
   HERO BANNER  (mais baixo que antes)
   ============================================================ */
.hero {
  margin: 0;
  border-radius: 0;
  background: radial-gradient(120% 130% at 85% 0%, #1D3358 0%, #0E1B31 55%);
  padding: 48px 53px;               /* era 40px 44px */
  position: relative; overflow: hidden;
  min-height: 374px;                /* era 312px, +20% */
  display: flex; align-items: center;
}
.hero::before {
  content: '';
  position: absolute; right: -40px; top: -60px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(232,89,12,.22), transparent 62%);
  border-radius: 50%; pointer-events: none;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(232,89,12,.16); color: #F8B78A;
  border: 1px solid rgba(232,89,12,.4);
  padding: 5px 12px; border-radius: 100px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
  margin-bottom: 12px;             /* era 20px */
}

.hero-title {
  font-size: 30px;                 /* era 40px */
  font-weight: 800;
  color: #fff; line-height: 1.2; letter-spacing: -.02em;
  margin-bottom: 10px;             /* era 16px */
}
.hero-title .accent { color: #F97A2E; }

.hero-sub {
  color: #B4BECF; font-size: 14px; /* era 16px */
  max-width: 460px; line-height: 1.6;
  margin-bottom: 18px;             /* era 28px */
}

.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-primary {
  background: var(--primary); color: #fff; border: none;
  padding: 11px 22px; border-radius: var(--radius);
  font-size: 14px; font-weight: 700; font-family: 'Instrument Sans', sans-serif;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all .2s;
  box-shadow: 0 12px 28px -8px rgba(232,89,12,.5);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(234,88,12,.4); }

.btn-green {
  background: var(--green); color: #fff; border: none;
  padding: 11px 22px; border-radius: var(--radius);
  font-size: 14px; font-weight: 700; font-family: 'Instrument Sans', sans-serif;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all .2s;
}
.btn-green:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(22,163,74,.4); }

/* Botão secundário do hero (ex: "Falar no WhatsApp") — translúcido sobre o fundo escuro */
.btn-secondary {
  background: rgba(255,255,255,.08); color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  padding: 11px 22px; border-radius: var(--radius);
  font-size: 14px; font-weight: 700; font-family: 'Instrument Sans', sans-serif;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all .2s;
}
.btn-secondary:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }

/* ============================================================
   FEATURES BAR
   ============================================================ */
.features {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 0; margin: 0 16px;
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
}
.feat {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  border-right: 1px solid #EEF1F6;
  min-width: 0;
}
.feat:last-child { border-right: none; }
.feat-icon-mask {
  display: inline-block; width: 24px; height: 24px; flex-shrink: 0;
  background-color: var(--primary);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center;  mask-position: center;
  -webkit-mask-size: contain;     mask-size: contain;
}
.feat-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feat-title    { font-size: 13px; font-weight: 700; color: var(--secondary); line-height: 1.3; font-family: 'Archivo', sans-serif; }
.feat-sub      { font-size: 11px; font-weight: 500; color: #8791A3; line-height: 1.3; }

/* ============================================================
   CARROSSEL DE MARCAS
   ============================================================ */
.brands-section {
  background: #fff;
  border-top: 1px solid var(--gray-200);
  padding: 26px 0 24px;
  margin: 0;
  overflow: hidden;
}
.brands-label {
  text-align: center;
  font-size: 11px; font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 12px;
}
.brands-wrapper {
  overflow: hidden;
  position: relative;
  /* fade nas bordas */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image:         linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.brands-track {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
  /* Sem animation aqui de propósito: só o JS (fixBrandsLoop, em app.js)
     liga a classe .brands-ready depois de calcular --brands-shift com a
     largura exata do 1º conjunto. Se a animação começasse a rodar antes
     disso (ex: direto no CSS, com o -50% como fallback), o keyframe de
     100% ficava "gravado" com esse valor errado assim que o navegador
     resolvia a @keyframes — e como --brands-shift muda DEPOIS que o
     ciclo já começou, esse primeiro ciclo continuava usando o valor
     antigo (o vão em branco), mesmo a variável já estando correta.
  */
}
.brands-track.brands-ready {
  animation: scroll-brands 22s linear infinite;
}
.brands-track:hover { animation-play-state: paused; }

.brands-track img {
  height: 54px; width: auto;
  object-fit: contain; flex-shrink: 0;
  opacity: .65;
  filter: grayscale(20%);
  transition: opacity .3s, filter .3s;
}
.brands-track img:hover { opacity: 1; filter: none; }

@keyframes scroll-brands {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(-1 * var(--brands-shift, 50%))); }
}

/* ============================================================
   CATEGORIAS (carrossel horizontal, acima da lista de produtos)
   ============================================================ */
.categories { padding: 20px 16px 4px; }
.sec-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.sec-header h2 { font-size: 20px; font-weight: 800; color: var(--secondary); font-family: 'Archivo', sans-serif; }
.sec-header-link { font-size: 13px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.sec-header-link:hover { color: var(--primary-dark); }

.cat-carousel-wrap { position: relative; display: flex; align-items: center; gap: 8px; }

.cat-grid {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 2px 8px;
  flex: 1;
  min-width: 0;
}
.cat-grid::-webkit-scrollbar { display: none; }

.cat-card {
  flex: 0 0 auto;
  width: 96px;
  background: transparent; border: none;
  padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  cursor: pointer;
}
.cg-icon {
  width: 88px; height: 88px; border-radius: 20px;
  background: #EEF2F8; color: #3A4A66;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(16,24,40,.10);
  transition: transform .15s, box-shadow .15s;
}
.cat-card:hover .cg-icon { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(16,24,40,.16); }
.cat-card:first-child .cg-icon,
.cat-card.active .cg-icon { background: #FEF1E7; color: var(--primary); }
.cg-icon img { width: 100%; height: 100%; object-fit: cover; }
.cg-name { font-size: 13px; font-weight: 600; color: #2B3446; text-align: center; line-height: 1.25; }

.cat-arrow {
  flex-shrink: 0;
  align-self: stretch;
  width: 40px; border-radius: 8px;
  background: transparent; border: none;
  color: #C7CCD6;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 400; line-height: 1; cursor: pointer;
  transition: color .15s;
}
.cat-arrow:hover { color: var(--primary); }

/* ============================================================
   SEÇÃO DE PRODUTOS
   ============================================================ */
.products-section { padding: 8px 28px 48px; }
.sec-title { font-size: 20px; font-weight: 800; color: var(--secondary); margin-bottom: 2px; }
.sec-count { color: var(--gray-500); font-size: 13px; margin-bottom: 10px; }

/* Abas de subcategoria - Piso e Revestimento */
.subcat-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 16px;
}
.subcat-btn {
  background: var(--gray-100); color: var(--secondary);
  border: 1px solid var(--gray-200);
  padding: 6px 16px; border-radius: 100px;
  font-size: 13px; font-weight: 600;
  transition: all .18s; cursor: pointer; white-space: nowrap;
}
.subcat-btn:hover { background: var(--gray-200); }
.subcat-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Colunas fixas de 306px (mesma largura do card do carrossel de Mais
   Vendidos/Promoção) — sem 1fr/minmax, os cards nunca esticam nem
   encolhem; o justify-content centraliza o conjunto na página, e o
   espaço que não couber vira margem igual dos dois lados. */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 306px);
  gap: 14px;
  justify-content: center;
}

/* Aba Promoção: carrossel horizontal em vez de grade + paginação. Rola
   sozinho via JS (initPromoAutoScroll) e volta pro início ao chegar no
   fim — não é pra parecer uma lista com scroll manual, então a barra de
   rolagem fica escondida (dá pra arrastar com o mouse/dedo mesmo assim,
   só não aparece a barra visualmente).
   Sem scroll-snap de propósito — briga com o auto-scroll suave em JS
   (o navegador tenta "encaixar" de volta a cada pixel movido). */
.products-grid.promo-scroll {
  display: flex;
  overflow-x: auto;
  padding-bottom: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.products-grid.promo-scroll .prod-card {
  /* flex-shrink:0 é proposital — initPromoAutoScroll (js/app.js) sempre
     clona cards o suficiente pra garantir overflow real, então o card
     nunca precisa encolher pra caber; com flex-shrink:1, o navegador
     comprimia TODOS os clones pra caber juntos na tela, cancelando o
     overflow que o auto-scroll depende pra se mover (o carrossel ficava
     parado com poucos produtos). */
  flex: 0 0 306px;
}
.products-grid.promo-scroll::-webkit-scrollbar { display: none; }

/* ============================================================
   CARD DE PRODUTO (nomes de classe iguais ao mockup index-1a.html)
   ============================================================ */
.prod-card {
  position: relative;
  background: #fff; border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: all .22s;
  display: flex; flex-direction: column;
}
.prod-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.promo-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: #DC2626; color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: .05em;
  padding: 6px 10px; border-radius: 100px;
}

.prod-image {
  height: 168px;
  display: flex; align-items: center; justify-content: center;
  font-size: 58px;
  background: #ffffff;
  overflow: hidden;
}
/* Quando tem imagem real */
.prod-image.has-img { background: #ffffff; }
.prod-image img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform .3s;
}
.prod-card:hover .prod-image img { transform: scale(1.05); }
.prod-body { padding: 14px 14px 16px; flex: 1; display: flex; flex-direction: column; border-top: 1px solid #F0F3F8; }

.prod-body .prod-badge {
  display: inline-block;
  align-self: flex-start;
  background: #FEF1E7; color: var(--primary);
  font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 100px;
  margin-bottom: 8px;
}
.prod-name        { font-size: 14px; font-weight: 700; color: var(--secondary); margin-bottom: 9px; line-height: 1.35; }
.prod-price       { margin-top: auto; padding-top: 0; }
.price-main       { font-size: 23px; font-weight: 800; color: var(--secondary); line-height: 1; }
.price-sub        { font-size: 11px; color: #9AA3B4; font-weight: 500; margin-top: 5px; }
.consulte         { font-size: 16px; color: var(--secondary); font-weight: 700; }

/* Seletor de quantidade do card (mesmos nomes usados também na página de detalhe do produto) */
.qty-control, .qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 12px;
  margin-bottom: 8px;
}
.qty-btn {
  border: none;
  width: 42px; height: 42px;
  font-size: 21px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background .15s;
  font-family: 'Archivo', sans-serif;
}
.qty-btn:first-child { background: #FED7AA; color: var(--primary-dark); }
.qty-btn:first-child:hover { background: #fdba74; }
.qty-btn:last-child { background: var(--primary); color: #fff; }
.qty-btn:last-child:hover { background: var(--primary-dark); }
.qty-input {
  flex: 1; min-width: 0;
  border: none;
  border-left: 1px solid var(--gray-200);
  border-right: 1px solid var(--gray-200);
  text-align: center;
  font-size: 15px; font-weight: 700;
  color: var(--secondary);
  padding: 6px 4px;
  outline: none;
  background: #fff;
  /* Remove setas nativas do input number */
  -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.qty-input:focus { border-color: var(--primary); }

.btn-add {
  background: var(--primary); color: #fff; border: none;
  height: 44px; padding: 10px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 700; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s;
}
.btn-add:hover { background: var(--primary-dark); }

.no-results {
  grid-column: 1/-1; text-align: center;
  padding: 60px 20px; color: var(--gray-400); font-size: 15px;
}

/* ============================================================
   PÁGINA DE DETALHE DO PRODUTO (clique na imagem do card)
   ============================================================ */
.product-detail-view { padding: 40px 20px; max-width: 1200px; margin: 0 auto; background: white; }

.pdv-back {
  background: none; border: none; cursor: pointer;
  color: #666; font-size: 14px; font-weight: 500; font-family: 'Instrument Sans', sans-serif;
  padding: 0 0 20px 0; margin-bottom: 20px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .2s;
}
.pdv-back:hover { color: var(--accent); }

.pdv-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start;
  background: transparent; border: none; box-shadow: none; padding: 0;
}

.pdv-image {
  position: relative;
  width: 100%; max-width: 420px; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  background: #f9f9f9; border: 1px solid #efefef; border-radius: 12px;
  overflow: hidden;
}
.pdv-image img { width: 100%; height: 100%; object-fit: cover; }
.pdv-image .promo-badge { position: absolute; top: 16px; left: 16px; background: #DC2626; color: white; padding: 6px 10px; border-radius: 100px; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; z-index: 10; }

.pdv-info { display: flex; flex-direction: column; padding-top: 0; }
.pdv-breadcrumb { font-size: 12px; font-weight: 600; color: #999; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 16px; font-family: 'Instrument Sans', sans-serif; }
.pdv-info h1 { font-size: 36px; font-weight: 700; color: #1a1a1a; margin-bottom: 20px; line-height: 1.3; font-family: 'Archivo', sans-serif; }
.pdv-desc { font-size: 15px; color: #666; line-height: 1.7; margin-bottom: 24px; font-family: 'Instrument Sans', sans-serif; border: none; padding: 0; }
.pdv-info .punit { font-size: 13px; color: #999; margin-bottom: 16px; font-family: 'Instrument Sans', sans-serif; }
.pdv-info .pprice { font-size: 42px; font-weight: 700; color: var(--accent); margin-bottom: 4px; font-family: 'Archivo', sans-serif; }
.pdv-info .pprice-lbl { font-size: 12px; color: #999; margin-bottom: 32px; font-family: 'Instrument Sans', sans-serif; }
.pdv-info .pactions { max-width: 340px; gap: 12px; }
.pdv-info .qty-selector {
  margin-bottom: 20px; border: 1px solid var(--gray-200); border-radius: 10px;
  overflow: hidden; display: flex;
}
.pdv-info .qty-btn { width: 44px; height: 44px; font-size: 18px; border-radius: 0; border: none; cursor: pointer; font-weight: 700; transition: background .2s; }
.pdv-info .qty-btn:first-child { background: #FED7AA; color: var(--primary-dark); }
.pdv-info .qty-btn:first-child:hover { background: #fdba74; }
.pdv-info .qty-btn:last-child { background: var(--primary); color: #fff; }
.pdv-info .qty-btn:last-child:hover { background: var(--primary-dark); }
.pdv-info .qty-input { font-size: 16px; padding: 8px 12px; border: none; background: white; text-align: center; font-weight: 600; font-family: 'Instrument Sans', sans-serif; flex: 1; }
.pdv-info .qty-input:focus { outline: none; }
.pdv-info .btn-add { font-size: 13px; font-weight: 700; height: 44px; padding: 10px 12px; border-radius: 10px; border: none; background: #1a1a1a; color: white; cursor: pointer; transition: background .2s; font-family: 'Instrument Sans', sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px; }
.pdv-info .btn-add:hover { background: #2d2d2d; }
.pdv-info .btn-add-cart { background: var(--primary); }
.pdv-info .btn-add-cart:hover { background: var(--primary-dark); }

@media (max-width: 768px) {
  .pdv-grid { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
  .pdv-image { max-width: 320px; margin: 0 auto; }
  .pdv-info { align-items: center; text-align: center; }
  .pdv-info .pactions { max-width: 340px; width: 100%; }
  .pdv-info .btn-add { padding: 15px 10px; font-size: 15px; }
}

/* ============================================================
   PAINEL DO CARRINHO (Lateral Direita)
   ============================================================ */
.cart-panel {
  position: fixed; top: var(--header-total); right: -360px;
  width: 360px; height: calc(100vh - var(--header-total));
  background: white; z-index: 1100;
  box-shadow: -4px 0 12px rgba(0,0,0,.08);
  display: flex; flex-direction: column;
  transition: right .3s cubic-bezier(.4,0,.2,1);
  border-left: 1px solid #efefef;
}
.cart-panel.open { right: 0; }

.cart-hdr {
  background: white; color: #1a1a1a;
  padding: 20px; border-bottom: 1px solid #efefef;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.cart-hdr h3 { font-size: 18px; font-weight: 700; margin: 0; font-family: 'Archivo', sans-serif; }
.cart-close {
  background: none; border: none; color: #999; cursor: pointer;
  font-size: 20px; padding: 0; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  transition: color .2s;
}
.cart-close:hover { color: #1a1a1a; }

.cart-items { flex: 1; overflow-y: auto; padding: 12px; background: #fafafa; }
.cart-items::-webkit-scrollbar { width: 6px; }
.cart-items::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

.cart-empty { text-align: center; color: #999; padding: 40px 20px; font-size: 14px; font-family: 'Instrument Sans', sans-serif; }

.ci {
  border: 1px solid #efefef; border-radius: 6px;
  padding: 12px; margin-bottom: 8px; background: white; font-family: 'Instrument Sans', sans-serif;
}
.ci-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.ci-name { font-size: 13px; font-weight: 600; color: #1a1a1a; line-height: 1.3; }
.ci-rm { background: none; border: none; color: #ccc; font-size: 16px; padding: 0; cursor: pointer; transition: color .2s; }
.ci-rm:hover { color: var(--accent); }
.ci-mid { margin-bottom: 8px; }
.ci-unit-price { font-size: 12px; color: #999; }
.ci-bot { display: flex; align-items: center; justify-content: space-between; }
.ci-qty { display: flex; align-items: center; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.ci-qty button {
  width: 28px; height: 28px; border: none; cursor: pointer; font-size: 14px; font-weight: 700;
  transition: background .2s;
}
.ci-qty button:first-child { background: #FED7AA; color: var(--primary-dark); border-radius: 4px 0 0 4px; }
.ci-qty button:first-child:hover { background: #fdba74; }
.ci-qty button:last-child { background: var(--primary); color: #fff; border-radius: 0 4px 4px 0; }
.ci-qty button:last-child:hover { background: var(--primary-dark); }
.ci-qty span { font-size: 13px; font-weight: 600; min-width: 28px; text-align: center; }
.ci-sub { font-size: 13px; font-weight: 700; color: var(--accent); }

.cart-ftr { padding: 16px; border-top: 1px solid #efefef; flex-shrink: 0; background: white; }
.cart-total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.cart-total-lbl { font-size: 12px; font-weight: 700; color: #999; text-transform: uppercase; letter-spacing: .5px; font-family: 'Instrument Sans', sans-serif; }
#cart-total { font-size: 28px; font-weight: 700; color: var(--accent); font-family: 'Archivo', sans-serif; }

.cart-ftr-btns { display: flex; flex-direction: column; gap: 8px; }
.cart-checkout {
  background: var(--accent); color: white; border: none;
  padding: 14px 16px; border-radius: 6px;
  font-size: 14px; font-weight: 700; width: 100%; cursor: pointer;
  font-family: 'Instrument Sans', sans-serif; transition: background .2s, transform .1s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.cart-checkout:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-checkout {
  background: var(--accent); color: white; border: none;
  padding: 14px 16px; border-radius: 6px;
  font-size: 14px; font-weight: 700; width: 100%; cursor: pointer;
  font-family: 'Instrument Sans', sans-serif; transition: background .2s, transform .1s;
}
.btn-checkout:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-orc-cart {
  background: #25d366; color: white; border: none;
  padding: 14px 16px; border-radius: 6px;
  font-size: 14px; font-weight: 700; width: 100%; cursor: pointer;
  font-family: 'Instrument Sans', sans-serif; transition: background .2s;
}
.btn-orc-cart:hover { background: #1fa856; }

/* ============================================================
   CHAT COM ATENDENTE
   ============================================================ */
.chat-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 3000;
  align-items: center; justify-content: center;
  padding: 16px;
}
.chat-overlay.open { display: flex; }

.chat-container {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 400px; max-width: 100%;
  height: 540px; max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
  overflow: hidden;
  animation: chat-pop .25s ease;
}
@keyframes chat-pop {
  from { opacity: 0; transform: scale(.93) translateY(12px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}

/* Header */
.chat-header {
  background: var(--secondary);
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.chat-attendant { display: flex; align-items: center; gap: 10px; }
.chat-avatar {
  width: 42px; height: 42px;
  background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.chat-att-name { color: #fff; font-size: 14px; font-weight: 700; }
.chat-status   { display: flex; align-items: center; gap: 5px; color: #9ca3af; font-size: 12px; margin-top: 2px; }
.online-dot {
  width: 8px; height: 8px; background: #22c55e;
  border-radius: 50%; flex-shrink: 0;
  animation: blink-dot 2s infinite;
}
@keyframes blink-dot { 0%,100%{opacity:1} 50%{opacity:.35} }

.chat-close-btn {
  background: none; border: none; color: #9ca3af;
  font-size: 18px; padding: 4px 8px; border-radius: 4px;
  transition: all .15s;
}
.chat-close-btn:hover { color: #fff; background: rgba(255,255,255,.1); }

/* Área de mensagens */
.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  background: #f1f5f9;
}

/* ============================================================
   BOTÃO FLUTUANTE DE CHAT
   ============================================================ */
@keyframes chatPulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.5), 0 0 20px rgba(234, 88, 12, 0.3);
  }
  50% {
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.7), 0 0 30px rgba(234, 88, 12, 0.5);
  }
}

.chat-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EA580C 0%, #c2410c 100%);
  color: white;
  border: none;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.5), 0 0 20px rgba(234, 88, 12, 0.3);
  z-index: 9999;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: chatPulse 2s infinite;
}

.chat-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.6);
}

.chat-fab:active {
  transform: scale(0.95);
}

/* ---- BOTÃO "ADICIONAR AO CARRINHO" (cards da grid e página de detalhe) ---- */
.btn-add-cart {
  height: 44px; padding: 10px 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  transition: background .2s;
}

.btn-add-cart:hover {
  background: var(--primary-dark);
}

.btn-add-cart.added {
  background: var(--green);
  cursor: default;
}

.btn-add-cart.added:hover {
  background: var(--green);
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 2px; }

/* Bolhas */
.chat-bubble { display: flex; flex-direction: column; max-width: 82%; gap: 3px; }
.chat-bubble.attendant { align-self: flex-start; }
.chat-bubble.customer  { align-self: flex-end; }

.chat-bubble span {
  display: block; padding: 10px 14px;
  font-size: 14px; line-height: 1.55; word-break: break-word;
  white-space: pre-wrap;
}
.chat-bubble.attendant span {
  background: #fff; color: var(--secondary);
  border-radius: 4px 14px 14px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.chat-bubble.customer span {
  background: var(--primary); color: #fff;
  border-radius: 14px 4px 14px 14px;
}
.chat-bubble time { font-size: 10px; color: var(--gray-400); }
.chat-bubble.customer time { align-self: flex-end; }

/* Footer do chat */
.chat-footer {
  padding: 12px; border-top: 1px solid var(--gray-200);
  display: flex; align-items: center; gap: 8px;
  background: #fff; flex-shrink: 0; width: 100%;
}
.chat-footer input {
  flex: 1; min-width: 0;
  border: 1px solid var(--gray-200);
  border-radius: 999px; padding: 11px 16px;
  font-size: 14px; outline: none; color: var(--secondary);
  background: var(--gray-100);
  transition: border-color .2s, background .2s;
}
.chat-footer input:focus { border-color: var(--primary); background: #fff; }
.chat-footer input::placeholder { color: var(--gray-400); }

/* Autocomplete do chat */
.chat-autocomplete {
  position: absolute; bottom: 100%; left: 0; right: 0;
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius); max-height: 200px;
  overflow-y: auto; box-shadow: 0 -2px 8px rgba(0,0,0,.1);
  margin-bottom: 4px; display: none; z-index: 1000;
}
.chat-autocomplete-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--gray-100);
  cursor: pointer; transition: background .15s;
}
.chat-autocomplete-item:hover { background: var(--gray-50); }
.chat-autocomplete-item:last-child { border-bottom: none; }
.chat-ac-name {
  flex: 1; font-size: 13px; color: var(--secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-ac-name mark { background: #fef08a; font-weight: 600; }
.chat-ac-price {
  font-size: 12px; font-weight: 700; color: var(--primary);
  margin-left: 12px; white-space: nowrap;
}

.chat-send-btn {
  background: var(--primary); color: #fff; border: none;
  padding: 11px 20px; border-radius: 999px;
  font-size: 13px; font-weight: 700; white-space: nowrap;
  flex-shrink: 0; cursor: pointer;
  transition: background .2s, transform .05s;
  box-shadow: 0 2px 8px rgba(234,88,12,.35);
}
.chat-send-btn:hover { background: var(--primary-dark); }
.chat-send-btn:active { transform: scale(.96); }

.chat-icon-btn {
  background: var(--gray-100); border: none; color: var(--gray-500);
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 16px; flex-shrink: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.chat-icon-btn:hover { background: var(--gray-200); }

/* Badge de mensagens não lidas na bolha flutuante */
.chat-fab-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--secondary); color: #fff;
  min-width: 20px; height: 20px; border-radius: 999px;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px; border: 2px solid #fff;
}

/* Formulário inicial (nome/whatsapp) antes de começar a conversa */
.chat-widget-form {
  padding: 20px 16px; flex: 1; display: flex; flex-direction: column; gap: 10px;
  background: #f1f5f9;
}
.chat-widget-form p { font-size: 13px; color: var(--gray-500); margin-bottom: 4px; }
.chat-widget-form input {
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 10px 14px; font-size: 14px; outline: none; color: var(--secondary);
  transition: border-color .2s;
}
.chat-widget-form input:focus { border-color: var(--primary); }
.chat-widget-start-btn {
  background: var(--primary); color: #fff; border: none;
  padding: 11px; border-radius: var(--radius);
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .2s; margin-top: 4px;
}
.chat-widget-start-btn:hover { background: var(--primary-dark); }

/* ============================================================
   POR QUE ESCOLHER A RODRIGUES
   ============================================================ */
.why-us-section { padding: 44px 28px 48px; text-align: center; }
.why-us-title { font-size: 26px; font-weight: 800; color: var(--secondary); margin-bottom: 6px; }
.why-us-sub { font-size: 14px; color: var(--gray-400); margin-bottom: 28px; }
.why-us-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  max-width: 1100px; margin: 0 auto;
}
.why-us-card {
  background: #F7F8FA; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 32px 20px;
  display: flex; flex-direction: column; align-items: center;
  transition: transform .2s, box-shadow .2s;
}
.why-us-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.06); }
.why-us-card.why-us-highlight { background: #FFF1E6; border-color: #FCD9B8; }
.why-us-icon { font-size: 40px; line-height: 1; margin-bottom: 14px; }
.why-us-card-title { font-size: 17px; font-weight: 700; color: var(--secondary); margin-bottom: 6px; }
.why-us-card-sub { font-size: 13px; color: var(--gray-400); }

/* ============================================================
   RODAPÉ
   ============================================================ */
.footer { background: var(--secondary); color: #d1d5db; padding: 40px 28px 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; padding-bottom: 28px; }
.ftr-logo     { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ftr-logo-img { height: 44px; width: auto; object-fit: contain; flex-shrink: 0; filter: brightness(1.1); }
.ftr-name     { color: #fff; font-size: 14px; font-weight: 700; font-family: 'Archivo', sans-serif; }
.ftr-tag      { color: var(--gray-400); font-size: 11px; }
.ftr-desc  { font-size: 13px; color: #9ca3af; line-height: 1.7; }
.ftr-col h4 { color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 10px; font-family: 'Archivo', sans-serif; }
.ftr-col p, .ftr-col a { font-size: 13px; color: #9ca3af; margin-bottom: 5px; display: block; }
.ftr-col a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--sec-light);
  padding: 14px 0; text-align: center;
  font-size: 12px; color: #6b7280;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */

/* --- 1200px: features quebram em 2 linhas --- */
@media (max-width: 1200px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .feat:nth-child(2) { border-right: none; }
  .feat:nth-child(odd) { border-bottom: 1px solid #EEF1F6; }
}

/* --- 900px: sidebar mais estreita --- */
@media (max-width: 900px) {
  :root { --sidebar-w: 200px; }
  .logo-info { display: none; }   /* esconde texto logo para ganhar espaço */
}

/* --- 768px: mobile. Header vira 2 linhas, sidebar vira drawer ---
   Linha 1: hamburguer, Início/Produtos/Contato, WhatsApp (só ícone),
   carrinho — tudo junto, igual pedido pelo usuário. Linha 2: busca. */
@media (max-width: 768px) {
  :root {
    /* linha 1 (42px) + gap 8px + busca (36px) + padding inferior 8px */
    --header-total: 94px;
  }

  /* Header: só a busca vai pra linha própria abaixo; hamburguer, nav,
     WhatsApp e carrinho ficam todos na linha 1. */
  .header { padding: 0 10px 8px; gap: 6px; column-gap: 6px; flex-wrap: wrap; }

  .hdr-left { height: var(--header-h); flex-shrink: 0; }
  .hdr-right { height: var(--header-h); flex-shrink: 0; }

  /* Search ocupa linha inteira abaixo */
  .search-wrap {
    order: 10;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: none;
    margin-top: 0;
  }

  /* Nav (Início/Produtos/Contato): mesma linha 1, entre o logo e o
     WhatsApp/carrinho. Fica com flex:1 pra dividir o espaço que sobra
     depois do hamburguer/logo/wa/carrinho — sem isso, 3 links por
     extenso não cabem ao lado dos outros elementos numa tela de ~390px. */
  .hdr-nav {
    flex: 1;
    justify-content: center;
    gap: 2px;
    min-width: 0;
  }
  .hdr-link { padding: 6px 5px; font-size: 12px; white-space: nowrap; }

  /* WhatsApp: só o ícone (texto por extenso não cabe na linha única) */
  .wa-txt { display: none; }
  .btn-wa-hdr { padding: 0; width: 42px; justify-content: center; flex-shrink: 0; }

  /* Esconder elementos desnecessários */
  .btn-ig  { display: none; }
  .logo-info { display: none; }

  .sidebar { top: var(--header-total); }

  /* Hero mobile */
  .hero { margin: 8px; padding: 20px 18px; min-height: auto; }
  .hero-title { font-size: 22px; }
  .hero-sub   { font-size: 13px; margin-bottom: 14px; }

  /* Grid de produtos: 2 colunas */
  .products-grid { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .products-section { padding: 8px 8px 40px; }
  .cat-card { width: 76px; }

  /* Carrossel de Mais Vendidos/Promoção — card mais estreito só no
     mobile (306px de largura fixa ficava grande demais numa tela de
     ~390px, quase ocupando a tela toda por card). */
  .products-grid.promo-scroll .prod-card { flex-basis: 220px; }
  .cg-icon { width: 68px; height: 68px; font-size: 30px; border-radius: 16px; }
  .cg-name { font-size: 11px; }
  .cat-arrow { width: 30px; height: 30px; font-size: 17px; }

  /* Carrinho full height com topo ajustado */
  .cart-panel { top: var(--header-total); height: calc(100vh - var(--header-total)); }

  /* Rodapé */
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer { padding: 28px 16px 0; }

  /* Por que escolher Rodrigues */
  .why-us-section { padding: 32px 16px 36px; }
  .why-us-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* --- 480px: ajustes finais para telas muito pequenas --- */
@media (max-width: 480px) {
  :root { --header-total: 94px; }

  /* .wa-txt/.btn-wa-hdr já ficam só com ícone desde o breakpoint 768px —
     nada a repetir aqui. */
  .hdr-link { padding: 5px 3px; font-size: 11px; }

  .features { margin: 0 6px; }
  .feat { padding: 12px 10px; gap: 8px; }
  .feat-icon-mask { width: 17px; height: 17px; }
  .feat-title { font-size: 11px; }
  .feat-sub { font-size: 10px; }

  .hero { margin: 6px; padding: 16px 14px; }
  .hero-title { font-size: 19px; }
  .hero-badge { font-size: 10px; margin-bottom: 8px; }
  .hero-sub   { display: none; }   /* oculta subtítulo em telas muito pequenas */
  .hero-btns  { gap: 7px; }
  .btn-primary, .btn-green, .btn-secondary { padding: 10px 14px; font-size: 13px; }

  .products-grid { grid-template-columns: repeat(2,1fr); gap: 7px; }
  .prod-image    { height: 110px; font-size: 48px; }
  .price-main    { font-size: 19px; }

  /* Carrinho ocupa largura total */
  .cart-panel { width: 100%; right: -100%; }
  .cart-panel.open { right: 0; }

  /* Botão flutuante de chat no mobile */
  .chat-fab {
    bottom: 80px;
    right: 15px;
    width: 56px;
    height: 56px;
    font-size: 26px;
  }
}

.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 6px; margin-top: 28px; flex-wrap: wrap;
}
.pagination button {
  border: 1px solid var(--gray-200); background: #fff; color: var(--secondary);
  padding: 8px 14px; border-radius: var(--radius); cursor: pointer;
  font-size: 14px; font-weight: 600; transition: all .15s;
}
.pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================
   EDITOR VISUAL DO SITE (site-editor.js) — modo "Editar Site"
   ============================================================ */
body.se-active { padding-bottom: 64px; }

.se-toolbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 99999;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--secondary, #1f2937); color: #fff;
  padding: 10px 20px; box-shadow: 0 -2px 12px rgba(0,0,0,.25);
  font-size: 14px;
}
.se-toolbar-title { font-weight: 700; margin-right: 8px; }
.se-color-field { display: flex; align-items: center; gap: 6px; }
.se-color-field label { font-size: 12px; color: #d1d5db; }
.se-color-field input[type="color"] {
  width: 30px; height: 26px; border: none; border-radius: 5px; cursor: pointer; padding: 0; background: none;
}
.se-btn {
  border: 1px solid #fff; background: #fff; color: var(--secondary, #1f2937);
  padding: 7px 14px; border-radius: var(--radius, 6px); cursor: pointer;
  font-size: 13px; font-weight: 600; margin-left: auto;
}
.se-btn:hover { opacity: .9; }
.se-btn-outline {
  background: transparent; color: #fff; margin-left: 0;
}
.se-btn-outline:hover { background: rgba(255,255,255,.1); }

/* Texto editável: contorno ao passar o mouse / durante edição */
.se-editable {
  cursor: pointer;
  outline: 2px dashed transparent;
  outline-offset: 3px;
  transition: outline-color .15s, background-color .15s;
  border-radius: 3px;
}
.se-editable:hover {
  outline-color: #3b82f6;
  background-color: rgba(59,130,246,.08);
}
.se-editable.se-editing {
  outline: 2px solid #3b82f6;
  outline-offset: 3px;
  background-color: rgba(59,130,246,.12);
  cursor: text;
}

.se-mini-toolbar {
  position: absolute; z-index: 99998;
  display: flex; gap: 4px;
  background: #111827; padding: 4px; border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.se-mini-toolbar button {
  border: none; background: #374151; color: #fff;
  width: 28px; height: 28px; border-radius: 4px; cursor: pointer;
  font-size: 12px; font-weight: 700;
}
.se-mini-toolbar button:hover { background: #4b5563; }

/* Imagens editáveis */
.se-editable-img { outline: 2px dashed transparent; outline-offset: 2px; transition: outline-color .15s; }
.se-editable-img:hover { outline-color: #3b82f6; }

.se-img-overlay {
  position: absolute; z-index: 99997;
  border: none; border-radius: 5px;
  background: rgba(17,24,39,.85); color: #fff;
  padding: 5px 9px; font-size: 11px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.se-img-overlay:hover { background: rgba(17,24,39,1); }

@media (max-width: 768px) {
  .se-toolbar { justify-content: center; padding: 10px; }
  .se-btn { margin-left: 0; }
}
