/* ==========================================================================
   COURSE CATALOGUE  —  /home/courses  (2026-09-22 redesign)

   Views: courses_page.php, courses_page_sidebar.php,
   courses_page_sorting_section.php, courses_page_grid_layout.php,
   courses_page_list_layout.php, courses_page_card.php.

   The homepage's design language (home_modern4.php .gfx-home): white cards
   on a pale green-grey ground, hairline rules instead of heavy shadows,
   4-8px corners, forest green, Fraunces titles, Space Grotesk micro-labels,
   Manrope text. Everything is scoped to .gcat, and all class names are new
   (gcat-* / gcard-*), so the theme's old .courses-card / .course-all-category
   rules in all.style.min.css cannot reach it.
   ========================================================================== */

.gcat {
    --gc-paper: #FFFFFF;
    --gc-paper-2: #F6F9F7;
    --gc-sand: #EAF2ED;
    --gc-ink: #12211B;
    --gc-ink-2: #47534C;
    --gc-muted: #5E6A63;
    --gc-forest: #1F8F5C;
    --gc-forest-2: #17724A;
    --gc-accent-soft: #E1F3EA;
    --gc-rule: rgba(18, 33, 27, 0.12);
    --gc-rule-soft: rgba(18, 33, 27, 0.07);
    --gc-star: #E8A33D;
    --gc-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --gc-body: 'Manrope', 'Inter', -apple-system, system-ui, sans-serif;
    --gc-label: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
    --gc-ease: cubic-bezier(.22, 1, .36, 1);

    background: var(--gc-paper-2);
    padding: 28px 0 88px;
    font-family: var(--gc-body);
    color: var(--gc-ink);
    -webkit-font-smoothing: antialiased;
}
.gcat *, .gcat *::before, .gcat *::after { box-sizing: border-box; }
.gcat a { text-decoration: none; }
.gcat ul { list-style: none; margin: 0; padding: 0; }
.gcat p { margin: 0; }

/* ----- Micro-label + page head ------------------------------------------ */
.gcat-kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--gc-label);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gc-forest);
}
.gcat-kicker::before {
    content: "";
    width: 34px;
    height: 1px;
    background: currentColor;
    opacity: .55;
}
.gcat-kicker--light { color: #A8E8C8; }

.gcat-head { max-width: 720px; margin-bottom: 34px; }
.gcat .gcat-title {
    margin: 12px 0 0;
    font-family: var(--gc-display);
    font-size: 40px;
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -.028em;
    color: var(--gc-ink);
}
.gcat .gcat-lead {
    margin-top: 12px;
    font-size: 17px;
    line-height: 1.65;
    color: var(--gc-ink-2);
}

/* Visually hidden, still read by screen readers and search engines. */
.gcat-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ----- Buttons ---------------------------------------------------------- */
.gcat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 24px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .3s ease, color .3s ease, transform .3s var(--gc-ease);
}
.gcat .gcat-btn--solid { background: var(--gc-forest); color: #fff; }
.gcat .gcat-btn--solid:hover { background: var(--gc-ink); color: #fff; transform: translateY(-2px); }
.gcat .gcat-btn--light { background: #fff; color: var(--gc-forest); }
.gcat .gcat-btn--light:hover { background: var(--gc-paper-2); color: var(--gc-forest-2); transform: translateY(-2px); }

/* ----- Placement-test result banner ------------------------------------- */
.gcat-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
    padding: 30px 34px;
    border-radius: 8px;
    background: var(--gc-forest);
    color: #fff;
}
.gcat .gcat-result h2 { margin: 10px 0 6px; font-size: 24px; color: #fff; }
.gcat .gcat-result p { color: rgba(255, 255, 255, .82); line-height: 1.6; }
.gcat .gcat-result .gcat-result__score { margin-top: 8px; color: #fff; }

/* ----- Two-column layout ------------------------------------------------ */
.gcat-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}
.gcat-aside {
    position: sticky;
    top: 104px;
    max-height: calc((100vh - 124px) / var(--gf-zoom, 1));
    overflow-y: auto;
    border-radius: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--gc-rule) transparent;
}
.gcat-backdrop { display: none; }

/* ----- Filter panel ----------------------------------------------------- */
.gcat-filters {
    background: var(--gc-paper);
    border: 1px solid var(--gc-rule);
    border-radius: 8px;
    padding: 20px 20px 8px;
}
.gcat-filters__top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.gcat-filters__title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-right: auto;
    font-size: 17px;
    font-weight: 700;
    color: var(--gc-ink);
}
.gcat-filters__title i { font-size: 14px; color: var(--gc-forest); }
.gcat .gcat-filters__clear {
    font-size: 14px;
    font-weight: 600;
    color: var(--gc-forest);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease;
}
.gcat .gcat-filters__clear:hover { color: var(--gc-forest-2); border-color: currentColor; }
.gcat-filters__close {
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid var(--gc-rule);
    border-radius: 6px;
    background: #fff;
    color: var(--gc-ink);
    font-size: 17px;
}

/* Keyword search */
.gcat-search {
    position: relative;
    margin-bottom: 6px;
}
.gcat-search > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--gc-muted);
    pointer-events: none;
}
.gcat .gcat-search input {
    width: 100%;
    height: 46px;
    padding: 0 48px 0 40px;
    border: 1px solid var(--gc-rule);
    border-radius: 6px;
    background: var(--gc-paper-2);
    font-family: var(--gc-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--gc-ink);
    outline: none;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.gcat .gcat-search input::placeholder { color: var(--gc-muted); }
.gcat .gcat-search input:focus {
    background: #fff;
    border-color: var(--gc-forest);
    box-shadow: 0 0 0 3px rgba(31, 143, 92, .14);
}
.gcat-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 5px;
    background: var(--gc-forest);
    color: #fff;
    font-size: 14px;
    transition: background .2s ease;
}
.gcat-search button:hover { background: var(--gc-ink); }

