@media (max-width: 1100px) {
  .section {
    margin: 24px;
  }

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

  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar {
    position: static;
    top: auto;
    flex-direction: row;
    align-items: center;
    max-height: 180px;
    overflow: hidden;
    transition: opacity 0.2s ease, max-height 0.24s ease, padding 0.24s ease, visibility 0s linear 0s;
  }

  .content-layout.detail-inactive .sidebar {
    max-height: 0;
    padding-block: 0;
    border-width: 0;
    transition: opacity 0.16s ease, max-height 0.2s ease, padding 0.2s ease, visibility 0s linear 0.2s;
  }

  .back-button {
    flex: 0 0 auto;
    margin: 0;
  }

  .sidebar-nav {
    flex: 1 1 auto;
    flex-direction: row;
    min-width: 0;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .sidebar-item {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }
}

@media (max-width: 700px) {
  :root {
    --topbar-height: clamp(64px, 10svh, 82px);
  }

  body {
    min-height: 100svh;
    overflow-x: hidden;
  }

  body.mobile-detail-open,
  body.all-categories-open {
    overflow: hidden;
  }

  .topbar,
  .topbar.scrolled {
    display: flex;
    min-height: var(--topbar-height);
    height: var(--topbar-height);
    gap: 10px;
    padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  }

  .brand {
    gap: 0;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .brand-copy {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .top-actions {
    flex: 1 1 auto;
  }

  .search {
    width: 100%;
    height: 40px;
    padding-inline: 13px;
    border-radius: 14px;
  }

  .search input {
    font-size: 13px;
  }

  .page {
    min-height: calc(100svh - var(--topbar-height));
  }

  .section {
    min-height: calc(100svh - var(--topbar-height));
    margin: 0;
    padding: 10px 0 14px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .section-head {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    margin: 0;
    padding: 0 12px 9px;
  }

  .section-head h1 {
    display: none;
  }

  .filters {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filters::-webkit-scrollbar,
  .category-carousel::-webkit-scrollbar,
  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .filter {
    flex: 0 0 auto;
    min-height: 34px;
    padding-inline: 13px;
    font-size: 11px;
  }

  .content-layout,
  .content-layout.detail-inactive {
    display: block;
  }

  .content-grid {
    display: block;
  }

  .content-grid.is-leaving {
    transform: none;
  }

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

  .featured-zone {
    height: 40svh;
    min-height: 210px;
    max-height: 310px;
    padding: 0 12px 10px;
  }

  .featured-zone:empty {
    display: none;
  }

  .content-card.featured {
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 22px;
  }

  .featured-caption {
    right: 14px;
    bottom: 14px;
    left: 14px;
    max-width: none;
    padding: 10px 12px;
    background: rgba(18, 39, 31, 0.18);
    border-radius: 14px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .featured-caption-eyebrow {
    margin-bottom: 3px;
    font-size: 8px;
  }

  .featured-caption strong {
    font-size: clamp(19px, 6vw, 25px);
  }

  .featured-caption small {
    max-width: 86%;
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.35;
    opacity: 0.62;
  }

  .featured-dots {
    right: 17px;
    bottom: 18px;
  }

  .featured-controls {
    right: 8px;
    left: 8px;
  }

  .featured-control {
    width: 31px;
    height: 31px;
    background: rgba(15, 35, 28, 0.22);
    opacity: 0.62;
  }

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

  .category-carousel-shell {
    min-height: 0;
    padding-top: 4px;
    overflow: hidden;
  }

  .category-carousel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 14px 10px;
  }

  .open-categories-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    padding: 0 13px 0 9px;
    color: var(--white);
    background: var(--green-900);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(36, 63, 55, 0.16);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
  }

  .open-categories-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--green-900);
    background: var(--white);
    border-radius: 50%;
    font-size: 15px;
  }

  .category-carousel-hint {
    color: var(--muted);
    font-size: 9px;
    white-space: nowrap;
  }

  .category-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 20px) / 3);
    grid-template-rows: minmax(118px, auto);
    gap: 10px;
    width: 100%;
    height: auto;
    padding: 2px 14px 14px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 14px;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
  }

  .category-carousel .content-card {
    scroll-snap-align: start;
  }

  .content-card:not(.featured) {
    min-height: 0;
    padding: 13px;
    border-radius: 19px;
  }

  .category-carousel .content-card {
    justify-content: flex-start;
    text-align: center;
  }

  .category-carousel .card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
  }

  .category-carousel .card-top {
    display: block;
  }

  .category-carousel .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 21px;
  }

  .category-carousel .badge-stack,
  .category-carousel .card-copy p {
    display: none;
  }

  .category-carousel .card-copy h3 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.18;
    letter-spacing: -0.02em;
    -webkit-box-orient: vertical;
  }

  .content-card.has-video:hover .card-copy h3 {
    display: none;
  }

  .all-categories-sheet {
    position: fixed;
    inset: 0;
    z-index: 75;
    display: flex;
    align-items: stretch;
    padding: 0;
    background: var(--white);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0s linear 0.22s;
  }

  .all-categories-sheet.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.22s ease, visibility 0s linear 0s;
  }

  .all-categories-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    height: 100svh;
    min-height: 0;
    padding: max(12px, env(safe-area-inset-top)) 0 0;
    overflow: hidden;
    background: var(--white);
    border-radius: 0;
    box-shadow: none;
    transform: translateY(100%);
    transition: transform 0.28s ease;
  }

  .all-categories-sheet.is-open .all-categories-panel {
    transform: translateY(0);
  }

  .all-categories-panel::before {
    display: none;
  }

  .all-categories-panel-head {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px 14px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }

  .all-categories-panel-head span {
    display: block;
    margin-bottom: 2px;
    color: var(--green-600);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .all-categories-panel-head h2 {
    margin: 0;
    color: var(--green-900);
    font-size: 21px;
    line-height: 1;
    letter-spacing: -0.035em;
  }

  .all-categories-close {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--green-900);
    background: var(--green-050);
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
  }

  .all-categories-row {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    min-height: 0;
    padding: 14px 14px max(20px, env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .all-categories-row::-webkit-scrollbar {
    width: 5px;
  }

  .all-categories-row::-webkit-scrollbar-thumb {
    background: rgba(36, 63, 55, 0.2);
    border-radius: 999px;
  }

  .all-categories-row .content-card {
    flex: 0 0 auto;
    width: 100%;
    min-height: 78px;
    padding: 12px 14px;
    border-radius: 17px;
    text-align: left;
  }

  .all-categories-row .card-body {
    display: flex;
    flex: 1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
  }

  .all-categories-row .card-top {
    display: block;
    flex: 0 0 auto;
  }

  .all-categories-row .card-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    font-size: 20px;
  }

  .all-categories-row .card-copy {
    min-width: 0;
  }

  .all-categories-row .badge-stack,
  .all-categories-row .card-copy p {
    display: none;
  }

  .all-categories-row .card-copy h3 {
    display: block;
    margin: 0;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .all-categories-tip {
    display: none;
  }

  .quick-discovery {
    display: block;
    margin: 4px 14px 2px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--green-900), var(--green-700));
    border-radius: 20px;
    box-shadow: 0 14px 30px rgba(36, 63, 55, 0.14);
  }

  .quick-discovery summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 72px;
    padding: 14px 16px;
    color: var(--white);
    cursor: pointer;
    list-style: none;
  }

  .quick-discovery summary::-webkit-details-marker {
    display: none;
  }

  .quick-discovery-copy small,
  .quick-discovery-copy strong {
    display: block;
  }

  .quick-discovery-copy small {
    margin-bottom: 4px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.12em;
    opacity: 0.65;
    text-transform: uppercase;
  }

  .quick-discovery-copy strong {
    font-family: "roc-grotesk-wide", Arial, sans-serif;
    font-size: 12px;
    line-height: 1.15;
  }

  .quick-discovery-toggle {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--green-900);
    background: var(--white);
    border-radius: 50%;
    font-size: 23px;
    transition: transform 0.2s ease;
  }

  .quick-discovery[open] .quick-discovery-toggle {
    transform: rotate(45deg);
  }

  .quick-discovery-body {
    padding: 0 14px 15px;
    color: var(--white);
  }

  .quick-discovery-body p {
    margin: 0 0 10px;
    font-size: 10px;
    line-height: 1.45;
    opacity: 0.68;
  }

  .quick-discovery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  .quick-discovery-actions button {
    min-height: 34px;
    padding: 0 11px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
  }

  /* Detalhes em painel suspenso no mobile. */
  .content-layout:not(.detail-inactive) {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0;
    padding-top: var(--topbar-height);
    background: rgba(8, 20, 16, 0.54);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
  }

  .content-layout:not(.detail-inactive) .sidebar {
    position: relative;
    width: 100%;
    z-index: 2;
    order: 1;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
    max-height: none;
    padding: 14px 14px 8px;
    overflow: visible;
    background: var(--white);
    border: 0;
    border-radius: 24px 24px 0 0;
    opacity: 1;
    visibility: visible;
  }

  .content-layout:not(.detail-inactive) .sidebar::before {
    align-self: center;
    width: 44px;
    height: 4px;
    margin-bottom: 2px;
    background: rgba(36, 63, 55, 0.18);
    border-radius: 999px;
    content: "";
  }

  .content-layout:not(.detail-inactive) .back-button {
    justify-content: center;
    width: 100%;
    min-height: 39px;
    margin: 0;
  }

  .content-layout:not(.detail-inactive) .sidebar-nav {
    display: none;
  }

  .content-layout:not(.detail-inactive) .content-main {
    position: relative;
    width: 100%;
    z-index: 2;
    order: 2;
    max-height: 66svh;
    padding: 8px 14px max(16px, env(safe-area-inset-bottom));
    overflow-y: auto;
    background: var(--white);
    border-radius: 0 0 24px 24px;
  }

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

  .content-layout.detail-inactive .mobile-sheet-handle {
    display: none;
  }

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

  .content-layout:not(.detail-inactive) .subcategory-card {
    min-height: 112px;
    padding: 14px;
  }

  .content-layout:not(.detail-inactive) .subcategory-card .card-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
  }

  .content-layout:not(.detail-inactive) .subcategory-card .card-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .content-layout:not(.detail-inactive) .subcategory-card .card-copy h3 {
    margin: 0;
    font-size: 16px;
  }

  .content-layout:not(.detail-inactive) .subcategory-card .card-copy p {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.4;
  }

  .content-layout:not(.detail-inactive) .card-footer {
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 10px;
  }

  .empty-state {
    padding: 28px 18px;
    background: var(--green-050);
  }
}

@media (max-width: 390px) {
  .topbar,
  .topbar.scrolled {
    padding-inline: 10px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }
}
