* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, "Segoe UI", sans-serif;
  background: #f3f5f7;
  color: #1f2937;
}

.app {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 260px;
  min-width: 260px;
  background: linear-gradient(180deg, #0b1730, #0e1d3d);
  color: white;
  padding: 16px 12px;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sidebar-top h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.sidebar-close {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
}

.sidebar-search {
  margin-bottom: 14px;
}

.sidebar-search input {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.07);
  color: white;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}

.sidebar-search input::placeholder {
  color: rgba(255,255,255,0.65);
}

.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-item {
  margin-bottom: 8px;
}

.category-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: white;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: 0.2s ease;
}

.category-button:hover {
  background: rgba(255,255,255,0.09);
}

.category-button.active {
  background: #16315f;
  border-color: rgba(255,255,255,0.14);
}

.category-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-count {
  font-size: 12px;
  opacity: 0.85;
}

.arrow {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.category-button.active .arrow {
  transform: rotate(180deg);
}

/* SUBCATEGORIAS */
.sub-list {
  display: none;
  margin-top: 6px;
  padding-left: 8px;
}

.sub-list.open {
  display: block;
}

.sub-item {
  background: #13284d;
  border: 1px solid rgba(255,255,255,0.08);
  color: #e8eef9;
  border-radius: 10px;
  padding: 9px 10px;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s ease;
}

.sub-item:hover {
  background: #1a3566;
}

.sub-item.active {
  background: #2553a6;
  color: white;
  border-color: rgba(255,255,255,0.18);
}

.sub-item.all {
  background: #0f7a43;
  color: #fff;
  font-weight: 700;
}

/* CONTENT */
.content {
  flex: 1;
  padding: 18px;
}

/* HERO */
.hero {
  background: #ffffff;
  border: 1px solid #dbe3ec;
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.hero-logo-box {
  width: 220px;
  min-width: 220px;
  height: 90px;
  border: 1px solid #e3e8ef;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafbfc;
}

.hero-logo {
  max-width: 85%;
  max-height: 58px;
  object-fit: contain;
}

.hero-text {
  flex: 1;
}

.hero-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #0d6efd;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.hero-text h1 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.1;
}

.hero-text p {
  margin: 0 0 12px;
  font-size: 14px;
  color: #667085;
}

.hero-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-box {
  flex: 1;
}

.search-box input {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  border: 1px solid #d7dee8;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}

.btn-clear {
  height: 42px;
  border: 1px solid #d7dee8;
  background: white;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* TOOLBAR */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

#categoriaTitulo {
  margin: 0 0 4px;
  font-size: 24px;
}

.subtitulo-catalogo {
  margin: 0;
  font-size: 14px;
  color: #667085;
}

.result-count {
  background: white;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.chips-ativos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.chip {
  background: #ffffff;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

/* GRID */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.card {
  background: white;
  border: 1px solid #dce3eb;
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  transition: 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.card-image {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f7fa;
  margin-bottom: 10px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(17, 24, 39, 0.85);
  color: white;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.card-title {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
  min-height: 38px;
}

.card-description {
  margin: 0 0 8px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.35;
  min-height: 34px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.meta-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f3f6fa;
  border: 1px solid #dbe3ec;
  color: #334155;
}

.card-footer {
  margin-top: auto;
}

.btn-whatsapp {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  background: #25d366;
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-whatsapp:hover {
  background: #1fb45a;
}

/* EMPTY */
.empty-state {
  background: white;
  border: 1px solid #dce3eb;
  border-radius: 16px;
  padding: 28px 18px;
  text-align: center;
}

.empty-icon {
  font-size: 34px;
  margin-bottom: 8px;
}

.hidden {
  display: none !important;
}

/* MOBILE */
.menu-btn {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1002;
  height: 42px;
  padding: 0 14px;
  border: none;
  border-radius: 10px;
  background: #0e1d3d;
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

#overlay.active {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 900px) {
  .menu-btn {
    display: block;
  }

  .sidebar-close {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1001;
    transform: translateX(-100%);
    transition: 0.25s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .content {
    padding: 70px 12px 14px;
  }

  .hero {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }

  .hero-logo-box {
    width: 100%;
    min-width: 100%;
    height: 80px;
  }

  .hero-text h1 {
    font-size: 24px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .card {
    padding: 8px;
  }

  .card-title {
    font-size: 14px;
    min-height: 34px;
  }

  .card-description {
    font-size: 12px;
    min-height: 30px;
  }

  .btn-whatsapp {
    height: 40px;
    font-size: 13px;
  }

  #categoriaTitulo {
    font-size: 21px;
  }
}