/* ═══════════════════════════════════════════════════════════
   CATÁLOGO CHEFA — Estrutura inspirada em WolyCasa
   Cores: navy (#0A1628), teal (#00C2A8), amber (#F5A623)
   ═══════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════
   BARRA DE ROLAGEM CUSTOMIZADA (pedido do Valmir — mais visual)
   ══════════════════════════════════════════════════════════ */

html {
  scrollbar-width: auto;
  scrollbar-color: var(--navy-dark) rgba(30, 50, 91, 0.08);
}

html::-webkit-scrollbar {
  width: 14px;
}

html::-webkit-scrollbar-track {
  background: rgba(30, 50, 91, 0.06);
}

html::-webkit-scrollbar-thumb {
  background-color: var(--navy-dark);
  border-radius: 8px;
  border: 3px solid rgba(30, 50, 91, 0.06);
}

html::-webkit-scrollbar-thumb:hover {
  background-color: var(--teal);
}

/* ══════════════════════════════════════════════════════════
   BARRA DE CATEGORIAS CIRCULARES
   ══════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════
   PAINEL DE OFERTAS (rolagem automática)
   ══════════════════════════════════════════════════════════ */

.ofertas-panel {
  background: var(--white);
  padding: 24px 0 20px;
  border-bottom: 1px solid rgba(30, 50, 91, 0.08);
  overflow: hidden;
}

.ofertas-panel-header h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 16px;
}

.ofertas-track-wrap {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}

.ofertas-track {
  display: flex;
  gap: 16px;
  width: max-content;
  padding: 0 24px;
  animation: ofertas-scroll linear infinite;
}

.ofertas-track-wrap:hover .ofertas-track {
  animation-play-state: paused;
}

@keyframes ofertas-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.oferta-card {
  flex-shrink: 0;
  width: 180px;
  background: var(--white);
  border: 1px solid rgba(30, 50, 91, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.oferta-card:hover {
  box-shadow: 0 8px 24px rgba(30, 50, 91, 0.12);
  transform: translateY(-2px);
}

.oferta-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--gray-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.oferta-card-img img {
  max-width: 75px;
  max-height: 75px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.oferta-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--amber);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 5px;
  z-index: 1;
}

.oferta-card-info {
  padding: 12px;
}

.oferta-card-nome {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-dark);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 31px;
  margin-bottom: 8px;
}

.oferta-card-preco {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 8px;
}

.oferta-card-preco span {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.oferta-card-desconto {
  display: inline-block;
  background: var(--amber);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 4px;
}

.oferta-card-preco-tabela {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-bottom: 2px;
}

.oferta-card-btn {
  width: 100%;
  padding: 8px;
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.oferta-card-btn:hover {
  background: var(--teal-hover);
}

@media (prefers-reduced-motion: reduce) {
  .ofertas-track {
    animation: none;
  }
  .ofertas-track-wrap {
    overflow-x: auto;
  }
}

/* ══════════════════════════════════════════════════════════
   BARRA DE MARCAS NO TOPO (acesso adicional, além da lateral)
   ══════════════════════════════════════════════════════════ */

.brands-bar {
  padding: 16px 0;
  background: var(--navy);
  margin-top: 116px; /* top-bar (~38px) + header fixo (~77px) */
}

.brands-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  flex-wrap: wrap;
}

.brand-tab-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px 6px 6px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.brand-tab-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.brand-tab-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: -webkit-optimize-contrast;
}

.brand-tab-top:hover {
  border-color: var(--teal);
  color: var(--white);
}

.brand-tab-top.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

/* ══════════════════════════════════════════════════════════
   MARCAS E CATEGORIAS — ambas dentro do aside sticky
   ══════════════════════════════════════════════════════════ */

.brands-section {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(30, 50, 91, 0.1);
}

.brands-scroll {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand-tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s;
  padding: 10px 14px;
  border-radius: 8px;
  border: 2px solid transparent;
  text-align: left;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-dark);
  white-space: normal;
  line-height: 1.3;
}

.brand-tab:hover {
  border-color: var(--teal);
  transform: translateX(2px);
}

.brand-tab.active {
  border-color: var(--teal);
  background: rgba(0, 194, 168, 0.08);
  box-shadow: 0 4px 12px rgba(0, 194, 168, 0.15);
}

.categories-section {
  /* Container das categorias — sem padding extra, herda do aside */
}

.catalog-layout {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding-top: 24px;
}

.catalog-main {
  flex: 1;
  min-width: 0;
}

.categories-bar {
  flex: 0 0 220px;
  width: 220px;
  padding: 20px 16px;
  background: var(--gray-bg);
  border: 1px solid rgba(30, 50, 91, 0.08);
  border-radius: 12px;
  margin-top: 0;
  position: sticky;
  top: 24px;
}

.categories-bar-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: var(--navy-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.brand-story-section {
  padding: 28px 0 0;
  background: var(--white);
}

.brand-story-catalog {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 28px;
  background: var(--gray-bg);
  border-left: 3px solid var(--teal);
  border-radius: 4px;
}

.brand-story-catalog p {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: var(--blue-text);
  margin-bottom: 10px;
}

.brand-story-catalog p:last-child {
  margin-bottom: 0;
}

.brand-story-catalog strong {
  color: var(--navy-dark);
}

.categories-scroll {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--teal) var(--gray-bg);
}

