/**
 * Category Slider Styles
 */

.opa-category-slider-wrapper {
    width: 100%;
    margin: 40px 0;
    overflow: hidden;
    position: relative;
    font-family: var(--opa-font-family, inherit);
}

.opa-category-slider-container {
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
    padding-bottom: 20px; /* Space for shadows */
    cursor: grab;
}

.opa-category-slider-container:active {
    cursor: grabbing;
}

.opa-category-slider-container::-webkit-scrollbar {
    display: none;
}

.opa-category-slider-track {
    display: inline-flex;
    gap: 20px;
    padding: 10px 20px;
}

.opa-cs-item {
    flex: 0 0 auto;
    height: 300px;
    border-radius: var(--opa-radius, 12px);
    scroll-snap-align: start;
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
    background: var(--opa-surface, #fff);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .opa-cs-item {
        height: 220px;
    }
}

.opa-cs-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Style: Image Top, Text Bottom */
.opa-cs-style-image_top .opa-cs-image-wrapper {
    width: 100%;
    flex: 1;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.opa-cs-style-image_top .opa-cs-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.opa-cs-style-image_top:hover .opa-cs-image-wrapper img {
    transform: scale(1.05);
}

.opa-cs-style-image_top .opa-cs-title-wrapper {
    padding: 10px 15px;
    text-align: center;
    background: var(--opa-surface, #fff);
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opa-cs-style-image_top .opa-cs-name {
    color: var(--opa-text, #333);
    font-weight: 600;
    font-size: 15px;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Style: Background Image + Text Overlay */
.opa-cs-style-background_overlay .opa-cs-bg-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    box-sizing: border-box;
    transition: transform 0.5s ease;
}

.opa-cs-style-background_overlay:hover .opa-cs-bg-image {
    transform: scale(1.05);
}

.opa-cs-style-background_overlay .opa-cs-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

.opa-cs-style-background_overlay .opa-cs-name {
    color: #fff;
    font-weight: 600;
    font-size: 18px;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
