﻿.category-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 7px;
    background: #fff;
    width: 100%;
    cursor: grab; /* نشانگر دست */
}

    .category-scroll-wrapper:active {
        cursor: grabbing; /* وقتی کاربر داره drag می‌کنه */
    }

    .category-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }

.category-scroll {
    display: flex;
    gap: 0.75rem;
    flex-wrap: nowrap;
    min-width: max-content;
}

.category-item {
    padding: 10px;
    background: #f2f2f2;
    border: 1px solid #ccc;
    border-radius: 999px;
    color: #333;
    font-family: "Vazirmatn", sans-serif;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

    .category-item:hover {
        background: #e0e0e0;
        transform: translateY(-2px);
    }

    .category-item.active {
        background: #007bff;
        color: #fff;
        border-color: #007bff;
    }

@media (max-width: 768px) {
    .category-scroll {
        flex-wrap: nowrap;
        min-width: max-content;
    }

    .category-scroll-wrapper {
        padding-bottom: 0.5rem;
    }
}



/*****************************************/
.modal-custom {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: start;
    align-items: flex-start;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    transition: opacity 0.3s ease;
}

    .modal-custom.show {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-custom .modal-content {
    position: relative;
    top: 0;
    margin: auto;
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    animation: slideUp 0.5s ease forwards;
    height: 300px;
    overflow-y: auto; /* فعال‌کردن اسکرول داخلی */
    scrollbar-width: none; /* برای Firefox */
}

    .modal-content::-webkit-scrollbar {
        display: none; /* برای Chrome و Safari */
    }

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sub-search {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.subcategories li {
    padding: 0.4rem 0;
    border-bottom: 1px dashed #ddd;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
}

.subcategories li a {
    text-decoration: none;
    color: #808080;
}
