/**
 * EBA Courses Page — modern archive with filter chips, search, sort, off-canvas drawer
 */

.eba-wrapper.eba-cpage {
    background: var(--eba-ivory);
}

/* ===== HELLO THEME RESET — kill pink/accent button leaks ===== */
.eba-wrapper.eba-cpage button,
.eba-wrapper.eba-cpage .eba-cpage button {
    background-image: none !important;
    text-shadow: none !important;
    font-family: var(--eba-font-body);
}

.eba-wrapper.eba-cpage button:focus {
    outline: none;
}

/* ===== HEADER — reference: vercel.app /courses hero =====
   No !important. Compound selectors beat Hello theme. */
.eba-cpage__header {
    position: relative;
    background-color: #0f1729;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 96px 24px;
    overflow: hidden;
    color: #ffffff;
}

.eba-cpage__header-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 41, 0.65);
    pointer-events: none;
    z-index: 0;
}

.eba-cpage__header-glow {
    position: absolute;
    top: -30%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(221, 171, 44, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    display: none; /* default off — toggle via Style tab */
}

.eba-cpage__header-inner {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

/* Alignment via PHP-rendered class — applies to badge, title, description together.
   Title/description max-widths combined with margin-inline keep them flush with badge. */
.eba-cpage__header-inner--align-left {
    text-align: left;
}
.eba-cpage__header-inner--align-left .eba-cpage__title,
.eba-cpage__header-inner--align-left .eba-cpage__description {
    margin-left: 0;
    margin-right: auto;
}

.eba-cpage__header-inner--align-center {
    text-align: center;
}
.eba-cpage__header-inner--align-center .eba-cpage__title,
.eba-cpage__header-inner--align-center .eba-cpage__description {
    margin-left: auto;
    margin-right: auto;
}

.eba-cpage__header-inner--align-right {
    text-align: right;
}
.eba-cpage__header-inner--align-right .eba-cpage__title,
.eba-cpage__header-inner--align-right .eba-cpage__description {
    margin-left: auto;
    margin-right: 0;
}

.eba-wrapper.eba-cpage .eba-cpage__badge,
.eba-cpage .eba-cpage__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(221, 171, 44, 0.15);
    border: 1px solid rgba(221, 171, 44, 0.3);
    border-radius: 999px;
    color: #ddab2c;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    margin-bottom: 24px;
}

.eba-wrapper.eba-cpage .eba-cpage__badge svg,
.eba-cpage .eba-cpage__badge svg { color: inherit; flex-shrink: 0; }

.eba-wrapper.eba-cpage .eba-cpage__title,
.eba-wrapper.eba-cpage h1.eba-cpage__title,
.eba-cpage .eba-cpage__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 60px;
    font-weight: 700;
    line-height: 1.1;
    color: #ffffff;
    margin: 0 0 24px;
    max-width: 720px;
    letter-spacing: -0.01em;
    text-shadow: none;
}

.eba-wrapper.eba-cpage .eba-cpage__description,
.eba-cpage .eba-cpage__description {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(248, 246, 241, 0.85);
    max-width: 720px;
    margin: 0;
}

/* Content container — outer boxed width holding search bar, filters, count, grid.
   Width adjustable per-breakpoint via Elementor (default 1280px, reference width). */
.eba-cpage__content-container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ===== TOOLBAR — unified filter card ===== */
.eba-cpage__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--eba-space-3);
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid var(--eba-border);
    border-radius: 18px;
    box-shadow: 0 4px 24px -8px rgba(15, 23, 42, 0.06);
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: var(--eba-space-4);
}

.eba-cpage__search {
    position: relative;
    flex: 1 1 280px;
    min-width: 0;
    height: 48px;
}

.eba-cpage__search > svg:first-of-type {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--eba-gold-dark);
    pointer-events: none;
    z-index: 1;
}

.eba-wrapper.eba-cpage .eba-cpage__search-input {
    width: 100%;
    height: 48px;
    padding: 0 48px 0 52px !important;
    background: var(--eba-ivory);
    border: 1px solid transparent;
    border-radius: 12px;
    font-family: var(--eba-font-body);
    font-size: 0.9375rem;
    color: var(--eba-charcoal);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
    text-indent: 0;
}

.eba-cpage__search-input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.eba-cpage__search-input:hover {
    background: var(--eba-ivory-dark);
}

