/* Category content only. Inherits the storefront font and theme tokens. */
.content.stc-category-content { min-width: 0; padding: 16px 10px 32px; }
.source-catalog {
    --cat-ink: var(--stc-ink, #20382f);
    --cat-muted: var(--stc-muted, #60736a);
    --cat-green: var(--stc-green-700, #237455);
    --cat-deep: var(--stc-green-900, #174c3c);
    --cat-line: var(--stc-line, #dce7df);
    --cat-surface: var(--stc-surface, #fff);
    --cat-soft: var(--stc-green-100, #eaf4ee);
    width: 100%; max-width: none; margin: 0; padding: 0;
    color: var(--cat-ink); container: category / inline-size; box-sizing: border-box;
}
.source-catalog *, .source-catalog *::before, .source-catalog *::after { box-sizing: border-box; }
.source-catalog [hidden] { display: none !important; }
.source-catalog a { text-decoration: none; }
.source-catalog .catalog-breadcrumb { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 12px; color: var(--cat-muted); }
.source-catalog .catalog-breadcrumb a { color: var(--cat-green); min-height: 44px; display: inline-flex; align-items: center; }
.source-catalog .catalog-hero { min-height: 160px; padding: 24px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--cat-soft); border: 1px solid var(--cat-line); border-radius: 16px; }
.source-catalog .catalog-hero h1 { font-size: clamp(23px, 2.2vw, 30px); line-height: 1.3; letter-spacing: -.5px; color: var(--cat-deep); margin: 0; font-weight: 700; }
.source-catalog .catalog-hero p { margin: 9px 0 12px; font-size: 14px; line-height: 1.6; color: var(--cat-muted); }
.source-catalog .catalog-count { display: inline-flex; padding: 4px 10px; border-radius: 6px; background: var(--cat-surface); color: var(--cat-green); font-size: 12px; font-weight: 600; }
.source-catalog .catalog-code-window { flex: 0 0 225px; background: var(--cat-deep); color: #d3e8dc; border-radius: 10px; padding: 12px 15px; transform: rotate(-2deg); }
.source-catalog .catalog-code-window > div { display: flex; align-items: center; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid #ffffff26; }
.source-catalog .catalog-code-window i { width: 5px; height: 5px; background: #94c4ab; border-radius: 50%; }
.source-catalog .catalog-code-window i:first-child { background: #d3b96b; }
.source-catalog .catalog-code-window div span { margin-left: auto; font-size: 9px; opacity: .8; }
.source-catalog .catalog-code-window pre { margin: 10px 0 0; font-size: 10px; line-height: 1.9; white-space: pre-wrap; }
.source-catalog .catalog-code-window pre span { color: #96cfaf; }
.source-catalog .catalog-search { display: flex; align-items: center; gap: 10px; margin-top: 0; padding: 0 14px; min-height: 48px; background: var(--cat-surface); border: 1px solid var(--cat-line); border-radius: 10px; }
.source-catalog .catalog-search:focus-within { outline: 2px solid var(--cat-green); outline-offset: 2px; }
.source-catalog .catalog-search svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--cat-muted); stroke-width: 1.7; }
.source-catalog .catalog-search input { min-width: 0; flex: 1; width: 100%; min-height: 46px; border: 0; outline: 0; background: transparent; color: var(--cat-ink); font: inherit; font-size: 14px; box-shadow: none; padding: 0; }
.source-catalog .catalog-search input::placeholder { color: var(--cat-muted); opacity: 1; }
.source-catalog .catalog-search input::-webkit-search-cancel-button { display: none; }
.source-catalog button { font: inherit; cursor: pointer; }
.source-catalog .catalog-search button { border: 0; background: transparent; color: var(--cat-muted); min-width: 44px; min-height: 44px; font-size: 24px; }
.source-catalog .catalog-search-meta { display: flex; justify-content: space-between; gap: 12px; margin: 9px 0 18px; color: var(--cat-muted); font-size: 12px; line-height: 1.5; }
.source-catalog .code-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.source-catalog .code-card-wrap { min-width: 0; }
.source-catalog .catalog-image { width: 100%; aspect-ratio: 16 / 9; margin: 0; padding: 0; overflow: hidden; border-bottom: 1px solid var(--cat-line); background: var(--stc-surface-soft, #f7faf7); }
.source-catalog .catalog-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.source-catalog .code-card { height: 100%; display: flex; flex-direction: column; overflow: hidden; background: var(--cat-surface); border: 1px solid var(--cat-line); border-radius: 16px; color: var(--cat-ink); transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.source-catalog .catalog-art { position: relative; min-height: 104px; display: flex; align-items: center; justify-content: center; background: var(--cat-soft); overflow: hidden; }
.source-catalog .catalog-art::before { content: ''; width: 70px; height: 70px; border: 1px solid var(--cat-line); border-radius: 20px; background: var(--cat-surface); transform: rotate(-8deg); position: absolute; }
.source-catalog .catalog-art svg { position: relative; z-index: 1; width: 38px; height: 38px; stroke: var(--cat-green); stroke-width: 1.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.source-catalog .catalog-art span { position: absolute; width: 9px; height: 9px; border-radius: 3px; background: #c6ac62; left: calc(50% + 40px); top: 26px; }
.source-catalog .code-card-content { display: flex; flex-direction: column; flex: 1; padding: 14px; }
.source-catalog .code-card-title { margin: 0; color: var(--cat-ink); font-size: 16px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.source-catalog .catalog-description { margin: 7px 0 12px; color: var(--cat-muted); font-size: 13px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.source-catalog .catalog-card-action { margin-top: auto; padding-top: 13px; border-top: 1px solid var(--cat-line); display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--cat-green); font-size: 13px; font-weight: 600; }
.source-catalog .catalog-card-action svg { width: 18px; height: 18px; flex-shrink: 0; }
.source-catalog .catalog-support { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 18px 20px; margin-top: 24px; border: 1px solid var(--cat-line); border-radius: 12px; font-size: 14px; background: var(--cat-surface); }
.source-catalog .catalog-support a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 600; color: var(--cat-green); }
.source-catalog .catalog-empty, .source-catalog .code-empty { padding: 32px 16px; text-align: center; border: 1px dashed var(--cat-line); border-radius: 16px; background: var(--cat-surface); grid-column: 1 / -1; }
.source-catalog .catalog-empty h2 { font-size: 18px; margin: 0 0 8px; }
.source-catalog .catalog-empty p { color: var(--cat-muted); font-size: 14px; }
.source-catalog .catalog-empty button { min-height: 44px; border: 1px solid var(--cat-line); border-radius: 8px; padding: 8px 16px; color: var(--cat-green); background: var(--cat-soft); }
.source-catalog a:focus-visible, .source-catalog button:focus-visible { outline: 3px solid var(--cat-green); outline-offset: 3px; }
.source-catalog .catalog-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (hover: hover) { .source-catalog .code-card:hover { border-color: var(--cat-green); transform: translateY(-2px); box-shadow: 0 5px 14px #173c330d; } }
@container category (max-width: 850px) { .source-catalog .code-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .source-catalog .catalog-code-window { flex-basis: 180px; } }
@container category (max-width: 540px) {
    .source-catalog .catalog-hero { padding: 20px; min-height: auto; }
    .source-catalog .catalog-code-window { display: none; }
    .source-catalog .catalog-hero h1 { font-size: 24px; }
    .source-catalog .code-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .source-catalog .code-card { flex-direction: row; align-items: stretch; border-radius: 12px; }
    .source-catalog .catalog-art { width: 68px; min-height: 100%; flex: 0 0 68px; }
    .source-catalog .catalog-image { width: 110px; flex: 0 0 110px; aspect-ratio: auto; margin: 0; padding: 0; display: flex; align-items: center; border-bottom: 0; border-right: 1px solid var(--cat-line); }
    .source-catalog .catalog-image img { height: auto; aspect-ratio: 16 / 9; }
    .source-catalog .catalog-art::before { width: 46px; height: 46px; border-radius: 12px; }
    .source-catalog .catalog-art svg { width: 28px; height: 28px; }
    .source-catalog .catalog-art span { width: 5px; height: 5px; left: auto; right: 7px; top: 18px; }
    .source-catalog .code-card-content { min-width: 0; padding: 14px 30px 14px 12px; position: relative; }
    .source-catalog .code-card-title { font-size: 15px; }
    .source-catalog .catalog-description { margin: 5px 0 0; font-size: 13px; }
    .source-catalog .catalog-card-action { font-size: 0; border: 0; padding: 0; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
    .source-catalog .catalog-search-meta { font-size: 11px; }
    .source-catalog .catalog-support { padding: 12px 16px; margin-top: 18px; }
}
@media (max-width: 600px) { .content.stc-category-content { padding: 12px 8px 24px; } }
@media (prefers-reduced-motion: reduce) { .source-catalog .code-card { transition: none; } .source-catalog .code-card:hover { transform: none; } }
