﻿
.products-container-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px; 
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}


.product-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 25px rgba(0,0,0,0.15);
    }
.product-link-12,
.product-link-12:visited,
.product-link-12:hover,
.product-link-12:active,
.product-link-12:focus {
    text-decoration: none !important;
    color: inherit !important;
    outline: none !important;
    box-shadow: none !important;
}
.product-link-12 {
    display: block;
    cursor: pointer;
}
.product-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    overflow: hidden;
}

    .product-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain; 
        display: block;
    }


.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 15px;
}

.product-title {
    font-size: 1rem;
    font-weight: bold;
    line-height: 1.3em;
    max-height: 2.6em;
    min-height: calc(1.4em * 2); 
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 10px;
    text-align: center;
}

.product-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.price-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: 0 auto;
}

.old-price {
    font-size: 0.95rem;
    color: #999;
    text-decoration: line-through;
   
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff3b3b;
 
}


.toast-msg {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #dc3545;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    display: none;
    z-index: 9999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.quantity-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1px 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    font-family: sans-serif;   
}

.qty-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: #0dcaf0;
    color: white;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

    .qty-btn:hover {
        background: #0bb6d9;
    }

.qty-number {
    min-width: 40px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin: 0 10px;
}
.discount-badge {
    background: #ff3b3b;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 6px;
    width: fit-content;
}
.Has-Not-Stock {
    padding: 6px 12px;
    background-color: black;
    color: #fff;
    border: none;
    border-radius: 8px;    
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin: 0 auto;
}
.add-to-cart {
    padding: 6px 12px;
    background-color: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin: 0 auto;
}
.Icons-Basket-12 span {
    color: #fff;
    border-radius: 25px;
    font-size: 12px;
    position: absolute;
    width: 20px;
    height: 20px;
    text-align: center;
    padding: 1px;
    background-color: red;
    animation: pulse 2s infinite;
    line-height: 20px;
    bottom: 40px;
    right: 40px;
}
    .add-to-cart:hover {
        background-color: #ff4c4c;
    }
@media (max-width: 576px) {

    .product-image {
        height: 140px; 
    }

        .product-image img {
            max-width: 100%;
            max-height: 100%;
        }
}


@media (max-width: 768px) {
    .products-container-2 {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .product-title {
        font-size: 0.95rem;
    }

    .product-price {
        font-size: 1rem;
        
    }

    .add-to-cart {
        padding: 5px 10px;
        font-size: 0.9rem;
    }
    .Has-Not-Stock {
        padding: 5px 10px;
        font-size: 0.9rem;
    }
    .quantity-box {
        padding: 1px 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .products-container-2 {
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px;
        padding: 10px;
    }
    .product-info{
        padding:5px 0 0 0;
    }
    .product-card {
        padding: 8px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    .product-image {
        height: 100px;
    }
    .product-title {
        font-size: 0.75rem; 
        line-height: 1.5em;
        max-height: 2.2em;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .product-price {
        font-size: 1rem;
       
    }

    .old-price {
        font-size: 0.75rem;
       
    }

    .discount-badge {
        font-size: 0.55rem;
        padding: 1px 3px;
    }

    .add-to-cart {
        font-size: 0.75rem;
        padding: 6px 6px;
        width: 100%;
        text-align: center;
    }
    .Has-Not-Stock {
        font-size: 0.75rem;
        padding: 6px 6px;
        width: 100%;
        text-align: center;
    }
    .quantity-box {
        font-size: 0.75rem;
        padding: 0px 0px;
        width: 100%;
        text-align: center;
    }
    .product-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }  
    
}


