/* Grid Slider - Snitch Style */

.grid-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.grid-slider-wrapper {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 0px 0px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-padding: 0;
    scroll-snap-stop: always;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.grid-slider-wrapper::-webkit-scrollbar {
    display: none;
}

.grid-slider-item {
    flex: 0 0 calc(33.333% - 14px);
    min-width: calc(33.333% - 14px);
    aspect-ratio: 1;
    position: relative;
    border-radius: 0px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    flex-shrink: 0;
    will-change: transform, opacity, box-shadow;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    scroll-snap-type: mandatory;
    opacity: 1;
    animation: slideInFade 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideInFade {
    0% {
        opacity: 0;
        transform: translate3d(30px, 0, 0);
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.grid-slider-item:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    opacity: 1;
}

.grid-slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 1.8s ease-out;
    will-change: transform, filter;
    transform: translate3d(0, 0, 0) scale(1);
    -webkit-transform: translate3d(0, 0, 0) scale(1);
    animation: imgSlideIn 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    filter: brightness(1);
}

@keyframes imgSlideIn {
    0% {
        transform: translate3d(0, 0, 0) scale(1.05);
        filter: brightness(0.9);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1);
        filter: brightness(1);
    }
}

.grid-slider-item:hover img {
    transform: scale(1.05);
}

.grid-slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    color: #fff;
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: background;
    transform: translate3d(0, 0, 0);
}

.grid-slider-item:hover .grid-slider-overlay {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.category-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.category-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
}

.category-desc {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    opacity: 0.85;
    transition: all 0.3s ease;
}

.grid-slider-item:hover .category-title {
    transform: translateY(-5px);
}

/* Navigation Arrows */
.grid-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.grid-slider-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.grid-slider-prev {
    left: 20px;
}

.grid-slider-next {
    right: 20px;
}

/* Container Width Control */
.grid-slider-container.max-width {
    max-width: 1400px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .grid-slider-item {
        flex: 0 0 calc(50% - 10px);
        min-width: calc(50% - 10px);
    }

    .category-title {
        font-size: 24px;
    }

    .grid-slider-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .grid-slider-wrapper {
        padding: 30px 15px;
        gap: 15px;
    }

    .grid-slider-item {
        flex: 0 0 calc(100% - 15px);
        min-width: calc(100% - 15px);
        border-radius: 6px;
    }

    .grid-slider-overlay {
        padding: 25px;
    }

    .category-label {
        font-size: 11px;
        margin-bottom: 10px;
    }

    .category-title {
        font-size: 22px;
    }

    .category-desc {
        font-size: 13px;
    }

    .grid-slider-nav {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .grid-slider-prev {
        left: 10px;
    }

    .grid-slider-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .grid-slider-wrapper {
        padding: 20px 10px;
        gap: 12px;
    }

    .grid-slider-item {
        flex: 0 0 calc(100% - 12px);
        min-width: calc(100% - 12px);
    }

    .grid-slider-overlay {
        padding: 20px;
    }

    .category-label {
        font-size: 10px;
        margin-bottom: 8px;
    }

    .category-title {
        font-size: 20px;
    }

    .category-desc {
        font-size: 12px;
        display: none;
    }

    .grid-slider-nav {
        display: none;
    }
}

/* Pagination Dots */
.grid-slider-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 20;
    justify-content: center;
}

.pagination-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.pagination-dot.active {
    background: rgba(255, 255, 255, 1);
    width: 28px;
    border-radius: 5px;
}

.pagination-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Instagram Carousel Styles */
.instagram-slides::-webkit-scrollbar {
    display: none;
}

.instagram-slides {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
