
/* =========================================================
   CATEGORIES PAGE
========================================================= */

.categories-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 35px 20px 70px;
    direction: rtl;
}

/* PAGE HEADER */

.page-header {
    margin-bottom: 35px;
}

/* BREADCRUMB */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: #888;
    font-size: 14px;
}

.breadcrumb a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #4f46e5;
}

/* TITLE */

.page-header h1 {
    margin: 0 0 8px;
    color: #171717;
    font-size: 32px;
    line-height: 1.3;
    font-weight: 900;
    letter-spacing: -0.7px;
}

.page-header p {
    margin: 0;
    color: #777;
    font-size: 15px;
    line-height: 1.7;
}

/* GRID */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* CATEGORY CARD */

.category-card {
    position: relative;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 18px;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 7px 22px rgba(15, 23, 42, 0.025);
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: #d5d9ff;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.075);
}

/* CATEGORY ICON */

.category-icon {
    width: 65px;
    height: 65px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(145deg, #f8fafc, #eef2ff);
    border: 1px solid #eef0f5;
    font-size: 32px;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.05) rotate(-2deg);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.08);
}

/* CATEGORY INFO */

.category-info {
    flex: 1;
    min-width: 0;
}

.category-info h2 {
    margin: 0 0 7px;
    overflow: hidden;
    color: #171717;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.category-info p {
    margin: 0;
    color: #888;
    font-size: 13px;
    line-height: 1.5;
}

/* ARROW */

.category-arrow {
    flex: 0 0 auto;
    color: #777;
    font-size: 20px;
    transition:
        transform 0.2s ease,
        color 0.2s ease;
}

.category-card:hover .category-arrow {
    transform: translateX(-4px);
    color: #4f46e5;
}

/* EMPTY STATE */

.categories-empty {
    grid-column: 1 / -1;
    padding: 70px 20px;
    text-align: center;
    direction: rtl;
}

.categories-empty-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: #eef2ff;
    font-size: 30px;
}

.categories-empty h2 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 20px;
    font-weight: 900;
}

.categories-empty p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

/* TABLET */

@media (max-width: 850px) {
    .categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* MOBILE */

@media (max-width: 550px) {
    .categories-page {
        padding: 25px 14px 50px;
    }

    .page-header {
        margin-bottom: 25px;
    }

    .breadcrumb {
        font-size: 12px;
    }

    .page-header h1 {
        font-size: 27px;
    }

    .page-header p {
        font-size: 13px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .category-card {
        padding: 18px;
        gap: 14px;
        border-radius: 15px;
    }

    .category-icon {
        width: 57px;
        height: 57px;
        border-radius: 14px;
        font-size: 27px;
    }

    .category-info h2 {
        font-size: 16px;
    }

    .category-info p {
        font-size: 12px;
    }

    .category-arrow {
        font-size: 18px;
    }
}