.grid-slide {
    display: grid;
    grid-template-rows: repeat(2, auto);
    gap: 12px;
    padding: 1px;
    padding-bottom: 20px; /* زيادة مسافة أسفل الشبكة */
}

@media (min-width: 901px) {
    .grid-slide { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 769px) and (max-width: 900px) {
    .grid-slide { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 577px) and (max-width: 768px) {
    .grid-slide { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 576px) {
    .grid-slide { grid-template-columns: repeat(2, 1fr); }
}

/* تصميم الكروت */
.category-card {
    text-align: center;
    border-radius: 12px;
    background-color: #fff;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.category-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px 8px;
}

.category-icon-wrapper {
    height: 90px; /* ارتفاع ثابت لتساوي الكروت */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0px !important;
}

.category-icon {
    height: 90px;
    object-fit: contain;
    filter: grayscale(30%);

    transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
}
.category-icon[src*="b3na.com/app-assets/images/catalog.png"] {

    height: 56px !important;
}

.category-title {
    font-size: 13px !important;
    font-weight: 600 !important;

    margin: 0 !important;
    line-height: 1.3 !important;
    min-height: calc(1.2em * 2);
    word-break: break-word;
    margin-bottom: 0px !important;
    margin-top: 6px !important;
}


.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.15);
    border-color: rgba(67, 97, 238, 0.2);
}
.category-card:hover .category-icon {
    transform: scale(1.07);
    filter: grayscale(0%);
    opacity: 1;
}
.category-card:hover .category-title {
    color: #3f37c9;
}

/* رابط الكاتالوج */
.catalog-link {
    color: #e91e63;
    text-decoration: none;
}

/* النقاط أسفل السلايدر */
.splide__pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 16px; /* زيادة مسافة أسفل النقاط */
    position: relative;
    z-index: 0;
}
.splide__pagination__page {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    opacity: 0.6;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    border: none;
}
.splide__pagination__page:hover,
.splide__pagination__page.is-active {
    background: #3f37c9;
    opacity: 1;
    transform: scale(1.2);
}

/* 🌙 الوضع الداكن */
body.dark-mode .category-card {
    background-color: #292929;
    border-color: #333;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
}

body.dark-mode .category-title {
    color: #ddd;
}

body.dark-mode .category-card:hover .category-title {
    color: #87bfff;
}


body.dark-mode .splide__pagination__page {
    background: #555;
}

body.dark-mode .splide__pagination__page.is-active {
    background: #87bfff;
}