.categorias {
  display: block;
}

.categorias-mobile {
  display: block;
  padding: 1rem 1rem 0.5rem;
  overflow: hidden;
}

.cat-sidebar {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.cat-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  color: #444;
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
  border-left: 3px solid transparent;
}

.cat-sidebar-item:hover {
  background: #f5f5f5;
  color: #111;
}

.cat-sidebar-item.cat-sidebar-active {
  background: #fff8e1;
  color: #FFB800;
  border-left-color: #FFB800;
  font-weight: 600;
}

.cat-sidebar-item i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: inherit;
}

.categorias-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.categorias-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.categorias-vermais {
  font-size: 0.8rem;
  color: #FFB800;
  text-decoration: none;
  font-weight: 600;
}

.categorias-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0;
}

.categorias-row::-webkit-scrollbar { display: none; }

.categoria-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #333;
  flex: 0 0 calc((100% - 24px) / 4);
  max-width: calc((100% - 24px) / 4);
  padding: 0.25rem;
  scroll-snap-align: start;
  transition: color 0.2s ease;
}

.categoria-item:hover span {
  color: #ffb800;
}

.icon-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border-radius: 8px;
}

.icon-wrap .bg-svg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
}

.icon-wrap svg {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  color: #fff;
  stroke-width: 2;
  pointer-events: none;
}

.categoria-item span {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  color: #555;
}

.categorias-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 99999;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.categorias-modal.open { display: flex; }

.categorias-modal-content {
  background: #fff;
  width: 100%;
  border-radius: 16px 16px 0 0;
}

.categorias-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.categorias-modal-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.categorias-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 4px;
}

.categorias-modal-close svg { width: 24px; height: 24px; }

.cat-modal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #333;
  font-size: 0.8rem;
  font-weight: 600;
}

.cat-modal-item .icon-wrap { width: 56px; height: 56px; }
.cat-modal-item .icon-wrap svg { width: 28px; height: 28px; }

.categorias-modal-carousel {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.categorias-modal-carousel::-webkit-scrollbar { display: none; }

.categorias-modal-track {
  display: flex;
  width: 100%;
}

.categorias-modal-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  padding: 0 1.25rem;
}

.categorias-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding-bottom: 0.5rem;
}

.categorias-modal-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 0;
  background: #fff;
  flex-shrink: 0;
}

.cat-modal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cat-modal-dot.active {
  background: #FFB800;
  width: 16px;
  border-radius: 4px;
}

/* Categorias PC */
.categorias-pc {
  display: none;
}

@media screen and (min-width: 1024px) {
  .categorias-pc {
    display: block;
    padding: 0.5rem 0;
    order: 2;
  }

  .banner-pc {
    order: 1;
  }

  .categorias-pc-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
  }

  .categorias-pc .categoria-item {
    flex: 1;
    max-width: none;
  }
}

@media screen and (min-width: 1024px) {
  .categorias-modal {
    align-items: center;
  }

  .categorias-modal-content {
    width: 600px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 16px;
  }

  .categorias-modal-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }

  .categorias-modal-dots {
    display: none;
  }

  .categorias-modal-track {
    display: block;
    width: 100%;
  }

.categorias-modal-slide {
  padding: 0;
}

.categorias-modal-carousel {
  overflow: visible;
  scroll-snap-type: none;
}
}
