/*
 Theme Name:   Hello Elementor Child
 Theme URI:    https://exemple.com
 Description:  Thème enfant de Hello Elementor
 Author:       Ton Nom
 Author URI:   https://exemple.com
 Template:     hello-elementor
 Version:      1.0.0
*/

/* Ici tu pourras ajouter tes styles personnalisés */
/* Cible chaque carte produit */
.woocommerce ul.products li.product {
    position: relative;
}

/* 2ᵉ image */
.wc-second-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 2;
}

/* Hover */
.woocommerce ul.products li.product:hover .wc-second-image {
    opacity: 1;
}




/* Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: #fff;
    transform: translateY(-100%);
    transition: transform 0.35s ease;
    z-index: 9999;
    border-bottom: 1px solid #eee;
}

/* Actif */
.search-overlay.active {
    transform: translateY(0);
}

/* Form */
.search-form {
    max-width: 100%;
    margin: 40px auto;
    padding: 0 20px;
}

.search-field {
    width: 100%;
    font-size: 24px;
    border: none;
    outline: none;
}

/* Boutons */
.search-toggle,
.search-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

.search-close {
    position: absolute;
    right: 25px;
    top: 45px;

    height: 43px;
    width: 45px;

    display: flex;
    align-items: center;
    justify-content: center;
}



/* Chrome / Edge / Safari */
input[type="search"]::-webkit-search-cancel-button {
    display: none;
    -webkit-appearance: none;
}

/* Firefox */
input[type="search"] {
    appearance: textfield;
}





/* Conteneur résultats */

.search-results {
    text-align: center;
    background: #ffffff;
}

.search-results .ajax-products {
    padding: 0 20px;

    width: 100%;
    background: #ffffff;
    max-width: none !important;
    margin-top: -13px !important;

    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.25rem;
    padding-bottom: 30px;
}

@media (max-width: 1024px) {
    .search-results .ajax-products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .search-results .ajax-products {
        grid-template-columns: repeat(2, 1fr);
    }
}

.search-results .ajax-products {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

/* Carte */
.search-results .ajax-product a {
    text-decoration: none;
    color: inherit;
}

/* Wrapper image avec ratio */
.search-results .ajax-img {
    width: 100%;
    aspect-ratio: 3 / 4; /* 🔥 LE RATIO MODE */
    overflow: hidden;
}

/* Image plein cadre */
.search-results .ajax-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Texte */
.search-results .ajax-meta {
    text-align: center;
    margin-top: 12px;
}

.search-results h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.search-results span#search-results-count {
    font-size: 14px;
    color: #777;
}


.btn-all-results{
    margin: 10px auto;
    background: #000000;
    color: #ffffff;
    font-size: 14px;
    border: 1px solid #000000;
    padding: 15px 30px;
    border-radius: 30px;

    margin-bottom: 30px;

    display: inline-block;
}

.btn-all-results:hover{
    background: #ffffff;
    color: #000000;
}



