body.menu-open {
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
}

.flyout-menu {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--theme-color-background);
    z-index: 99999;
    transition: transform 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    overscroll-behavior: contain;
    font-family: var(--theme-font-family, "DM Sans") !important;
}

@media (max-width: 768px) {
    .flyout-menu {
        width: 100vw;
    }
}

.flyout-menu.active {
    transform: translateX(0);
}
.flyout-menu .logo-close-container{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 20px;
    border-bottom: 1px solid var(--theme-color-accent);
    cursor: pointer;
    position: relative;
}


.flyout-menu .live-search-container {
    /* Fills whatever the fixed-width close button leaves. min-width:0 stops the
       input's intrinsic width from forcing the flex item wider than its share. */
    flex: 1 1 auto;
    min-width: 0;
}


.flyout-menu .live-search-list .related-result{
   display: none;
}
/* first 3 results */
.flyout-menu .live-search-list .related-result:nth-child(-n+3){
    display: flex;
}
.flyout-menu .logo-close-container img{
    max-width: 150px;
}

/* Close button styling
   Sits in the normal flex flow and fills whatever width the search bar leaves,
   so the whole area is tappable. JS toggles display between none and flex. */
#flyoutMenuClose {
    display: none;
    flex: 0 0 auto;
    align-self: stretch;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--theme-color-text);
    z-index: 9999999999;
}

#flyoutMenuClose svg {
    width: 18px;
    height: 18px;
}

/* close.svg is a stroked icon with a hardcoded blue, so recolour it here */
#flyoutMenuClose svg path {
    stroke: currentColor;
}

/* Simple styling for the toggle button */
#flyoutMenuToggle {
       z-index: 1001;
    cursor: pointer;
    border: none;
padding:0px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: relative;
  
    column-gap: 8px;
		color: var(--theme-color-text);

	font-size:  16px;
	font-style: normal;
	font-weight: 600;
	line-height: 120%; /* 19.2px */
}
#flyoutMenuToggle svg{
	width: 24px;
}
#flyoutMenuToggle img{
	width: 100%;
}
#flyoutMenuToggle svg path{
    fill:var(--theme-color-text);
}
#flyoutMenuToggle:hover, #flyoutMenuToggle:focus, #flyoutMenuToggle:active {
    background-color: transparent; /* Optional: change on hover */
}

/* Page 1 */
.flyout-menu .page_1 {
    width: 100%;
    height: calc(100vh - 8vh);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow-y: auto;
    max-height: calc(100vh - 8vh);
    overscroll-behavior: contain;
    padding: 24px 20px;
    gap: 32px;
    padding-right: 0;
}
/* Service Pages parent container */
.flyout-menu .service-pages{
    display: flex;
    flex-direction: column;
    width: 100%;
}

.flyout-menu .mobile-menu-section{
    width: 100%;
}



/*  Mobile Menu Pages parent container */
.flyout-menu .mobile-menu-pages{
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    margin-bottom: 50px;
}

/* Menu Item */
.flyout-menu .menu-item{
    display: flex;
    flex-direction: column;
    width: 100%;
}

.flyout-menu .menu-item.active .menu-item-label {
    /* background-color: var(--e-global-color-secondary); */
}
/* Menu Item Label */
.flyout-menu .menu-item-label{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    padding-left: 0px;
    border-bottom: 1px solid var(--theme-color-accent);
    cursor: pointer;
	color: var(--theme-color-text);
    font-size: 16px;
    font-weight: 500;
    line-height: 130%; /* 20.8px */
    text-transform: uppercase;
}

.flyout-menu .menu-item-label svg,
.flyout-menu .menu-item-label img{
    max-width: 9px;
}
/* Submenu */
.flyout-menu .submenu{
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0 20px 0 0px;
    max-height: 0;
    overflow: hidden !important;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    padding-right: 0;
}

/* Open submenu when parent has active class */
.flyout-menu .menu-item.active .submenu{
    max-height: 800px;
    overflow: visible;
    opacity: 1;
}
.flyout-menu .submenu.alt{
    padding: 0 20px 0 20px;
}

/* Swiper Carousel for Submenu */
.flyout-menu .submenu-swiper {
    width: 100%;
    overflow: visible;
    padding: 12px 0;
}

.flyout-menu .submenu-swiper .swiper-wrapper {
    display: flex;
}

