/* ALL CATEGORIES SECTION STYLES */

.all-categories-section {
    padding: 60px 0;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    width: 100%;
}

.gt-container {
    max-width: 95%;
    /* Use more of the screen width */
    margin: 0 auto;
    padding: 0 40px;
}

.all-categories-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 40px;
    letter-spacing: 1px;
    color: #000;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1600px;
    /* Increased max-width for better use of space */
    margin: 0 auto;
    padding: 0 40px;
    /* More padding on sides */
}

/* Very large screens */
@media screen and (min-width: 1600px) {
    .categories-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Standard Laptops (13, 14, 15 inch) and Desktop */
@media screen and (max-width: 1400px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* Small Laptops and Large Tablets */
@media screen and (max-width: 1199px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* Tablets */
@media screen and (max-width: 991px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Tablets / Large Phones */
@media screen and (max-width: 767px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media screen and (max-width: 575px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .category-group-header {
        cursor: pointer;
        padding: 10px 0;
    }

    .category-group-header::after {
        display: block;
        /* Show on mobile */
        content: '+';
        /* Plus by default */
        font-size: 1.5rem;
        font-weight: 300;
    }

    .category-group.is-active .category-group-header::after {
        content: '-';
        /* Minus when open */
    }

    .category-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, opacity 0.2s ease;
        opacity: 0;
    }

    .category-group.is-active .category-list {
        max-height: 1000px;
        opacity: 1;
        margin-top: 10px;
        margin-bottom: 20px;
    }
}

.category-group {
    margin-bottom: 20px;
}

.category-group-header {
    font-size: 1.2rem;
    font-weight: 900;
    border-bottom: 2px solid #000;
    margin-bottom: 15px;
    padding-bottom: 5px;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    cursor: default;
}

/* Accordion indicator (hidden on desktop) */
.category-group-header::after {
    content: '+';
    font-size: 1.5rem;
    display: none;
    transition: transform 0.3s ease;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    font-size: 0.95rem;
    color: #000;
    /* Changed from #444 to satisfy black requirement */
    padding: 4px 0;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-item:hover {
    color: #000;
    font-weight: 700;
    padding-left: 5px;
    /* Subtle interaction */
}