/* Filter groups */
.gcat-group {
    padding: 18px 0;
    border-top: 1px solid var(--gc-rule-soft);
}
.gcat-search + .gcat-group { border-top: 0; padding-top: 14px; }
.gcat .gcat-group__label {
    margin: 0 0 12px;
    font-family: var(--gc-label);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gc-ink-2);
}

/* Level: CEFR pills */
.gcat-levels {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}
.gcat .gcat-level {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border: 1px solid var(--gc-rule);
    border-radius: 6px;
    background: #fff;
    font-family: var(--gc-label);
    font-size: 14px;
    font-weight: 700;
    color: var(--gc-ink);
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.gcat .gcat-level:hover { border-color: var(--gc-forest); color: var(--gc-forest); }
.gcat .gcat-level.is-active {
    background: var(--gc-forest);
    border-color: var(--gc-forest);
    color: #fff;
}

/* Segmented control: format / price */
.gcat-seg {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 8px;
    background: var(--gc-paper-2);
    border: 1px solid var(--gc-rule-soft);
}
.gcat .gcat-seg a {
    flex: 1;
    padding: 8px 6px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--gc-ink-2);
    white-space: nowrap;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.gcat .gcat-seg a:hover { color: var(--gc-ink); }
.gcat .gcat-seg a.is-active {
    background: #fff;
    color: var(--gc-forest-2);
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(18, 33, 27, .08), 0 0 0 1px var(--gc-rule-soft);
}

/* Categories: parent rows, expandable sub-category lists */
.gcat-cats { display: flex; flex-direction: column; gap: 2px; }
.gcat .gcat-cat {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--gc-ink);
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.gcat .gcat-cat:hover { background: var(--gc-paper-2); }
.gcat .gcat-cat__name { flex: 1; min-width: 0; color: inherit; }
.gcat .gcat-cat.is-active {
    background: var(--gc-accent-soft);
    color: var(--gc-forest-2);
}
.gcat .gcat-cat.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--gc-forest);
}
.gcat-count {
    flex-shrink: 0;
    min-width: 30px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--gc-paper-2);
    font-family: var(--gc-label);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: var(--gc-ink-2);
}
.is-active > .gcat-count { background: #fff; color: var(--gc-forest-2); }

.gcat-branch > summary { list-style: none; }
.gcat-branch > summary::-webkit-details-marker { display: none; }
.gcat-branch__chev {
    flex-shrink: 0;
    width: 14px;
    font-size: 14px;
    color: var(--gc-muted);
    transition: transform .25s var(--gc-ease);
}
.gcat-branch[open] > summary .gcat-branch__chev { transform: rotate(180deg); }
.gcat-subcats {
    margin: 2px 0 8px 18px;
    padding-left: 10px;
    border-left: 1px solid var(--gc-rule);
}
.gcat .gcat-subcat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--gc-ink-2);
    transition: background .2s ease, color .2s ease;
}
.gcat .gcat-subcat > span:first-child { flex: 1; min-width: 0; }
.gcat .gcat-subcat:hover { background: var(--gc-paper-2); color: var(--gc-ink); }
.gcat .gcat-subcat.is-active {
    background: var(--gc-accent-soft);
    color: var(--gc-forest-2);
    font-weight: 700;
}