.eba-cpage__search-input:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--eba-gold);
    box-shadow: 0 0 0 4px rgba(212, 162, 76, 0.18);
}

.eba-cpage__search-input::-webkit-search-cancel-button,
.eba-cpage__search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.eba-wrapper.eba-cpage .eba-cpage__search-clear,
.eba-wrapper.eba-cpage button.eba-cpage__search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: none !important;
    border-radius: 50%;
    background: var(--eba-charcoal) !important;
    color: #ffffff !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
    text-shadow: none;
}

.eba-wrapper.eba-cpage .eba-cpage__search-clear[hidden] { display: none !important; }

.eba-wrapper.eba-cpage .eba-cpage__search-clear:hover {
    background: var(--eba-gold-dark) !important;
    color: #ffffff !important;
    transform: translateY(-50%) scale(1.08);
}

.eba-wrapper.eba-cpage .eba-cpage__search-clear svg {
    stroke: #ffffff !important;
    color: #ffffff !important;
}

.eba-cpage__toolbar-right {
    display: flex;
    align-items: center;
    gap: var(--eba-space-2);
    margin-left: auto;
}

/* Sort */
.eba-cpage__sort {
    position: relative;
}

.eba-cpage__sort-select {
    height: 48px;
    padding: 0 40px 0 18px;
    background: var(--eba-ivory);
    border: 1px solid transparent;
    border-radius: 12px;
    font-family: var(--eba-font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--eba-charcoal);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.eba-cpage__sort-select:hover {
    background: var(--eba-ivory-dark);
}

.eba-cpage__sort-select:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--eba-gold);
    box-shadow: 0 0 0 4px rgba(212, 162, 76, 0.18);
}

.eba-cpage__sort-caret {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--eba-gold-dark);
    pointer-events: none;
    z-index: 1;
}

/* Filter toggle (mobile) */
.eba-wrapper.eba-cpage .eba-cpage__filter-toggle,
.eba-wrapper.eba-cpage button.eba-cpage__filter-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 22px;
    background: var(--eba-charcoal) !important;
    color: #ffffff !important;
    border: 1px solid var(--eba-charcoal) !important;
    border-radius: 12px;
    font-family: var(--eba-font-body) !important;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 4px 14px -4px rgba(15, 23, 42, 0.4);
    text-shadow: none;
}

.eba-wrapper.eba-cpage .eba-cpage__filter-toggle:hover,
.eba-wrapper.eba-cpage button.eba-cpage__filter-toggle:hover {
    background: #1e293b !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.eba-wrapper.eba-cpage .eba-cpage__filter-toggle svg {
    stroke: #ffffff !important;
    color: #ffffff !important;
    flex-shrink: 0;
}

/* ===== CATEGORY CHIPS — Modern slider with optional sticky ===== */
.eba-cpage__chips-wrap {
    position: relative;
    margin-bottom: var(--eba-space-4);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Sticky mode — pinned to top while scrolling */
.eba-cpage__chips-wrap.is-sticky {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #ffffff;
    padding: 12px 0;
    margin-left: calc(-1 * var(--eba-space-4));
    margin-right: calc(-1 * var(--eba-space-4));
    padding-left: var(--eba-space-4);
    padding-right: var(--eba-space-4);
    box-shadow: 0 4px 16px -8px rgba(15, 23, 41, 0); /* shadow appears when stuck via JS */
    transition: box-shadow 0.2s ease;
}

.eba-cpage__chips-wrap.is-sticky.is-stuck {
    box-shadow: 0 4px 16px -8px rgba(15, 23, 41, 0.15);
}

/* Slider track — horizontal scroll with hidden native scrollbar */
.eba-cpage__chips {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
    padding: 4px 2px;
    margin: 0;
    scroll-padding: 8px;
}

.eba-cpage__chips::-webkit-scrollbar { display: none; }

.eba-cpage__chip {
    flex-shrink: 0;
    scroll-snap-align: start;
}

/* Arrow buttons — show when chips overflow (toggled by JS) */
.eba-cpage__chips-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e7e2d3;
    color: #0f1729;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px -2px rgba(15, 23, 41, 0.1);
}

.eba-cpage__chips-arrow:hover:not(:disabled) {
    background: #c89821;
    color: #ffffff;
    border-color: #c89821;
    transform: scale(1.05);
}

.eba-cpage__chips-arrow:disabled,
.eba-cpage__chips-arrow[hidden] {
    opacity: 0;
    pointer-events: none;
    display: inline-flex; /* keep layout even when hidden, JS toggles via hidden attr only when truly not needed */
}

