.container-products {
    align-items: flex-start;
    flex: 1;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    width: 100%;
}

.container-products-card {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 60%;
    gap: 30px;
    justify-content: center;
    align-items: center;
}

.products-card, .products-card-nohover {
    position: relative;
    background-color: #fff;
    border: 2px solid #2e8b3658; 
    border-radius: 8px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    padding:5px;
    padding-top:15px;
}

.products-card:hover {
    transform: scale(1.005);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.product-description {
    margin-top: 0px;
}

.overlay-attiva {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    background: rgba(93, 93, 93, 0.4); 
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 10px;
}

.product-image-container {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-info-container {
    display: flex;
    flex-direction: column;
    width: auto;
    /*background-color: rgba(255, 0, 0, 0.379);*/
}

.product-image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; 
    border: 1px solid #c9c9c9f1; 
}

.product-title {
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
    color: #333;
}

.product-info-container p {
    font-size: 14px;
    color: #999;
    margin: 10px 0;
    text-align: justify;
    hyphens: auto; 
}

.button-group-products  {
    display: flex;
    gap: 20px; 
    margin: 0px 20px 10px 20px;
}

.hide-button-products, .show-button-products, .delete-button-products {
    padding: 5px 10px;
    cursor: pointer;
    color: white;
    border: none;
    border-radius: 3px;
    flex: 1; 
    text-align: center;
    font-size:12px;
    transition: transform 0.1s ease-in-out;
    z-index: 2;
}

.delete-button-products {
    background-color: #f44336;
}

.hide-button-products, .show-button-products {
    background-color: #8c8c8c; 
}

.delete-button-products:hover, .hide-button-products:hover, .show-button-products:hover {
    transform: scale(1.02);
}

.confirmation-overlay-product {
    width: 100%;
    height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 14px;
    z-index: 2;
}

.confirmation-buttons-product {
    width: 100%;
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.confirm-yes-product,
.confirm-no-product {
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background-color: #0000000f;
    padding: 6px 10px;
    font-size: 12px;
    min-width: 80px;
    z-index: 2;
}

.container-new-product {
    display: flex;
    max-width:100%;
    margin: 20px;
    justify-content: center;
    align-items: center;
}

.add-product-button {
    font-size: 18px; 
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 6px; 
    text-align: center;
    background-color: #eeeded76; 
    border: 1px solid rgba(0, 0, 0, 0.182); 
    color: rgb(37, 37, 37);
    margin:0;
}

@media (max-width: 1024px) and (min-width: 769px) {
    .container-products-card {
        width: 70%;
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) and (min-width: 481px) {
    .container-products-card {
        width: 75%;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .container-products-card {
        width: 70%;
        grid-template-columns: 1fr;
        gap: 15px;
    }
}