.grf-category-view-switcher{display:flex;justify-content:flex-end;gap:.5rem;margin-bottom:1rem;width:100%}
.grf-category-view-switcher .grf-view-btn{padding:.35rem .6rem;border:1px solid #ddd;background:#fff;cursor:pointer}
.grf-category-view-switcher .grf-view-btn.active{background:#111;color:#fff;border-color:#111}

/* New: improved icon button styles */
.grf-category-view-switcher .grf-view-btn{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    width:42px;
    height:42px;
    padding:0;
    border-radius:8px;
    border:1px solid #e6e6e6;
    background:#ffffff;
    color:#333333;
    text-decoration:none !important;
    transition:transform .12s ease, box-shadow .12s ease, background-color .12s ease, color .12s ease;
    box-shadow:0 1px 2px rgba(0,0,0,0.04);
}

.grf-category-view-switcher .grf-view-btn svg{width:20px;height:20px;display:block;fill:none;stroke:currentColor;stroke-width:1.5;opacity:0.9}

.grf-category-view-switcher .grf-view-btn:hover{
    transform:translateY(-3px);
    border-color:#cfcfcf;
    box-shadow:0 6px 18px rgba(0,0,0,0.06);
}

.grf-category-view-switcher .grf-view-btn:focus{
    outline:none;
    box-shadow:0 0 0 4px rgba(17,119,255,0.12);
}

.grf-category-view-switcher .grf-view-btn.active{
    background:#111;
    color:#ffffff;
    border-color:#111;
    transform:none;
    box-shadow:0 4px 12px rgba(0,0,0,0.12);
}

.grf-category-view-switcher .grf-view-btn.active svg{opacity:1}

/* Small screens: shrink buttons slightly */
@media (max-width:600px){
    .grf-category-view-switcher .grf-view-btn{width:36px;height:36px;border-radius:6px}
    .grf-category-view-switcher .grf-view-btn svg{width:18px;height:18px}
}

/* RIMOSSI: regole fallback per la vista lista che forzavano layout custom.
   Ora ci affidiamo esclusivamente alle classi/markup generati da Flatsome. */

/* ========== SOTTOCATEGORIE ========== */

/* Modalità lista per sottocategorie: forza layout a singola colonna */
.grf-subcategories-list-view .products.product-categories.grf-subcategories-list-mode .product-category,
.products.product-categories.grf-subcategories-list-mode .product-category {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-bottom: 1rem;
}

/* Styling migliorato per sottocategorie in modalità lista */
.products.product-categories.grf-subcategories-list-mode .product-category.grf-category-list-view .col-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.products.product-categories.grf-subcategories-list-mode .product-category.grf-category-list-view .box {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.2s ease;
    margin: 0;
}

.products.product-categories.grf-subcategories-list-mode .product-category.grf-category-list-view .box:hover {
    border-color: #d0d0d0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.products.product-categories.grf-subcategories-list-mode .product-category.grf-category-list-view .box-image {
    flex: 0 0 80px;
    margin-right: 1rem;
    margin-bottom: 0;
}

.products.product-categories.grf-subcategories-list-mode .product-category.grf-category-list-view .box-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.products.product-categories.grf-subcategories-list-mode .product-category.grf-category-list-view .box-text {
    flex: 1;
    text-align: left !important;
    margin: 0;
}

.products.product-categories.grf-subcategories-list-mode .product-category.grf-category-list-view .box-text .box-text-inner {
    text-align: left !important;
}

.products.product-categories.grf-subcategories-list-mode .product-category.grf-category-list-view .header-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left !important;
}

.products.product-categories.grf-subcategories-list-mode .product-category.grf-category-list-view .count {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    opacity: 0.8;
    text-align: left !important;
}

/* Modalità griglia per sottocategorie: mantieni comportamento standard */
.products.product-categories.grf-subcategories-grid-mode .product-category.grf-category-grid-view {
    /* Mantiene lo styling standard di Flatsome per la griglia */
}

/* Responsive per sottocategorie in modalità lista */
@media (max-width: 600px) {
    .products.product-categories.grf-subcategories-list-mode .product-category.grf-category-list-view .col-inner {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }

    .products.product-categories.grf-subcategories-list-mode .product-category.grf-category-list-view .box {
        flex-direction: column;
        text-align: center;
        padding: 0.8rem;
    }

    .products.product-categories.grf-subcategories-list-mode .product-category.grf-category-list-view .box-image {
        flex: none;
        margin: 0 0 0.8rem 0;
    }

    .products.product-categories.grf-subcategories-list-mode .product-category.grf-category-list-view .box-text,
    .products.product-categories.grf-subcategories-list-mode .product-category.grf-category-list-view .box-text .box-text-inner,
    .products.product-categories.grf-subcategories-list-mode .product-category.grf-category-list-view .header-title,
    .products.product-categories.grf-subcategories-list-mode .product-category.grf-category-list-view .count {
        text-align: center !important;
    }
}

/*immagine categorie*/
.category-page-row .shop-container .products .box-image {
    min-height: 390px;
	max-height: 390px;
    display: flex;
    align-content: center;
    flex-direction: column;
    justify-content: center;
}