.flyout-menu .submenu-swiper .swiper-slide {
    width: auto;
    flex-shrink: 0;
}
.flyout-menu .page_2 .submenu{
    padding: 0 20px 0 40px;
}
.flyout-menu .section-header{
    color: var(--Colour-Text-Accent, #6D6D6D);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 130%; /* 15.6px */
    text-transform: uppercase;
}

/* Submenu Item */
.flyout-menu .page_1 .submenu-item{
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}
/* links */
.flyout-menu .page_1 .submenu-item a{
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    color: var(--theme-color-text);

    /* H6 */
    font-weight: var(--theme-font-weight-h6, 600);
    font-size: var(--theme-font-size-h6, 16px);
    line-height: var(--theme-line-height-h6, 120%);
    text-transform: uppercase;
    text-align: center;
    gap: 4px;
}
/* Page 1 Cards */
.flyout-menu .page_1 .card {
    width: 100%;
    height: 100%;
    min-height: 63px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--theme-color-accent);
    column-gap: 8px;
    cursor: pointer;
}

.flyout-menu .page_1 .card span{
    flex: 1;
    justify-content: center;
    align-items: center;
    display: flex;
}

/* Card Label */
.flyout-menu .card-label{
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}
.flyout-menu .card-label span{
    display: flex;
    color: var(--e-global-color-text, black);
    align-items: center;
    column-gap: 16px;

    /* H6 */
    font-weight: var(--theme-font-weight-h6, 600);
    font-size: var(--theme-font-size-h6, 16px);
    line-height: var(--theme-line-height-h6, 120%);
    text-transform: uppercase;
}
.flyout-menu .page_2 .card-label{
    justify-content: flex-start;
    column-gap: 8px;
    padding: 12px 20px 12px 20px;
    /* margin-left: 20px; */
    /* background-color: var(--e-global-color-secondary); */
    border-bottom: 1px solid #EFEEF3;
}
.flyout-menu .page_1 .service-pages .card:not(.alt) .card-label > img{
    transform: rotate(45deg);
}

