/* Catalog geometry is isolated from account, Admin and product surfaces. */
#asseteka-store-surface {
    --ak-container: 154rem;
    --ak-gutter: 2rem;
}

#asseteka-store-surface .page-intro--catalog,
#asseteka-store-surface .sale-landing__intro {
    padding-block: 2rem 1.5rem;
}

#asseteka-store-surface .page-intro--catalog,
#asseteka-store-surface .sale-landing__heading {
    align-items: end;
    gap: 1.5rem;
}

#asseteka-store-surface .eyebrow {
    margin-bottom: 0.5rem;
    color: var(--ak-muted);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
}

#asseteka-store-surface #store-title {
    max-width: none;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

#asseteka-store-surface .catalog-intro-description,
#asseteka-store-surface .sale-landing__heading > div:first-child > p:last-child {
    min-block-size: 0;
    max-width: 64rem;
    margin-top: 0.75rem;
    color: var(--ak-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

#asseteka-store-surface .page-intro__stat {
    display: flex;
    flex: 0 0 auto;
    gap: 0.375rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

#asseteka-store-surface .page-intro__stat strong,
#asseteka-store-surface .page-intro__stat span {
    color: var(--ak-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    letter-spacing: normal;
}

#asseteka-store-surface .catalog-range {
    margin-bottom: 1rem;
    color: var(--ak-text);
    font-size: 0.875rem;
    font-weight: 500;
}

#asseteka-store-surface .catalog-layout {
    grid-template-columns: 17.5rem minmax(0, 1fr);
    gap: 1.5rem;
}

#asseteka-store-surface .catalog-filter-shell {
    position: static;
    padding-right: 1.5rem;
    border-right: 1px solid var(--ak-border);
}

#asseteka-store-surface .catalog-filters fieldset {
    gap: 4px;
    margin-bottom: 24px;
    padding-bottom: 8px;
}

#asseteka-store-surface .catalog-filters legend {
    margin-bottom: 4px;
    padding: 8px;
    color: #141414;
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;
    letter-spacing: -.096px;
}

/* All sidebar facets share the category text size and vertical rhythm. */
#asseteka-store-surface .filter-option {
    grid-template-columns: 16px minmax(0, 1fr) auto;
    gap: 12px;
    min-width: 0;
    min-height: 32px;
    margin-right: 32px;
    padding: 6px 0 6px 8px;
    color: var(--ak-text);
    font-size: 14px;
    line-height: 20px;
    border-radius: 8px;
    cursor: pointer;
}

#asseteka-store-surface .filter-option__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#asseteka-store-surface .filter-option .filter-option__count {
    min-width: 0;
    padding: 0 4px;
    border-radius: 4px;
    color: #808080;
    background: #f5f5f5;
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    white-space: nowrap;
}

#asseteka-store-surface .catalog-filters input,
#asseteka-store-surface .filter-option__native-check {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* Category selection and disclosure have separate slots. Keep this rule next
   to the base option padding so a later shorthand cannot cover the count. */
#asseteka-store-surface .filter-option--category-root {
    grid-template-columns: 20px minmax(0, 1fr) auto;
    margin-right: 0;
    padding: 6px 40px 6px 8px;
}

#asseteka-store-surface .filter-option__icon,
#asseteka-store-surface .filter-option__icon svg {
    display: block;
    width: 20px;
    height: 20px;
    color: var(--ak-brand);
}

#asseteka-store-surface .filter-option--category-root > input,
#asseteka-store-surface .filter-option--subcategory > input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

#asseteka-store-surface .filter-option--category-root:has(input:checked),
#asseteka-store-surface .filter-option--category-root:has(input:indeterminate),
#asseteka-store-surface .filter-option--category-root[aria-current="true"],
#asseteka-store-surface .filter-option--category-root[data-store-filter-indeterminate="true"],
#asseteka-store-surface .filter-option--subcategory:has(input:checked),
#asseteka-store-surface .filter-option--subcategory[aria-current="true"] {
    background: #f5f5f5;
    font-weight: 500;
}

#asseteka-store-surface .filter-option:has(input:focus-visible) {
    outline: 2px solid var(--ak-brand);
    outline-offset: -2px;
}

#asseteka-store-surface .filter-subcategories {
    gap: 4px;
    padding-top: 4px;
    padding-left: 0;
}

#asseteka-store-surface .filter-option--subcategory {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-right: 0;
    padding-inline: 24px 40px;
}

#asseteka-store-surface .filter-option--subcategory .filter-option__native-check {
    display: none;
}

#asseteka-store-surface .filter-category-disclosure > summary {
    right: 4px;
    width: 32px;
    height: 32px;
    color: #666;
}

#asseteka-store-surface .filter-category-disclosure > summary::after {
    content: none;
}

#asseteka-store-surface .filter-category-disclosure > summary svg {
    width: 16px;
    height: 16px;
    transition: transform 160ms ease;
}

#asseteka-store-surface .filter-category-disclosure[open] > summary svg {
    transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
    #asseteka-store-surface .filter-category-disclosure > summary svg {
        transition: none;
    }
}

#asseteka-store-surface .catalog-control-bar {
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

#asseteka-store-surface .catalog-control-bar:has(+ .catalog-active-filters) {
    margin-bottom: 0;
}

#asseteka-store-surface .catalog-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    margin-block: 0.75rem 1.25rem;
}

#asseteka-store-surface .catalog-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    padding: 0.25rem 0.5rem 0.25rem 0.75rem;
    border: 0;
    border-radius: 9999px;
    color: var(--ak-text-soft);
    background: var(--ak-surface-raised);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    text-decoration: none;
}

