.ah-search-row,
.ah-search-reveal {
    display: contents;
}

.ah-ui .ah-search-toggle {
    display: none;
}

@media (max-width: 800px) {
    body.aromy-modern-header #header[data-ah-search-panned] {
        top: calc(var(--ah-search-viewport-top, 0px) + var(--ah-search-admin-inset, 0px)) !important;
    }

    .ah-search-mobile-open .ah-search-panel {
        top: calc(var(--ah-mobile-search-bottom, var(--ah-bottom, 119px)) + 6px);
    }

    .ah-search-mobile-open #ah-search-list {
        max-height: min(380px, max(0px, calc(var(--ah-search-visible-bottom, 100dvh) - var(--ah-mobile-search-bottom, var(--ah-bottom, 119px)) - 140px)));
    }

    .ah-ui .ah-mainbar.ah-search-mobile-ready {
        min-height: 0;
        row-gap: 0;
        grid-template-columns: 44px minmax(0, 1fr) auto;
    }

    .ah-mainbar.ah-search-mobile-ready > .ah-brand {
        min-width: 0;
        gap: 4px;
        font-size: clamp(.625rem, 2.7vw, .8125rem);
    }

    .ah-search-mobile-ready .ah-search-toggle {
        display: flex;
        color: var(--ah-ink);
        flex: 0 0 44px;
    }

    .ah-search-mobile-ready .ah-search-toggle[aria-expanded="true"] {
        color: var(--ah-ink);
    }

    .ah-mainbar.ah-search-mobile-ready > .ah-brand small {
        display: block;
        margin-top: 1px;
        font-size: clamp(8px, 2.15vw, 9px);
        line-height: 1.2;
        letter-spacing: 0;
    }

    .ah-search-mobile-ready .ah-search-toggle:focus-visible {
        outline: 2px solid var(--ah-purple);
        outline-offset: -2px;
    }

    .ah-search-mobile-ready .ah-search-row {
        grid-column: 1 / -1;
        grid-row: 2;
        display: grid;
        grid-template-rows: 0fr;
        min-width: 0;
        visibility: hidden;
        transition: grid-template-rows 180ms ease-in, visibility 0s 180ms;
    }

    .ah-search-mobile-open .ah-search-row {
        grid-template-rows: 1fr;
        visibility: visible;
        transition: grid-template-rows 240ms cubic-bezier(.2, .75, .3, 1), visibility 0s;
    }

    .ah-search-mobile-ready .ah-search-reveal {
        display: block;
        min-height: 0;
        overflow: hidden;
    }

    .ah-search-mobile-ready .ah-search {
        margin-block-start: 7px;
    }

    .ah-mainbar.ah-search-mobile-overlay {
        position: relative;
    }

    .ah-search-mobile-overlay .ah-search-row {
        position: absolute;
        grid-area: auto;
        inset: 100% 0 auto;
        padding-inline: inherit;
        background: #fff;
        box-shadow: 0 1px 0 var(--ah-line);
    }

    .ah-search-mobile-overlay .ah-search {
        margin-block: 6px 10px;
    }
}

@media (min-width: 601px) and (max-width: 782px) {
    body.aromy-modern-header.admin-bar #header[data-ah-search-panned] {
        --ah-search-admin-inset: 46px;
    }
}

@media (min-width: 783px) and (max-width: 800px) {
    body.aromy-modern-header.admin-bar #header[data-ah-search-panned] {
        --ah-search-admin-inset: 32px;
    }
}

@media (max-width: 420px) {
    .ah-ui .ah-mainbar.ah-search-mobile-ready {
        column-gap: 4px;
    }
}

@media (max-width: 369px) {
    .ah-mainbar.ah-search-mobile-ready > .ah-brand {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 1px;
        font-size: .5625rem;
        line-height: 1.2;
    }

    .ah-mainbar.ah-search-mobile-ready > .ah-brand img {
        width: 26px;
        height: 29px;
    }
}

@media (max-width: 319px) {
    .ah-mainbar.ah-search-mobile-ready > .ah-brand > span {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ah-search-mobile-ready .ah-search-row {
        transition: none;
    }
}

.ah-result-action {
    display: none;
}

@media (max-width: 900px) {
    .ah-search-panel .ah-result--purchasable {
        grid-template-columns: minmax(0, 1fr) 62px 44px;
        grid-template-rows: minmax(56px, auto) auto;
        gap: 0 8px;
        height: auto;
        min-height: 76px;
    }

    .ah-result--purchasable > .ah-result-open {
        grid-area: 1 / 1;
    }

    .ah-result--purchasable > .ah-result-stock {
        grid-area: 1 / 2;
        min-width: 0;
    }

    .ah-result--purchasable > .ah-result-action {
        display: flex;
        grid-area: 1 / 3;
        justify-content: flex-end;
    }

    .ah-ui .ah-result-buy-toggle {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        min-height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 10px;
        background: transparent;
        color: #008047;
        box-shadow: none;
        touch-action: manipulation;
    }

    .ah-ui .ah-result-buy-toggle svg {
        width: 20px;
        height: 20px;
    }

    .ah-ui .ah-result-buy-toggle[aria-expanded="true"] {
        background: #eaf6ee;
    }

    .ah-ui .ah-result-buy-toggle:focus-visible {
        outline: 2px solid var(--ah-purple);
        outline-offset: -2px;
    }

    .ah-search-panel .ah-result--purchasable > .ah-result-buy {
        display: grid;
        grid-area: 2 / 1 / 3 / -1;
        grid-template-rows: 0fr;
        min-width: 0;
        visibility: hidden;
        transition: grid-template-rows 180ms ease-in, visibility 0s 180ms;
    }

    .ah-search-panel .ah-result--purchasable > .ah-result-buy:not([inert]) {
        grid-template-rows: 1fr;
        visibility: visible;
        transition: grid-template-rows 240ms cubic-bezier(.2, .75, .3, 1), visibility 0s;
    }

    .ah-result-buy-inner {
        min-height: 0;
        overflow: hidden;
    }

    .ah-result--purchasable .apt-suggest-buy {
        padding-block-start: 6px;
    }

    .ah-result--purchasable .apt-pack,
    .ah-result--purchasable .apt-order {
        border-radius: 12px;
    }

    .ah-result--purchasable .apt-pack {
        font-size: 12px;
    }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
    .ah-search-panel .ah-result--purchasable > .ah-result-buy {
        transition: none;
    }
}

.ah-header .ah-actions > :is(.ah-search-toggle, .ah-cart) {
    -webkit-tap-highlight-color: transparent;
}

.ah-header .ah-actions > :is(.ah-search-toggle, .ah-cart)[data-ah-pointer-action]:is(:focus, :hover, :active) {
    outline: none;
    box-shadow: none;
    background: transparent !important;
    transition-property: border-color, color;
}
