/* ========== استایل اختصاصی صفحه دسته‌بندی ========== */
/* ========== فونت ========== */
@font-face {
    font-family: "dana-fanum-regular";
    src: url('../fonts/dana-fanum-regular.woff2');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "dana-fanum-regular";
}

body {
    background: #f0f4f8;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
}

/* هدر جستجو در دسته‌بندی */
.categories-search {
    margin-bottom: 20px;
}

.categories-search-box {
    backdrop-filter: blur(12px);
    border-radius: 60px;
    display: flex;
    align-items: center;
    padding: 6px 6px 6px 20px;
    border: 1px solid rgba(0, 82, 212, 0.2);
    transition: all 0.3s;
}

.categories-search-box:focus-within {
    border-color: #0052D4;
    box-shadow: 0 0 0 2px rgba(0, 82, 212, 0.2);
}

.categories-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px;
    font-size: 14px;
    outline: none;
    color: #1e293b;
    /* رنگ تیره برای حالت روشن */
}

/* حالت دارک - رنگ متن سفید */
body.dark .categories-search-box input {
    color: #f1f5f9;
}

body.dark .categories-search-box input::placeholder {
    color: #94a3b8;
}

/* حالت روشن - placeholder */
.categories-search-box input::placeholder {
    color: #94a3b8;
}

.categories-search-box button {
    background: linear-gradient(135deg, #0052D4, #4364F7);
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

@keyframes bannerShine {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(10%, 10%);
    }
}

/* دسته‌بندی اصلی - کارت‌های بزرگ */
.main-categories {
    margin-bottom: 32px;
}

.main-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.main-category-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 20px 16px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 82, 212, 0.1);
    position: relative;
    overflow: hidden;
}

body.dark .main-category-card {
    background: rgba(20, 25, 45, 0.9);
}

.main-category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 82, 212, 0.15);
    border-color: rgba(0, 82, 212, 0.3);
}

.main-category-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #0052D4, #4364F7);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    transition: all 0.3s;
}

.main-category-card:hover .main-category-icon {
    transform: scale(1.05);
    border-radius: 24px;
}

.main-category-icon i {
    font-size: 28px;
    color: white;
}

.main-category-name {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

body.dark .main-category-name {
    color: #f1f5f9;
}

.main-category-count {
    font-size: 11px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

body.dark .main-category-count {
    color: #94a3b8;
}

/* دسته‌بندی فرعی - لیستی */
.sub-categories {
    margin-bottom: 28px;
}

.sub-categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.sub-categories-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark .sub-categories-header h3 {
    color: #f1f5f9;
}

.sub-categories-header h3 i {
    color: #0052D4;
}

.sub-categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sub-category-item {
    background: rgba(0, 82, 212, 0.06);
    border-radius: 40px;
    padding: 8px 16px;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark .sub-category-item {
    background: rgba(0, 82, 212, 0.12);
}

.sub-category-item:hover {
    background: linear-gradient(135deg, #0052D4, #4364F7);
    transform: translateY(-2px);
}

.sub-category-item i {
    font-size: 14px;
    color: #0052D4;
    transition: all 0.3s;
}

.sub-category-item span {
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    transition: all 0.3s;
}

body.dark .sub-category-item span {
    color: #e2e8f0;
}

.sub-category-item:hover i,
.sub-category-item:hover span {
    color: white;
}

/* دسته‌بندی های ویژه (اسلایدر افقی) */
.featured-categories {
    margin-bottom: 28px;
}

.featured-slider-wrapper {
    position: relative;
    padding: 0 30px;
}

.featured-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 4px 12px 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.featured-slider::-webkit-scrollbar {
    display: none;
}

.featured-card {
    min-width: 140px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 16px 12px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid rgba(0, 82, 212, 0.1);
}

body.dark .featured-card {
    background: rgba(20, 25, 45, 0.9);
}

.featured-card:hover {
    transform: translateY(-4px);
    background: linear-gradient(135deg, #0052D4, #4364F7);
}

.featured-card-icon {
    width: 48px;
    height: 48px;
    background: rgba(0, 82, 212, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    transition: all 0.3s;
}

.featured-card:hover .featured-card-icon {
    background: rgba(255, 255, 255, 0.2);
}

.featured-card-icon i {
    font-size: 22px;
    color: #0052D4;
    transition: all 0.3s;
}

.featured-card:hover .featured-card-icon i {
    color: white;
}

.featured-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    /* رنگ پیش‌فرض برای حالت روشن */
    transition: all 0.3s;
}

/* حالت دارک - رنگ سفید */
body.dark .featured-card-name {
    color: #f1f5f9;
}

.featured-card:hover .featured-card-name {
    color: white;
}

/* دکمه‌های ناوبری */
.featured-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 1px solid rgba(0, 82, 212, 0.2);
    color: #0052D4;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.featured-slider-btn:hover {
    background: linear-gradient(135deg, #0052D4, #4364F7);
    color: white;
    transform: translateY(-50%) scale(1.05);
}

.featured-prev {
    right: -5px;
}

.featured-next {
    left: -5px;
}

@media (max-width: 450px) {
    .featured-slider-wrapper {
        padding: 0 20px;
    }

    .featured-slider-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .featured-prev {
        right: -8px;
    }

    .featured-next {
        left: -8px;
    }

    .main-categories-grid {
        gap: 12px;
    }

    .main-category-icon {
        width: 52px;
        height: 52px;
    }

    .main-category-icon i {
        font-size: 24px;
    }

    .featured-card {
        min-width: 120px;
    }
}