.eba-cpage__chips-arrow[hidden] {
    display: none;
}

/* Fade edges when scrollable to hint there's more content */
.eba-cpage__chips-wrap.has-arrows .eba-cpage__chips {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}

@media (max-width: 767px) {
    .eba-cpage__chips-wrap.is-sticky {
        margin-left: calc(-1 * var(--eba-space-3));
        margin-right: calc(-1 * var(--eba-space-3));
        padding-left: var(--eba-space-3);
        padding-right: var(--eba-space-3);
    }
}

.eba-wrapper.eba-cpage .eba-cpage__chip,
.eba-wrapper.eba-cpage button.eba-cpage__chip {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 18px;
    background: #ffffff !important;
    border: 1px solid var(--eba-border) !important;
    border-radius: var(--eba-radius-full);
    color: #64748b !important;
    font-family: var(--eba-font-body) !important;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s var(--eba-ease);
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
    text-shadow: none;
}

.eba-wrapper.eba-cpage .eba-cpage__chip:hover,
.eba-wrapper.eba-cpage button.eba-cpage__chip:hover {
    border-color: var(--eba-gold) !important;
    color: var(--eba-charcoal) !important;
    background: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -4px rgba(212, 162, 76, 0.25);
}

.eba-wrapper.eba-cpage .eba-cpage__chip.is-active,
.eba-wrapper.eba-cpage button.eba-cpage__chip.is-active {
    background: var(--eba-charcoal) !important;
    border-color: var(--eba-charcoal) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px -6px rgba(15, 23, 42, 0.45);
}

.eba-wrapper.eba-cpage .eba-cpage__chip.is-active:hover,
.eba-wrapper.eba-cpage button.eba-cpage__chip.is-active:hover {
    background: #1e293b !important;
    border-color: #1e293b !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* ===== RESULT COUNT ===== */
.eba-cpage__count {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--eba-text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--eba-space-4);
}

.eba-cpage__count::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--eba-gold);
    display: inline-block;
    flex-shrink: 0;
}

.eba-cpage__count [data-count] {
    font-weight: 500;
    color: var(--eba-charcoal);
}

/* ===== GRID ===== */
.eba-cpage__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding-bottom: clamp(3rem, 6vw, 5rem);
}

/* ===== CARD — mirrors home page Course Showcase (.eba-cs__) styling.
   No !important. Compound selectors beat Hello theme. */
.eba-cpage__card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: ebaCpageIn 0.3s var(--eba-ease) both;
    box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.05),
                0 4px 16px -4px rgba(15, 23, 42, 0.04);
    height: 100%;
}

@keyframes ebaCpageIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.eba-cpage__card[hidden] { display: none; }

.eba-cpage__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -10px rgba(15, 23, 42, 0.15);
}

.eba-cpage__card-image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f1ede8;
    text-decoration: none;
}

.eba-cpage__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.eba-cpage__card:hover .eba-cpage__card-image img {
    transform: scale(1.06);
}

.eba-cpage__card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cdc6b8;
    background: linear-gradient(135deg, #f1ede8 0%, #e7e2d3 100%);
}

/* Featured badge — gold #DDAB2C bg, charcoal text */
.eba-cpage__badge-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    background: #ddab2c;
    color: #0f1729;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 999px;
    z-index: 2;
}

.eba-cpage__badge-featured svg { fill: currentColor; }

/* Category badge — white 80% bg, charcoal text */
.eba-cpage__badge-category {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 2px 10px;
    background: rgba(255, 255, 255, 0.8);
    color: #0f1729;
    border: 1px solid rgba(15, 23, 41, 0.08);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 999px;
    max-width: calc(100% - 28px - 80px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2;
}

.eba-cpage__card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 0;
}

/* Title — Cormorant Garamond 20px weight 600 (matches Course Showcase) */
.eba-wrapper.eba-cpage .eba-cpage__card-title,
.eba-wrapper.eba-cpage .eba-cpage__card-title a,
.eba-cpage .eba-cpage__card-title,
.eba-cpage .eba-cpage__card-title a {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #0f1729;
    letter-spacing: -0.005em;
    transition: color 0.2s ease;
}

