/* GSL Mega Menu — panneau de droite du dropdown Woodmart « aside ». */

.gsl-mm-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    align-items: start;
}

.gsl-mm-col {
    min-width: 0;
}

.gsl-mm-title {
    margin-bottom: 14px;
    color: var(--color-gray-800);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.3;
}

.gsl-mm-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.gsl-mm-links + .gsl-mm-links,
.gsl-mm-links + .gsl-mm-media,
.gsl-mm-links + .gsl-mm-text,
.gsl-mm-media + .gsl-mm-links,
.gsl-mm-media + .gsl-mm-media,
.gsl-mm-text + .gsl-mm-links,
.gsl-mm-text + .gsl-mm-media {
    margin-top: 16px;
}

.gsl-mm-links li {
    margin-bottom: 12px;
}

.gsl-mm-links li:last-child {
    margin-bottom: 0;
}

/* Le badge .menu-label du thème est positionné par rapport au lien. */
.gsl-mm-links a {
    position: relative;
    display: inline-block;
    color: var(--color-gray-500);
    font-size: 14px;
    line-height: 1.4;
    transition: color .25s ease;
}

.gsl-mm-links a:hover {
    color: var(--wd-primary-color);
}

.gsl-mm-text {
    color: var(--color-gray-500);
    font-size: 14px;
    line-height: 1.5;
}

.gsl-mm-text p {
    margin-bottom: 8px;
}

.gsl-mm-text p:last-child {
    margin-bottom: 0;
}

.gsl-mm-media a {
    display: block;
}

.gsl-mm-img,
.gsl-mm-video video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--wd-brd-radius);
}

/* Carrousel de produits */
.gsl-mm-carousel {
    position: relative;
}

.gsl-mm-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.gsl-mm-track::-webkit-scrollbar {
    display: none;
}

.gsl-mm-slide {
    display: block;
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: start;
    text-align: center;
    color: var(--color-gray-800);
}

.gsl-mm-slide-img {
    display: block;
    overflow: hidden;
    border-radius: var(--wd-brd-radius);
}

.gsl-mm-slide-img img {
    display: block;
    width: 100%;
    height: auto;
}

.gsl-mm-slide-title {
    display: block;
    margin-top: 10px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
}

.gsl-mm-slide-price {
    display: block;
    margin-top: 4px;
    color: var(--wd-primary-color);
    font-size: 14px;
}

.gsl-mm-slide:hover .gsl-mm-slide-title {
    color: var(--wd-primary-color);
}

/* Flèches : sélecteurs renforcés pour passer devant le style global des boutons du thème. */
.gsl-mm-carousel .gsl-mm-nav {
    position: absolute !important;
    top: calc(50% - 30px);
    z-index: 2;
    display: block;
    width: 34px !important;
    height: 34px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: -17px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, .92) !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .3) !important;
    font-size: 0 !important;
    line-height: 0 !important;
    cursor: pointer;
    transition: background-color .25s ease, transform .25s ease;
}

.gsl-mm-carousel .gsl-mm-nav:hover {
    background: #fff !important;
    transform: scale(1.08);
}

.gsl-mm-carousel .gsl-mm-nav::before {
    content: none !important;
}

.gsl-mm-carousel .gsl-mm-nav::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border: solid var(--color-gray-800, #333);
    border-width: 2px 2px 0 0;
}

.gsl-mm-carousel .gsl-mm-prev {
    left: 10px !important;
    right: auto !important;
}

.gsl-mm-carousel .gsl-mm-prev::after {
    transform: translate(-30%, -50%) rotate(-135deg);
}

.gsl-mm-carousel .gsl-mm-next {
    right: 10px !important;
    left: auto !important;
}

.gsl-mm-carousel .gsl-mm-next::after {
    transform: translate(-70%, -50%) rotate(45deg);
}

.gsl-mm-ratio {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--wd-brd-radius);
    background: #000;
}

.gsl-mm-ratio iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ------------------------------------------------------------------ */
/* Dropdown « aside » : le contenu ne dépasse jamais la hauteur de      */
/* .wd-sub-menu-wrapp (le panneau est calé dessus, sans défilement).    */
/* Les images, vidéos et carrousels se partagent la hauteur restante.   */
/* ------------------------------------------------------------------ */

.wd-design-aside .wd-sub-menu-wrapp .wd-dropdown:has(.gsl-mm-grid) {
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
}

/* Conteneur intermédiaire du Bloc HTML (mode Bloc HTML) */
.wd-design-aside .wd-sub-menu-wrapp .wd-dropdown:has(.gsl-mm-grid) > .container {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.wd-design-aside .gsl-mm-grid {
    flex: 1 1 auto;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    min-height: 0;
    height: 100%;
}

.wd-design-aside .gsl-mm-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}

/* Blocs « média » : occupent la hauteur disponible et recadrent l'image (cover). */
.wd-design-aside .gsl-mm-col > .gsl-mm-media,
.wd-design-aside .gsl-mm-col > .gsl-mm-carousel {
    flex: 1 1 0;
    min-height: 80px;
}

.wd-design-aside .gsl-mm-media > a {
    height: 100%;
}

.wd-design-aside .gsl-mm-media .gsl-mm-img {
    height: 100% !important;
    object-fit: cover;
}

.wd-design-aside .gsl-mm-media.gsl-mm-ratio {
    aspect-ratio: auto;
}

.wd-design-aside .gsl-mm-media.gsl-mm-video video {
    height: 100%;
    object-fit: cover;
}

/* Carrousel : l'image prend la hauteur restante, le titre et le prix restent visibles. */
.wd-design-aside .gsl-mm-carousel .gsl-mm-track {
    height: 100%;
}

.wd-design-aside .gsl-mm-carousel .gsl-mm-slide {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.wd-design-aside .gsl-mm-carousel .gsl-mm-slide-img {
    flex: 1 1 0;
    min-height: 0;
}

.wd-design-aside .gsl-mm-carousel .gsl-mm-slide-img img {
    height: 100%;
    object-fit: cover;
}

.wd-design-aside .gsl-mm-carousel .gsl-mm-slide-title,
.wd-design-aside .gsl-mm-carousel .gsl-mm-slide-price {
    flex: none;
}

/* Les flèches se centrent maintenant sur l'image : plus besoin du décalage du titre. */
.wd-design-aside .gsl-mm-carousel .gsl-mm-nav {
    top: calc(50% - 25px);
}
