/* Aakram Elite Search - storefront styles. Colours come from CSS variables set by the module. */
/* the hidden attribute must win over the display rules below, whatever the theme ships */
[class^="aes-"][hidden],
[class*=" aes-"][hidden] {
    display: none !important;
}

.aes-panel,
.aes-panel * {
    box-sizing: border-box;
}
.aes-panel {
    position: absolute;
    display: none;
    flex-direction: column;
    background: var(--aes-bg, #fff);
    color: var(--aes-text, #222);
    border: 1px solid var(--aes-border, #e5e7eb);
    border-radius: var(--aes-radius, 10px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    z-index: var(--aes-z, 99999);
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
    overflow: hidden;
    max-height: 80vh;
}
.aes-panel--open {
    display: flex;
}
.aes-panel a {
    color: inherit;
    text-decoration: none;
}
.aes-panel mark {
    background: transparent;
    color: inherit;
    font-weight: 700;
    padding: 0;
}
.aes-panel__head {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--aes-border, #e5e7eb);
    background: var(--aes-bg, #fff);
}
.aes-headinput {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}
.aes-input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--aes-border, #e5e7eb);
    border-radius: 999px;
    padding: 0 84px 0 16px;
    font-size: 16px;
    background: #fff;
    color: var(--aes-text, #222);
    outline: none;
    -webkit-appearance: none;
}
.aes-input:focus {
    border-color: var(--aes-accent, #b8860b);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15);
}
.aes-clear,
.aes-mic {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--aes-muted, #6b7280);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.aes-clear {
    right: 44px;
    font-size: 13px;
}
.aes-mic {
    right: 6px;
}
.aes-mic--on {
    color: var(--aes-sale, #c62828);
    animation: aes-pulse 1s infinite;
}
@keyframes aes-pulse {
    0% { box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.35); }
    100% { box-shadow: 0 0 0 10px rgba(198, 40, 40, 0); }
}
.aes-back,
.aes-go {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--aes-text, #222);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.aes-go {
    background: var(--aes-primary, #1a1a1a);
    color: #fff;
}
.aes-panel__body {
    position: relative;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
}
.aes-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--aes-accent, #b8860b), transparent);
    background-size: 200% 100%;
    animation: aes-bar 1s linear infinite;
    color: transparent;
    overflow: hidden;
    font-size: 0;
}
@keyframes aes-bar {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}
.aes-cols {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 120px;
}
.aes-cols--single {
    grid-template-columns: 1fr;
}
.aes-side {
    border-right: 1px solid var(--aes-border, #e5e7eb);
    padding: 10px 0;
    background: rgba(0, 0, 0, 0.015);
}
.aes-main {
    padding: 12px 14px 14px;
    min-width: 0;
}
.aes-section {
    padding: 4px 0 8px;
}
.aes-section__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--aes-muted, #6b7280);
    padding: 6px 14px 4px;
    font-weight: 600;
}
.aes-section__title--main {
    padding: 0 0 8px;
}
.aes-section__extra .aes-link {
    border: 0;
    background: none;
    color: var(--aes-accent, #b8860b);
    cursor: pointer;
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0;
    padding: 0;
}
.aes-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    cursor: pointer;
    border-left: 3px solid transparent;
}
.aes-item:hover,
.aes-item.aes-active {
    background: rgba(0, 0, 0, 0.05);
    border-left-color: var(--aes-accent, #b8860b);
}
.aes-item__label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.aes-ico {
    width: 16px;
    color: var(--aes-muted, #6b7280);
    font-size: 12px;
    text-align: center;
    flex: 0 0 auto;
}
.aes-count {
    font-size: 11px;
    color: var(--aes-muted, #6b7280);
    background: rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    padding: 1px 7px;
    font-weight: 500;
}
.aes-relaxed {
    color: var(--aes-muted, #6b7280);
    font-weight: 400;
}
.aes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.aes-product {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--aes-border, #e5e7eb);
    border-radius: calc(var(--aes-radius, 10px) - 2px);
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.15s, transform 0.15s;
    cursor: pointer;
}
.aes-product:hover,
.aes-product.aes-active {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
    border-color: var(--aes-accent, #b8860b);
}
.aes-product__img {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    background: #f6f6f6;
    overflow: hidden;
}
.aes-product__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.aes-noimg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 30px;
}
.aes-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    color: #fff;
    background: var(--aes-primary, #1a1a1a);
}
.aes-badge--sale {
    background: var(--aes-sale, #c62828);
}
.aes-badge--new {
    background: var(--aes-accent, #b8860b);
}
.aes-product__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 9px 10px;
    flex: 1;
}
.aes-product__meta {
    font-size: 11px;
    color: var(--aes-muted, #6b7280);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.aes-product__name {
    font-size: 13px;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}
.aes-product__sub {
    font-size: 11px;
    color: var(--aes-muted, #6b7280);
}
.aes-attrs {
    opacity: 0.8;
}
.aes-product__price {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.aes-from {
    font-size: 11px;
    color: var(--aes-muted, #6b7280);
}
.aes-price {
    font-weight: 700;
    color: var(--aes-price, #111);
    font-size: 14px;
}
.aes-price--sale {
    color: var(--aes-sale, #c62828);
}
.aes-regular {
    font-size: 12px;
    color: var(--aes-muted, #6b7280);
    text-decoration: line-through;
}
.aes-stock {
    font-size: 11px;
    font-weight: 500;
}
.aes-stock--in {
    color: #15803d;
}
.aes-stock--order {
    color: #b45309;
}
.aes-stock--out {
    color: #9ca3af;
}
.aes-add {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--aes-primary, #1a1a1a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.15s, transform 0.15s;
}
.aes-product:hover .aes-add,
.aes-product.aes-active .aes-add,
.aes-add--done {
    opacity: 1;
    transform: scale(1);
}
.aes-add--busy {
    opacity: 0.5 !important;
}
.aes-add--done {
    background: #15803d;
}
.aes-empty {
    padding: 26px 10px;
    text-align: center;
    color: var(--aes-muted, #6b7280);
}
.aes-empty__title {
    color: var(--aes-text, #222);
    font-weight: 600;
    margin: 0 0 6px;
}
.aes-empty__hint,
.aes-empty p {
    margin: 0;
}
.aes-notice {
    padding: 8px 14px;
    background: #fff7e6;
    color: #8a5a00;
    font-size: 12px;
}
.aes-banner {
    margin: 0 0 12px;
}
.aes-banner img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: calc(var(--aes-radius, 10px) - 2px);
}
.aes-panel__foot {
    border-top: 1px solid var(--aes-border, #e5e7eb);
    padding: 10px 14px;
    background: var(--aes-bg, #fff);
    flex: 0 0 auto;
}
.aes-seeall {
    display: block;
    text-align: center;
    padding: 11px 16px;
    background: var(--aes-primary, #1a1a1a);
    color: #fff !important;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
}
.aes-seeall:hover,
.aes-seeall.aes-active {
    background: var(--aes-accent, #b8860b);
}
.aes-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: calc(var(--aes-z, 99999) - 1);
}
.aes-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 20px);
    background: #15803d;
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    z-index: calc(var(--aes-z, 99999) + 1);
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
}
.aes-toast--show {
    opacity: 1;
    transform: translate(-50%, 0);
}
.aes-captcha {
    position: fixed;
    bottom: 0;
    right: 0;
}
html.aes-lock,
html.aes-lock body {
    overflow: hidden;
}

/* overlay layout (desktop) */
.aes-panel--overlay:not(.aes-panel--mobile) {
    position: fixed !important;
    top: 6vh !important;
    left: 50% !important;
    transform: translateX(-50%);
    width: min(1100px, 94vw) !important;
    max-height: 86vh !important;
}
.aes-panel--overlay:not(.aes-panel--mobile) .aes-panel__head {
    display: flex;
}
.aes-panel--overlay .aes-back {
    order: 3;
}

/* mobile full screen */
.aes-panel--mobile {
    position: fixed !important;
    inset: 0 !important;
    width: auto !important;
    max-height: none !important;
    border-radius: 0;
    border: 0;
}
.aes-panel--mobile .aes-panel__head {
    display: flex;
    padding-top: max(10px, env(safe-area-inset-top));
}
.aes-panel--mobile .aes-cols {
    grid-template-columns: 1fr;
}
.aes-panel--mobile .aes-side {
    border-right: 0;
    border-bottom: 1px solid var(--aes-border, #e5e7eb);
}
.aes-panel--mobile .aes-grid {
    grid-template-columns: repeat(2, 1fr);
}
.aes-panel--mobile .aes-add {
    opacity: 1;
    transform: none;
}
.aes-panel--mobile .aes-panel__foot {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
}
@media (max-width: 900px) {
    .aes-cols {
        grid-template-columns: 1fr;
    }
    .aes-side {
        border-right: 0;
        border-bottom: 1px solid var(--aes-border, #e5e7eb);
        display: flex;
        flex-wrap: wrap;
        gap: 0 4px;
        padding: 6px 8px;
    }
    .aes-side .aes-section {
        flex: 1 1 100%;
        padding: 2px 0;
    }
    .aes-side .aes-section__title {
        padding: 4px 6px 2px;
    }
    .aes-side .aes-item {
        display: inline-flex;
        border: 1px solid var(--aes-border, #e5e7eb);
        border-radius: 999px;
        padding: 4px 10px;
        margin: 2px 4px 2px 0;
        font-size: 12px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .aes-panel *,
    .aes-toast {
        transition: none !important;
        animation: none !important;
    }
}

/* own search bar widget */
.aes-bar {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.aes-bar__form {
    position: relative;
    width: 100%;
    display: flex;
}
.aes-bar__input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--aes-border, #e5e7eb);
    border-radius: 999px;
    padding: 0 46px 0 18px;
    font-size: 15px;
    outline: none;
    background: #fff;
    color: var(--aes-text, #222);
}
.aes-bar__input:focus {
    border-color: var(--aes-accent, #b8860b);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15);
}
.aes-bar__btn {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--aes-primary, #1a1a1a);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* facets on the native search page */
.aes-facets {
    font-size: 14px;
}
.aes-facets__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.aes-facets__title {
    font-weight: 700;
    font-size: 15px;
    margin: 0;
}
.aes-facets__clear {
    font-size: 12px;
    color: var(--aes-accent, #b8860b);
}
.aes-facet {
    border-top: 1px solid var(--aes-border, #e5e7eb);
    padding: 8px 0;
}
.aes-facet__title {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: 0;
    padding: 6px 0;
    font-weight: 600;
    cursor: pointer;
    color: inherit;
    text-align: left;
}
.aes-facet__title::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.15s;
    margin-right: 4px;
}
.aes-facet--closed .aes-facet__title::after {
    transform: rotate(-45deg);
}
.aes-facet--closed .aes-facet__body {
    display: none;
}
.aes-facet__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.aes-facet__item {
    margin: 0;
    padding: 0;
}
.aes-facet__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    color: inherit;
    text-decoration: none;
}
.aes-facet__link:hover {
    color: var(--aes-accent, #b8860b);
}
.aes-facet__box {
    width: 16px;
    height: 16px;
    border: 1px solid #9ca3af;
    border-radius: 3px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    background: #fff;
}
.aes-facet__link--selected .aes-facet__box {
    background: var(--aes-primary, #1a1a1a);
    border-color: var(--aes-primary, #1a1a1a);
    color: #fff;
}
.aes-facet__link--path {
    font-weight: 600;
}
.aes-facet__label {
    flex: 1;
}
.aes-facet__count {
    font-size: 12px;
    color: var(--aes-muted, #6b7280);
}
.aes-facet__swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    display: inline-block;
}
.aes-facet__more {
    background: none;
    border: 0;
    color: var(--aes-accent, #b8860b);
    cursor: pointer;
    padding: 4px 0;
    font-size: 12px;
}
.aes-facet__item--hidden {
    display: none;
}
.aes-price-form {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.aes-price-form input {
    width: 72px;
    padding: 5px 6px;
    border: 1px solid var(--aes-border, #e5e7eb);
    border-radius: 4px;
    font-size: 13px;
}
.aes-price-form button {
    padding: 5px 12px;
    border: 0;
    background: var(--aes-primary, #1a1a1a);
    color: #fff;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
}
.aes-hist {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 34px;
    margin-top: 6px;
}
.aes-hist span {
    flex: 1;
    background: var(--aes-border, #e5e7eb);
    border-radius: 2px 2px 0 0;
    min-height: 2px;
}
.aes-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 12px;
}
.aes-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    font-size: 12px;
    color: inherit;
    text-decoration: none;
}
.aes-pill:hover {
    background: rgba(0, 0, 0, 0.12);
}
.aes-pill--clear {
    background: transparent;
    color: var(--aes-accent, #b8860b);
}
.aes-active-filters--empty {
    display: none;
}

/* results page layout built by the script when the theme has no side column */
.aes-results {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}
.aes-results__side {
    flex: 0 0 260px;
    width: 260px;
    max-width: 100%;
}
.aes-results__main {
    flex: 1 1 auto;
    min-width: 0;
}
.aes-filters-toggle,
.aes-filters-close {
    display: none;
    border: 1px solid var(--aes-border, #e5e7eb);
    background: #fff;
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 600;
    cursor: pointer;
    margin: 0 0 12px;
}
@media (max-width: 767px) {
    .aes-results {
        display: block;
    }
    .aes-filters-toggle,
    .aes-filters-close {
        display: inline-block;
    }
    .aes-results__side {
        display: none;
        position: fixed;
        inset: 0;
        width: auto;
        z-index: var(--aes-z, 99999);
        background: #fff;
        overflow-y: auto;
        padding: 16px;
    }
    .aes-results__side--open {
        display: block;
    }
}

/* the theme's native suggestion list (ps_searchbar) is replaced by the panel */
.searchbar-autocomplete { display: none !important; }

/* results page above the rate limit */
.aes-gate { margin: 0 0 16px; padding: 16px 18px; border: 1px solid var(--aes-border, #e5e7eb); border-radius: var(--aes-radius, 10px); background: var(--aes-bg, #fff); color: var(--aes-text, #222); }
.aes-gate p { margin: 0 0 10px; }
.aes-gate__btn { appearance: none; border: 0; border-radius: var(--aes-radius, 10px); padding: 10px 18px; background: var(--aes-primary, #1a1a1a); color: #fff; font: inherit; cursor: pointer; }
.aes-gate__btn[disabled] { opacity: .6; cursor: wait; }
