.catalog-facets, #productGrid { scroll-margin-top: 220px; }
.catalog-facets { margin-bottom: 28px; }
.catalog-toolbar { display: flex; align-items: center; gap: 24px; border-block: 1px solid #dedbd5; padding: 12px 0; }
.catalog-controls { flex: 1; min-width: 0; }
#catalogFilterForm { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.catalog-filter-label, .catalog-result-count { color: #655f58; font-size: .85rem; }
.catalog-result-count { white-space: nowrap; }
.catalog-filter-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.catalog-facet { position: relative; }
.catalog-facet summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: .875rem; color: #25221e; cursor: pointer; }
.catalog-facet summary::-webkit-details-marker { display: none; }
.catalog-facet summary > i { font-size: .6rem; transition: transform .18s ease; }
.catalog-facet[open] summary > i { transform: rotate(180deg); }
.catalog-facet[open] summary { text-decoration: underline; text-underline-offset: 5px; }
.catalog-facet-panel { position: absolute; top: calc(100% + 10px); left: 0; z-index: 1040; width: 290px; max-width: calc(100vw - 32px); padding: 18px; background: #fff; box-shadow: 0 10px 35px #29231b26; }
.catalog-facet:nth-last-child(-n+2) .catalog-facet-panel { left: auto; right: 0; }
.catalog-facet-heading { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid #eee; font-size: .8rem; }
.catalog-facets button[data-clear-facet], .catalog-facets button[data-clear-all] { border: 0; background: none; padding: 0; color: #59534d; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.catalog-option-list { max-height: 280px; overflow-y: auto; overscroll-behavior: contain; }
.catalog-option { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 2px; font-size: .875rem; line-height: 1.5; cursor: pointer; }
.catalog-option input { flex-shrink: 0; width: 17px; height: 17px; margin-top: 2px; accent-color: #342b20; }
.catalog-selection-count:empty { display: none; }
.catalog-selection-count { font-size: .7rem; font-variant-numeric: tabular-nums; }
.catalog-price-fields { display: flex; align-items: center; gap: 12px; }
.catalog-price-fields label { flex: 1; min-width: 0; font-size: .8rem; }
.catalog-price-fields input { width: 100%; min-height: 44px; border: 1px solid #a49c91; margin-top: 6px; padding: 8px; border-radius: 0; }
.catalog-more-panel { width: 320px; max-height: 65vh; overflow-y: auto; }
.catalog-more-group { margin-bottom: 20px; }
.catalog-more-group:last-child { margin-bottom: 0; }
.catalog-more-group legend { font-size: .875rem; font-weight: 600; margin: 0 0 4px; }
.catalog-more-group > button { font-size: .75rem !important; margin-bottom: 8px; }
.catalog-sort { margin-left: auto; }
.catalog-sort label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.catalog-sort select { max-width: 100%; background: transparent; border: 0; color: #25221e; min-height: 44px; padding: 8px 20px 8px 0; font-size: .85rem; cursor: pointer; }
.catalog-active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.catalog-active-filters:not(:empty) { padding-top: 16px; }
.catalog-filter-chip { background: #f4f1eb; border: 1px solid #ded8cc; color: #332c23; padding: 8px 12px; min-height: 40px; display: inline-flex; gap: 10px; align-items: center; font-size: .8rem; border-radius: 4px; }
.catalog-filter-chip i { font-size: .7rem; }
.catalog-filter-error { margin-top: 16px; color: #a32519; }
.catalog-mobile-open, .catalog-drawer-heading, .catalog-mobile-actions, .category-mobile-controls { display: none; }
.catalog-facets :is(button,input,select,summary):focus-visible { outline: 2px solid #9c763a; outline-offset: 4px; }
.category-products-wrap .product-img-container { height: 420px; padding: 14px; display: flex; align-items: center; justify-content: center; background: #fff; }
.category-products-wrap .product-img-container img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
#productGrid[aria-busy="true"] { opacity: .5; }
@media (max-width: 991.98px) {
    .catalog-facets, #productGrid { scroll-margin-top: 130px; }
    .catalog-toolbar { justify-content: space-between; gap: 16px; }
    .catalog-mobile-open { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; border: 0; background: none; color: #25221e; font-size: .9rem; }
    .catalog-controls { display: none; }
    .catalog-controls.is-open { display: flex; flex-direction: column; position: fixed; inset: 0 0 0 auto; width: min(430px,100%); z-index: 2201; background: #fff; padding: 20px; overflow-y: auto; overscroll-behavior: contain; }
    .catalog-drawer-heading { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; border-bottom: 1px solid #dedbd5; }
    .catalog-drawer-heading h2 { font-family: var(--font-heading); font-size: 1.5rem; margin: 0; }
    .catalog-drawer-heading button { width: 44px; height: 44px; border: 0; background: none; }
    .catalog-controls #catalogFilterForm { display: flex; flex-direction: column; flex: 1; align-items: stretch; gap: 0; }
    .catalog-filter-label { display: none; }
    .catalog-filter-groups { display: block; }
    .catalog-facet { border-bottom: 1px solid #dedbd5; }
    .catalog-facet summary { justify-content: space-between; padding: 16px 0; }
    .catalog-facet-panel, .catalog-facet:nth-last-child(-n+2) .catalog-facet-panel { position: static; width: 100%; max-width: none; box-shadow: none; padding: 0 0 18px; max-height: none; }
    .catalog-facet-heading { border: 0; margin: 0; }
    .catalog-option-list { max-height: 260px; }
    .catalog-sort { margin: 20px 0; }
    .catalog-sort label { position: static; width: auto; height: auto; display: block; clip-path: none; font-size: .85rem; margin-bottom: 8px; }
    .catalog-sort select { border: 1px solid #a49c91; width: 100%; padding: 12px; }
    .catalog-mobile-actions { position: sticky; bottom: -20px; display: flex; align-items: center; gap: 24px; padding: 16px 0; margin-top: auto; background: #fff; border-top: 1px solid #dedbd5; }
    .catalog-apply { flex: 1; min-height: 48px; border: 0; background: #28231d; color: white; }
    .catalog-backdrop:not([hidden]) { position: fixed; inset: 0; background: #0006; z-index: 2200; }
    .category-mobile-controls { display: flex; margin-bottom: 16px; }
    .mobile-grid-toggle .btn { padding: 8px 12px; }
    .mobile-grid-toggle .btn.active { background: #25221e; color: #fff; }
    #productGrid.mobile-cols-1 .product-grid-col { width: 100%; }
    #productGrid.mobile-cols-2 .product-grid-col { width: 50%; }
    .category-products-wrap .product-img-container { height: 320px; }
}
@media (max-width: 767.98px) {
    .category-products-wrap .product-img-container { height: 250px; padding: 10px; }
    #productGrid nav > .d-flex.justify-content-between.flex-fill.d-sm-none { display: none !important; }
    #productGrid nav > .d-none.flex-sm-fill.d-sm-flex { display: flex !important; justify-content: center !important; }
    #productGrid nav > .d-none.flex-sm-fill.d-sm-flex > div:first-child { display: none !important; }
    #productGrid .pagination { flex-wrap: wrap; justify-content: center; gap: 6px; }
    #productGrid .page-link { margin: 0; padding: 8px 10px; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) { .catalog-facet summary > i { transition: none; } }

/* Price facet: two accessible range handles and matching amount fields. */
.catalog-price-panel { width: 350px; padding: 24px; background: #f6f4f0; border: 1px solid #e3dfd8; box-shadow: 0 10px 28px #29231b14; }
.catalog-price-ceiling { font-size: .8rem; line-height: 1.5; color: #25221e; margin: 0 0 20px; }
.catalog-price-range { position: relative; height: 24px; margin: 0 8px 16px; }
.catalog-price-track { position: absolute; top: 10px; left: 0; right: 0; height: 3px; background: linear-gradient(to right, #c6c0b7 var(--range-start), #24211d var(--range-start), #24211d var(--range-end), #c6c0b7 var(--range-end)); }
.catalog-price-range input { position: absolute; inset: 0; width: 100%; height: 24px; margin: 0; appearance: none; -webkit-appearance: none; background: transparent; pointer-events: none; }
.catalog-price-range input::-webkit-slider-runnable-track { height: 3px; background: transparent; }
.catalog-price-range input::-moz-range-track { height: 3px; background: transparent; }
.catalog-price-range input::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; pointer-events: auto; height: 18px; width: 18px; border: 1px solid #26231f; border-radius: 3px; background: #fff; margin-top: -7px; cursor: ew-resize; }
.catalog-price-range input::-moz-range-thumb { pointer-events: auto; height: 18px; width: 18px; border: 1px solid #26231f; border-radius: 3px; background: #fff; cursor: ew-resize; }
.catalog-price-range input:focus-visible { outline: none; }
.catalog-price-range input:focus-visible::-webkit-slider-thumb { outline: 2px solid #9c763a; outline-offset: 3px; }
.catalog-price-range input:focus-visible::-moz-range-thumb { outline: 2px solid #9c763a; outline-offset: 3px; }
.catalog-price-panel .catalog-price-fields { gap: 20px; }
.catalog-price-panel .catalog-price-fields label { display: flex; align-items: center; gap: 10px; }
.catalog-price-panel .catalog-price-fields input { margin: 0; min-width: 0; background: transparent; border-color: #655e54; padding: 10px; font-size: .8rem; }
.catalog-price-panel .catalog-price-reset { display: block; margin-top: 16px; font-size: .75rem; min-height: 24px; }
@media (max-width: 991.98px) {
    .catalog-price-panel { padding: 12px 0 20px; background: transparent; border: 0; }
    .catalog-price-range input { height: 44px; top: -10px; }
    .catalog-price-range input::-webkit-slider-thumb { height: 24px; width: 24px; margin-top: -10px; }
    .catalog-price-range input::-moz-range-thumb { height: 24px; width: 24px; }
}
