/* Shell: sidebar + main (responsive) */
.cat2-page {
  box-sizing: border-box;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-cat2);
  font-size: 16px;
  line-height: 1.4;
  color: var(--cat2-text-body);
  background: var(--cat2-bg-page);
  -webkit-font-smoothing: antialiased;
}

.cat2-page *,
.cat2-page *::before,
.cat2-page *::after {
  box-sizing: border-box;
}

.cat2-skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cat2-skip:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 9999;
  width: auto;
  height: auto;
  padding: 12px 16px;
  margin: 0;
  clip: auto;
  overflow: visible;
  background: var(--cat2-accent-orange);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
}

.cat2-shell {
  max-width: var(--cat2-shell-max);
  margin: 0 auto;
  padding: 8px clamp(16px, 4vw, 40px) 48px;
  display: flex;
  align-items: flex-start;
  gap: clamp(16px, 2.4vw, 32px);
  min-width: 0;
}

.cat2-shell > * {
  min-width: 0;
}

@media (min-width: 1024px) {
  .cat2-shell {
    padding-top: 8px;
    padding-inline: clamp(24px, 5.69vw, 82px);
    gap: 0;
    align-items: flex-start;
  }

  .cat2-shell__sidebar {
    flex: 0 0 var(--cat2-sidebar-width);
    width: var(--cat2-sidebar-width);
    max-width: var(--cat2-sidebar-width);
    padding-right: clamp(16px, 2vw, 28px);
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--cat2-border-input) transparent;
  }

  .cat2-shell__main {
    flex: 1;
    min-width: 0;
    max-width: var(--cat2-main-max);
    margin-left: auto;
  }
}

/* Filter toggle button — hidden on desktop */
.cat2-filter-toggle {
  display: none;
}

@media (max-width: 1023px) {
  .cat2-shell {
    flex-direction: column;
  }

  /* Sidebar hidden by default on mobile; shown when expanded */
  .cat2-shell__sidebar {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.32s ease;
  }

  .cat2-shell__sidebar.is-filter-open {
    max-height: 2000px;
  }

  .cat2-shell__main {
    width: 100%;
  }

  /* Show filter toggle button on mobile */
  .cat2-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 9px 18px;
    border: 1.5px solid var(--cat2-border-input);
    border-radius: var(--cat2-radius-btn);
    background: #fff;
    font-family: var(--font-cat2);
    font-size: 15px;
    font-weight: 600;
    color: var(--cat2-text-heading);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
  }

  .cat2-filter-toggle:hover {
    background: var(--cat2-bg-muted);
    border-color: var(--cat2-accent-orange);
  }

  .cat2-filter-toggle:focus-visible {
    outline: 2px solid var(--cat2-accent-orange);
    outline-offset: 2px;
  }

  .cat2-filter-toggle[aria-expanded="true"] {
    background: var(--cat2-bg-muted);
    border-color: var(--cat2-accent-orange);
    color: var(--cat2-accent-orange);
  }

  .cat2-filter-toggle__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--cat2-accent-orange);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
  }
}