.categories-scroll::-webkit-scrollbar {
  width: 6px;
}

.categories-scroll::-webkit-scrollbar-track {
  background: var(--gray-bg);
}

.categories-scroll::-webkit-scrollbar-thumb {
  background: var(--teal);
  border-radius: 3px;
}

.category-circle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s;
  padding: 10px 14px;
  border-radius: 8px;
  border: 2px solid transparent;
  text-align: left;
}

.category-circle:hover {
  border-color: var(--navy-dark);
  transform: translateX(2px);
}

.category-circle.active {
  border-color: var(--navy-dark);
  box-shadow: 0 4px 12px rgba(30, 50, 91, 0.25);
}

.category-circle-name {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-dark);
  text-align: left;
  white-space: normal;
  line-height: 1.3;
}

.category-circle.active .category-circle-name {
  color: var(--navy-dark);
}

.category-item-list {
  margin: 2px 0 8px 10px;
  padding: 8px 0 8px 10px;
  border-left: 2px solid rgba(0, 194, 168, 0.4);
}

.category-item-list-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.category-item-list-close {
  flex: 0 0 auto;
  border: none;
  background: rgba(0, 194, 168, 0.12);
  color: var(--teal);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.category-item-list-title {
  font-weight: 700;
  color: var(--blue-text);
  font-size: 14px;
}

.category-item-list-nome {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--blue-text);
  padding: 6px 0;
  border-bottom: 1px solid rgba(30, 50, 91, 0.06);
  cursor: pointer;
  transition: color 0.15s;
}

.category-item-list-nome:hover {
  color: var(--teal);
}

.category-item-list-nome:last-child {
  border-bottom: none;
}

/* ══════════════════════════════════════════════════════════
   CONTROLES DO CATÁLOGO
   ══════════════════════════════════════════════════════════ */

.catalog-controls {
  padding: 24px 0 16px;
  background: var(--white);
}

#controlsPlaceholder {
  display: none;
}

.catalog-controls.is-stuck {
  position: fixed;
  top: 116px;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 16px 24px;
  box-shadow: 0 8px 16px rgba(10, 22, 40, 0.08);
  border-bottom: 1px solid rgba(30, 50, 91, 0.08);
}

.catalog-controls.is-stuck > * {
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .catalog-controls.is-stuck {
    padding: 16px 48px;
  }
}

.scroll-nav-group {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.btn-scroll-nav,
.btn-back-to-top {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  color: var(--navy-dark);
  border: 1px solid rgba(30, 50, 91, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(10, 22, 40, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s, background 0.2s, color 0.2s;
}

.btn-scroll-nav.visible,
.btn-back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.btn-scroll-nav:hover {
  background: var(--gray-bg);
}

.btn-back-to-top {
  width: 48px;
  height: 48px;
  background: var(--navy-dark);
  color: var(--white);
  border: none;
}

.btn-back-to-top:hover {
  background: var(--teal);
}

@media (max-width: 900px) {
  .scroll-nav-group {
    right: 16px;
    bottom: 16px;
    gap: 8px;
  }
}

@media (max-width: 900px) {
  .catalog-controls.is-stuck {
    top: 96px;
  }
  .btn-back-to-top {
    right: 16px;
    bottom: 16px;
  }
}

.control-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-dark);
  margin-bottom: 8px;
  font-family: var(--font-body);
}

.control-select {
  width: 100%;
  max-width: 400px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  border: 2px solid rgba(30, 50, 91, 0.15);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy-dark);
  cursor: pointer;
  transition: border-color 0.2s;
  margin-bottom: 24px;
}

.control-select:focus {
  outline: none;
  border-color: var(--teal);
}

.search-box-new {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 2px solid rgba(30, 50, 91, 0.15);
  border-radius: 12px;
  padding: 12px 20px;
  transition: all 0.2s;
  max-width: 600px;
}

.search-box-new:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 194, 168, 0.1);
}

.search-icon {
  color: var(--blue-text);
  flex-shrink: 0;
}

.search-box-new input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--navy-dark);
  background: transparent;
}

.search-box-new input::placeholder {
  color: var(--text-muted);
}

.btn-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  flex-shrink: 0;
}

.btn-clear:hover {
  color: var(--navy-dark);
}

/* ══════════════════════════════════════════════════════════
   ABAS DO CATÁLOGO
   ══════════════════════════════════════════════════════════ */

.catalog-tabs {
  padding: 0 0 24px;
  background: var(--white);
  border-bottom: 2px solid rgba(30, 50, 91, 0.08);
}

.tabs-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-text);
  background: transparent;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  background: rgba(0, 194, 168, 0.08);
  color: var(--navy-dark);
}

