/*****
 * Ratchet Depot Theme Overrides
 */
:root {
  --nav-height: 88px;
}

body {
    padding-top: var(--nav-height);

    &:has( > header.search-is-active) {
        height: 100vh;
        overflow: hidden;

        .t-site-header.search-is-active:after {
            background-color: rgba(34, 34, 34, 0.8);
            content: "";
            height: 100vmax;
            position: absolute;
            width: 100%;
            z-index: -1;
        }
    }
}

.t-site-header {
    background: white;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding-left: 1rem;
    padding-right: 2rem;

    .t-site-header__masthead {
        flex-wrap: nowrap;
        justify-content: space-between;
        min-height: var(--nav-height);

        & > .t-site-header__mobile-menu {
            align-items: center;
            justify-content: space-between;
            max-width: unset;
            gap: 0.25rem;

            & > .c-button {
                padding: 1rem;
                min-width: 48px;
            }
        }
     }

    .t-site-header__logo {
        flex-basis: auto;
        flex-grow: 0;
        margin-right: -6px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .t-site-header__search {
      opacity: 0;
      width: 100%;
      position: absolute;
      top: calc(100% + 1rem);
      height: 100px;
      pointer-events: none;

      .t-site-header__search-form {
        min-width: 250px;
        background: white;
      
        .t-site-header__search-button {
            line-height: unset;
            flex-grow: 0;

            &::before {
                display: none;
            }
        }
      }
    }

    &.search-is-active .t-site-header__search {
        opacity: 1;
        pointer-events: auto;
    }

    .t-site-navigation {
        border-bottom: unset;
        margin: 0;
    }

    .u-icon-menu {
        padding-left: 1.5rem;
        padding-right: 1rem;
    }

    .rd-btn {
        margin-left: 0.5rem;
        margin-right: 0;
        padding: 0.5em !important;
    }
}

#js-SFNT main :is(mmx-category-carousel, mmx-product-carousel, mmx-image-across) {
    display: block !important;
    margin-inline: auto !important;
    padding-inline: 2rem !important;
    max-width: 1600px !important;
}

mmx-category-list#mmx-category-list__mmx_categorylist:has([slot="categories"]:empty) {
    display: none !important;
}

footer.t-site-footer {
    max-width: 1536px;
    margin-inline: auto;
    width: 100%;

    & > .t-site-footer__wrapper {
        padding: 0;
        max-width: unset;

        & > .t-site-footer__content {
            margin: 0;
        }
    }
}

@media (min-width: 960px) {
    
    :root {
    }
    
    body {
    }
    
    .t-site-header {
        padding-inline: 0px;

        & .t-site-header__masthead {
            & > .t-site-header__mobile-menu {
                margin-left: -1rem;
            }
        }
    }
}

@media (min-width: 1200px) {

    .t-site-header {
        .t-site-header__logo {
            position: relative;
            left: unset;
            transform: unset
        }
        .t-site-header__masthead {
            .t-site-header__mobile-menu {
                order: 3;
                width: auto;
                flex-shrink: 1;
                flex-grow: 0;
                flex-basis: auto;

                .u-icon-menu {
                    display: none;
                }

                .u-icon-search {
                    appearance: none;
                    background: transparent;
                    border: none !important;
                    outline: none !important;
                    width: 48px;
                }
            }

            .t-site-header__search {
                width: 80%;
                max-width: unset;
                left: 50%;
                transform: translateX(-50%);
            }

            .rd-btn {
                order: 4;
            }

            .t-site-navigation {
                order: 2;
            }

            /*Sub Sub menu*/
            .x-transfigure-navigation__row .c-navigation__row .c-navigation__row {
                left: 100% !important;
                top: 0 !important;
            }

            .c-navigation__list.has-child-menu {
                >a {
                    position: relative;
                    z-index: 1000;
                }

                .c-navigation__row {
                    top: 100%;

                    &::before {
                        height: 2rem;
                        top: 0;
                        transform: translateY(-100%);
                    }
                }
            }
        }
    }
}

@media (min-width: 1440px) {
    .t-site-header {
        .t-site-header__masthead {
        }
    }
}
