/* ==========================================================================
   Mega-menu
   ========================================================================== */

.megamenu-overlay {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(var(--light-pink-rgb), 0.9);
    z-index: 99;
    visibility: hidden;
    pointer-events: none;
}

.megamenu-overlay.is-open {
    visibility: visible;
    pointer-events: auto;
    cursor: none;
}

.megamenu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    z-index: 100;
    transform: translateY(-100%);
    will-change: transform;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    border-bottom: 4px solid white;
}

.megamenu.is-open {
    transform: translateY(var(--megamenu-top, 0px));
}

.megamenu-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--brown);
    padding: 0;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    z-index: 1;
}

.megamenu-close:hover {
    background-color: var(--cream-dark);
}

.megamenu-close svg {
    width: 20px;
    height: 20px;
}

.megamenu-inner {
    padding: 0 4px;
}

.megamenu-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.megamenu-product {
    display: block;
}

.megamenu-product-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.megamenu-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.megamenu-product:hover .megamenu-product-img img {
    transform: scale(1.05);
}

.megamenu-product-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.megamenu-product-name {
    font-size: 6rem;
    font-weight: 700;
    text-align: center;
    padding: 0 6rem;
    text-transform: uppercase;
}

/* Item "Tout voir" */
.megamenu-all {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background-color: var(--light-pink);
    text-decoration: none;
    transition: background-color 0.3s ease;
    animation: name-summer 2.5s ease-in-out infinite;
}

.megamenu-all:hover {
    background-color: var(--light-pink-darker);
}

.megamenu-all-label {
    font-size: 6rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0 2rem;
}

.megamenu-all-arrow {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.megamenu-all-arrow svg {
    width: 50px;
    height: 50px;
}

.megamenu-all:hover .megamenu-all-arrow {
    transform: translateX(8px);
}