/* Rating */
.gcat-ratings { display: flex; flex-direction: column; gap: 2px; }
.gcat .gcat-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gc-ink-2);
    transition: background .2s ease;
}
.gcat .gcat-rating:hover { background: var(--gc-paper-2); }
.gcat .gcat-rating.is-active { background: var(--gc-accent-soft); color: var(--gc-forest-2); }
.gcat-stars { display: inline-flex; gap: 3px; font-size: 14px; color: #D9DFDB; }
.gcat-stars .is-on { color: var(--gc-star); }
.gcat-rating__up { font-size: 14px; font-weight: 500; }

/* ----- Toolbar ---------------------------------------------------------- */
.gcat-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
    margin-bottom: 22px;
}
.gcat-toolbar__count { display: flex; align-items: center; gap: 14px; }
.gcat-toolbar__count p { font-size: 15px; font-weight: 500; color: var(--gc-ink-2); }
.gcat-toolbar__count b {
    font-family: var(--gc-display);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--gc-ink);
}
.gcat-toolbar__range { color: var(--gc-muted); font-size: 15px; }
.gcat-toolbar__controls { display: flex; align-items: center; gap: 10px; }

.gcat-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border: 1px solid var(--gc-rule);
    border-radius: 6px;
    background: #fff;
    font-size: 15px;
    font-weight: 700;
    color: var(--gc-ink);
}
.gcat-filter-btn i { color: var(--gc-forest); }
.gcat-filter-btn span {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--gc-forest);
    color: #fff;
    font-size: 14px;
    line-height: 20px;
}

.gcat-view {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--gc-rule);
    border-radius: 6px;
    background: #fff;
}
.gcat-view button {
    width: 38px;
    height: 34px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--gc-muted);
    font-size: 15px;
    transition: background .2s ease, color .2s ease;
}
.gcat-view button:hover { color: var(--gc-ink); }
.gcat-view button.is-active { background: var(--gc-forest); color: #fff; }

.gcat-sort {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 42px;
    margin: 0;
    padding-left: 14px;
    border: 1px solid var(--gc-rule);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s ease;
}
.gcat-sort:hover, .gcat-sort:focus-within { border-color: var(--gc-forest); }
.gcat-sort > span {
    font-family: var(--gc-label);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gc-muted);
}
.gcat .gcat-sort select {
    height: 40px;
    padding: 0 38px 0 10px;
    border: 0;
    background: transparent;
    font-family: var(--gc-body);
    font-size: 15px;
    font-weight: 700;
    color: var(--gc-ink);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.gcat-sort > i {
    position: absolute;
    right: 14px;
    font-size: 11px;
    color: var(--gc-ink-2);
    pointer-events: none;
}

/* Active-filter chips */
.gcat-chips {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.gcat .gcat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 14px;
    border: 1px solid rgba(31, 143, 92, .3);
    border-radius: 999px;
    background: var(--gc-accent-soft);
    font-size: 14px;
    font-weight: 600;
    color: var(--gc-forest-2);
    transition: background .2s ease, border-color .2s ease;
}
.gcat .gcat-chip .fa-star { margin-left: 3px; font-size: 11px; color: var(--gc-star); }
.gcat .gcat-chip .fa-xmark { font-size: 12px; opacity: .7; }
.gcat .gcat-chip:hover { background: #fff; border-color: var(--gc-forest); color: var(--gc-forest-2); }
.gcat .gcat-chips__clear {
    margin-left: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gc-ink-2);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.gcat .gcat-chips__clear:hover { color: var(--gc-ink); }

/* ----- Course cards ----------------------------------------------------- */
.gcat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(262px, 1fr));
    gap: 24px;
}
.gcat-list { display: flex; flex-direction: column; gap: 18px; }

