.ahura-catcards-wrap {
    color: var(--ahura-text);
}

html.ahura-catcards-lock {
    overflow: hidden !important;
}

.ahura-catcards-empty {
    padding: 30px;
    text-align: center;
    background: #fff3cd;
    border-radius: 12px;
    color: #664d03;
    font-size: 13px;
}

.ahura-catcards-track {
    display: flex;
    gap: 16px;
}

.ahura-catcards-slider .ahura-catcards-desktop {
    overflow-x: auto;
    padding: 6px 4px 16px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.ahura-catcards-slider .ahura-catcards-desktop:hover {
    scrollbar-color: rgba(var(--ahura-primary-rgb), .35) transparent;
}

.ahura-catcards-slider .ahura-catcards-desktop::-webkit-scrollbar {
    height: 6px;
}

.ahura-catcards-slider .ahura-catcards-desktop::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 99px;
}

.ahura-catcards-slider .ahura-catcards-desktop:hover::-webkit-scrollbar-thumb {
    background: rgba(var(--ahura-primary-rgb), .35);
}

.ahura-catcards-grid .ahura-catcards-desktop {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.ahura-catcards-mobilebox {
    display: none;
}

.ahura-catcards-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 14px;
    border: 1px solid transparent;
    border-radius: 18px;
    background-color: var(--ahura-background);
    box-shadow: 0 6px 24px rgba(138, 27, 227, .06);
    text-decoration: none;
    text-align: center;
    scroll-snap-align: start;
    transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease, border-color .3s ease;
}

.ahura-catcards-grid .ahura-catcards-card,
.ahura-catcards-mobile .ahura-catcards-card,
.ahura-catcards-modal-grid .ahura-catcards-card {
    width: auto;
    min-width: 0;
}

.ahura-catcards-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(138, 27, 227, .1);
}

.ahura-catcards-card.is-active {
    background-color: rgba(var(--ahura-primary-rgb), .14);
    border-color: rgba(var(--ahura-primary-rgb), .35);
}

.ahura-catcards-card.is-active .ahura-catcards-title {
    color: var(--ahura-primary);
    font-weight: 700;
}

.ahura-catcards-card.is-active::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 4px;
    border-radius: 99px;
    background-color: var(--ahura-primary);
}

.ahura-catcards-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 90px;
    border-radius: 14px;
    background-color: #f7f9fc;
    overflow: hidden;
}

.ahura-catcards-media img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    transition: transform .4s ease;
}

.ahura-catcards-card:hover .ahura-catcards-media img {
    transform: scale(1.06);
}

.ahura-catcards-media svg {
    width: 40px;
    height: 40px;
    color: rgba(var(--ahura-text-rgb), .4);
}

.ahura-catcards-media-icon {
    background-color: rgba(var(--ahura-primary-rgb), .1);
}

.ahura-catcards-media-icon svg {
    color: var(--ahura-primary);
}

.ahura-catcards-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--ahura-text);
    transition: color .3s ease;
}

.ahura-catcards-card:hover .ahura-catcards-title {
    color: var(--ahura-primary);
}

.ahura-catcards-count {
    font-size: 11px;
    color: rgba(var(--ahura-text-rgb), .55);
}

.ahura-catcards-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    border-radius: 999px;
    background-color: rgba(var(--ahura-primary-rgb), .12);
    color: var(--ahura-primary);
    font-size: 11px;
    font-weight: 700;
    transition: background-color .3s ease, color .3s ease;
}

.ahura-catcards-card:hover .ahura-catcards-btn {
    background-color: var(--ahura-primary);
    color: #fff;
}

.ahura-catcards-allbtn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 13px;
    border: none;
    border-radius: 14px;
    background-color: rgba(var(--ahura-primary-rgb), .12);
    color: var(--ahura-primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .3s ease;
}

.ahura-catcards-allbtn svg {
    width: 18px;
    height: 18px;
}

.ahura-catcards-allbtn:active {
    background-color: rgba(var(--ahura-primary-rgb), .22);
}

.ahura-catcards-modal {
    position: fixed;
    inset: 0;
    z-index: 10003;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
}

.ahura-catcards-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.ahura-catcards-modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(15, 23, 42, .5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ahura-catcards-modal-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 82vh;
    overflow-y: auto;
    padding: 16px 14px calc(16px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
    background-color: var(--ahura-background);
    box-shadow: 0 -12px 40px rgba(138, 27, 227, .18);
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}

.ahura-catcards-modal.is-open .ahura-catcards-modal-panel {
    transform: translateY(0);
}

.ahura-catcards-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.ahura-catcards-modal-head strong {
    font-size: 15px;
    font-weight: 800;
}

.ahura-catcards-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 99px;
    background-color: rgba(var(--ahura-secondary-rgb), .1);
    color: var(--ahura-text);
    cursor: pointer;
}

.ahura-catcards-modal-close svg {
    width: 16px;
    height: 16px;
}

.ahura-catcards-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 1023px) {
    .ahura-catcards-grid .ahura-catcards-desktop {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .ahura-catcards-desktop {
        display: none !important;
    }

    .ahura-catcards-mobilebox {
        display: block;
    }

    .ahura-catcards-mobile {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .ahura-catcards-allbtn {
        display: flex;
    }

    .ahura-catcards-mobile .ahura-catcards-card,
    .ahura-catcards-modal-grid .ahura-catcards-card {
        padding: 12px 8px;
        gap: 8px;
        border-radius: 14px;
    }

    .ahura-catcards-mobile .ahura-catcards-media,
    .ahura-catcards-modal-grid .ahura-catcards-media {
        height: 64px;
        border-radius: 10px;
    }

    .ahura-catcards-mobile .ahura-catcards-title,
    .ahura-catcards-modal-grid .ahura-catcards-title {
        font-size: 11px;
    }

    .ahura-catcards-mobile .ahura-catcards-btn,
    .ahura-catcards-modal-grid .ahura-catcards-btn {
        display: none;
    }

    .ahura-catcards-mobile .ahura-catcards-count,
    .ahura-catcards-modal-grid .ahura-catcards-count {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .ahura-catcards-mobile .ahura-catcards-media,
    .ahura-catcards-modal-grid .ahura-catcards-media {
        height: 56px;
    }

    .ahura-catcards-mobile .ahura-catcards-title,
    .ahura-catcards-modal-grid .ahura-catcards-title {
        font-size: 10px;
    }
}