/**
* 2007-2024 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    PrestaShop SA <contact@prestashop.com>
*  @copyright 2007-2024 PrestaShop SA
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*
* Don't forget to prefix your containers with your own identifier
* to avoid any conflicts with others containers.
*/
#productshome h1{
    padding: 2rem 0;
    margin: 0;
}

#index #productshome .grid_items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    grid-column-gap: 20px;
    grid-row-gap: 20px;
}
/* #productshome *{
    border: 1px solid #000;
}     */
#index #productshome .products:nth-child(1) { 
    grid-area: 1 / 1 / 3 / 3; 
    display: flex;
    flex-direction: column;
}
#index #productshome .products:nth-child(2) { grid-area: 1 / 3 / 2 / 4; }
#index #productshome .products:nth-child(3) { 
    grid-area: 2 / 3 / 3 / 4;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
#index #productshome .products:nth-child(4) { grid-area: 1 / 4 / 2 / 5; }
#index #productshome .products:nth-child(5) { 
    grid-area: 2 / 4 / 3 / 5;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
#productshome .products{
    cursor: pointer;
}

#productshome img{
    width: 100%;
    height: auto;
}


#productshome .typologie_1 .tag_typologie svg{
    fill: var(--background_stock);
}
#productshome .typologie_2 .tag_typologie svg{
    fill: var(--background_fournisseur);
}
#productshome .typologie_3 .tag_typologie svg{
    fill: var(--background_preco);
}
#productshome .typologie_1 .delai,
#productshome .typologie_1 .tag_typologie {
    color: var(--background_stock);
}
#productshome .typologie_2 .delai,
#productshome .typologie_2 .tag_typologie {
    color: var(--background_fournisseur);
}
#productshome .typologie_3 .delai,
#productshome .typologie_3 .tag_typologie {
    color: var(--background_preco);
}


#productshome .product_img{
    flex: 1;
    display: flex;
    position: relative;
    align-items: center;
    padding: 10px;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.101961);
    border-radius: 9px;
    transition: 0.05s ease-in-out;
}
#productshome .products:hover .product_img{
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0);
}
#productshome .products {
    border-radius: 9px;
    transition: 0.05s ease-in-out;
}
#productshome .products:hover {
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.101961);
}

#productshome .product_img img{
    border-radius: 6px;
}
#productshome .tag_typologie svg{
    display: flex;
    width: 20px;
    min-width: 20px;
    margin-right: 10px;
    transition: 0.1s ease-in-out;
}
#productshome .products:hover .tag_typologie svg{
    display: flex;
    width: 12px;
    min-width: 12px;
    margin-right: 0px;
}
#productshome .products:hover .product_img .tag_typologie{
    max-width: 195px;
    transition: 0.3s ease-in-out 0.1s;
}
#productshome .product_img .tag_typologie{
    position: absolute;
    display: flex;
    bottom: 5px;
    left: 15px;
    align-items: center;
    padding: 3px 5px;
    gap: 5px;
    font-size: 16px;
    background-color: #fff;
    border-radius: 3px;
    transform: translate(0,-50%);
    font-weight: 300;
    overflow: hidden;
    max-width: 30px;
    white-space: nowrap;
    text-overflow: hidden;
}
#productshome .product_info{
    padding:  20px 10px 10px 10px;
    transition: 0.05s ease-in-out;
    width: 100%;
}
#productshome .products:hover{
   transform: scale(1.02);
}
#productshome .product_info .product_price,
#productshome .product_info .product_reference,
#productshome .product_info .delai{
    font-weight: 300;
    font-size: 12px;
}
#productshome .product_info .delai span{
    font-weight: 600;
    font-size: 14px;
}
#productshome .product_info h2{
    font-size: 21px;
    margin: 5px 0;
    min-height: 47px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.1;
}
#productshome .product_info .product_price{
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    gap: 10px;
}
#productshome .product_info .product_price .price .original_price{
    text-decoration: line-through;
}
#productshome .product_info .product_price .price .product_price_value{
    font-size: 21px;
    font-weight: 700;
    white-space: nowrap;
}
#productshome .product_info .product_price .price{
    color: var(--primary);
    text-align: end;
}   
.nowrap{
    white-space: nowrap !important;
}

@media (max-width:980px){

    #productshome .grid_items {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }
    
    #productshome .products {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }
    #productshome .products:nth-child(1) { grid-area: 1 / 1 / 3 / 3; }
    #productshome .products:nth-child(2) { grid-area: 3 / 1 / 4 / 2; }
    #productshome .products:nth-child(3) { grid-area: 3 / 2 / 4 / 3; }
    #productshome .products:nth-child(4) { grid-area: 4 / 1 / 5 / 2; }
    #productshome .products:nth-child(5) { grid-area: 4 / 2 / 5 / 3; }
    #index #productshome .grid_items{
        display: flex !important;
        flex-direction: column;
    }

}
