/* Adjust grid for mobile */
@media screen and (max-width: 767px) {
    .col-lg-3.col-md-4.col-sm-12 {
        width: 50%;
        padding: 0 8px;
        float: left;
    }

    .product__item {
        margin-bottom: 20px;
    }

    /* Adjust product image container */
    .product__item__pic {
        position: relative;
        padding-top: 100%; /* Makes it square */
    }

    .product__item__pic img.default-img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Show product hover items by default on mobile */
    .product__hover {
        opacity: 1;
        position: absolute;
        right: 10px;
        top: 10px;
        transform: none;
        width: auto;
    }

    .product__hover li {
        width: auto;
        background: rgba(255, 255, 255, 0.8);
        border-radius: 50%;
        margin-bottom: 10px;
    }

    /* Adjust text content for mobile */
    .product__item__text {
        padding: 10px 5px;
        text-align: center;
    }

    .product__item__text h6 {
        font-size: 14px;
        margin-bottom: 8px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        height: 40px;
    }

    /* Style Add to Cart button for mobile */
    .product__item__text .add-cart {
        display: inline-block;
        padding: 6px 12px;
        background: #000;
        color: #fff;
        border-radius: 4px;
        margin: 8px 0;
        font-size: 12px;
        width: 90%;
        text-align: center;
    }

    /* Adjust price display */
    .product__item__text .h5 {
        font-size: 16px;
        margin: 5px 0;
    }

    .product__item__text .small {
        font-size: 12px;
    }

    .product__item__text .text-muted {
        font-size: 12px;
        margin: 0;
    }

    /* Badge styling */
    .badge-danger {
        font-size: 10px;
        padding: 3px 6px;
        margin-top: 5px;
        display: inline-block;
    }
}

/* Preserve desktop hover effects */
@media screen and (min-width: 768px) {
    .product__hover {
        opacity: 0;
        transition: all 0.5s;
    }

    .product__item:hover .product__hover {
        opacity: 1;
    }
}