body.post-type-archive-product .site-main.rhm-shop-page,
body.tax-product_cat .site-main.rhm-shop-page,
body.tax-product_tag .site-main.rhm-shop-page,
body.tax-pa_benefits .site-main.rhm-shop-page {
  padding-bottom: 64px;
  background: var(--rhm-color-surface, #fff);
}

.rhm-shop-hero {
  padding: 32px 0;
  background: var(--rhm-color-surface-subtle, #f6f7f8);
  border-bottom: 1px solid var(--rhm-color-outline, #d9dcd7);
}

.rhm-shop-hero__inner,
.rhm-shop-hero__content {
  display: grid;
}

.rhm-shop-hero__content {
  max-width: 68ch;
  gap: 12px;
}

.rhm-shop-hero__title {
  margin: 0;
  color: var(--rhm-color-ink, #171817);
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: 0;
}

.rhm-shop-hero__description {
  max-width: 56ch;
  margin: 0;
  color: var(--rhm-color-ink-muted, #626660);
  font-size: 16px;
  line-height: 1.5;
}

.rhm-shop-page__main {
  padding-top: 20px;
}

.rhm-shop-page__notices:not(:empty) {
  margin-bottom: 12px;
}

.rhm-shop-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--rhm-color-ink-muted, #626660);
  font-size: 14px;
}

.rhm-shop-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.rhm-shop-breadcrumb a:hover {
  color: var(--rhm-color-brand-strong, #59400c);
  text-decoration: underline;
}

.rhm-shop-breadcrumb__sep {
  color: var(--rhm-color-outline, #d9dcd7);
}

.rhm-shop-layout,
.rhm-shop-content,
.rhm-shop-toolbar {
  display: grid;
}

.rhm-shop-layout {
  gap: 20px;
}

.rhm-shop-content {
  min-width: 0;
  gap: 16px;
}

.rhm-shop-filters__backdrop {
  position: fixed;
  inset: 0;
  z-index: 48;
  background: rgb(23 24 23 / 55%);
}

.rhm-shop-filters {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 49;
  display: grid;
  width: min(88vw, 340px);
  align-content: start;
  gap: 20px;
  padding: 20px 16px 32px;
  overflow-y: auto;
  background: var(--rhm-color-surface, #fff);
  border-right: 1px solid var(--rhm-color-outline, #d9dcd7);
  transform: translateX(-100%);
  transition: transform 180ms ease;
}

.rhm-shop-filters.is-open {
  transform: translateX(0);
}

.rhm-shop-filters-open {
  overflow: hidden;
}

.rhm-shop-filters-open .rhm-shop-filters__backdrop {
  display: block;
}

.rhm-shop-filters__header,
.rhm-shop-filter__heading-row,
.rhm-shop-price-filter__meta,
.rhm-shop-toolbar__top,
.rhm-shop-toolbar__bottom {
  display: flex;
  align-items: center;
}

.rhm-shop-filters__header,
.rhm-shop-filter__heading-row,
.rhm-shop-price-filter__meta {
  justify-content: space-between;
}

.rhm-shop-filters__title {
  margin: 0;
  color: var(--rhm-color-ink, #171817);
  font-size: 20px;
  line-height: 1.2;
}

.rhm-shop-filters__close {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  color: var(--rhm-color-ink, #171817);
  background: var(--rhm-color-surface, #fff);
  border: 1px solid var(--rhm-color-outline, #d9dcd7);
  border-radius: 10px;
  font-size: 24px;
  line-height: 1;
}

.rhm-shop-filter {
  display: grid;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rhm-color-outline, #d9dcd7);
}

.rhm-shop-filter:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.rhm-shop-filter__heading-row {
  gap: 12px;
}

.rhm-shop-filter__heading {
  margin: 0;
  color: var(--rhm-color-ink, #171817);
  font-size: 16px;
  line-height: 1.25;
}

.rhm-shop-filter__dash {
  width: 12px;
  height: 2px;
  background: var(--rhm-color-outline, #d9dcd7);
}

.rhm-shop-filter__options {
  display: grid;
  gap: 4px;
}

.rhm-shop-filter__option {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  color: var(--rhm-color-ink-muted, #626660);
  border-radius: 8px;
  text-decoration: none;
}

.rhm-shop-filter__option:hover {
  color: var(--rhm-color-ink, #171817);
  background: var(--rhm-color-surface-subtle, #f6f7f8);
}

.rhm-shop-filter__control {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: var(--rhm-color-surface, #fff);
  border: 1px solid var(--rhm-color-outline, #d9dcd7);
  border-radius: 50%;
}

.rhm-shop-filter__options--checkbox .rhm-shop-filter__control {
  border-radius: 4px;
}

.rhm-shop-filter__option.is-active {
  color: var(--rhm-color-brand-strong, #59400c);
  background: var(--rhm-color-brand-soft, #f4eddc);
}

.rhm-shop-filter__option.is-active .rhm-shop-filter__control {
  background: var(--rhm-color-brand, #765816);
  border-color: var(--rhm-color-brand, #765816);
  box-shadow: inset 0 0 0 4px var(--rhm-color-surface, #fff);
}

.rhm-shop-filter__count {
  color: var(--rhm-color-ink-muted, #626660);
}

.rhm-shop-price-filter,
.rhm-shop-price-filter__sliders {
  display: grid;
}

.rhm-shop-price-filter {
  gap: 12px;
}

.rhm-shop-price-filter__sliders {
  gap: 4px;
}

.rhm-shop-price-filter input[type="range"] {
  width: 100%;
  height: 28px;
  margin: 0;
  accent-color: var(--rhm-color-brand, #765816);
}

.rhm-shop-price-filter__meta {
  color: var(--rhm-color-ink-muted, #626660);
  font-size: 14px;
  font-weight: 600;
}

.rhm-shop-price-filter__submit {
  min-width: 88px;
  min-height: 44px;
  border-radius: 10px;
}

.rhm-shop-toolbar {
  gap: 12px;
}

.rhm-shop-toolbar__top,
.rhm-shop-toolbar__bottom {
  justify-content: space-between;
  gap: 12px;
}

.rhm-shop-toolbar__summary {
  display: none;
}

.rhm-shop-toolbar__summary,
.rhm-shop-toolbar__mobile-summary {
  color: var(--rhm-color-ink-muted, #626660);
  font-size: 14px;
}

.rhm-shop-toolbar__actions {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(96px, 0.75fr) minmax(0, 1.25fr);
  gap: 8px;
}

.rhm-shop-toolbar__filter-toggle,
.rhm-shop-toolbar__ordering .woocommerce-ordering,
.rhm-shop-toolbar__view-button {
  min-height: 48px;
  color: var(--rhm-color-ink, #171817);
  background: var(--rhm-color-surface, #fff);
  border: 1px solid var(--rhm-color-outline, #d9dcd7);
  border-radius: 10px;
}

.rhm-shop-toolbar__filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  font-weight: 700;
}

.rhm-shop-toolbar__icon,
.rhm-shop-toolbar__icon svg,
.rhm-shop-toolbar__view-button svg {
  width: 20px;
  height: 20px;
}

.rhm-shop-toolbar__ordering,
.rhm-shop-toolbar__ordering .woocommerce-ordering {
  min-width: 0;
  margin: 0;
}

.rhm-shop-toolbar__ordering .woocommerce-ordering {
  position: relative;
  display: flex;
  align-items: center;
}

.rhm-shop-toolbar__ordering .orderby {
  width: 100%;
  min-width: 0;
  height: 46px;
  margin: 0;
  padding: 0 34px 0 0;
  color: var(--rhm-color-ink, #171817);
  background-color: transparent;
  border: 0;
  font-weight: 600;
}

.rhm-shop-toolbar__view-switch {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.rhm-shop-toolbar__view-button {
  display: inline-grid;
  width: 48px;
  padding: 0;
  place-items: center;
}

.rhm-shop-toolbar__view-button.is-active {
  color: var(--rhm-color-brand-strong, #59400c);
  background: var(--rhm-color-brand-soft, #f4eddc);
  border-color: var(--rhm-color-brand, #765816);
}

.rhm-shop-products__grid,
.rhm-shop-products[data-view="list"] .rhm-shop-products__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rhm-shop-products .product {
  min-width: 0;
  margin: 0;
}

@media (max-width: 767.98px) {
  .rhm-shop-products[data-view="list"] .rhm-product-card--archive .rhm-product-card__rating {
    align-content: center;
  }

  .rhm-shop-products[data-view="list"] .rhm-product-card--archive .rhm-product-card__rating .rhm-rating-summary {
    flex-wrap: nowrap;
  }

  .rhm-shop-products[data-view="list"] .rhm-product-card--archive .rhm-rating-summary__reviews {
    flex-basis: auto;
    margin-left: 2px;
  }

}

.rhm-shop-products[data-view="list"] .rhm-shop-products__grid {
  grid-template-columns: 1fr;
}

.rhm-shop-products[data-view="list"] .rhm-product-card--archive {
  display: grid;
  grid-template-columns: clamp(104px, 36%, 160px) minmax(0, 1fr);
  align-items: start;
}

.rhm-shop-products[data-view="list"] .rhm-product-card--archive .rhm-product-card__image-wrapper {
  max-width: 160px;
}

body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product,
body.tax-pa_benefits ul.products li.product {
  float: none;
  clear: none;
  width: 100%;
  margin: 0;
}

body.post-type-archive-product ul.products::before,
body.post-type-archive-product ul.products::after,
body.tax-product_cat ul.products::before,
body.tax-product_cat ul.products::after,
body.tax-product_tag ul.products::before,
body.tax-product_tag ul.products::after,
body.tax-pa_benefits ul.products::before,
body.tax-pa_benefits ul.products::after {
  display: none;
  content: none;
}

.rhm-shop-empty-state {
  padding: 24px;
  background: var(--rhm-color-surface, #fff);
  border: 1px solid var(--rhm-color-outline, #d9dcd7);
  border-radius: 10px;
}

body.post-type-archive-product .woocommerce-pagination,
body.tax-product_cat .woocommerce-pagination,
body.tax-product_tag .woocommerce-pagination,
body.tax-pa_benefits .woocommerce-pagination {
  margin-top: 20px;
}

body.post-type-archive-product .woocommerce-pagination ul.page-numbers,
body.tax-product_cat .woocommerce-pagination ul.page-numbers,
body.tax-product_tag .woocommerce-pagination ul.page-numbers,
body.tax-pa_benefits .woocommerce-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
}

body.post-type-archive-product .woocommerce-pagination .page-numbers li,
body.tax-product_cat .woocommerce-pagination .page-numbers li,
body.tax-product_tag .woocommerce-pagination .page-numbers li,
body.tax-pa_benefits .woocommerce-pagination .page-numbers li {
  border: 0;
}

body.post-type-archive-product .woocommerce-pagination .page-numbers a,
body.post-type-archive-product .woocommerce-pagination .page-numbers span,
body.tax-product_cat .woocommerce-pagination .page-numbers a,
body.tax-product_cat .woocommerce-pagination .page-numbers span,
body.tax-product_tag .woocommerce-pagination .page-numbers a,
body.tax-product_tag .woocommerce-pagination .page-numbers span,
body.tax-pa_benefits .woocommerce-pagination .page-numbers a,
body.tax-pa_benefits .woocommerce-pagination .page-numbers span {
  display: inline-flex;
  min-width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--rhm-color-ink, #171817);
  background: var(--rhm-color-surface, #fff);
  border: 1px solid var(--rhm-color-outline, #d9dcd7);
  border-radius: 10px;
}

body.post-type-archive-product .woocommerce-pagination .page-numbers .current,
body.tax-product_cat .woocommerce-pagination .page-numbers .current,
body.tax-product_tag .woocommerce-pagination .page-numbers .current,
body.tax-pa_benefits .woocommerce-pagination .page-numbers .current {
  color: var(--rhm-color-brand-strong, #59400c);
  background: var(--rhm-color-brand-soft, #f4eddc);
  border-color: var(--rhm-color-brand, #765816);
}

.rhm-shop-breadcrumb a:focus-visible,
.rhm-shop-filters__close:focus-visible,
.rhm-shop-filter__option:focus-visible,
.rhm-shop-toolbar__filter-toggle:focus-visible,
.rhm-shop-toolbar__view-button:focus-visible,
.rhm-shop-toolbar__ordering .orderby:focus-visible,
.rhm-shop-products .rhm-product-card--archive a:focus-visible,
.rhm-shop-products .rhm-product-card--archive button:focus-visible {
  outline: 3px solid var(--rhm-color-info, #176b73);
  outline-offset: 2px;
}

@media (max-width: 1099.98px) {
  .rhm-shop-filter__option,
  .rhm-shop-price-filter input[type="range"] {
    min-height: 44px;
  }
}

@media (max-width: 767.98px) {
  .rhm-shop-hero {
    padding: 24px 0;
  }

  .rhm-shop-hero__content {
    gap: 8px;
  }

  .rhm-shop-hero__title {
    font-size: 32px;
  }

  .rhm-shop-hero__description {
    font-size: 15px;
  }

  .rhm-shop-page__main {
    padding-top: 16px;
  }

  .rhm-shop-breadcrumb {
    margin-bottom: 16px;
  }
}

@media (min-width: 1024px) {
  body.post-type-archive-product .woocommerce-pagination .page-numbers a,
  body.post-type-archive-product .woocommerce-pagination .page-numbers span,
  body.tax-product_cat .woocommerce-pagination .page-numbers a,
  body.tax-product_cat .woocommerce-pagination .page-numbers span,
  body.tax-product_tag .woocommerce-pagination .page-numbers a,
  body.tax-product_tag .woocommerce-pagination .page-numbers span,
  body.tax-pa_benefits .woocommerce-pagination .page-numbers a,
  body.tax-pa_benefits .woocommerce-pagination .page-numbers span {
    min-width: 40px;
    height: 40px;
  }
}

@media (min-width: 768px) {
  .rhm-shop-toolbar__summary {
    display: block;
  }

  .rhm-shop-toolbar__mobile-summary {
    display: none;
  }

  .rhm-shop-toolbar__actions {
    width: auto;
    grid-template-columns: auto minmax(220px, 280px);
    margin-left: auto;
  }

  .rhm-shop-toolbar__bottom {
    justify-content: flex-end;
  }

  .rhm-shop-products__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

}

@media (min-width: 1100px) {
  .rhm-shop-price-filter__submit,
  .rhm-shop-toolbar__ordering .woocommerce-ordering,
  .rhm-shop-toolbar__view-button {
    min-height: 40px;
  }

  .rhm-shop-toolbar__ordering .orderby {
    height: 40px;
    min-height: 40px;
  }

  .rhm-shop-toolbar__view-button {
    width: 40px;
  }

  .rhm-shop-toolbar__actions {
    grid-template-columns: minmax(220px, 280px);
  }

  .rhm-shop-toolbar__filter-toggle {
    display: none;
  }

  .rhm-shop-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
  }

  .rhm-shop-filters__backdrop,
  .rhm-shop-filters__close {
    display: none;
  }

  .rhm-shop-filters {
    position: sticky;
    top: 96px;
    width: auto;
    height: auto;
    max-height: calc(100vh - 120px);
    padding: 0;
    background: transparent;
    border-right: 0;
    transform: none;
    z-index: 1;
  }

  .rhm-shop-products__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .rhm-shop-filters {
    transition: none;
  }
}