.eba-wrapper.eba-cpage .eba-cpage__card-title,
.eba-cpage .eba-cpage__card-title {
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.eba-wrapper.eba-cpage .eba-cpage__card-title a,
.eba-cpage .eba-cpage__card-title a {
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0 1.5px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.3s ease;
}

.eba-wrapper.eba-cpage .eba-cpage__card-title a:hover,
.eba-cpage .eba-cpage__card-title a:hover {
    background-size: 100% 1.5px;
}

/* Excerpt — Inter 14px, color #525E7A, 2-line clamp */
.eba-wrapper.eba-cpage .eba-cpage__card-excerpt,
.eba-cpage .eba-cpage__card-excerpt {
    font-family: 'Inter', sans-serif;
    color: #525e7a;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta row — Inter 12px, charcoal-muted, gold icons */
.eba-wrapper.eba-cpage .eba-cpage__card-meta,
.eba-cpage .eba-cpage__card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-family: 'Inter', sans-serif;
    color: #525e7a;
    font-size: 12px;
    margin-bottom: 16px;
}

.eba-cpage__card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.eba-cpage__card-meta svg {
    color: #c89821;
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

/* Footer — 16px padding-top, 1px border-top */
.eba-cpage__card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e0dad0;
}

/* Price — Cormorant Garamond 20px weight 600 charcoal */
.eba-wrapper.eba-cpage .eba-cpage__card-price,
.eba-cpage .eba-cpage__card-price {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    color: #0f1729;
    letter-spacing: -0.005em;
}

/* View Course button — gold #DDAB2C, charcoal text, 36px height, 8px radius */
.eba-wrapper.eba-cpage .eba-cpage__card-btn,
.eba-wrapper.eba-cpage a.eba-cpage__card-btn,
.eba-cpage .eba-cpage__card-btn,
.eba-cpage a.eba-cpage__card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    background: #ddab2c;
    background-image: none;
    color: #0f1729;
    border: 0;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.eba-wrapper.eba-cpage .eba-cpage__card-btn:hover,
.eba-wrapper.eba-cpage a.eba-cpage__card-btn:hover,
.eba-cpage .eba-cpage__card-btn:hover,
.eba-cpage a.eba-cpage__card-btn:hover {
    background: #c89821;
    background-image: none;
    color: #0f1729;
}

.eba-wrapper.eba-cpage .eba-cpage__card-btn svg,
.eba-cpage .eba-cpage__card-btn svg {
    transition: transform 0.2s ease;
    color: inherit;
    stroke: currentColor;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.eba-wrapper.eba-cpage .eba-cpage__card-btn:hover svg,
.eba-cpage .eba-cpage__card-btn:hover svg {
    transform: translateX(3px);
}

/* ===== EMPTY STATE ===== */
.eba-cpage__empty {
    text-align: center;
    padding: clamp(3rem, 6vw, 5rem) var(--eba-space-4);
    color: var(--eba-text-muted);
}

.eba-cpage__empty[hidden] { display: none !important; }

.eba-cpage__empty svg {
    color: var(--eba-border);
    margin-bottom: var(--eba-space-3);
}

.eba-cpage__empty h3 {
    font-family: var(--eba-font-heading);
    font-size: 1.5rem;
    color: var(--eba-charcoal);
    margin: 0 0 var(--eba-space-2);
    font-weight: 500;
}

.eba-cpage__empty p {
    margin: 0 0 var(--eba-space-4);
}

/* ===== OFF-CANVAS FILTER DRAWER ===== */
.eba-cpage__offcanvas {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.eba-cpage__offcanvas[hidden] { display: none !important; }

.eba-cpage__offcanvas.is-open {
    pointer-events: auto;
}

.eba-cpage__offcanvas-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s var(--eba-ease);
    pointer-events: none;
}

.eba-cpage__offcanvas.is-open .eba-cpage__offcanvas-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.eba-cpage__offcanvas-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: min(420px, 90vw);
    background: #ffffff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s var(--eba-ease);
    box-shadow: -20px 0 60px -20px rgba(0, 0, 0, 0.25);
    pointer-events: auto;
}

.eba-cpage__offcanvas.is-open .eba-cpage__offcanvas-panel {
    transform: translateX(0);
}

.eba-cpage__offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--eba-border);
    background: var(--eba-ivory);
}

.eba-cpage__offcanvas-header h3 {
    font-family: var(--eba-font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--eba-charcoal);
    margin: 0;
}

