/* Product Categories Grid - Main container */
.product-categories-grid {
    display: grid;
    gap: 16px;
    margin: 10px 0;
    grid-template-columns: repeat(3, 1fr); /* Default: 3 columns for mobile */
}

/* Responsive breakpoints for different screen sizes */
@media (min-width: 600px) {
    .product-categories-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columns for tablets */
    }
}

@media (min-width: 960px) {
    .product-categories-grid {
        grid-template-columns: repeat(7, 1fr); /* 6 columns for desktops */
    }
}

/* Category box styling - consolidated styles */
.category-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.category-box .category_title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hover effect for category boxes */
.category-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Link styling */
.category-box a {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Category image container */
.category-box .category-image {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    max-height: 82px;
}

/* Category image styling */
.category-box .category-image img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
}

/* Alternative image styling for grid layout */
.product-categories-grid .category-box img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Square format */
    object-fit: cover; /* Ensures images maintain aspect ratio */
    display: block;
    max-width: 48px;
}

/* Category heading styling */

/* Specific heading style for grid layout */
.product-categories-grid .category-box h4 {
    font-size: 14px;
    border-top: none;
    font-weight: 500;
    padding: 4px;
    margin: 0;
}


/* Current category highlight in product categories grid */
.product-categories-grid .category-box.current_category {
    border: 1px solid #9e150b;
    position: relative;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: #f1f1f1;
}

.product-categories-grid .category-box.current_category:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background-color: #9e150b;
}

.product-categories-grid .category-box.current_category h4 {
    color: #9e150b;
    font-weight: bold;
}


@media screen and (max-width: 768px) {
    .category-box .category-image {       
        max-height: 54px;
    }
    .product-categories-grid .category-box img {        
        max-width: 38px;
    }
    .product-categories-grid {
        display: grid;
        gap: 10px;
        margin: 15px 0;
        
    }
}