/*
 * Pilot Mega Menu colour contract.
 * Pilot Storefront Editor publishes these --pilot-mega-* variables per store view.
 * Fallbacks preserve the standalone module appearance when the editor is disabled.
 */
/* Tammex Pilot Mega Menu — five-section visual layout */
.pilot-mega-menu__grid--visual-builder {
    align-content: start;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 205px;
}

.pilot-mega-menu__grid--visual-builder .pilot-mega-menu__group {
    border-right: 1px solid var(--pilot-mega-divider, #EEE8DF);
    box-sizing: border-box;
    min-width: 0;
    padding: 0 26px;
}

.pilot-mega-menu__grid--visual-builder .pilot-mega-menu__group:first-child {
    padding-left: 0;
}

.pilot-mega-menu__grid--visual-builder .pilot-mega-menu__group:last-child {
    border-right: 0;
    padding-right: 0;
}

.pilot-mega-menu__grid--visual-builder .pilot-mega-menu__group--empty {
    min-height: 205px;
}

.pilot-mega-menu__nested--flat > .pilot-mega-menu__nested-item {
    margin-bottom: 10px;
}

.pilot-mega-menu__nested--flat > .pilot-mega-menu__nested-item > a {
    color: var(--pilot-mega-link, #10212B) !important;
    font-size: 13px;
    font-weight: 600;
}

.pilot-mega-menu__group-view-all {
    align-items: center;
    color: var(--pilot-mega-link, #10212B) !important;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 7px;
    margin-top: 11px;
    text-decoration: none !important;
}

.pilot-mega-menu__group-view-all:hover,
.pilot-mega-menu__group-view-all:focus {
    text-decoration: underline !important;
}

.pilot-mega-menu__landing {
    display: grid;
    gap: 20px;
}

.pilot-mega-menu__landing-top {
    background: var(--pilot-mega-sidebar-background, #FAF8F5);
    border: 1px solid var(--pilot-mega-divider, #E4DDD4);
    border-radius: 5px;
    box-sizing: border-box;
    display: grid;
    min-height: 210px;
    overflow: hidden;
}

.pilot-mega-menu__landing-top.has-image {
    grid-template-columns: minmax(260px, .72fr) minmax(360px, 1.28fr);
}

.pilot-mega-menu__landing-intro {
    align-content: center;
    display: grid;
    padding: 26px 30px;
}

.pilot-mega-menu__landing-label {
    color: var(--pilot-mega-link, #7A746D);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.pilot-mega-menu__landing-intro h3 {
    color: var(--pilot-mega-heading, #10212B);
    font-family: var(--pilot-font, Arial, sans-serif);
    font-size: 25px;
    font-weight: 800;
    line-height: 1.08;
    margin: 0 0 11px;
}

.pilot-mega-menu__landing-intro p {
    color: var(--pilot-mega-link, #586269);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
    margin: 0 0 18px;
    max-width: 420px;
}

.pilot-mega-menu__landing-cta {
    align-items: center;
    background: var(--pilot-mega-button-background, #071C28);
    border: 1px solid var(--pilot-mega-button-background, #071C28);
    border-radius: 4px;
    color: var(--pilot-mega-button-text, #FFFFFF) !important;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 9px;
    justify-content: center;
    min-height: 38px;
    padding: 0 17px;
    text-decoration: none !important;
    width: fit-content;
}

.pilot-mega-menu__landing-cta:hover,
.pilot-mega-menu__landing-cta:focus {
    background: var(--pilot-mega-hover, #12313F);
    border-color: var(--pilot-mega-hover, #12313F);
}

.pilot-mega-menu__landing-hero {
    background: var(--pilot-mega-sidebar-background, #F1EDE7);
    color: var(--pilot-mega-text, #10212B) !important;
    display: block;
    min-height: 210px;
    overflow: hidden;
    position: relative;
    text-decoration: none !important;
}

.pilot-mega-menu__landing-hero::after {
    background: linear-gradient(90deg, rgba(15, 28, 37, .12), transparent 45%);
    content: '';
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.pilot-mega-menu__landing-hero img {
    height: 100%;
    inset: 0;
    object-fit: cover;
    object-position: center;
    position: absolute;
    width: 100%;
}

.pilot-mega-menu__landing-hero > span {
    background: var(--pilot-mega-background, #FFFFFF);
    border-radius: 3px;
    bottom: 18px;
    font-size: 11px;
    font-weight: 800;
    left: 18px;
    padding: 8px 11px;
    position: absolute;
    z-index: 2;
}

.pilot-mega-menu__products-section {
    border-top: 1px solid var(--pilot-mega-divider, #E8E1D8);
    padding-top: 17px;
}

.pilot-mega-menu__products-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pilot-mega-menu__products-heading > span {
    color: var(--pilot-mega-link, #6F6962);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.pilot-mega-menu__products-heading a {
    color: var(--pilot-mega-link, #10212B) !important;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none !important;
}

.pilot-mega-menu__products-heading a:hover,
.pilot-mega-menu__products-heading a:focus {
    text-decoration: underline !important;
}

.pilot-mega-menu__products {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pilot-mega-menu__product {
    align-items: center;
    background: var(--pilot-mega-background, #FFFFFF);
    border: 1px solid var(--pilot-mega-divider, #E3DDD5);
    border-radius: 4px;
    box-sizing: border-box;
    color: var(--pilot-mega-text, #10212B) !important;
    display: grid;
    gap: 12px;
    grid-template-columns: 70px minmax(0, 1fr);
    min-height: 94px;
    padding: 9px 12px 9px 9px;
    text-decoration: none !important;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.pilot-mega-menu__product:hover,
.pilot-mega-menu__product:focus {
    border-color: var(--pilot-mega-hover, #B9B0A5);
    box-shadow: 0 8px 18px rgba(16, 31, 39, .08);
    transform: translateY(-1px);
}

.pilot-mega-menu__product-image {
    align-items: center;
    background: var(--pilot-mega-sidebar-background, #F6F3EF);
    display: flex;
    height: 74px;
    justify-content: center;
    overflow: hidden;
    width: 70px;
}

.pilot-mega-menu__product-image img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.pilot-mega-menu__product-copy {
    display: grid;
    min-width: 0;
}

.pilot-mega-menu__product-copy strong {
    color: var(--pilot-mega-heading, #10212B);
    display: -webkit-box;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 7px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.pilot-mega-menu__product-copy b {
    color: var(--pilot-mega-heading, #10212B);
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 1180px) and (min-width: 768px) {
    .pilot-mega-menu__grid--visual-builder {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 24px;
    }

    .pilot-mega-menu__grid--visual-builder .pilot-mega-menu__group:nth-child(2n) {
        border-right: 0;
        padding-right: 0;
    }

    .pilot-mega-menu__grid--visual-builder .pilot-mega-menu__group:nth-child(2n + 1) {
        padding-left: 0;
    }

    .pilot-mega-menu__products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) and (min-width: 768px) {
    .pilot-mega-menu__landing-top.has-image {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .pilot-mega-menu__grid--visual-builder,
    .pilot-mega-menu__landing-top.has-image {
        display: block;
    }

    .pilot-mega-menu__grid--visual-builder .pilot-mega-menu__group {
        border-bottom: 1px solid var(--pilot-mega-divider, #EEE8DF);
        border-right: 0;
        min-height: 0;
        padding: 0 0 18px;
    }

    .pilot-mega-menu__grid--visual-builder .pilot-mega-menu__group--empty {
        display: none;
    }

    .pilot-mega-menu__grid--visual-builder .pilot-mega-menu__group:last-child {
        border-bottom: 0;
    }

    .pilot-mega-menu__landing-hero {
        min-height: 180px;
    }

    .pilot-mega-menu__products {
        grid-template-columns: 1fr;
    }
}

/* Flexible content blocks selected in Pilot Mega Menu admin */

.pilot-mega-menu__featured-card {
    background: var(--pilot-mega-sidebar-background, #FAF8F5);
    border: 1px solid var(--pilot-mega-divider, #E4DDD4);
    border-radius: 4px;
    box-sizing: border-box;
    color: var(--pilot-mega-text, #10212B) !important;
    display: block;
    overflow: hidden;
    text-decoration: none !important;
}

.pilot-mega-menu__featured-card:hover,
.pilot-mega-menu__featured-card:focus {
    border-color: var(--pilot-mega-hover, #B9B0A5);
    box-shadow: 0 8px 18px rgba(16, 31, 39, .08);
}

.pilot-mega-menu__featured-image {
    align-items: center;
    background: var(--pilot-mega-sidebar-background, #F4F1ED);
    display: flex;
    height: 145px;
    justify-content: center;
    overflow: hidden;
}

.pilot-mega-menu__featured-image img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.pilot-mega-menu__featured-copy {
    display: grid;
    gap: 7px;
    padding: 14px;
}

.pilot-mega-menu__featured-copy strong {
    color: var(--pilot-mega-heading, #10212B);
    font-size: 14px;
    font-style: normal;
    font-weight: 800;
    line-height: 1.3;
}

.pilot-mega-menu__featured-copy b {
    color: var(--pilot-mega-heading, #10212B);
    font-size: 13px;
    font-weight: 800;
}

.pilot-mega-menu__featured-copy em {
    color: var(--pilot-mega-heading, #10212B);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    margin-top: 3px;
}

.pilot-mega-menu__text-card {
    background: var(--pilot-mega-sidebar-background, #FAF8F5);
    border: 1px solid var(--pilot-mega-divider, #E4DDD4);
    border-radius: 4px;
    box-sizing: border-box;
    padding: 18px;
}

.pilot-mega-menu__text-card strong {
    color: var(--pilot-mega-heading, #10212B);
    display: block;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 8px;
}

.pilot-mega-menu__text-card p {
    color: var(--pilot-mega-link, #59636A);
    font-size: 12px;
    line-height: 1.55;
    margin: 0 0 12px;
}

.pilot-mega-menu__text-card a {
    color: var(--pilot-mega-link, #10212B) !important;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none !important;
}

.pilot-mega-menu__text-card a:hover,
.pilot-mega-menu__text-card a:focus {
    text-decoration: underline !important;
}

@media (max-width: 767px) {
    .pilot-mega-menu__featured-card,
    .pilot-mega-menu__text-card {
        margin-bottom: 18px;
    }
}

/* Multi-section content columns saved by the visual builder */
.pilot-mega-menu__group--content_stack {
    align-content: start;
    display: grid;
    gap: 0;
}

.pilot-mega-menu__section {
    min-width: 0;
}

/* Sections without headings should read as one continuous list. */
.pilot-mega-menu__section + .pilot-mega-menu__section {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

/* Add separation only when the next section has its own visible heading. */
.pilot-mega-menu__section + .pilot-mega-menu__section:has(.pilot-mega-menu__group-title) {
    margin-top: 20px;
}

.pilot-mega-menu__section .pilot-mega-menu__group-title {
    color: var(--pilot-mega-heading, #10213A) !important;
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px;
    text-decoration: none !important;
}

.pilot-mega-menu__section .pilot-mega-menu__group-title:hover,
.pilot-mega-menu__section .pilot-mega-menu__group-title:focus {
    color: var(--pilot-mega-hover, #0B4DCC) !important;
    text-decoration: underline !important;
}

.pilot-mega-menu__section .pilot-mega-menu__group-title--static:hover,
.pilot-mega-menu__section .pilot-mega-menu__group-title--static:focus {
    color: var(--pilot-mega-heading, #10213A) !important;
    text-decoration: none !important;
}

.pilot-mega-menu__nested--flat > .pilot-mega-menu__nested-item {
    margin: 0 0 9px;
}

.pilot-mega-menu__nested--flat > .pilot-mega-menu__nested-item:last-child {
    margin-bottom: 0;
}

.pilot-mega-menu__nested--flat > .pilot-mega-menu__nested-item > a {
    color: var(--pilot-mega-link, #4F5D6B) !important;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    text-decoration: none !important;
}

.pilot-mega-menu__nested--flat > .pilot-mega-menu__nested-item > a:hover,
.pilot-mega-menu__nested--flat > .pilot-mega-menu__nested-item > a:focus {
    color: var(--pilot-mega-hover, #0B4DCC) !important;
    text-decoration: underline !important;
}

.pilot-mega-menu__group-view-all {
    color: var(--pilot-mega-link, #4F5D6B) !important;
    font-size: 12px;
    font-weight: 600;
    margin-top: 13px;
    display:none;
}

/* Featured product card — one authoritative desktop design. */
.pilot-mega-menu__section--featured_product {
    height: 100%;
}

body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card {
    background: var(--pilot-mega-background, #FFFFFF);
    border: 1px solid var(--pilot-mega-divider, #D9E2EF);
    border-radius: 5px;
    box-sizing: border-box;
    color: var(--pilot-mega-heading, #10213A) !important;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    min-height: 220px;
    overflow: hidden;
    padding: 23px 15px 18px 17px;
    position: relative;
    text-decoration: none !important;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card::before,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card::before {
    background: var(--pilot-mega-button-background, #0B4DCC);
    content: '';
    height: 3px;
    left: -1px;
    position: absolute;
    right: -1px;
    top: -1px;
}

body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card:hover,
body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card:focus,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card:hover,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card:focus {
    border-color: var(--pilot-mega-hover, #B9C9DF);
    box-shadow: 0 8px 20px rgba(21, 54, 96, .10);
    text-decoration: none !important;
    transform: translateY(-1px);
}

body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-copy,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-copy {
    align-content: start;
    display: grid;
    gap: 0;
    min-width: 0;
    padding: 0;
    position: relative;
    z-index: 2;
}

.pilot-mega-menu__featured-heading,
.pilot-mega-menu__featured-copy strong {
    color: var(--pilot-mega-heading, #10213A);
    display: block;
    font-size: 21px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.08;
    margin: 0 0 10px;
    max-width: 145px;
    overflow-wrap: normal;
}

.pilot-mega-menu__featured-description {
    color: var(--pilot-mega-link, #4F5D6B);
    display: block;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.45;
    margin: 0 0 15px;
    max-width: 135px;
}

.pilot-mega-menu__featured-button {
    align-items: center;
    align-self: end;
    background: var(--pilot-mega-button-background, #0B4DCC);
    border: 1px solid var(--pilot-mega-button-background, #0B4DCC);
    border-radius: 4px;
    color: var(--pilot-mega-button-text, #FFFFFF);
    display: inline-flex;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    justify-content: center;
    line-height: 1.2;
    margin-top: auto;
    min-height: 34px;
    padding: 0 12px;
    width: fit-content;
}

.pilot-mega-menu__featured-card:hover .pilot-mega-menu__featured-button,
.pilot-mega-menu__featured-card:focus .pilot-mega-menu__featured-button {
    background: var(--pilot-mega-hover, #083FA7);
    border-color: var(--pilot-mega-hover, #083FA7);
    text-decoration: underline;
}

body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-image,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-image {
    align-items: center;
    align-self: center;
    background: transparent;
    display: flex;
    height: 145px;
    justify-content: center;
    min-height: 0;
    overflow: visible;
    padding: 0;
    width: 96px;
}

body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-image img,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-image img {
    display: block;
    height: 100%;
    max-height: 145px;
    max-width: 96px;
    mix-blend-mode: normal;
    object-fit: contain;
    object-position: center;
    transform: none;
    width: 100%;
}

/* Desktop spacing: keep columns clean without making the menu oversized. */
@media (min-width: 1181px) {
    .pilot-mega-menu__grid--visual-builder {
        align-items: start;
        min-height: 0;
    }

    .pilot-mega-menu__grid--visual-builder .pilot-mega-menu__group {
        min-height: 0;
        padding: 0 24px;
    }

    .pilot-mega-menu__grid--visual-builder .pilot-mega-menu__group:first-child {
        padding-left: 0;
    }

    .pilot-mega-menu__grid--visual-builder .pilot-mega-menu__group:last-child {
        padding-right: 0;
    }
}

/* Tablet: retain the same visual treatment at a tighter scale. */
@media (max-width: 1180px) and (min-width: 768px) {
    body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card,
    .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card {
        grid-template-columns: minmax(0, 1fr) 84px;
        min-height: 200px;
        padding: 20px 12px 16px 14px;
    }

    .pilot-mega-menu__featured-heading,
    .pilot-mega-menu__featured-copy strong {
        font-size: 18px;
        max-width: 125px;
    }

    body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-image,
    .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-image {
        height: 125px;
        width: 84px;
    }

    body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-image img,
    .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-image img {
        max-height: 125px;
        max-width: 84px;
    }
}

/* Mobile: stack the card cleanly and avoid desktop sizing. */
@media (max-width: 767px) {
    .pilot-mega-menu__section + .pilot-mega-menu__section:has(.pilot-mega-menu__group-title) {
        margin-top: 16px;
    }

    body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card,
    .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card {
        grid-template-columns: minmax(0, 1fr) 96px;
        min-height: 190px;
        padding: 20px 14px 16px;
    }

    .pilot-mega-menu__featured-heading,
    .pilot-mega-menu__featured-copy strong {
        font-size: 19px;
    }

    body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-image,
    .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-image {
        height: 130px;
        width: 96px;
    }

    body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-image img,
    .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-image img {
        max-height: 130px;
        max-width: 96px;
    }
}

/* Featured product cards: interaction must not move or restyle the card. */
body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card {
    cursor: pointer !important;
    transition: none !important;
    transform: none !important;
}

body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card:hover,
body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card:focus,
body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card:active,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card:hover,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card:focus,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card:active {
    transform: none !important;
    translate: none !important;
    top: auto !important;
    margin-top: 0 !important;
    box-shadow: none !important;
}

body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card:hover .pilot-mega-menu__featured-button,
body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card:focus .pilot-mega-menu__featured-button,
body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card:active .pilot-mega-menu__featured-button,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card:hover .pilot-mega-menu__featured-button,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card:focus .pilot-mega-menu__featured-button,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card:active .pilot-mega-menu__featured-button {
    text-decoration: none !important;
    transform: none !important;
    translate: none !important;
    top: auto !important;
    margin-top: auto !important;
}

.pilot-mega-menu__featured-button,
.pilot-mega-menu__featured-button:hover,
.pilot-mega-menu__featured-button:focus,
.pilot-mega-menu__featured-button:active {
    text-decoration: none !important;
    cursor: pointer !important;
    transform: none !important;
    transition: none !important;
}

/* Final featured-product layout: square 1:1 image with an optional button. */
body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    grid-template-areas: "image" !important;
    gap: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    text-decoration: none !important;
    transform: none !important;
    transition: none !important;
}

body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card.has-button,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-card.has-button {
    grid-template-rows: auto auto !important;
    grid-template-areas:
        "image"
        "button" !important;
    gap: 12px !important;
}

.pilot-mega-menu__featured-card::before {
    content: none !important;
    display: none !important;
}

/* Legacy Storefront Editor templates used to inject product copy inside this card. */
.pilot-mega-menu__featured-copy,
.pilot-mega-menu__featured-heading,
.pilot-mega-menu__featured-description,
.pilot-mega-menu__featured-accent,
.pilot-mega-menu__featured-button-arrow {
    display: none !important;
}

body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-image,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-image {
    grid-area: image !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: var(--pilot-mega-sidebar-background, #F1F1F1) !important;
    border: 1px solid var(--pilot-mega-divider, #E1E5EB) !important;
}

body.pilot-theme .pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-image img,
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
    transform: none !important;
    transition: none !important;
}

.pilot-mega-menu__featured-button {
    grid-area: button !important;
    justify-self: start !important;
    align-self: start !important;
    display: inline-flex !important;
    align-items: center !important;
    min-height: 32px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transform: none !important;
    transition: none !important;
}

.pilot-mega-menu__featured-card:hover,
.pilot-mega-menu__featured-card:focus,
.pilot-mega-menu__featured-card:active,
.pilot-mega-menu__featured-card:hover *,
.pilot-mega-menu__featured-card:focus *,
.pilot-mega-menu__featured-card:active * {
    text-decoration: none !important;
    transform: none !important;
    transition: none !important;
}

/* Full Image Promo: portrait (275 x 400) or square (275 x 275). */
.pilot-mega-menu__section--full_image,
.pilot-mega-menu__section--category_image {
    align-items: stretch;
    display: flex;
    height: 100%;
    justify-content: center;
    min-height: 0;
}

.pilot-mega-menu__full-image {
    background: var(--pilot-mega-sidebar-background, #F2F4F7);
    border: 0;
    border-radius: 0;
    box-sizing: border-box;
    display: block;
    height: auto;
    max-height: 400px;
    max-width: 275px;
    overflow: hidden;
    position: relative;
    text-decoration: none !important;
    width: 100%;
    aspect-ratio: 11 / 16;
}

.pilot-mega-menu__full-image--square {
    aspect-ratio: 1 / 1;
    max-height: 275px;
    max-width: 275px;
}

.pilot-mega-menu__full-image img {
    display: block;
    height: 100%;
    max-height: none;
    max-width: none;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.pilot-mega-menu__full-image:hover,
.pilot-mega-menu__full-image:focus {
    box-shadow: none;
    outline: 0;
    transform: none;
}

@media (max-width: 767px) {
    .pilot-mega-menu__full-image {
        aspect-ratio: 2 / 1;
        max-height: none;
        max-width: none;
        width: 100%;
    }

    .pilot-mega-menu__full-image--square {
        aspect-ratio: 1 / 1;
    }
}

.pilot-mega-menu__full-image-button {
    align-items: center;
    background: var(--pilot-mega-button-background, #0B4DCC);
    border-radius: 3px;
    bottom: 18px;
    color: var(--pilot-mega-button-text, #FFFFFF) !important;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    justify-content: center;
    left: 50%;
    line-height: 1;
    max-width: calc(100% - 28px);
    min-height: 38px;
    padding: 0 16px;
    position: absolute;
    text-align: center;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 2;
}

.pilot-mega-menu__full-image:hover .pilot-mega-menu__full-image-button,
.pilot-mega-menu__full-image:focus .pilot-mega-menu__full-image-button {
    text-decoration: none !important;
    transform: translateX(-50%);
}

/* Keep the optional featured-product CTA compact and evenly padded. */
.pilot-mega-menu__section--featured_product .pilot-mega-menu__featured-button {
    box-sizing: border-box !important;
    min-height: 32px !important;
    min-width: 0 !important;
    width: auto !important;
    padding: 0 10px !important;
    justify-content: center !important;
}

/*
 * Keep all four visual-builder columns the same usable width on desktop.
 * Column 4 previously had 28px total horizontal inset (28px left / 0 right)
 * while middle columns lost more width to padding. Use the same 28px total
 * inset on every column, split evenly so image/content blocks line up.
 * The body-qualified selector intentionally overrides Storefront Editor's
 * per-column spacing without requiring any Storefront Editor file changes.
 */
@media (min-width: 1181px) {
    body.pilot-theme .pilot-mega-menu__grid--visual-builder > .pilot-mega-menu__group,
    .pilot-mega-menu__grid--visual-builder > .pilot-mega-menu__group {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}
