/* Mobile Price Display & Grid Layout Fix */

/* Fix Bootstrap Grid Layout for Mobile */
@media (max-width: 768px) {

    /* Ensure proper grid layout */
    .category-products {
        display: flex !important;
        flex-wrap: wrap !important;
        margin: 0 -5px !important;
    }

    .product-item {
        float: left !important;
        display: block !important;
        width: 50% !important;
        padding: 0 5px !important;
        margin-bottom: 15px !important;
        box-sizing: border-box !important;
    }

    /* Product card styling */
    .product-card {
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        border: 1px solid #eee;
        border-radius: 8px;
        overflow: hidden;
        background: white;
    }

    .product-card .product-image {
        position: relative;
        width: 100%;
        height: 200px;
        overflow: hidden;
        padding-top: 18px !important;
    }

    .product-card .product-image img {
        width: 100% !important;
        height: 140px !important;
        object-fit: cover !important;
    }

    .product-card .product-info {
        padding: 8px 6px !important;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

    .product-card .product-name {
        font-size: 13px !important;
        line-height: 1.2 !important;
        margin-bottom: 5px !important;
        height: 26px !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        text-align: center !important;
    }

    .product-card .product-name a {
        font-size: 13px !important;
        color: #333 !important;
        text-decoration: none !important;
        display: block !important;
    }

    .product-price {
        margin: 5px 0 8px 0 !important;
        display: flex !important;
        flex-direction: column !important;
        /*align-items: flex-start !important;*/
        text-align: center!important;
    }

    .product-price .current-price {
        font-size: 13px !important;
        font-weight: bold !important;
        color: #d60404 !important;
        display: block !important;
        margin-bottom: 2px !important;

    }

    .product-price .old-price {
        font-size: 13px !important;
        text-decoration: line-through !important;
        color: #999 !important;
        display: block !important;
    }

    .product-actions {
        margin-top: auto !important;
    }

    .add-cart-btn {
        font-size: 13px !important;
        padding: 10px 14px !important;
        white-space: nowrap !important;
        width: 94% !important;
        border: none !important;
        background: #ff6b35 !important;
        color: white !important;
        border-radius: 10px !important;
        margin-left: 5px!important;
    }

    .add-cart-btn i {
        font-size: 15px !important;
        margin-right: 3px !important;
    }

    /* Product badge */
    .product-badge {
        position: absolute !important;
        top: 5px !important;
        left: 115px !important;
        background: #ff6b35 !important;
        color: white !important;
        padding: 3px 12px !important;
        font-size: 10px !important;
        border-radius: 10px !important;
        z-index: 2 !important;
    }
}

@media (max-width: 480px) {
    .product-item {
        width: 50% !important;
    }

    .product-card .product-image {
        height: 100%;
    }

    .product-card .product-name {
        font-size: 10px !important;
        height: 24px !important;
    }

    .product-card .product-name a {
        font-size: 10px !important;
    }

    .product-price .current-price {
        font-size: 12px !important;
    }

    .product-price .old-price {
        font-size: 9px !important;
    }

    .add-cart-btn {
        font-size: 8px !important;
        padding: 4px 5px !important;
    }
}

@media (max-width: 375px) {
    .product-card .product-image img {
        max-width: 23px ; 
        max-height: 25px ;
        object-fit: cover ;

    .product-card .product-name {
        font-size: 9px !important;
        height: 22px !important;
    }

    .product-card .product-name a {
        font-size: 9px !important;
    }

    .product-price .current-price {
        font-size: 11px !important;
    }

    .add-cart-btn {
        font-size: 7px !important;
        padding: 3px 4px !important;
    }
}