.eba-wrapper.eba-cpage .eba-cpage__offcanvas-close,
.eba-wrapper.eba-cpage button.eba-cpage__offcanvas-close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--eba-border) !important;
    border-radius: 50%;
    background: #ffffff !important;
    color: var(--eba-charcoal) !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
    text-shadow: none;
    padding: 0;
}

.eba-wrapper.eba-cpage .eba-cpage__offcanvas-close:hover {
    background: var(--eba-charcoal) !important;
    color: #ffffff !important;
    border-color: var(--eba-charcoal) !important;
}

.eba-wrapper.eba-cpage .eba-cpage__offcanvas-close svg {
    stroke: currentColor !important;
}

.eba-cpage__offcanvas-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.eba-cpage__offcanvas-section {
    margin-bottom: var(--eba-space-5);
}

.eba-cpage__offcanvas-section:last-child {
    margin-bottom: 0;
}

.eba-cpage__offcanvas-label {
    font-family: var(--eba-font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: var(--eba-text-muted);
    margin: 0 0 var(--eba-space-3);
}

.eba-cpage__offcanvas-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.eba-cpage__offcanvas-footer {
    display: flex;
    gap: var(--eba-space-2);
    padding: 16px 24px;
    border-top: 1px solid var(--eba-border);
    background: var(--eba-ivory);
}

.eba-cpage__offcanvas-footer .eba-btn--full {
    flex: 1;
}

/* Footer + empty-state buttons — kill Hello theme color leak */
.eba-wrapper.eba-cpage .eba-cpage__offcanvas-footer .eba-btn,
.eba-wrapper.eba-cpage .eba-cpage__empty .eba-btn {
    height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    font-family: var(--eba-font-body) !important;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    text-shadow: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.eba-wrapper.eba-cpage .eba-btn--primary,
.eba-wrapper.eba-cpage button.eba-btn--primary {
    background: var(--eba-charcoal) !important;
    color: #ffffff !important;
    border: 1px solid var(--eba-charcoal) !important;
}

.eba-wrapper.eba-cpage .eba-btn--primary:hover,
.eba-wrapper.eba-cpage button.eba-btn--primary:hover {
    background: var(--eba-gold-dark) !important;
    border-color: var(--eba-gold-dark) !important;
    color: #ffffff !important;
}

.eba-wrapper.eba-cpage .eba-btn--outline,
.eba-wrapper.eba-cpage button.eba-btn--outline {
    background: #ffffff !important;
    color: var(--eba-charcoal) !important;
    border: 1px solid var(--eba-border) !important;
}

.eba-wrapper.eba-cpage .eba-btn--outline:hover,
.eba-wrapper.eba-cpage button.eba-btn--outline:hover {
    background: var(--eba-charcoal) !important;
    color: #ffffff !important;
    border-color: var(--eba-charcoal) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .eba-cpage__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .eba-cpage__grid {
        grid-template-columns: 1fr !important;
    }

    /* Hide desktop chips wrapper on mobile — use off-canvas instead */
    .eba-wrapper.eba-cpage .eba-cpage__chips-wrap {
        display: none;
    }

    /* Hide standalone sort on mobile — moved to off-canvas */
    .eba-wrapper.eba-cpage .eba-cpage__toolbar-right .eba-cpage__sort {
        display: none !important;
    }

    .eba-wrapper.eba-cpage .eba-cpage__filter-toggle,
    .eba-wrapper.eba-cpage button.eba-cpage__filter-toggle {
        display: inline-flex !important;
        width: 100%;
    }

    .eba-cpage__toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }

    .eba-cpage__toolbar-right {
        margin-left: 0;
        width: 100%;
        justify-content: stretch;
    }

    .eba-cpage__search {
        flex: 0 0 auto;
        width: 100%;
        height: 48px;
    }

    .eba-cpage__search-input {
        width: 100%;
    }

    .eba-cpage__card-image { aspect-ratio: 16 / 11; }
    .eba-cpage__card-footer { flex-wrap: wrap; gap: 10px; }
}

@media (min-width: 768px) {
    /* Hide off-canvas trigger on desktop */
    .eba-wrapper.eba-cpage .eba-cpage__filter-toggle {
        display: none !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .eba-cpage__card,
    .eba-cpage__card-image img,
    .eba-cpage__card-btn,
    .eba-cpage__offcanvas-panel,
    .eba-cpage__offcanvas-backdrop {
        transition: none !important;
        animation: none !important;
    }
}
