.apex-directory-wrapper {
    display: flex;
    gap: 28px;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    position: relative;
    align-items: flex-start;
}

.apex-directory-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.apex-directory-main {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Top Bar: Count & Sort */
.apex-top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

.apex-top-controls-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.apex-product-count {
    color: #798aa3;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.apex-mobile-filter-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background-color: #070d1e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    height: 42px;
    width: 42px;
    min-width: 42px;
    flex-shrink: 0;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease;
    padding: 0;
}

.apex-mobile-filter-btn svg {
    width: 17px;
    height: 17px;
    stroke: #667994;
    display: block;
    transition: stroke 0.2s ease;
}

.apex-mobile-filter-btn:hover {
    border-color: #1d68fe;
}

.apex-mobile-filter-btn:hover svg {
    stroke: #ffffff;
}

.apex-sort-box {
    width: 210px;
    flex-shrink: 0;
}

.apex-sort-select {
    width: 100%;
    height: 42px;
    background-color: #070d1e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0 14px;
    color: #ffffff;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23667994' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 36px;
}

.apex-sort-select:focus {
    border-color: #1d68fe;
    box-shadow: 0 0 0 1px #1d68fe;
}

.apex-sort-select option {
    background-color: #070d1e;
    color: #ffffff;
}

/* Product Cards Grid */
.apex-products-container {
    width: 100%;
}

.apex-product-cards-grid {
    display: grid;
    gap: 20px;
    width: 100%;
    align-items: stretch;
}

.apex-no-products {
    grid-column: 1 / -1;
    color: #8da2c0;
    text-align: center;
    padding: 50px 20px;
    font-size: 15px;
}

/* Card Elements */
.apex-helix-card {
    background-color: #0b132b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.apex-helix-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5);
}

.apex-card-image {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0 0 14px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.apex-card-image img {
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.apex-card-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.apex-badge-wrap {
    display: flex;
    align-items: center;
    min-height: 26px;
    margin-bottom: 12px;
}

.apex-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #798aa3;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    text-transform: uppercase;
}

.apex-badge-spacer {
    display: block;
    height: 26px;
}

/* Red title override */
.apex-title,
.apex-title a {
    color: #ffffff !important;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.35;
    text-decoration: none;
}

.apex-title a:hover {
    color: #2e82fe !important;
}

.apex-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 14px;
}

.apex-price-wrap .apex-price,
.apex-price-wrap .apex-price * {
    color: #2e82fe !important;
    font-size: 18px;
    font-weight: 700;
}

.apex-unit-label {
    color: #637592;
    font-size: 13px;
}

.apex-card-bottom-actions {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

.apex-variants-slot {
    min-height: 38px;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.apex-variants-slot.empty {
    visibility: hidden;
}

.apex-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.apex-variant-pill {
    background: #111a30;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.apex-variant-pill.active {
    background: #1d68fe;
    border-color: #1d68fe;
}

/* Side by Side Buttons */
.apex-actions-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.apex-actions-row.apex-single-btn .apex-btn-cart {
    width: 100%;
}

.apex-btn {
    flex: 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
    transition: background 0.2s ease;
}

.apex-btn-select {
    background-color: #2b77fe;
    color: #ffffff;
}

.apex-btn-cart {
    background-color: #1d68fe;
    color: #ffffff;
}

.apex-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Sidebar Elements */
.apex-filter-card {
    background-color: #070d1e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px;
}

.apex-filter-title {
    color: #8da2c0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0 0 16px 0;
    text-transform: uppercase;
}

.apex-term-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.apex-term-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    color: #92a4bc;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.apex-term-item * {
    pointer-events: none;
}

.apex-term-item .apex-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #435470;
    margin-right: 12px;
    flex-shrink: 0;
}

.apex-term-item .apex-term-name {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apex-term-item .apex-term-count {
    font-size: 11px;
    color: #556682;
    margin-left: 8px;
}

.apex-term-item:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.04);
}

.apex-term-item.active {
    background-color: #122347;
    color: #3b82f6;
    font-weight: 600;
}

.apex-term-item.active .apex-dot {
    background-color: #3b82f6;
}

/* Banner */
.apex-promo-banner {
    background-color: #070d1e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
}

.apex-banner-img {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
}

.apex-banner-img img {
    width: 100%;
    height: auto;
    display: block;
}

.apex-banner-tag {
    color: #3b82f6;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.apex-banner-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.apex-banner-desc {
    color: #7b8fa7;
    font-size: 12px;
    line-height: 1.45;
    margin: 0 0 16px 0;
}

.apex-banner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #1d68fe;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
}

/* Pagination */
.apex-pagination-slot {
    margin-top: 36px;
    padding-bottom: 20px;
}

.apex-pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.apex-pagination-btn {
    background-color: #0b132b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.apex-pagination-btn:hover {
    background-color: #162650;
    border-color: #1d68fe;
}

.apex-pagination-btn.active {
    background-color: #1d68fe;
    border-color: #1d68fe;
    color: #ffffff;
}

/* Mobile Off-Canvas */
.apex-sidebar-header-mobile,
.apex-drawer-backdrop {
    display: none;
}

@media (max-width: 991px) {
    .apex-directory-wrapper {
        flex-direction: column;
    }

    .apex-top-controls {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .apex-mobile-filter-btn {
        display: inline-flex;
    }

    .apex-product-count {
        font-size: 12px;
    }

    .apex-sort-box {
        width: 140px;
        flex-shrink: 0;
    }

    .apex-sort-select {
        padding-left: 10px;
        padding-right: 28px;
        font-size: 12px;
    }

    .apex-directory-sidebar {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        height: 100vh;
        background-color: #050a17;
        z-index: 99999;
        padding: 20px;
        overflow-y: auto;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .apex-directory-sidebar.drawer-open {
        left: 0;
    }

    .apex-drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(2px);
        z-index: 99998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .apex-drawer-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    .apex-sidebar-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 16px;
        margin-bottom: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        color: #ffffff;
        font-weight: 700;
    }

    .apex-drawer-close {
        background: transparent;
        border: none;
        color: #ffffff;
        font-size: 26px;
        cursor: pointer;
    }
}

@media (max-width: 480px) {
    .apex-sort-box {
        width: 120px;
    }
    
    .apex-sort-select {
        font-size: 11px;
        padding-left: 8px;
        padding-right: 22px;
    }

    .apex-product-count {
        font-size: 11px;
    }
}