.gcat .gcard {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--gc-paper);
    border: 1px solid var(--gc-rule);
    border-radius: 8px;
    overflow: hidden;
    color: var(--gc-ink);
    transition: transform .4s var(--gc-ease), box-shadow .4s var(--gc-ease), border-color .3s ease;
}
.gcat .gcard:hover {
    transform: translateY(-4px);
    border-color: rgba(31, 143, 92, .38);
    box-shadow: 0 26px 50px -30px rgba(18, 33, 27, .38);
    color: var(--gc-ink);
}

.gcard__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--gc-sand);
}
.gcard__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s var(--gc-ease);
}
.gcard:hover .gcard__media img { transform: scale(1.045); }

.gcard__tags {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-right: 52px;
}
.gcard__level,
.gcard__type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 10px;
    border-radius: 4px;
    font-family: var(--gc-label);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}
.gcard__level { background: var(--gc-ink); color: #fff; letter-spacing: .04em; }
.gcard__type {
    background: rgba(255, 255, 255, .95);
    color: var(--gc-ink);
    box-shadow: 0 1px 3px rgba(18, 33, 27, .12);
}
.gcard__type i { font-size: 10px; }
.gcard__type--group { color: var(--gc-forest-2); }

.gcard__wish {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 2px 8px rgba(18, 33, 27, .14);
    color: #AEB8B2;
    font-size: 15px;
    cursor: pointer;
    transition: transform .25s var(--gc-ease), color .2s ease;
}
.gcard__wish:hover { transform: scale(1.1); color: #E0445A; }
.gcard__wish.red-heart { color: #E0445A; }
.gcard__wish i { pointer-events: none; }

.gcard__flag {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 9px;
    border-radius: 4px;
    background: #FFF3DF;
    font-size: 14px;
    font-weight: 700;
    color: #9A5A0C;
}

.gcard__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 20px 20px;
}
.gcard__kicker {
    overflow: hidden;
    margin-bottom: 8px;
    font-family: var(--gc-label);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--gc-forest);
}
.gcat .gcard__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-family: var(--gc-display);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.28;
    letter-spacing: -.015em;
    color: var(--gc-ink);
    transition: color .2s ease;
}
.gcat .gcard:hover .gcard__title { color: var(--gc-forest-2); }
.gcat .gcard__desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--gc-ink-2);
}

.gcard__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 14px;
}
.gcard__meta li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gc-ink-2);
}
.gcard__meta li i { font-size: 12.5px; color: var(--gc-forest); }
.gcard__meta li b { font-weight: 700; color: var(--gc-ink); }
.gcard__meta li.is-muted, .gcard__meta li.is-muted i { color: var(--gc-muted); }
.gcard__meta .gcard__rating i { color: var(--gc-star); }

.gcard__seats {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin-top: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--gc-accent-soft);
    font-size: 14px;
    font-weight: 700;
    color: var(--gc-forest-2);
}
.gcard__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 0 currentColor;
    animation: gcatPulse 2.2s ease-out infinite;
}
.gcard__seats.is-low { background: #FDECEC; color: #B4232F; }
@keyframes gcatPulse {
    0% { box-shadow: 0 0 0 0 rgba(31, 143, 92, .45); }
    70% { box-shadow: 0 0 0 7px rgba(31, 143, 92, 0); }
    100% { box-shadow: 0 0 0 0 rgba(31, 143, 92, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .gcard__dot { animation: none; }
    .gcat .gcard, .gcard__media img { transition: none; }
}

.gcard__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--gc-rule-soft);
}
/* margin-top:auto pins the footer to the bottom of equal-height cards; this
   keeps a minimum gap above its rule on the tallest card. */
.gcard__body > :nth-last-child(2) { margin-bottom: 18px; }

.gcard__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.gcard__price b {
    font-family: var(--gc-display);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--gc-ink);
}
.gcard__price b.is-free { color: var(--gc-forest); }
.gcard__price del { font-size: 14px; font-weight: 500; color: var(--gc-muted); }

