/* Shared storefront layout safeguards. Keep these rules independent from the
   generated Tailwind bundle so critical responsive layouts cannot disappear
   when a template introduces a new arbitrary utility. */
.storefront-attribute-row {
    display: grid;
    grid-template-columns: minmax(0, 35%) minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
}

.storefront-attribute-key,
.storefront-attribute-value {
    min-width: 0;
}

.storefront-attribute-value,
.storefront-long-content,
.storefront-filter-chip {
    overflow-wrap: anywhere;
    word-break: normal;
}

.storefront-attribute-value {
    white-space: pre-line;
}

.storefront-filter-chip {
    max-width: 100%;
    white-space: normal;
}

.storefront-facet-summary {
    display: flex;
    min-height: 2.75rem;
    cursor: pointer;
    list-style: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.storefront-facet-summary::-webkit-details-marker,
.storefront-facet-chevron,
.market-catalog-filter-chevron {
    flex: none;
    transition: transform 180ms ease;
}

.storefront-facet-disclosure[open] > .storefront-facet-summary .storefront-facet-chevron,
.market-catalog-filter-toggle[aria-expanded="true"] .market-catalog-filter-chevron {
    transform: rotate(180deg);
}

.storefront-facet-list {
    max-height: min(46vh, 26rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.35rem;
    scrollbar-gutter: stable;
}

.market-catalog-layout {
    display: block;
}

.market-catalog-filter-toggle {
    display: flex;
}

.market-catalog-filter-content {
    display: none;
    padding-top: 0.5rem;
}

.market-catalog-filter-content.is-open {
    display: block;
}

@media (max-width: 639px) {
    .storefront-attribute-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.25rem;
    }
}

@media (min-width: 1024px) {
    .market-catalog-layout {
        display: grid;
        grid-template-columns: 280px minmax(0, 1fr);
        gap: 1.25rem;
    }

    .market-catalog-filter-toggle {
        display: none;
    }

    .market-catalog-filter-content {
        display: block;
        padding-top: 0;
    }

    .market-catalog-sidebar-inner {
        position: sticky;
        top: 6rem;
    }

    .storefront-catalog-heading--minimal {
        grid-template-columns: minmax(0, 1fr) 360px;
    }

    .storefront-catalog-heading--bold {
        grid-template-columns: minmax(0, 1fr) 390px;
    }

    .storefront-catalog-layout--minimal {
        grid-template-columns: 310px minmax(0, 1fr);
    }

    .storefront-catalog-layout--bold {
        grid-template-columns: 320px minmax(0, 1fr);
    }
}
