/* --- Hub / filtered view toggle --- */

[data-view="hub"] .rp-product-category-toolbar,
[data-view="hub"] .rp-product-category-results {
	display: none;
}

[data-view="filtered"] .rp-product-category-hub {
	display: none;
}

/* --- Hub sections --- */
.rp-product-category-hub {
	margin-top: 30px;
}

.rp-product-category-hub__section {
	margin-bottom: 30px;
}

.rp-product-category-hub__heading {
	text-align: center;
	font-size: 36px;
	line-height: 42px;
	font-family: Muro Slant;
	text-transform: uppercase;
	color: #000;
	margin: 0 0 30px;
}

.rp-product-category-hub__section ul.products {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 22px 8px;
	margin: 0;
}

.rp-product-category-hub__section ul.products::before,
.rp-product-category-hub__section ul.products::after {
	display: none;
}

.woocommerce .rp-product-category-hub__section ul.products li.product {
	margin: 0;
	width: 100%;
	float: none;
}

.rp-product-category-hub__section .rps-product-card__image__link img {
	width: 100%;
	/* max-width: 160px; */
}

@media (max-width: 1023px) {
	.rp-product-category-hub__section ul.products {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 20px 8px;
	}

	.rp-product-category-hub__section ul.products li.product {
		margin: 0;
		width: 100%;
		float: none;
	}
}

@media (max-width: 768px) {
	.rp-product-category-hub {
		margin-top: 20px;
	}

	.rp-product-category-hub__heading {
		font-size: 20px;
		line-height: 1;
		margin-bottom: 20px;
	}

	.rp-product-category-hub__section {
		margin-bottom: 20px;
	}

	.rp-product-category-hub__section ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px 8px;
	}

	.rp-product-category-hub__section ul.products li.product {
		margin: 0;
		width: 100%;
		float: none;
	}
}

/* --- Hub Swiper (tablet / mobile) --- */

.rp-product-category-hub__viewport {
	overflow: visible;
}

.rp-product-category-hub__nav {
	display: none;
}

@media (max-width: 1023px) {
	.rp-product-category-hub__section.is-hub-slider-ready .rp-product-category-hub__viewport {
		overflow: hidden;
	}

	.is-hub-slider-ready .rp-product-category-hub__nav {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 8px;
		margin-top: 20px;
	}

	.is-hub-slider-ready ul.products {
		gap: 0;
		margin: 0;
		display: flex;
	}

	.is-hub-slider-ready ul.products li.product {
		margin: 0;
		width: auto;
		float: none;
		margin-bottom: 0 !important;
		height: auto;
		box-sizing: border-box;
	}

	.rp-product-category-hub__prev,
	.rp-product-category-hub__next {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		background: transparent;
		cursor: pointer;
		color: #000;
		padding: 0;
		flex-shrink: 0;
		border: none;
	}

	.rp-product-category-hub__prev:hover,
	.rp-product-category-hub__next:hover,
	.rp-product-category-hub__prev:focus,
	.rp-product-category-hub__next:focus {
		background-color: transparent;
		color: #000;
	}

	.rp-product-category-hub__prev[aria-disabled="true"],
	.rp-product-category-hub__next[aria-disabled="true"] {
		opacity: 0.4;
		cursor: default;
	}

	.rp-product-category-hub__pagination {
		flex-grow: 1;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.rp-product-category-hub__pagination .swiper-pagination-bullet {
		height: 14px;
		width: 2px;
		border-radius: 10px;
		background-color: var(--border);
		margin: 0 4px !important;
		opacity: 1;
	}

	.rp-product-category-hub__pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
		height: 20px;
		background-color: #000;
	}

	.is-hub-slider-ready .rp-product-category-hub__viewport ul.products::before,
	.is-hub-slider-ready .rp-product-category-hub__viewport ul.products::after {
		display: none;
	}
}

/* --- Toolbar --- */

