/**
* 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.
*/
#categorieshome h1{
    padding: 2rem 0;
    margin: 0;
}
#categorieshome .grid_items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    grid-column-gap: 20px;
    grid-row-gap: 20px;
}
    
#categorieshome .cat_item:nth-child(1) { grid-area: 1 / 1 / 3 / 3; }
#categorieshome .cat_item:nth-child(2) { grid-area: 1 / 3 / 2 / 4; }
#categorieshome .cat_item:nth-child(3) { grid-area: 2 / 3 / 3 / 4; }
#categorieshome .cat_item:nth-child(4) { grid-area: 1 / 4 / 2 / 5; }
#categorieshome .cat_item:nth-child(5) { grid-area: 2 / 4 / 3 / 5; }

#categorieshome img{
    width: 100%;
    height: auto;
    border-radius: 6px;
}
#categorieshome .cat_item:hover{
    transform: scale(1.02);
}
#categorieshome .cat_item{
    position: relative;
    cursor: pointer;
    padding: 10px;
    border-radius: 9px;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.101961);
    transition: 0.05s ease-in-out;
}
#categorieshome .cat_item .cat_info{
    position: absolute;
    top: 0;
    left: 50%;
    text-align: center;
    padding: 25px 10px;
    transform: translateX(-50%);
    width: 100%;
}
#categorieshome .cat_item .cat_info h2,
#categorieshome .cat_item .cat_info p{
    color: #fff;
}
#categorieshome .cat_item .cat_info .description{
    position: relative;
    overflow: hidden;
    height: 90px;    
}
#categorieshome .cat_item .cat_info p{
    position: absolute;
    opacity: 0;
    top: -100px;
    transition: 0.3s;
    max-width: 100%;
    padding: 0 15px;
}
#categorieshome .cat_item:hover .cat_info p{
    opacity: 1;
    top: 0;
}
@media(max-width:980px){
    #categorieshome .grid_items {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }
        
    #categorieshome .cat_item:nth-child(1) { grid-area: 1 / 1 / 3 / 3; }
    #categorieshome .cat_item:nth-child(2) { grid-area: 3 / 1 / 4 / 2; }
    #categorieshome .cat_item:nth-child(3) { grid-area: 3 / 2 / 4 / 3; }
    #categorieshome .cat_item:nth-child(4) { grid-area: 4 / 1 / 5 / 2; }
    #categorieshome .cat_item:nth-child(5) { grid-area: 4 / 2 / 5 / 3; }

}