.tab-btn.active {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

/* ══════════════════════════════════════════════════════════
   GRID DE PRODUTOS — Estilo WolyCasa
   ══════════════════════════════════════════════════════════ */

.catalog-section {
  padding: 40px 0 80px;
  background: var(--white);
}

.products-grid-new {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
}

.products-grid-new .product-card-new {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 68vw;
  max-width: 240px;
}

@media (min-width: 640px) {
  .products-grid-new {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow-x: visible;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .products-grid-new .product-card-new {
    width: auto;
    max-width: none;
  }
}

@media (min-width: 900px) {
  .products-grid-new {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .products-grid-new {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ══════════════════════════════════════════════════════════
   CARD DE PRODUTO — Visual WolyCasa
   ══════════════════════════════════════════════════════════ */

.product-card-new {
  background: var(--white);
  border: 1px solid rgba(30, 50, 91, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.product-card-new:hover {
  border-color: var(--teal);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(30, 50, 91, 0.12);
}

/* Destaque temporário ao clicar no nome na lista da categoria (apontarItem) */
.product-card-destacado {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(0, 194, 168, 0.35), 0 16px 40px rgba(30, 50, 91, 0.12) !important;
}

.product-image-new {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--white);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.product-image-new img {
  max-width: 90px;
  max-height: 90px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.4s;
}

.product-card-new:hover .product-image-new img {
  transform: scale(1.08);
}

/* Placeholder para produtos sem imagem */
.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F0F4F8 0%, #E8EFF5 100%);
  gap: 12px;
}

.product-image-placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  opacity: 0.4;
}

.product-image-placeholder span {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Badge de oferta */
.product-badge-new {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 16px;
  background: var(--amber);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.4);
}

/* Informações do produto */
.product-info-new {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-code-new {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.product-name-new {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-dark);
  line-height: 1.4;
  /* Nome completo sempre visível — sem corte, é B2B e o nome exato importa pro pedido */
  min-height: 44px;
}

.product-category-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--navy-dark);
  background: rgba(0, 194, 168, 0.12);
  margin-bottom: 4px;
  width: fit-content;
}

.product-embalagem {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.product-price-oferta-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.product-price-desconto {
  display: inline-block;
  background: var(--amber);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
}

.product-price-tabela-riscado {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-price-new {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.product-price-oferta-wrap + .product-price-new {
  margin-top: 0;
  padding-top: 2px;
}

.product-price-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy-dark);
}

.product-price-unit {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.product-add-btn {
  width: 100%;
  padding: 12px 20px;
  margin-top: 12px;
  background: var(--teal);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.product-add-btn:hover {
  background: var(--teal-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 194, 168, 0.3);
}

.product-add-btn:active {
  transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════
   ESTADOS VAZIOS E LOADING
   ══════════════════════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--blue-text);
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 15px;
  line-height: 1.6;
}

.loader {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 194, 168, 0.2);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ══════════════════════════════════════════════════════════
   TOAST DE FEEDBACK
   ══════════════════════════════════════════════════════════ */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--teal);
  color: var(--white);
  padding: 16px 28px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 194, 168, 0.4);
  z-index: 1000;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVIDADE
   ══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .catalog-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-main {
    width: 100%;
    max-width: 100%;
  }

  /* Em Oferta: no celular troca o auto-scroll pelo arraste manual (swipe) */
  .ofertas-track-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ofertas-track {
    animation: none;
  }

  .categories-bar {
    position: static;
    width: 100%;
    flex: none;
  }

  /* Marcas em mobile: horizontal scroll */
  .brands-section {
    padding-bottom: 16px;
    margin-bottom: 16px;
  }

  .brands-scroll {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
  }

  .brand-tab {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }

  /* Categorias em mobile: horizontal scroll */
  .categories-scroll {
    position: relative;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    max-height: none;
  }

  .category-circle {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }

  .category-circle-name {
    white-space: nowrap;
  }

  /* Lista de itens da categoria: no celular vira um painel cheio embaixo
     da faixa de categorias (posição fixed calculada via JS — a faixa tem
     overflow-x:auto, que corta o eixo vertical também, então position:
     absolute normal ficaria invisível dentro dela) */
  .category-item-list {
    margin: 0;
    max-height: 55vh;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid rgba(30, 50, 91, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 16px 40px rgba(30, 50, 91, 0.18);
    z-index: 30;
    -webkit-overflow-scrolling: touch;
  }

  .category-item-list-header {
    display: flex;
    position: sticky;
    top: -12px;
    background: var(--white);
    padding: 4px 0 10px;
    margin: -12px -16px 6px;
    padding-left: 16px;
    padding-right: 16px;
    border-bottom: 1px solid rgba(30, 50, 91, 0.08);
  }
}

@media (max-width: 640px) {
  .categories-bar {
    padding: 16px;
  }

  .category-circle {
    padding: 8px 14px;
  }

  .category-circle-name {
    font-size: 12px;
  }

  .catalog-controls {
    padding: 16px 0;
  }

  .search-box-new {
    padding: 10px 16px;
  }

  .tabs-nav {
    gap: 6px;
  }

  .tab-btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  .product-price-value {
    font-size: 20px;
  }
}

.hidden {
  display: none !important;
}
