/* ==============================================
   AHMED PAPER DECORATIONS
   Category Section - Animated Single Line Slider
   ============================================== */


/* ==========================================
   SECTION WRAPPER
   ========================================== */

.category-section {
    padding: 70px 0;
    background: #fff;
    overflow: hidden;
    position: relative;
}

.category-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 100%;
    background: linear-gradient(90deg, #fff 0%, transparent 100%);
    z-index: 5;
    pointer-events: none;
}

.category-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    background: linear-gradient(-90deg, #fff 0%, transparent 100%);
    z-index: 5;
    pointer-events: none;
}


/* ==========================================
   SLIDER WRAPPER
   ========================================== */

.category-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
    margin-top: 20px;
}


/* ==========================================
   ANIMATED TRACK (Infinite Scroll)
   ========================================== */

.category-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: categoryScroll 40s linear infinite;
}

.category-track:hover {
    animation-play-state: paused;
}

@keyframes categoryScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}


/* ==========================================
   CATEGORY CARD (Circular)
   ========================================== */

.category-card {
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 160px;
}

.category-card-image-wrapper {
    width: 140px;
    height: 140px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: #F9F9F9;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.category-card:hover .category-card-image-wrapper {
    border-color: #D4AF37;
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.3);
}

.category-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.category-card:hover .category-card-image {
    transform: scale(1.15);
}

.category-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.85), rgba(0, 0, 0, 0.5));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.category-card:hover .category-card-overlay {
    opacity: 1;
}

.category-card-icon {
    color: #fff;
    font-size: 30px;
    transform: scale(0) rotate(-180deg);
    transition: transform 0.4s ease;
}

.category-card:hover .category-card-icon {
    transform: scale(1) rotate(0deg);
}


/* ==========================================
   ICON CIRCLE (Fallback)
   ========================================== */

.category-icon-circle {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #D4AF37, #E5C158);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon-circle {
    transform: rotate(360deg);
}


/* ==========================================
   CATEGORY TITLE
   ========================================== */

.category-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin: 0;
    text-transform: capitalize;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-card:hover .category-card-title {
    color: #B8941F;
}

.category-card-count {
    display: block;
    font-size: 11px;
    color: #737373;
    margin-top: 5px;
    font-weight: 400;
}


/* ==========================================
   ANIMATION DIRECTION CONTROL
   ========================================== */

.category-track.scroll-right {
    animation: categoryScrollRight 40s linear infinite;
}

@keyframes categoryScrollRight {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}


/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 991px) {
    .category-section {
        padding: 50px 0;
    }
    
    .category-card {
        width: 140px;
    }
    
    .category-card-image-wrapper {
        width: 120px;
        height: 120px;
    }
    
    .category-card-title {
        font-size: 13px;
    }
    
    .category-section::before,
    .category-section::after {
        width: 100px;
    }
}

@media (max-width: 767px) {
    .category-section {
        padding: 40px 0;
    }
    
    .category-track {
        gap: 20px;
        animation-duration: 30s;
    }
    
    .category-card {
        width: 120px;
    }
    
    .category-card-image-wrapper {
        width: 100px;
        height: 100px;
        border-width: 2px;
    }
    
    .category-card-title {
        font-size: 12px;
    }
    
    .category-card-count {
        font-size: 10px;
    }
    
    .category-icon-circle {
        font-size: 38px;
    }
    
    .category-card-icon {
        font-size: 22px;
    }
    
    .category-section::before,
    .category-section::after {
        width: 60px;
    }
}

@media (max-width: 575px) {
    .category-section {
        padding: 30px 0;
    }
    
    .category-track {
        gap: 15px;
        animation-duration: 25s;
    }
    
    .category-card {
        width: 100px;
    }
    
    .category-card-image-wrapper {
        width: 85px;
        height: 85px;
    }
    
    .category-card-title {
        font-size: 11px;
    }
    
    .category-card-count {
        font-size: 9px;
    }
}