/* Category Effects CSS */

/* Modern 3D Card Effect */
.cat-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.cat-item:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.cat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent4-rgb), 0.1));
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.cat-item:hover::before {
    opacity: 1;
}

/* Image Container */
.cat-item .overflow-hidden {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.5s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.cat-item:hover .overflow-hidden {
    transform: scale(1.05) translateZ(20px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Image Zoom Effect */
.cat-item .img-fluid {
    transition: transform 0.8s ease;
    transform-origin: center;
}

.cat-item:hover .img-fluid {
    transform: scale(1.15);
}

/* Category Title */
.cat-item .flex-fill h5 {
    position: relative;
    transition: all 0.4s ease;
    transform: translateZ(10px);
    font-weight: 600;
    color: #333;
}

.cat-item:hover .flex-fill h5 {
    color: var(--accent2);
    transform: translateZ(30px);
}

/* Underline Effect */
.cat-item .flex-fill h5::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent4));
    transition: width 0.4s ease;
}

.cat-item:hover .flex-fill h5::after {
    width: 100%;
}

/* Shine Effect */
.cat-item::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(30deg);
    transition: all 0.7s ease;
    opacity: 0;
}

.cat-item:hover::after {
    left: 130%;
    opacity: 0.8;
}

/* Category Count Badge */
.cat-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent4));
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
    z-index: 3;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.cat-item:hover .cat-count {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 575px) {
    .cat-item {
        margin-bottom: 10px;
        padding: 8px;
    }
    
    .cat-item .overflow-hidden {
        width: 70px !important;
        height: 70px !important;
    }
    
    .cat-item h5 {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
    
    .cat-item:hover {
        transform: translateY(-3px);
    }
    
    .cat-item:hover .overflow-hidden {
        transform: scale(1.02);
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .cat-item {
        margin-bottom: 12px;
    }
    
    .cat-item .overflow-hidden {
        width: 80px !important;
        height: 80px !important;
    }
    
    .cat-item:hover {
        transform: translateY(-5px) rotateX(2deg);
    }
    
    .cat-item:hover .overflow-hidden {
        transform: scale(1.03) translateZ(5px);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .cat-item {
        margin-bottom: 15px;
    }
    
    .cat-item .overflow-hidden {
        width: 90px !important;
        height: 90px !important;
    }
    
    .cat-item:hover {
        transform: translateY(-5px) rotateX(3deg);
    }
    
    .cat-item:hover .overflow-hidden {
        transform: scale(1.03) translateZ(10px);
    }
}

/* Category Icon */
.cat-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: var(--accent);
    font-size: 18px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    z-index: 3;
}

.cat-item:hover .cat-icon {
    opacity: 1;
    transform: translateY(0);
}