/*
 * INSTICK MEGAMENU V10 UNIVERSAL
 * All languages / RTL / LTR
 * Desktop only
 */

@media (min-width: 1025px) {

    /* Main columns */
    .nav__item--has-menu
    .mega__panel:not(.mega__panel--learn) {
        grid-template-columns:
            minmax(180px, 200px)
            minmax(240px, 260px)
            minmax(0, 1fr) !important;

        column-gap: 18px;
        min-height: 420px;
        box-sizing: border-box;
    }

    /* Category navigation */
    .mega__rows {
        min-width: 0;
        width: 100%;
    }

    .mega__row {
        display: flex;
        align-items: center;
        gap: 9px;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        padding-inline: 9px;
        font-size: 15px;
        line-height: 1.35;
    }

    .mega__row-thumb {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
    }

    .mega__row > :not(.mega__row-thumb):not(.mega__row-arrow) {
        min-width: 0;
    }

    .mega__row-arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 14px;
        width: 14px;
        margin-inline-start: auto;
        opacity: .65;
    }

    .mega__row:hover .mega__row-arrow,
    .mega__row.is-active .mega__row-arrow {
        opacity: 1;
    }

    /* Products area */
    .mega__products {
        min-width: 0;
    }

    .mega__group {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 12px;
        align-items: start;
        align-content: start;
    }

    /* Product card */
    .mega__group .mega__prod {
        display: flex;
        flex-direction: column;
        min-width: 0;
        height: auto;
        align-self: start;
        gap: 6px;
    }

    /*
     * UNIVERSAL IMAGE FRAME
     *
     * Same aspect ratio for all products.
     * Images cannot change the frame height.
     * Horizontal and vertical images both fit.
     */
    .mega__group .mega__prod-photo {
        position: relative !important;
        display: block !important;
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        aspect-ratio: 5 / 6 !important;
        overflow: hidden !important;
        background: #fff;
        box-sizing: border-box;
        flex-shrink: 0;
    }

    /* Picture fills the frame */
    .mega__group .mega__prod-photo picture {
        position: absolute !important;
        inset: 0 !important;
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
    }

    /* Image fills picture without cropping */
    .mega__group .mega__prod-photo picture img {
        position: absolute !important;
        inset: 0 !important;
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        aspect-ratio: auto !important;
        object-fit: cover !important;
        object-position: center !important;
        transform: none !important;
    }

    /* Stable product title */
    .mega__group .mega__prod-name {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
        font-size: 13px;
        line-height: 1.35;
        height: 2.7em;
        min-height: 2.7em;
        max-height: 2.7em;
        box-sizing: border-box;
    }

    /* Stable prices */
    .mega__group .mega__prod-price {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        align-items: baseline;
        gap: 4px 10px;
        direction: ltr;
        unicode-bidi: isolate;
        width: 100%;
        max-width: 100%;
        margin-top: 6px;
        white-space: normal;
        font-variant-numeric: tabular-nums;
    }

    .mega__price-current,
    .mega__price-old {
        display: inline-block;
        direction: ltr;
        unicode-bidi: isolate;
        white-space: nowrap;
    }

    .mega__price-current {
        color: rgba(255,255,255,.85);
    }

    .mega__price-old {
        color: rgba(255,255,255,.45);
        font-size: .9em;
    }
}

/* Compact desktop */
@media (min-width: 1025px) and (max-width: 1199px) {

    .nav__item--has-menu
    .mega__panel:not(.mega__panel--learn) {
        grid-template-columns:
            minmax(145px, 170px)
            minmax(225px, 245px)
            minmax(0, 1fr) !important;
        column-gap: 12px;
    }

    .mega__row {
        font-size: 14px;
        gap: 7px;
    }

    .mega__row-thumb {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }
}