/* Імпорт змінних */
@import url('variables.css');

/* Стилі каруселі з використанням змінних */
.categories-carousel {
 position: relative;
}

/* Контейнер з елементами */
.categories-carousel__container {
    position: relative;
    display: flex;
    gap: 20px;
    justify-content: start;
    overflow-x: scroll;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE та Edge */
}

/* Приховування скролбара для WebKit браузерів (Chrome, Safari, Edge) */
.categories-carousel__container::-webkit-scrollbar {
    display: none;
}

/* Елемент категорії */
.categories-carousel__element {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
}

.categories-carousel__element:nth-child(3n+1) {
    background-color: #DFF2FE;
    border: 1px solid #00BCFF;
}

.categories-carousel__element:nth-child(3n+2) {
    background-color: #CBFBF1;
    border: 1px solid #00D5BE;
}

.categories-carousel__element:nth-child(3n+3) {
    background-color: #FFE2E2;
    border: 1px solid #FF6467;
}


.categories-carousel__element-image {
    width: 86px;
    height: 86px;
    overflow: hidden;
}

.categories-carousel__element-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.categories-carousel__element-name {
    text-align: center;
    text-decoration: none;
    margin-top: auto;
}

.categories-carousel__element-name p {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-font);
}


.categories-carousel__arrow{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    background-color: var(--color-white);
    border: 1px solid var(--color-border-gray);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}


.categories-carousel__arrow.v-enter-active,
.categories-carousel__arrow.v-leave-active {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.categories-carousel__arrow.v-enter-from,
.categories-carousel__arrow.v-leave-to {
    opacity: 0;
    visibility: hidden;
}

.categories-carousel__arrow.v-enter-to,
.categories-carousel__arrow.v-leave-from {
    opacity: 1;
    visibility: visible;
}

.categories-carousel__arrow:hover {
    background-color: #f5f5f5;
    transform: translateY(-50%) scale(1.1);
}
.categories-carousel__arrow >img{
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.categories-carousel__arrow--left{
    left: 16px;
}
.categories-carousel__arrow--left >img{
    transform: rotate(180deg);
}

.categories-carousel__arrow--right{
    right: 16px;
}

/* ============================================
   SHIMMER СТИЛІ (для завантаження)
   ============================================ */


@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.categories-carousel__element--shimmer {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 50%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border: 1px solid #e0e0e0 !important;
    flex-shrink: 0;
}
