/* ACE category archive — APP-DESIGN-STANDARD v3.3 / 规律 9 */

.ace-cat {
  --ace-cat-red: #dc2626;
  --ace-cat-black: #151515;
  --ace-cat-cream: #f7f4eb;
  --ace-cat-soft: #fffdf8;
  --ace-cat-muted: #5b5b5b;
  --ace-cat-line: rgba(21, 21, 21, 0.12);
  --ace-cat-display: "Oswald", sans-serif;
  --ace-cat-body: "Plus Jakarta Sans", system-ui, sans-serif;
  box-sizing: border-box;
  width: min(88rem, calc(100% - 32px));
  margin: 24px auto 72px;
  color: var(--ace-cat-black);
  font-family: var(--ace-cat-body);
}

.ace-cat *,
.ace-cat *::before,
.ace-cat *::after {
  box-sizing: border-box;
}

html.ace-cat-lock,
html.ace-cat-lock body {
  overflow: hidden;
}

.ace-cat-title {
  margin: 0 0 12px;
  font-family: var(--ace-cat-display);
  font-size: 34px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.ace-cat-desc {
  position: relative;
  margin: 0 0 22px;
}

.ace-cat-desc.is-clamped .ace-cat-desc__inner {
  max-height: 110px;
  overflow: hidden;
}

.ace-cat-desc.is-clamped::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 36px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(247, 244, 235, 0), #f7f4eb);
  pointer-events: none;
}

.ace-cat-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 16px;
  border: 1px solid var(--ace-cat-black);
  border-radius: 4px;
  background: #fff;
  color: var(--ace-cat-black);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.ace-cat-seo {
  margin: 0;
  padding: 20px;
  background: var(--ace-cat-soft);
  border: 2px solid var(--ace-cat-black);
  border-radius: 16px;
}

.ace-cat-seo__kicker {
  margin: 0 0 8px;
  color: var(--ace-cat-red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ace-cat-seo__title {
  margin: 0 0 12px;
  font-family: var(--ace-cat-display);
  font-size: 28px;
  line-height: 1.1;
  text-transform: uppercase;
}

.ace-cat-seo__intro {
  margin: 0 0 16px;
  max-width: 72ch;
  color: var(--ace-cat-muted);
  font-size: 15px;
  line-height: 1.6;
}

.ace-cat-seo__table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--ace-cat-line);
}

.ace-cat-seo__table th,
.ace-cat-seo__table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--ace-cat-line);
  text-align: left;
  vertical-align: top;
  font-size: 15px;
}

.ace-cat-seo__table th {
  width: 32%;
  color: var(--ace-cat-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ace-cat-seo__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.ace-skel-btn,
.ace-cat-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--ace-cat-red);
  color: #fff !important;
  border: 2px solid var(--ace-cat-black);
  border-radius: 8px;
  box-shadow: 3px 3px 0 var(--ace-cat-black);
  font: 800 12px var(--ace-cat-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none !important;
  cursor: pointer;
}

.ace-skel-btn--ghost,
.ace-cat-clear {
  background: #fff;
  color: var(--ace-cat-black) !important;
}

.ace-skel-faq {
  margin: 0 0 8px;
  padding: 10px 14px;
  border: 1px solid var(--ace-cat-line);
  border-radius: 10px;
  background: #fff;
}

.ace-skel-faq summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.ace-skel-faq p {
  margin: 8px 0 0;
  color: var(--ace-cat-muted);
  font-size: 15px;
  line-height: 1.6;
}

.ace-cat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}

.ace-cat-filter-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 4px;
  background: #f3f3f3;
  color: var(--ace-cat-black);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.ace-cat-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.ace-cat-sort__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.ace-cat-sort select {
  min-height: 44px;
  min-width: 168px;
  padding: 0 12px;
  border: 1px solid var(--ace-cat-black);
  border-radius: 4px;
  background: #fff;
  color: var(--ace-cat-black);
  font-size: 15px;
  font-weight: 500;
}

.ace-cat-layout {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.ace-cat-filters {
  flex: 0 0 194px;
  position: relative;
}

.ace-cat-filters__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
}

.ace-cat-filters__heading {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ace-cat-filters__close {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ace-cat-black);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.ace-cat-facet {
  border-bottom: 1px solid var(--ace-cat-line);
  padding: 8px 0;
}

.ace-cat-facet summary {
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  font-weight: 700;
}

.ace-cat-facet summary::-webkit-details-marker {
  display: none;
}

.ace-cat-facet summary::after {
  content: "+";
  float: right;
  font-weight: 400;
}

.ace-cat-facet[open] summary::after {
  content: "–";
}

.ace-cat-facet__list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.ace-cat-facet__list.is-scroll {
  max-height: 232px;
  padding-right: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ace-cat-facet__list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  line-height: 1.35;
}

.ace-cat-facet__list label span {
  flex: 1;
  min-width: 0;
}

.ace-cat-facet__list label i {
  color: var(--ace-cat-muted);
  font-size: 12px;
  font-style: normal;
}

.ace-cat-filters__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.ace-cat-stage {
  flex: 1;
  min-width: 0;
}

.ace-cat-count {
  margin: 0 0 14px;
  color: var(--ace-cat-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ace-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ace-cat-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  background: #fff;
}

.ace-cat-card__media {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--ace-cat-soft);
  border: 1px solid var(--ace-cat-line);
}

.ace-cat-card__media img,
.ace-cat-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ace-cat-card__ph {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ace-cat-cream);
}

.ace-cat-card__title {
  margin: 12px 0 6px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.ace-cat-card__title a {
  color: inherit;
  text-decoration: none;
}

.ace-cat-card__cta {
  margin: 0;
  font-size: 15px;
}

.ace-cat-card__cta a {
  color: var(--ace-cat-muted);
}

.ace-cat-empty {
  padding: 40px 20px;
  text-align: center;
}

.ace-cat-pager .page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.ace-cat-pager a,
.ace-cat-pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--ace-cat-line);
  color: var(--ace-cat-black);
  font-size: 15px;
  text-decoration: none;
}

.ace-cat-pager .current {
  background: var(--ace-cat-black);
  color: #fff;
}

.ace-cat-backdrop {
  display: none;
}

@media (max-width: 1023px) {
  .ace-cat-title {
    font-size: 28px;
  }

  .ace-cat-card__title {
    font-size: 20px;
  }
}

@media (min-width: 768px) {
  .ace-cat-filter-toggle,
  .ace-cat-filters__close,
  .ace-cat-backdrop {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .ace-cat {
    width: calc(100% - 24px);
    margin-top: 16px;
  }

  .ace-cat-title {
    font-size: 28px;
  }

  .ace-cat-seo__title {
    font-size: 22px;
  }

  .ace-cat-filter-toggle {
    display: inline-flex;
  }

  .ace-cat-layout {
    display: block;
  }

  .ace-cat-filters {
    position: fixed;
    inset: 0;
    z-index: 1052;
    flex: none;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 16px 18px 32px;
    overflow-y: auto;
    background: #fff;
    transform: translateX(-100%);
    visibility: hidden;
  }

  .ace-cat-filters.is-open {
    transform: none;
    visibility: visible;
  }

  .ace-cat-filters__close {
    display: grid;
    place-items: center;
  }

  .ace-cat-backdrop.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1051;
    background: #000;
    opacity: 0.5;
  }

  .ace-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .ace-cat-card__title {
    font-size: 20px;
  }
}