.rp-product-category-toolbar {
  display: flex;
	flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.rp-product-category-toolbar__product-count,
.rp-product-category-toolbar__filters {
	width: 100%;
}

.rp-product-category-toolbar__filters {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	justify-content: space-between;
	padding-top: 8px;
}

.rp-product-category-toolbar__product-count {
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 10px;
}

.rps-product-count {
	font-size: 16px;
	line-height: 28px;
	font-weight: 700;
	color: var(--primary-text);
}

.rp-product-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 768px) {
	.rp-product-category-toolbar__filters {
		gap: 12px;
		padding-top: 0;
	}

	.rp-product-category-toolbar__product-count,
	.rp-product-filters {
		display: none;
	}
}

/* --- Active filters bar --- */

.rp-product-category-toolbar__active-filters {
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 4px;
}

.rps-active-filter {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: none;
	background: #fff;
	color: #000;
	font-size: 16px;
	font-weight: 400;
	line-height: 19px;
	cursor: pointer;
	white-space: nowrap;
	outline: 1px solid var(--border);
	outline-offset: -1px;
	transition: outline-color 0.15s, background-color 0.15s;
}

.rps-active-filter:hover,
.rps-active-filter:focus {
	outline-color: #f8f8f8;
	color: #000;
	background: #f8f8f8;
}

.rps-active-filter__icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
}

@media (max-width: 768px) {
	.rp-product-category-toolbar__active-filters {
		gap: 8px;
		padding-top: 8px;
		margin-top: 0;
	}

	.rps-active-filter {
		padding: 6px 10px;
		font-size: 12px;
		line-height: 14px;
		gap: 4px;
	}

	.rps-active-filter__icon svg {
		width: 12px;
		height: 12px;
	}
}


/* --- Filter triggers (price, attribute modals) --- */

.rps-filter-trigger,
.rps-sorting-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 16px;
	border: none;
	background: #fff;
	color: #000;
	font-size: 20px;
	line-height: 23px;
	cursor: pointer;
	white-space: nowrap;
	transition: outline-color 0.15s, background-color 0.15s;
	outline: 1px solid var(--border);
	outline-offset: -1px;
}

.rps-filter-trigger:hover,
.rps-filter-trigger:focus,
.rps-sorting-trigger:hover,
.rps-sorting-trigger:focus {
	outline: 1px solid #f8f8f8 !important;
	color: #000;
	background: #f8f8f8;
}

.rps-filter-trigger__label {
	display: flex;
	align-items: center;
	gap: 8px;
}

.rps-filter-trigger__count {
	font-size: 14px;
	line-height: 20px;
	font-weight: 600;
	padding: 0 6px;
	color: #fff;
	background-color: #000;
}

.rps-filter-trigger__icon,
.rps-sorting-trigger__icon {
	flex-shrink: 0;
	display: flex;
}

/* --- Price modal content --- */

.rps-price-modal__divider {
	border: none;
	border-top: 1px solid var(--border);
	margin: 24px 0 80px;
}

.rps-price-modal__content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 40px;
}

.rps-price-modal__slider-group {
	width: 100%;
	max-width: 480px;
	text-align: center;
}

.rps-price-modal__label {
	font-size: 20px;
	line-height: 23px;
	font-weight: 400;
	color: #000;
	margin: 0 0 8px;
}

.rps-price-modal__value {
	font-weight: 700;
}

.rps-price-modal__range {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 4px;
	background: #3b82f6;
	border-radius: 2px;
	outline: none;
}

.rps-price-modal__range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #3b82f6;
	cursor: pointer;
}

.rps-price-modal__range::-moz-range-thumb {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #3b82f6;
	cursor: pointer;
}

.rps-price-modal__apply {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 40px;
	background-color: var(--primary);
	border: none;
	color: #fff;
	font-size: 20px;
	line-height: 23px;
	font-weight: 700;
	cursor: pointer;
	margin-top: 40px;
	transition: background-color 0.15s;
}

.rps-price-modal__apply:hover,
.rps-price-modal__apply:focus {
	color: #fff;
	background-color: var(--primary-hover);
}

