/* === 0. Default system fonts everywhere === */
* {
   
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === 1. Hide the product template === */
#SearchProductTemplate {
    display: none !important;
}

/* === 2. Product grid layout === */
div.product-grid,
div.featured-collection .product-list,
div.category-products,
div.collection-products,
div.product-list,
section.products,
div.products-grid,
div.products-list {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
}

/* === 3. Product card flex layout === */
div.product.clickable,
div.product.featureditem {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    min-height: 380px !important;
}

/* === 4. Clamp product names to 2 lines === */
div.product.clickable .name,
div.product.featureditem .name {
    font-size: 12px !important;
    line-height: 1.3 !important;
    max-height: 2.6em !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    word-break: break-word !important;
    margin-bottom: 8px !important;
    font-family: "rosella-solid", sans-serif; /* Rosella only for product name */
    font-weight: 400;
    font-style: normal;
}

/* === 5. Lock buttons to bottom of card === */
div.product.clickable .button,
div.product.clickable a.button,
div.product.featureditem .button,
div.product.featureditem a.button {
    margin-top: auto !important;
    padding: 0.5em 1.2em !important;
    font-size: 13px !important;
    text-align: center !important;
    align-self: center !important;
    width: fit-content !important;
}

/* === 6. Mobile adjustments === */
@media (max-width: 768px) {
    div.product.clickable,
    div.product.featureditem {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        min-height: auto !important;
        margin-bottom: 20px !important;
        width: 100% !important;
    }
}
