/* Design 1: Shop by Category - Horizontal Card Layout */
/* Scoped to Home Page */

body.route-common-home .module-categories .category-layout .category-thumb {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px 20px;
    transition: all 0.3s ease;
    height: 100%;
}

body.route-common-home .module-categories .category-layout:hover .category-thumb {
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Image container */
body.route-common-home .module-categories .category-layout .image {
    flex: 0 0 80px;
    width: 80px;
    margin-right: 20px;
    margin-bottom: 0 !important;
}

body.route-common-home .module-categories .category-layout .image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 80px;
}

/* Text Content */
body.route-common-home .module-categories .category-layout .caption {
    flex: 1;
    text-align: left;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Category Name */
body.route-common-home .module-categories .category-layout .name {
    margin-bottom: 5px;
}

body.route-common-home .module-categories .category-layout .name a {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

/* Product Count */
body.route-common-home .module-categories .category-layout .product-count {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 5px;
    background: transparent;
    padding: 0;
}

/* Hide description if present */
body.route-common-home .module-categories .category-layout .description {
    display: none;
}

/* Shop Now Button / Link */
body.route-common-home .module-categories .category-layout .button-group {
    display: block;
    margin-top: 2px;
}

body.route-common-home .module-categories .category-layout .btn-view-more {
    background: transparent;
    border: none;
    padding: 0;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-transform: capitalize;
}

body.route-common-home .module-categories .category-layout .btn-view-more:hover {
    color: #000;
}

/* Responsiveness */
@media (max-width: 768px) {
    body.route-common-home .module-categories .category-layout .category-thumb {
        padding: 10px 15px;
    }

    body.route-common-home .module-categories .category-layout .image {
        flex: 0 0 60px;
        width: 60px;
        margin-right: 15px;
    }
}

/* Subcategory Redesign (Pill Style) on Category Pages */
.refine-categories .refine-item a {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    background-color: #f8f8f8 !important;
    border-radius: 50px !important;
    /* Pill shape */
    padding: 10px 20px 10px 10px !important;
    /* Less padding on left for image */
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    border: 1px solid #eee !important;
    height: 100% !important;
    min-height: 60px !important;
    /* Ensure consistent height */
}

.refine-categories .refine-item a:hover {
    background-color: #fff !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05) !important;
    border-color: #ddd !important;
}

/* Subcategory Image */
.refine-categories .refine-item img {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    /* Circular image */
    object-fit: cover !important;
    margin-right: 15px !important;
    margin-bottom: 0 !important;
    /* Reset */
    flex-shrink: 0 !important;
    display: block !important;
    /* Ensure visibility */
}

/* Subcategory Name */
.refine-categories .refine-item .refine-name {
    font-size: 14px !important;
    color: #333 !important;
    font-weight: 500 !important;
    text-align: left !important;
    white-space: normal !important;
    /* Allow slight wrapping if needed, or nowrap */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
}

/* Adjust Refine Grid to allow width for pills */
.refine-categories .refine-item {
    margin-bottom: 15px !important;
}