@media (max-width: 768px) {
	.rps-filter-trigger {
		padding: 6px 8px;
		gap: 4px;
		font-size: 12px;
		line-height: 14px;
	}

	.rps-price-modal__divider {
		margin: 20px 0 40px;
	}

	.rps-price-modal__content {
		gap: 20px;
	}

	.rps-price-modal__label {
		font-size: 14px;
		line-height: 16px;
	}

	.rps-price-modal__slider-group {
		max-width: 100%;
	}

	.rps-price-modal__apply {
		padding: 12px 36px;
		font-size: 14px;
		line-height: 16px;
		margin-top: 20px;
	}

	.rps-filter-trigger__count {
		font-size: 12px;
		line-height: 18px;
	}
}

/* --- Attribute modal --- */

.rps-attr-modal__content {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.rps-attr-modal__divider {
	border: none;
	border-top: 1px solid var(--border);
	margin: 24px 0 80px;
}

.rps-attr-modal__options {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px 40px;
}

.rps-attr-modal__option {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 20px;
	line-height: 23px;
	font-weight: 400;
	color: #000;
	cursor: pointer;
	white-space: nowrap;
}

.rps-attr-modal__option input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--primary);
	cursor: pointer;
}

.rps-attr-modal__apply {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 40px;
	background-color: var(--primary);
	border: none;
	color: #fff;
	font-size: 20px;
	line-height: 23px;
	font-weight: 700;
	cursor: pointer;
	margin-top: 80px;
	transition: background-color 0.15s;
}

.rps-attr-modal__apply:hover,
.rps-attr-modal__apply:focus {
	color: #fff;
	background-color: var(--primary-hover);
}

@media (max-width: 768px) {
	.rps-attr-modal__divider {
		margin: 20px 0 24px;
	}

	.rps-attr-modal__options {
		gap: 16px 24px;
	}

	.rps-attr-modal__option {
		font-size: 14px;
		line-height: 16px;
	}

	.rps-attr-modal__option input[type="checkbox"] {
		width: 16px;
		height: 16px;
	}

	.rps-attr-modal__apply {
		padding: 12px 36px;
		font-size: 14px;
		line-height: 16px;
		margin-top: 32px;
	}
}

/* --- Mobile combined filter trigger --- */

.rps-mobile-filter-trigger {
	display: none;
}

.rps-mobile-filter-section {
	width: 100%;
	text-align: center;
}

.rps-mobile-filter-section__title {
	font-size: 20px;
	line-height: 23px;
	font-weight: 700;
	color: #000;
	margin: 0 0 16px;
	text-transform: uppercase;
}

/* --- Mobile nav drill-down --- */

.rps-mobile-nav {
	width: 100%;
}

.rps-mobile-nav__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 18px 24px;
	border: none;
	background: #fff;
	color: #000;
	font-size: 18px;
	font-weight: 500;
	line-height: 22px;
	cursor: pointer;
	text-align: left;
	transition: background-color 0.15s;
}

.rps-mobile-nav__row:hover,
.rps-mobile-nav__row:focus {
	background: #f8f8f8;
	color: #000;
}

.rps-mobile-nav__row-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.rps-mobile-nav__row-count {
	display: none;
}

