/* Classes catalog page */

.zf-classes-page {
    padding-top: 20px;
    padding-bottom: 56px;
    overflow: visible;
}

.zf-classes-page .hv2-container,
.zf-classes-page [id$="upClasses"] {
    overflow: visible !important;
}

.zf-classes-hero {
    margin-bottom: 24px;
}

.zf-classes-hero__title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
    color: var(--hv2-dark, #383838);
}

.zf-classes-hero__text {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.75;
    color: var(--hv2-muted, #777);
}

/* Two-column layout: filters sidebar + results */
.zf-classes-page [id$="upClasses"] > div {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    overflow: visible;
}

.zf-classes-layout {
    display: contents;
}

.zf-classes-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: 96px;
    align-self: start;
    z-index: 20;
    min-width: 0;
    width: 100%;
    max-height: none;
    overflow: visible;
    padding-bottom: 4px;
}

.zf-filter-panel {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.zf-filter-panel[open] {
    position: relative;
    z-index: 30;
    overflow: visible;
}

.zf-filter-panel.zf-filter-panel--dropdown-open {
    z-index: 200;
}

.zf-filter-select--enhanced {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.zf-custom-select {
    position: relative;
    width: 100%;
    direction: rtl;
    font-family: inherit;
}

.zf-custom-select__button {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 13px;
    border: 1px solid #dedede;
    border-radius: 10px;
    color: #444;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    text-align: right;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.zf-custom-select__button:hover,
.zf-custom-select.is-open .zf-custom-select__button {
    border-color: #fdba0c;
    background: #fffdf7;
    box-shadow: 0 0 0 3px rgba(253, 186, 12, .13);
}

.zf-custom-select__button .fa {
    flex: 0 0 auto;
    color: #fdba0c;
    font-size: 10px;
    transition: transform .18s ease;
}

.zf-custom-select.is-open .zf-custom-select__button .fa {
    transform: rotate(180deg);
}

.zf-custom-select__text {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.zf-custom-select__menu {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    z-index: 100;
    max-height: 300px;
    display: none;
    padding: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #ece5d3;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(32, 32, 32, .16);
    scrollbar-width: thin;
    scrollbar-color: #fdba0c #f5f5f5;
}

.zf-custom-select.is-open .zf-custom-select__menu {
    display: block;
}

.zf-custom-select__option {
    width: 100%;
    min-height: 38px;
    display: block;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    color: #3e3e3e;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.65;
    text-align: right;
    cursor: pointer;
    transition: color .12s ease, background .12s ease;
}

.zf-custom-select__option:hover,
.zf-custom-select__option:focus {
    color: #2c2100;
    background: #fff1bd;
    outline: none;
}

.zf-custom-select__option.is-selected {
    color: #332500;
    background: #fdba0c;
    font-weight: 700;
}

.zf-filter-panel--active {
    border-left: 4px solid var(--hv2-yellow, #fbc42f);
}

.zf-filter-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 800;
    color: var(--hv2-dark, #383838);
    cursor: pointer;
    list-style: none;
    user-select: none;
    background: #fff;
}

.zf-filter-panel__label-wrap {
    flex: 1;
    min-width: 0;
    text-align: right;
}

.zf-filter-panel__value {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #8a8a8a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zf-filter-panel__value:empty {
    display: none;
}

.zf-filter-panel__head::-webkit-details-marker {
    display: none;
}

.zf-filter-panel__icon {
    flex-shrink: 0;
    width: 14px;
    text-align: center;
    font-size: 11px;
    color: var(--hv2-yellow, #fbc42f);
    transition: transform 0.2s ease;
}

.zf-filter-panel[open] .zf-filter-panel__icon {
    transform: rotate(-90deg);
}

.zf-filter-panel__label {
    flex: 1;
    min-width: 0;
    text-align: right;
    line-height: 1.4;
}

.zf-filter-panel__body {
    padding: 0 16px 16px;
}

.zf-filter-input,
.zf-filter-select {
    width: 100%;
    height: 42px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 0 12px;
    font-family: inherit;
    font-size: 13px;
    background: #fff;
    color: var(--hv2-dark, #383838);
}

.zf-filter-input:focus,
.zf-filter-select:focus {
    outline: none;
    border-color: rgba(251, 196, 47, 0.7);
    box-shadow: 0 0 0 3px rgba(251, 196, 47, 0.12);
}

.zf-filter-search-btn {
    width: 100%;
    height: 38px;
    margin-top: 8px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: #fff;
    color: var(--hv2-dark, #383838);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.zf-filter-search-btn:hover {
    border-color: rgba(251, 196, 47, 0.7);
    background: #fffdf5;
}

.zf-filter-clear-box {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    text-align: center;
    padding: 14px 12px;
}

.zf-filter-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
}

.zf-filter-clear:hover {
    color: var(--hv2-dark, #383838);
    text-decoration: none;
}

.zf-classes-main {
    min-width: 0;
}

.zf-classes-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 14px;
}

.zf-classes-breadcrumb {
    font-size: 12px;
    color: #999;
    line-height: 1.6;
}

.zf-classes-breadcrumb a {
    color: var(--hv2-yellow, #fbc42f);
    text-decoration: none;
    font-weight: 700;
}

.zf-classes-breadcrumb a:hover {
    text-decoration: underline;
}

.zf-classes-search {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.zf-classes-search__input {
    flex: 1 1 260px;
    height: 46px;
    border: 1px solid var(--hv2-border, #ececec);
    border-radius: 999px;
    padding: 0 18px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
}

.zf-classes-search__input:focus {
    outline: none;
    border-color: rgba(251, 196, 47, 0.7);
    box-shadow: 0 0 0 3px rgba(251, 196, 47, 0.15);
}

.zf-classes-search__btn {
    height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--hv2-yellow, #fbc42f);
    color: var(--hv2-dark, #383838);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.zf-classes-search__btn:hover {
    background: #e5ad1a;
}

.zf-classes-count {
    margin: 0;
    font-size: 13px;
    color: var(--hv2-muted, #777);
    font-weight: 700;
}

/* Mobile filter chips + Bootstrap modal sheet */
.zf-mobile-toolbar {
    display: none;
}

.zf-classes-sidebar-slot {
    min-width: 0;
}

.zf-mobile-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.zf-mobile-chips::-webkit-scrollbar {
    display: none;
}

.zf-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 999px;
    background: #fff;
    color: #2b2b2b;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    font-family: inherit;
}

.zf-chip--filter {
    background: #fff8e6;
    border-color: #fdba0c;
}

.zf-chip--filter .fa-sliders {
    color: #fdba0c;
}

.zf-chip-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #fdba0c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

.zf-chip-badge[hidden] {
    display: none !important;
}

.zf-chip--sort .fa-chevron-down {
    color: #8a8a8a;
    font-size: 11px;
}

.zf-classes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.zf-class-card {
    display: flex;
    flex-direction: row-reverse;
    align-items: stretch;
    gap: 12px;
    min-height: 118px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid #e8e8e8;
    background: #fff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.zf-class-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
    border-color: rgba(251, 196, 47, 0.45);
    text-decoration: none;
    color: inherit;
}

.zf-class-card__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 2px;
}

.zf-class-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.5;
    color: var(--hv2-dark, #383838);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.zf-class-card__instructor {
    margin: 0;
    font-size: 12px;
    color: #8a8a8a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zf-class-card__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
}

.zf-class-card__stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #7a7a7a;
    line-height: 1.35;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zf-class-card__stat i {
    flex-shrink: 0;
    width: 14px;
    text-align: center;
    font-size: 11px;
    color: #b0b0b0;
}

.zf-class-card__stat--price {
    color: #2e7d32;
    font-weight: 700;
}

.zf-class-card__stat--price i {
    color: #6fae73;
}

.zf-class-card__media {
    flex: 0 0 100px;
    width: 100px;
    border-radius: 12px;
    overflow: hidden;
    background: #f0f0f0;
}

.zf-class-card__media img {
    width: 100%;
    height: 100%;
    min-height: 98px;
    object-fit: cover;
    display: block;
}

.zf-classes-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    border: 1px dashed #e0e0e0;
    border-radius: 16px;
    background: #fff;
    color: #777;
}

.zf-classes-empty p {
    margin: 0 0 12px;
    font-size: 15px;
}

.zf-classes-empty__link,
.zf-classes-empty a.zf-classes-empty__link {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--hv2-yellow, #fbc42f);
    color: var(--hv2-dark, #383838) !important;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    border: 0;
}

@media (max-width: 900px) {
    .zf-classes-page [id$="upClasses"] > div {
        grid-template-columns: 1fr;
    }

    .zf-classes-layout {
        display: block;
    }

    .zf-mobile-toolbar {
        display: block;
        margin-bottom: 12px;
    }

    .zf-classes-sidebar-slot {
        display: none;
    }

    .hv2-container > .zf-classes-filters {
        display: none;
    }

    #zfFilterModalBody .zf-classes-filters {
        display: block;
    }

    #zfClassesFilterModal {
        z-index: 10060 !important;
        padding: 0 !important;
    }

    #zfClassesFilterModal .modal-dialog,
    #zfClassesFilterModal .zf-filter-modal__dialog {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        transform: translate3d(0, 100%, 0) !important;
        transition: transform 0.28s ease;
    }

    #zfClassesFilterModal.in .modal-dialog,
    #zfClassesFilterModal.in .zf-filter-modal__dialog {
        transform: translate3d(0, 0, 0) !important;
    }

    #zfClassesFilterModal .modal-content,
    #zfClassesFilterModal .zf-filter-modal__content {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        height: 100%;
        max-height: 100%;
        display: flex;
        flex-direction: column;
        background: #fff;
        overflow: hidden;
    }

    #zfClassesFilterModal .zf-filter-modal__header {
        background: #fff;
        border-bottom: 1px solid #eee;
        padding: 14px 16px;
        text-align: right;
        position: relative;
        flex-shrink: 0;
        border-radius: 0;
    }

    #zfClassesFilterModal .zf-filter-modal__title {
        margin: 0;
        font-size: 15px;
        font-weight: 700;
        color: #2b2b2b;
    }

    #zfClassesFilterModal .zf-filter-modal__close {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        width: 32px;
        height: 32px;
        border: 0;
        background: transparent;
        color: #8a8a8a;
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
        padding: 0;
    }

    #zfClassesFilterModal .zf-filter-modal__body {
        background: #fff;
        padding: 0;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1 1 auto;
    }

    #zfClassesFilterModal .zf-filter-modal__footer {
        background: #fff;
        border-top: 1px solid #eee;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        flex-shrink: 0;
        border-radius: 0;
        direction: ltr;
    }

    #zfClassesFilterModal .zf-filter-modal__apply {
        flex: 1;
        max-width: 62%;
        background: #fdba0c !important;
        color: #fff !important;
        border: 0 !important;
        border-radius: 10px;
        padding: 14px 16px;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        box-shadow: none !important;
        font-family: inherit;
    }

    #zfClassesFilterModal .zf-filter-modal__apply:hover,
    #zfClassesFilterModal .zf-filter-modal__apply:focus {
        background: #e5a900 !important;
        color: #fff !important;
        outline: none;
    }

    #zfClassesFilterModal .zf-filter-modal__clear {
        flex-shrink: 0;
        background: transparent !important;
        color: #fdba0c !important;
        border: 0;
        border-radius: 0;
        padding: 8px 4px;
        font-size: 13px;
        font-weight: 700;
        text-decoration: none !important;
        cursor: pointer;
        box-shadow: none !important;
    }

    #zfClassesFilterModal .zf-classes-filters {
        position: static;
        display: block;
        gap: 0;
        max-height: none;
        overflow: visible;
        padding: 0;
        margin: 0;
        border: 0;
        box-shadow: none;
        top: auto;
        z-index: auto;
    }

    #zfClassesFilterModal .zf-filter-sheet__scroll {
        display: block;
        gap: 0 !important;
        padding: 0 !important;
    }

    #zfClassesFilterModal .zf-filter-clear-box,
    #zfClassesFilterModal .zf-filter-clear-box--sidebar {
        display: none !important;
    }

    #zfClassesFilterModal .zf-filter-search-btn {
        display: none !important;
    }

    #zfClassesFilterModal .zf-filter-panel {
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        border-bottom: 1px solid #eee !important;
        background: #fff !important;
    }

    #zfClassesFilterModal .zf-filter-panel--active {
        border-left: 0 !important;
        border-right: 3px solid #fdba0c;
    }

    #zfClassesFilterModal .zf-filter-panel__head {
        padding: 16px;
        font-weight: 600;
        background: #fff;
        border-radius: 0;
    }

    #zfClassesFilterModal .zf-filter-panel__head:hover {
        background: #fafafa;
    }

    #zfClassesFilterModal .zf-filter-panel__icon {
        color: #bdbdbd;
    }

    #zfClassesFilterModal .zf-filter-panel__body {
        padding: 0 16px 16px;
        background: #fff;
    }

    #zfClassesFilterModal.zf-filter-mode #detailsSort {
        display: none !important;
    }

    #zfClassesFilterModal.zf-sort-mode .zf-filter-panel:not(#detailsSort) {
        display: none !important;
    }

    body.modal-open .modal-backdrop {
        z-index: 10055 !important;
    }

    .zf-classes-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 901px) {
    #zfClassesFilterModal {
        display: none !important;
    }

    .zf-mobile-toolbar {
        display: none !important;
    }

    #zfFiltersRoot .zf-filter-sheet__scroll {
        display: flex;
        flex-direction: column;
        gap: 10px;
        overflow: visible;
    }

    #zfFiltersRoot .zf-filter-clear-box--sidebar {
        display: block;
    }

    #zfFiltersRoot .zf-filter-panel__value {
        display: none !important;
    }
}

@media (max-width: 520px) {
    .zf-class-card {
        min-height: 108px;
        padding: 8px;
        gap: 10px;
    }

    .zf-class-card__media {
        flex-basis: 88px;
        width: 88px;
    }

    .zf-class-card__title {
        font-size: 14px;
    }

    .zf-class-card__stats {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
