/* Brand products */

.mt-brand-products .x-row-inner {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
    margin: 0;
    padding: 0;
}

.mt-brand-products .product-loop {
    width: 100%;
    min-width: 0;
}

.mt-brand-products .product-cart {
    position: relative;
    margin-bottom: 14px;
}

.mt-brand-products .mt-card-badges-shortcode {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: grid;
    gap: 4px;
    pointer-events: none;
}

.mt-brand-products .mt-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 6px;
    border-radius: 0;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
}

.mt-brand-products .mt-card-badge-sale,
.mt-brand-products .mt-card-badge-new,
.mt-brand-products .mt-card-badge-bestseller {
    background: #000000;
}

.mt-brand-products .product-cart .x-image,
.mt-brand-products .product-cart img {
    display: block;
    width: 100%;
}

.mt-brand-products .product-cart img {
    height: auto;
}

.mt-brand-products .product-loop > .x-text {
    margin: 0;
    padding: 0;
}

.mt-brand-products h3.x-text-content-text-primary {
    margin: 0 0 6px;
    color: #000000 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
}

.mt-brand-products .product-loop > .x-text + .x-text .x-text-content-text-primary {
    display: block;
    color: #000000 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
}

.mt-brand-products .mt-product-card-price-shortcode {
    display: grid;
    gap: 2px;
    color: #000000;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
}

.mt-brand-products .mt-product-card-price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.mt-brand-products .mt-product-card-price-current {
    color: #000000;
    font-weight: 700;
}

.mt-brand-products .mt-product-card-price-regular {
    color: #808080;
    font-size: 12px;
    font-weight: 400;
}

.mt-brand-products .mt-product-card-price-omnibus {
    display: block;
    color: #808080;
    font-size: 11px;
    font-weight: 300;
    line-height: 1.25;
    text-decoration: none;
}

.mt-brand-products .mt-product-card-price-omnibus .wc-price-history-shortcode,
.mt-brand-products .mt-product-card-price-omnibus .wc-price-history-lowest-inner,
.mt-brand-products .mt-product-card-price-omnibus .wc-price-history.prior-price.lowest {
    display: inline;
    width: auto;
    margin: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-decoration: none;
}

.mt-brand-products .mt-product-card-price-omnibus .woocommerce-Price-amount,
.mt-brand-products .mt-product-card-price-omnibus .wc-price-history.prior-price-value,
.mt-brand-products .mt-product-card-price-omnibus .wc-price-history-lowest-raw-value {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-decoration: none;
}

@media (max-width: 767px) {
    .mt-brand-products .x-row-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 4px;
    }
}

/* Homepage color carousel */

.mt-home-color-carousel {
    overflow: hidden;
}

.mt-home-color-carousel .mt-home-color-carousel__header {
    position: relative;
}

.mt-home-color-carousel .mt-home-color-carousel__header > .x-row-inner {
    align-items: center;
}

.mt-home-color-carousel__row {
    display: flex !important;
    align-items: center !important;
    gap: 12px;
    overflow: visible;
}

.mt-home-color-carousel__track {
    display: flex !important;
    flex: 1 1 auto;
    flex-wrap: nowrap !important;
    gap: 16px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.mt-home-color-carousel__track::-webkit-scrollbar {
    display: none;
}

.mt-home-color-carousel__track > .x-col {
    flex: 0 0 calc((100% - 24px) / 2.5) !important;
    width: calc((100% - 24px) / 2.5) !important;
    max-width: calc((100% - 24px) / 2.5) !important;
    min-width: 0 !important;
    scroll-snap-align: start;
}

.mt-home-color-carousel__track .x-image,
.mt-home-color-carousel__track .x-image img {
    display: block;
    width: 100%;
}

.mt-home-color-carousel__track .x-image img {
    height: auto;
}

.mt-home-color-carousel__button {
    display: none;
}

/* Show more color options at once on tablets while retaining a scroll cue. */
@media (min-width: 768px) and (max-width: 979px) {
    .mt-home-color-carousel .mt-home-color-carousel__track > .x-col {
        flex-basis: calc((100% - 48px) / 3.5) !important;
        width: calc((100% - 48px) / 3.5) !important;
        max-width: calc((100% - 48px) / 3.5) !important;
    }
}

@media (min-width: 980px) {
    .mt-home-color-carousel .x-row.mt-home-color-carousel__row {
        --mt-home-color-size: clamp(118px, 11.5vw, 150px);
        --mt-home-color-gap: clamp(20px, 3vw, 48px);
        box-sizing: border-box !important;
        justify-content: center !important;
        width: 100vw !important;
        max-width: none !important;
        margin-right: calc(50% - 50vw) !important;
        margin-left: calc(50% - 50vw) !important;
        padding-right: clamp(24px, 4vw, 64px) !important;
        padding-left: clamp(24px, 4vw, 64px) !important;
        gap: 16px !important;
    }

    .mt-home-color-carousel__button {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
        border: 1px solid #111111;
        border-radius: 0;
        background: #ffffff;
        color: #111111;
        cursor: pointer;
        transition: opacity 160ms ease, background-color 160ms ease, color 160ms ease;
    }

    .mt-home-color-carousel__button::before {
        content: "";
        display: block;
        width: 10px;
        height: 10px;
        border-top: 2px solid currentColor;
        border-right: 2px solid currentColor;
    }

    .mt-home-color-carousel__button--prev::before {
        transform: rotate(-135deg);
        margin-left: 4px;
    }

    .mt-home-color-carousel__button--next::before {
        transform: rotate(45deg);
        margin-right: 4px;
    }

    .mt-home-color-carousel__button:hover:not(:disabled),
    .mt-home-color-carousel__button:focus-visible:not(:disabled) {
        background: #111111;
        color: #ffffff;
    }

    .mt-home-color-carousel__button:disabled {
        opacity: 0.35;
        cursor: default;
    }

    .mt-home-color-carousel .mt-home-color-carousel__row > .x-row-inner.mt-home-color-carousel__track {
        flex: 1 1 0 !important;
        width: 100% !important;
        max-width: none !important;
        gap: var(--mt-home-color-gap) !important;
    }

    .mt-home-color-carousel__track > .x-col {
        flex-basis: var(--mt-home-color-size) !important;
        width: var(--mt-home-color-size) !important;
        max-width: var(--mt-home-color-size) !important;
    }
}