.gcard__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    height: 40px;
    padding: 0 16px;
    border-radius: 6px;
    background: var(--gc-forest);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    transition: background .3s ease;
}
.gcard__cta i { font-size: 11px; transition: transform .35s var(--gc-ease); }
.gcard:hover .gcard__cta { background: var(--gc-ink); }
.gcard:hover .gcard__cta i { transform: translateX(4px); }
.gcard__cta--go { cursor: pointer; }

/* List view: image left, content right */
.gcat .gcard--row { flex-direction: row; }
.gcard--row .gcard__media {
    flex: 0 0 34%;
    max-width: 320px;
    aspect-ratio: auto;
    min-height: 220px;
}
.gcard--row .gcard__body { padding: 22px 26px; }
.gcat .gcard--row .gcard__title { font-size: 24px; }

/* ----- Pagination + empty state ----------------------------------------- */
.gcat-pagination { margin-top: 36px; }
.gcat-pagination .pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; }
.gcat-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--gc-rule) !important;
    border-radius: 6px !important;
    background: #fff;
    font-family: var(--gc-label);
    font-size: 15px;
    font-weight: 600;
    color: var(--gc-ink);
    box-shadow: none !important;
}
.gcat-pagination .page-link:hover { border-color: var(--gc-forest) !important; color: var(--gc-forest); }
.gcat-pagination .page-item.active .page-link {
    background: var(--gc-forest);
    border-color: var(--gc-forest) !important;
    color: #fff;
}

.gcat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 64px 24px;
    border: 1px dashed var(--gc-rule);
    border-radius: 8px;
    background: #fff;
    text-align: center;
}
.gcat-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: var(--gc-accent-soft);
    color: var(--gc-forest);
    font-size: 20px;
}
.gcat .gcat-empty h3 { margin: 0 0 8px; font-size: 24px; color: var(--gc-ink); }
.gcat .gcat-empty p { max-width: 420px; margin-bottom: 22px; font-size: 15px; line-height: 1.6; color: var(--gc-ink-2); }

/* ----- Responsive ------------------------------------------------------- */
@media (max-width: 1199px) {
    .gcat-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 24px; }
    .gcat-levels { grid-template-columns: repeat(3, 1fr); }
}

/* Below 992px the filter column becomes a slide-in drawer. */
@media (max-width: 991px) {
    .gcat { padding: 20px 0 64px; }
    .gcat-head { margin-bottom: 24px; }
    .gcat-layout { grid-template-columns: minmax(0, 1fr); }
    .gcat-aside {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 10001;
        width: min(360px, 88vw);
        max-height: none;
        border-radius: 0;
        background: #fff;
        transform: translateX(-105%);
        transition: transform .35s var(--gc-ease);
    }
    .gcat-filters { border: 0; border-radius: 0; min-height: 100%; }
    .gcat-filters__close { display: inline-flex; align-items: center; justify-content: center; }
    .gcat-levels { grid-template-columns: repeat(6, 1fr); }
    .gcat-backdrop {
        position: fixed;
        inset: 0;
        z-index: 10000;
        display: block;
        background: rgba(18, 33, 27, .45);
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s ease, visibility .3s;
    }
    body.gcat-filters-open { overflow: hidden; }
    body.gcat-filters-open .gcat-aside { transform: none; box-shadow: 0 0 60px rgba(18, 33, 27, .3); }
    body.gcat-filters-open .gcat-backdrop { opacity: 1; visibility: visible; }
    .gcat-filter-btn { display: inline-flex; }
}

@media (max-width: 767px) {
    .gcat-toolbar__controls { width: 100%; }
    .gcat-sort { flex: 1; }
    .gcat .gcat-sort select { flex: 1; width: 100%; }
    .gcat .gcard--row { flex-direction: column; }
    .gcard--row .gcard__media { flex: none; max-width: none; min-height: 0; aspect-ratio: 16 / 10; }
    .gcard--row .gcard__body { padding: 18px 20px 20px; }
    .gcat .gcard--row .gcard__title { font-size: 17px; }
    .gcat-result { flex-direction: column; align-items: flex-start; padding: 24px; }
}

@media (max-width: 575px) {
    .gcat-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .gcat-toolbar__count b { font-size: 24px; }
}