#asseteka-store-surface .catalog-filter-chip > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

#asseteka-store-surface .catalog-filter-chip svg {
    flex: 0 0 1rem;
    width: 1rem;
    height: 1rem;
    color: #808080;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}

#asseteka-store-surface .catalog-filter-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    border: 0;
    color: #808080;
    background: transparent;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25rem;
    text-decoration: none;
}

#asseteka-store-surface .catalog-filter-chip:hover {
    background: var(--ak-surface-high);
}

#asseteka-store-surface .catalog-filter-clear:hover {
    color: var(--ak-text-soft);
}

#asseteka-store-surface .catalog-filter-chip:focus-visible,
#asseteka-store-surface .catalog-filter-clear:focus-visible {
    outline: 2px solid var(--ak-brand);
    outline-offset: 2px;
}

@media (forced-colors: active) {
    #asseteka-store-surface .catalog-filter-chip {
        outline: 1px solid ButtonText;
    }
}

#asseteka-store-surface .catalog-dropdown__trigger {
    min-height: 2.625rem;
    border-radius: var(--ak-radius-sm);
    background: var(--ak-canvas);
    font-size: 0.875rem;
    font-weight: 400;
}

#asseteka-store-surface .catalog-dropdown__trigger:hover,
#asseteka-store-surface .catalog-dropdown[open] > .catalog-dropdown__trigger {
    background: var(--ak-surface-raised);
}

#asseteka-store-surface .catalog-dropdown__trigger:focus-visible,
#asseteka-store-surface .catalog-dropdown__search:focus-within {
    outline: 2px solid var(--ak-brand);
    outline-offset: 2px;
}

#asseteka-store-surface .catalog-dropdown__panel {
    border-radius: var(--ak-radius-sm);
    background: var(--ak-canvas);
    box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 14%);
}

#asseteka-store-surface .catalog-dropdown__option:hover,
#asseteka-store-surface .catalog-dropdown__option:focus-visible,
#asseteka-store-surface .catalog-dropdown__option--choice.is-selected,
#asseteka-store-surface .catalog-dropdown__clear:hover {
    background: var(--ak-surface-raised);
}

#asseteka-store-surface .catalog-dropdown__option small {
    background: transparent;
}

#asseteka-store-surface .catalog-no-results {
    min-height: 16rem;
    border-style: solid;
    background: var(--ak-surface);
}

#asseteka-store-surface .catalog-no-results h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

@media (width < 1024px) {
    #asseteka-store-surface {
        --ak-gutter: 2rem;
    }

    #asseteka-store-surface .catalog-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    #asseteka-store-surface .catalog-filter-shell {
        padding-right: 0;
        border-right: 0;
    }

    #asseteka-store-surface .catalog-filter-shell > .filter-disclosure-toggle {
        display: block;
    }

    #asseteka-store-surface .filter-disclosure {
        min-height: 2.75rem;
        margin-bottom: 1rem;
        border-radius: var(--ak-radius-sm);
        background: var(--ak-canvas);
        font-size: 0.875rem;
        font-weight: 500;
    }

    #asseteka-store-surface .catalog-layout:not(:has(.filter-disclosure-toggle:checked)) .catalog-control-bar {
        display: none;
    }

    #asseteka-store-surface .filter-disclosure-toggle:checked ~ .catalog-filters {
        max-block-size: 22rem;
        overflow-y: auto;
        padding: 1rem;
        border: 1px solid var(--ak-border);
        border-bottom: 0;
        border-radius: var(--ak-radius-sm) var(--ak-radius-sm) 0 0;
        background: var(--ak-surface);
    }

    #asseteka-store-surface .catalog-layout:has(.filter-disclosure-toggle:checked) .catalog-control-bar {
        display: grid;
        gap: 0.75rem;
        padding: 1rem;
        border: 1px solid var(--ak-border);
        border-top: 0;
        border-radius: 0 0 var(--ak-radius-sm) var(--ak-radius-sm);
        background: var(--ak-surface);
    }

    #asseteka-store-surface .catalog-control-bar__filters,
    #asseteka-store-surface .catalog-control-bar__ordering {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
        margin-left: 0;
    }

    #asseteka-store-surface .catalog-filter-chip,
    #asseteka-store-surface .catalog-filter-clear {
        min-height: 2.75rem;
    }

    #asseteka-store-surface .catalog-filter-clear {
        min-width: 2.75rem;
    }

    #asseteka-store-surface .catalog-dropdown__trigger {
        width: 100%;
        min-width: 0;
        white-space: normal;
    }

    #asseteka-store-surface .catalog-dropdown__panel {
        min-width: 0;
        max-width: calc(100vw - 5rem);
    }

    #asseteka-store-surface .catalog-control-bar__filters .catalog-dropdown:nth-child(2n) .catalog-dropdown__panel {
        right: 0;
        left: auto;
    }
}

@media (max-width: 40rem) {
    #asseteka-store-surface {
        --ak-gutter: 1rem;
    }

    #asseteka-store-surface .page-intro--catalog,
    #asseteka-store-surface .sale-landing__intro {
        padding-block: 1.5rem;
    }

    #asseteka-store-surface .page-intro--catalog,
    #asseteka-store-surface .sale-landing__heading {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
    }

    #asseteka-store-surface #store-title {
        font-size: 1.75rem;
    }

    #asseteka-store-surface .catalog-control-bar__ordering {
        grid-template-columns: minmax(0, 1fr);
    }
}
