/* Mobile responsive fixes for product grid alignment */

/* Fix product body height to ensure consistent alignment */
.product-grid-holder .product-item-holder .body {
    height: 107px !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-grid-holder .product-item-holder .body .title {
    flex-shrink: 0;
    margin-bottom: 5px;
}

.product-grid-holder .product-item-holder .body span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    line-height: 1.2em;
    max-height: 4.8em; /* 4 lines * 1.2em line-height */
}

/* Mobile specific adjustments */
@media (max-width: 479px) {
    .product-grid-holder .product-item-holder .body {
        height: 90px !important;
        margin: 0 15px;
    }
    
    .product-grid-holder .product-item-holder .body span {
        -webkit-line-clamp: 3;
        max-height: 3.6em; /* 3 lines for mobile */
        font-size: 12px;
    }
}

/* Ensure consistent heights for different product sizes */
.product-grid-holder .product-item-holder.size-medium .body {
    height: 107px !important;
}

.product-grid-holder .product-item-holder.size-small .body {
    height: 71px !important;
}

.product-grid-holder .product-item-holder.size-big .body {
    height: 133px !important;
}

/* Change btn-add-to-compare icon to separator */
.btn-add-to-compare:before {
    content: '|' !important;
    font-family: inherit !important;
    margin: 0 5px !important;
}