/* Icon */
.flyout-menu .icon{
    border: none;
    border-radius: 8px;
    background: var(--e-global-color-accent);
    /* aspect-ratio on a replaced element only resolves reliably when one
       dimension is fixed. Chrome infers it from the intrinsic size, Safari does
       not - which is why real iPads showed the images at their natural ratio
       while Chrome's device emulation looked correct. Pinning the width makes
       the height computed rather than inferred, and object-fit stops the image
       stretching to fill the square. */
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* Page 2 */
.flyout-menu .page_2 {
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    /* padding: 0 20px; */
    overflow-y: scroll;
    padding-bottom: 60px;
}

/* Active menu item styling */
.flyout-menu .menu-item.active .menu-item-label {
    color: var(--e-global-color-primary);
}

/* Rotate arrow for active items */
.flyout-menu .menu-item.active .menu-item-label img {
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}

.flyout-menu .menu-item-label img {
    transition: transform 0.3s ease;
}

/* Accordion arrow: points down when closed, up when open.
   less_than.svg is a left-pointing chevron, so -90deg reads as down and 90deg as up.
   :not(a) keeps the plain link rows (which use arrow-right-white) unrotated. */
.flyout-menu .menu-item-label:not(a) svg {
    transform: rotate(-90deg);
    transition: transform 0.3s ease;
}

.flyout-menu .menu-item.active .menu-item-label:not(a) svg {
    transform: rotate(90deg);
}

.flyout-menu .mobile-menu-section:first-of-type .menu-item.active .menu-item-label svg path {
    fill: var(--e-global-color-primary);
}

/* Back button for page_2 navigation */
.back-to-menu {
    display: flex;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    color: var(--e-global-color-primary, blue);
    width: 100%;

    /* H6 */
    font-weight: var(--theme-font-weight-h6, 600);
    font-size: var(--theme-font-size-h6, 16px);
    line-height: var(--theme-line-height-h6, 120%);
    font-family: var(--theme-font-family, "DM Sans");
}

.back-to-menu img {
    transform: rotate(90deg);
    margin-right: 10px;
}

/* Page 2 specific styling */
.flyout-menu .page_2 .card {
    width: 100%;
    /* padding: 24px 0; */
    display: flex;
    flex-direction: column;
    /* row-gap: 20px; */
}

.flyout-menu .page_2 .card-label a{
    display: flex;
    align-items: center;
	justify-content: space-between;
    column-gap: 20px;
    width: 100%;
    color: var(--e-global-color-text);

    /* H6 */
    font-weight: var(--theme-font-weight-h6, 600);
    font-size: var(--theme-font-size-h6, 16px);
    line-height: var(--theme-line-height-h6, 120%);
}

.flyout-menu .page_2 .submenu-item {
    padding: 0;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #EFEEF3;
}
.flyout-menu .page_2 .submenu-item:first-child{
    /* border-top: 2px solid #EFEEF3; */
}
.flyout-menu .page_2 .submenu-item a {
    color: #fff;
    text-decoration: none;
    display: flex;
    column-gap: 16px;
    justify-content: flex-start;
    align-items: center;
    /* border-bottom: 1px solid #EFEEF3; */
    padding: 12px 0;
}
.flyout-menu .page_2 .submenu-item a span{
    display: flex;
    flex-direction: column;
    width: 100%;
    justify-content: flex-start;
    align-items: flex-start;

    /* H6 */
    font-weight: var(--theme-font-weight-h6, 600);
    font-size: var(--theme-font-size-h6, 16px);
    line-height: var(--theme-line-height-h6, 120%);
    font-family: var(--theme-font-family, "DM Sans");
}

.flyout-menu .page_2 .submenu-item a span p{
    color: #919191;
    font-family: var(--theme-font-family, "DM Sans");
    font-size: var(--theme-font-size-body-sm, 14px);
    font-style: var(--theme-font-style-body-sm, normal);
    font-weight: var(--theme-font-weight-body-sm, 500);
    line-height: var(--theme-line-height-body-sm, 140%);
}

/* Login Button */
.flyout-menu .login-button{
    width: 100%;
    padding: 16px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex: 1 0 0;
    background: var(--e-global-color-primary, #BFA743);

    color: var(--Background, #FFF);
    font-size: var(--theme-font-size-button-text, 16px);
    font-weight: var(--theme-font-weight-button-text, 600);
    line-height: var(--theme-line-height-button-text, 120%);
    border-radius: 999px;
}
/* Login Button */
.flyout-menu .get-in-touch-button{
    width: 100%;
    padding: 16px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex: 1 0 0;
    background: transparent;
    border:1px solid var(--e-global-color-primary, #BFA743);
    color: var(--Background, #FFF);
    font-size: var(--theme-font-size-button-text, 16px);
    font-weight: var(--theme-font-weight-button-text, 600);
    line-height: var(--theme-line-height-button-text, 120%);
    border-radius: 999px;
}
.flyout-menu .get-in-touch-button:hover{
    /* brightness */
    filter: brightness(0.7);
}

.flyout-menu .login-button-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 20px 144px 20px;
    flex-direction: column;
    row-gap: 12px;
}

/* Mobile VAT Toggle */
.flyout-menu .section-1a .right{
    display: flex;
    justify-content: flex-start;
    align-items: center;
    column-gap: 16px;
    padding: 24px 20px 0 20px;
    width: 100%;
}
.flyout-menu .section-1a .right p:first-of-type {
    color: var(--e-global-color-text, black);
}
.flyout-menu .section-1a .right p {
    color: var(--e-global-color-text, black);
}
.flyout-menu .section-1a .switch {
    color: var(--e-global-color-primary, black);
}
.flyout-menu .section-1a .switch .slider:before {
    background-color: var(--e-global-color-primary, black);
}
.flyout-menu .section-1a .switch .slider {
    border: 1px solid var(--e-global-color-primary, black);
}
.flyout-menu .section-1a .switch input:checked + .slider:before {
    background-color: var(--e-global-color-primary, black);
}
/* ---------------------------------------------------------------------------
   Swiper pre-init layout (stops the shop-by-category cards jumping)

   Swiper is loaded from a CDN and initialised on document.ready, so between
   first paint and init the markup is just a flex row of auto-width slides with
   `overflow: visible` - every card lays out at its natural size and spills out
   of the container, then snaps in when Swiper assigns widths and a transform.

   Below mirrors Swiper's computed layout for `slidesPerView: 2.7` /
   `spaceBetween: 10` while `.swiper-initialized` is absent, so the first paint
   already matches the initialised state and there is nothing to shift.
   Keep these values in sync with the Swiper config in index.php.
   --------------------------------------------------------------------------- */
.flyout-menu .submenu-swiper:not(.swiper-initialized) {
    overflow: hidden;
}

.flyout-menu .submenu-swiper:not(.swiper-initialized) .swiper-wrapper {
    display: flex;
    gap: 10px; /* spaceBetween */
}

.flyout-menu .submenu-swiper:not(.swiper-initialized) .swiper-slide {
    /* Swiper: (containerWidth - spaceBetween * (slidesPerView - 1)) / slidesPerView */
    width: calc((100% - 10px * 1.7) / 2.7);
    flex: 0 0 auto;
}

/* "Shop All <tag>" card - first slide in each tag accordion, links to the tag archive.
   Photo with the arrow overlaid bottom-left, label underneath, matching the sibling cards. */
.flyout-menu .page_1 .card.card-shop-all {
    justify-content: flex-start;
    row-gap: 8px;
}