.rps-mobile-nav__row-count--active {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	padding: 0 6px;
	background: #000;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}

.rps-mobile-nav__back {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 18px 24px;
	border: none;
	border-bottom: 1px solid var(--border);
	background: #fff;
	color: #000;
	font-size: 18px;
	font-weight: 600;
	line-height: 22px;
	cursor: pointer;
	text-align: left;
	transition: background-color 0.15s;
}

.rps-mobile-nav__back:hover,
.rps-mobile-nav__back:focus {
	background: #f8f8f8;
	color: #000;
}

.rps-mobile-nav__panel-content {
	padding: 24px;
}

.rps-mobile-nav__panel .rps-attr-modal__options {
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
}

.rps-mobile-nav__panel .rps-attr-modal__apply {
	margin: 24px auto 0;
	display: block;
}

@media (max-width: 768px) {
	.rps-mobile-filter-trigger {
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		padding: 8px;
		border: none;
		background: #fff;
		color: #000;
		font-size: 14px;
		line-height: 20px;
		cursor: pointer;
		white-space: nowrap;
		outline: 1px solid var(--border);
		outline-offset: -1px;
		gap: 4px;
		transition: outline-color 0.15s, background-color 0.15s;
	}

	.rps-mobile-filter-trigger:hover,
	.rps-mobile-filter-trigger:focus {
		outline: 1px solid #f8f8f8;
		color: #000;
		background: #f8f8f8;
	}

	.rps-mobile-filter-trigger__label {
		display: flex;
		gap: 4px;
		align-items: center;
	}

	.rps-mobile-filter-trigger__icon {
		display: flex;
	}

	.rps-mobile-filter-trigger__icon svg {
		width: 20px;
		height: 20px;
	}

	.rp-product-filters > .rps-filter-trigger {
		display: none !important;
	}

	.rps-mobile-nav__row {
		padding: 16px 20px;
		font-size: 16px;
		line-height: 20px;
	}

	.rps-mobile-nav__back {
		padding: 16px 20px;
		font-size: 16px;
		line-height: 20px;
	}

	.rps-mobile-nav__back svg {
		width: 20px;
		height: 20px;
	}

	.rps-mobile-nav__panel-content {
		padding: 20px;
	}

	.rps-mobile-nav__panel .rps-attr-modal__options {
		gap: 16px;
	}
}

/* --- Sorting modal --- */

.rps-sorting-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s,
    visibility 0.2s;
}

.rps-sorting-modal-backdrop--open {
  opacity: 1;
  visibility: visible;
}

.rps-sorting-modal {
  position: relative;
  background: #fff;
  padding: 120px 100px 48px;
  width: 90%;
  max-width: 960px;
  max-height: 90vh;
  overflow-y: auto;
}

.rps-sorting-modal__close {
  position: absolute;
  top: 48px;
  right: 100px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #000;
  line-height: 0;
}

.rps-sorting-modal__close:hover,
.rps-sorting-modal__close:focus {
  color: #000;
	background-color: transparent;
}

.rps-sorting-modal__title {
  text-align: center;
  font-size: 36px;
	line-height: 42px;
  font-weight: 400;
	text-transform: uppercase;
	color: #000;
	font-style: italic;
	margin-bottom: 0;
}

.rps-sorting-modal__options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
	margin-top: 40px;
}

.rps-sorting-modal__option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border: 1px solid var(--border);
  background: #fff;
	color: #000;
  font-size: 20px;
	line-height: 23px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.rps-sorting-modal__option:hover,
.rps-sorting-modal__option:focus {
  border-color: var(--border-hover);
	color: #000;
	background-color: #fff;
}

.rps-sorting-modal__option--active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.rps-sorting-modal__option--active:hover,
.rps-sorting-modal__option--active:focus {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.rps-loading {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.2s;
}

.rps-no-results {
  padding: 40px 20px;
  text-align: center;
}

.rps-no-results p {
  font-size: 15px;
  color: #6b7280;
}

@media (max-width: 1024px) {
	.rps-sorting-modal__options {
		grid-template-columns: repeat(2, 1fr);
		padding: 0 30px;
	}
}

@media (max-width: 768px) {
	.rps-sorting-trigger {
		padding: 8px;
		gap: 4px;
		width: 100%;
	}

	.rps-sorting-trigger__label {
		font-size: 14px;
		line-height: 20px;
	}

	.rps-sorting-trigger__icon svg {
		width: 20px;
		height: 20px;
	}

	.rps-sorting-modal {
		width: 100%;
		height: 100%;
		max-width: 100%;
		max-height: 100%;
		padding: 0;
	}

	.rps-sorting-modal__close {
		top: 14px;
		right: 20px;
	}

	.rps-sorting-modal__close svg {
		width: 24px;
		height: 24px;
	}

	.rps-sorting-modal__title {
		padding: 16px 64px 16px 20px;
		font-size: 16px;
		line-height: 20px;
		text-align: left;
		text-transform: none;
		font-style: normal;
		border-bottom: 1px solid var(--border);
	}

	.rps-sorting-modal__options {
		margin-top: 20px;
    grid-template-columns: repeat(1, 1fr);
		gap: 20px;
  }

	.rps-sorting-modal__option {
		padding: 16px;
		font-size: 14px;
		line-height: 16px;
	}
}
