.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-height: var(--topbar-height);
  padding: 12px 24px;
  background: rgba(20, 30, 26, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 40px rgba(36, 63, 55, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  contain: layout paint;
  transform: translateZ(0);
  transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    padding 0.25s ease, min-height 0.25s ease;
}

/* Estado "encolhido": menos altura/respiro, e os filhos (logo, busca)
   também diminuem — cada um lê o próprio tamanho reduzido lá embaixo. */
.topbar.scrolled {
  min-height: calc(var(--topbar-height) - 18px);
  padding: 8px 24px;
  background: rgba(20, 30, 26, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 28px rgba(18, 37, 30, 0.2);
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  color: var(--white);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  object-fit: contain;
  transition: width 0.25s ease, height 0.25s ease;
}

.topbar.scrolled .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 12px;
}

.brand-copy {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  transition: font-size 0.25s ease;
}

.topbar.scrolled .brand-copy {
  font-size: 14px;
}

.top-actions {
  display: flex;
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}

.search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(410px, 100%);
  height: 48px;
  padding: 0 18px;
  color: var(--green-700);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, height 0.25s ease, padding 0.25s ease;
}

.topbar.scrolled .search {
  height: 40px;
  padding: 0 14px;
}

.search:focus-within {
  border-color: rgba(62, 99, 84, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
}

.search svg {
  flex: 0 0 auto;
  transition: transform 0.25s ease;
}

.topbar.scrolled .search svg {
  transform: scale(0.88);
}

.search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
}

.search input::placeholder {
  color: #81918b;
  opacity: 1;
}

.search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.section {
  margin: 38px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 58px rgba(36, 63, 55, 0.07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-head h1 {
  margin: 0;
  color: var(--green-900);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.filter {
  min-height: 46px;
  padding: 0 16px;
  color: var(--green-900);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.filter:hover,
.filter:focus-visible {
  background: var(--green-050);
  border-color: rgba(36, 63, 55, 0.25);
}

.filter.active {
  color: var(--white);
  background: var(--green-900);
  border-color: var(--green-900);
}

.content-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  column-gap: 24px;
  row-gap: 24px;
  transition: grid-template-columns 0.32s ease, column-gap 0.32s ease;
}

.content-layout.detail-inactive {
  grid-template-columns: 0 minmax(0, 1fr);
  column-gap: 0;
}

.sidebar {
  position: sticky;
  top: calc(var(--topbar-height) + 18px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.24s ease 0.08s, visibility 0s linear 0s;
}

.content-layout.detail-inactive .sidebar {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0s linear 0.18s;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 12px 14px;
  color: var(--green-900);
  background: var(--green-050);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.back-button:hover,
.back-button:focus-visible {
  background: var(--green-100);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.sidebar-item:hover,
.sidebar-item:focus-visible {
  background: var(--green-050);
}

.sidebar-item.active {
  color: var(--white);
  background: var(--green-900);
  border-color: var(--green-900);
}

.sidebar-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--green-900);
  background: var(--green-100);
  border-radius: 10px;
  font-size: 15px;
}

.sidebar-item.active .sidebar-icon {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
}

.sidebar-icon img,
.card-icon img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

.content-main {
  min-width: 0;
}

.mobile-sheet-handle {
  display: none;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.content-grid.is-leaving {
  opacity: 0;
  transform: translateY(4px);
}

.featured-zone,
.category-carousel-shell,
.category-carousel {
  display: contents;
}

.category-carousel-head,
.all-categories-sheet,
.quick-discovery {
  display: none;
}

.content-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 250px;
  padding: 22px;
  overflow: hidden;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 14px 32px rgba(36, 63, 55, 0.06);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  animation: card-fade-in 0.45s ease both;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-card:focus-visible {
  outline: 3px solid rgba(62, 99, 84, 0.35);
  outline-offset: 3px;
}

.content-card.featured {
  grid-column: span 2;
  min-height: 320px;
  padding: 0;
  color: var(--white);
  background: var(--green-900);
}

.card-body,
.card-top,
.card-copy,
.card-footer {
  z-index: 2;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.card-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 62px;
  height: 62px;
  color: var(--green-900);
  background: var(--green-100);
  border-radius: 22px;
  font-size: 28px;
}

.badge-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.badge {
  padding: 8px 11px;
  color: var(--green-900);
  background: var(--green-100);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge.internal {
  background: #e9edea;
}

.badge.revendas {
  background: #dbeadf;
}

.card-copy h3 {
  margin: 26px 0 10px;
  font-size: 22px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.subcategory-card .card-body .card-copy h3{
  font-size: 20px;
}

.card-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  padding-top: 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}

.enter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-900);
  font-size: 13px;
  font-weight: 900;
}

.card-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.content-card.has-video::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(180deg, rgba(13, 31, 25, 0.04), rgba(13, 31, 25, 0.78));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.featured-carousel,
.featured-media,
.featured-slide,
.featured-shade {
  position: absolute;
  inset: 0;
}

.featured-carousel {
  display: block;
  width: 100%;
  height: 100%;
}

.featured-media {
  overflow: hidden;
  background: var(--green-900);
}

.featured-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 0.8s ease, transform 4.8s ease;
}

.featured-slide.active {
  opacity: 1;
  transform: scale(1);
}

.featured-shade {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(12, 29, 23, 0.64) 0%, rgba(12, 29, 23, 0.2) 58%, rgba(12, 29, 23, 0.08) 100%),
    linear-gradient(0deg, rgba(12, 29, 23, 0.44), transparent 52%);
  pointer-events: none;
}

.featured-caption {
  position: absolute;
  z-index: 2;
  left: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: min(68%, 560px);
  padding: 14px 16px;
  color: var(--white);
  background: rgba(18, 39, 31, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  pointer-events: none;
}

.featured-caption-eyebrow {
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  opacity: 0.72;
  text-transform: uppercase;
}

.featured-caption strong {
  font-family: "roc-grotesk-wide", Arial, sans-serif;
  font-size: clamp(22px, 2.3vw, 34px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.featured-caption small {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0.72;
}

.featured-dots {
  position: absolute;
  z-index: 3;
  right: 20px;
  bottom: 20px;
  display: flex;
  gap: 7px;
}

.featured-dot {
  width: 7px;
  height: 7px;
  background: rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  transition: width 0.3s ease, background 0.3s ease;
}

.featured-dot.active {
  width: 23px;
  background: rgba(255, 255, 255, 0.94);
}

.featured-controls {
  position: absolute;
  top: 50%;
  right: 14px;
  left: 14px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  transform: translateY(-50%);
}

.featured-control {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--white);
  background: rgba(15, 35, 28, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  opacity: 0.48;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: opacity 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.featured-control svg {
  width: 18px;
  height: 18px;
}

.featured-control:hover,
.featured-control:focus-visible {
  background: rgba(15, 35, 28, 0.46);
  opacity: 0.96;
  transform: scale(1.06);
}

.featured-control:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 40px 20px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
}

.hidden {
  display: none !important;
}

@keyframes card-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (hover: hover) and (pointer: fine) {
  .content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 38px rgba(36, 63, 55, 0.12);
  }

  .content-card.has-video:hover .card-video,
  .content-card.has-video:hover::after {
    opacity: 1;
  }

  .content-card.has-video:hover .card-top,
  .content-card.has-video:hover .card-copy p {
    opacity: 0;
  }

  .content-card.has-video:hover .card-copy h3 {
    position: absolute;
    bottom: 8px;
    color: var(--white);
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}