/* ==========================================================================
   Autodex.ba — product archive / shop
   ========================================================================== */

#page-wrapper {
	width: 100%;
	max-width: var(--autodex-container-shop) !important;
	margin: 12px auto 50px;
	padding: 0 20px;
}

.custom-shop-wrapper {
	display: flex;
	align-items: flex-start;
	gap: 35px;
}

.shop-sidebar {
	flex: 1 1 0;
	min-width: 0;
}

.shop-products {
	flex: 3 1 0;
	min-width: 0;
}

/* --------------------------------------------------------------------------
   Sidebar filters
   -------------------------------------------------------------------------- */

.filter_by {
	margin: 0 0 10px;
	color: var(--autodex-heading);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
}

.price-filter {
	margin-top: 2px;
}

.price-filter > br {
	display: none;
}

.drange {
	position: relative;
	display: flex;
	align-items: center;
	max-width: 400px;
	height: 50px;
	margin: 0 10px 20px;
}

.drange::before {
	content: "";
	position: absolute;
	top: 50%;
	right: 0;
	left: 0;
	z-index: 0;
	height: 6px;
	border-radius: 999px;
	background: #E1E4E8;
	transform: translateY(-50%);
	pointer-events: none;
}

.drange input[type="range"] {
	position: absolute;
	z-index: 1;
	width: 100%;
	height: 6px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	pointer-events: none;
	appearance: none;
	-webkit-appearance: none;
}

.drange input[type="range"]:focus {
	outline: none;
}

.drange input[type="range"]::-webkit-slider-runnable-track {
	height: 6px;
	border-radius: 999px;
	background: transparent;
}

.drange input[type="range"]::-moz-range-track {
	height: 6px;
	border-radius: 999px;
	background: transparent;
}

.drange input[type="range"]::-webkit-slider-thumb {
	width: 20px;
	height: 20px;
	margin-top: -7px;
	border: 0;
	border-radius: 50%;
	background: var(--autodex-primary);
	box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0, 0, 0, .25);
	pointer-events: all;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.drange input[type="range"]::-moz-range-thumb {
	width: 20px;
	height: 20px;
	border: 0;
	border-radius: 50%;
	background: var(--autodex-primary);
	box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0, 0, 0, .25);
	pointer-events: all;
	cursor: pointer;
}

.drange .dmin,
.drange .dmax {
	position: absolute;
	bottom: -5px;
	color: var(--autodex-heading);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
}

.drange .dmin { left: 0; }
.drange .dmax { right: 0; }

.price-inputs {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.price-input-wrap {
	position: relative;
	width: 48%;
}

.price-input-wrap input {
	width: 100%;
	height: 34px;
	min-height: 34px;
	padding: 4px 34px 4px 38px !important;
	border: 1px solid #D9DEE4;
	border-radius: 3px;
	background: #fff;
	color: var(--autodex-heading);
	font-size: 14px;
	font-weight: 600 !important;
	-moz-appearance: textfield;
}

.price-input-wrap input::-webkit-inner-spin-button,
.price-input-wrap input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.price-prefix,
.price-suffix {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: #555;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	pointer-events: none;
}

.price-prefix { left: 10px; }
.price-suffix { right: 10px; }

#price-filter-submit {
	width: calc(100% - 16px);
	margin: 8px;
	padding: 7px 14px;
	min-height: 38px;
	border-radius: 3px;
	font-size: 14px;
	font-weight: 600;
}

.shop-subcategories,
.shop-brands {
	margin-top: 8px;
}

.shop-subcategories .filter_by,
.shop-brands .filter_by {
	margin-top: 10px;
}

ul.filter-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

ul.filter-list li {
	margin: 0;
	padding: 0;
	line-height: 1.55;
}

ul.filter-list li a {
	display: inline-block;
	padding: 1px 0;
	color: var(--autodex-primary);
	font-size: 16px;
	line-height: 1.55;
}

ul.filter-list li a:hover {
	color: var(--autodex-primary-dark);
}

/* --------------------------------------------------------------------------
   Top bar and pagination
   -------------------------------------------------------------------------- */

.autodex-shop-notices .woocommerce-notices-wrapper,
.autodex-shop-notices .woocommerce-message,
.autodex-shop-notices .woocommerce-info,
.autodex-shop-notices .woocommerce-error {
	margin-bottom: 20px;
}

.shop-search-summary {
	margin: 0 0 16px;
	font-size: 15px;
}

.shop-top-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 20px;
}

.shop-top-bar .shop-sorting {
	display: flex;
	align-items: center;
	flex-direction: row;
	gap: 10px;
	width: calc(100% - 150px);
}

.sort-label {
	flex: 0 0 auto;
	color: var(--autodex-text);
	font-size: 15px;
	line-height: 1.4;
}

.woocommerce-ordering {
	margin: 0;
}

.woocommerce-ordering select {
	width: 220px;
	height: 36px;
	min-height: 36px;
	padding: 4px 32px 4px 12px;
	border: 1px solid #D9DEE4;
	border-radius: 3px;
	background-color: #fff;
	color: var(--autodex-text);
	font-size: 14px;
}

.shop-pagination {
	flex: 0 0 auto;
}

.autodex-pagination__nav .nav-links,
.shop-pagination .nav-links {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 7px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.autodex-pagination__nav .page-numbers,
.shop-pagination .page-numbers,
.shop-pagination .nav-links a,
.shop-pagination .nav-links span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid #D9DEE4;
	border-radius: 3px;
	background: #fff;
	color: #1B1B1B;
	font-size: 14px;
	line-height: 1;
	text-decoration: none;
	transition: background-color var(--autodex-transition), border-color var(--autodex-transition), color var(--autodex-transition);
}

.autodex-pagination__nav .page-numbers.current,
.shop-pagination .page-numbers.current,
.shop-pagination .nav-links span.current {
	border-color: var(--autodex-primary);
	background: var(--autodex-primary);
	color: #fff;
}

.autodex-pagination__nav .page-numbers:hover,
.shop-pagination .page-numbers:hover,
.shop-pagination .nav-links a:hover {
	border-color: var(--autodex-primary);
	background: var(--autodex-primary);
	color: #fff;
}

.autodex-pagination__nav .dots,
.shop-pagination .dots {
	border-color: transparent;
	background: transparent;
}

#bottom-pagination {
	display: flex;
	justify-content: center;
	margin-top: 35px;
}

#bottom-pagination .nav-links {
	justify-content: center;
}

/* --------------------------------------------------------------------------
   Mobile filter slide-in
   -------------------------------------------------------------------------- */

.mobile-filter-trigger-wrapper {
	display: none;
	width: 100%;
	margin-bottom: 20px;
	padding: 0;
}

.mobile-filter-btn {
	width: 100%;
	min-height: 44px;
	padding: 12px 20px;
	border-radius: 4px;
	background: #222;
	border-color: #222;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	gap: 10px;
}

.mobile-filter-btn:hover {
	background: #000;
	border-color: #000;
}

.sidebar-close-wrapper {
	display: none;
	justify-content: flex-end;
	margin-bottom: 20px;
}

.sidebar-close-btn {
	padding: 5px 10px;
	border: 0;
	background: transparent;
	color: #333;
	font-size: 28px;
	line-height: 1;
}

.sidebar-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99998;
	background: rgba(0, 0, 0, .5);
	opacity: 0;
	transition: opacity .3s ease;
}

.sidebar-overlay.active {
	display: block;
	opacity: 1;
}

.autodex-no-products {
	padding: 30px 0;
}

.autodex-no-products .woocommerce-info {
	margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1050px) {
	.price-inputs {
		flex-direction: column;
		gap: 11px;
	}

	.price-input-wrap {
		width: 100%;
	}

	.price-input-wrap input {
		padding-left: 50px !important;
	}

	.shop-top-bar .shop-sorting {
		width: 100% !important;
	}

	.woocommerce-ordering {
		width: calc(100% - 100px);
	}

	.woocommerce-ordering select {
		width: 100%;
	}

	#page-wrapper {
		padding: 15px 25px 40px;
	}
}

@media (max-width: 767px) {
	#page-wrapper {
		padding: 14px 20px 40px;
		margin-top: 5px;
	}

	.custom-shop-wrapper {
		flex-direction: column;
		gap: 0;
	}

	.mobile-filter-trigger-wrapper {
		display: block;
	}

	.sidebar-close-wrapper {
		display: flex;
	}

	aside.shop-sidebar {
		position: fixed;
		top: 0;
		right: -100%;
		z-index: 99999;
		width: 85%;
		max-width: 320px;
		height: 100%;
		margin: 0;
		padding: 20px 25px !important;
		background: #fff;
		box-shadow: -5px 0 15px rgba(0, 0, 0, .1);
		overflow-y: auto;
		transition: right .4s cubic-bezier(.25, .8, .25, 1);
	}

	aside.shop-sidebar.active {
		right: 0;
	}

	.shop-products {
		width: 100% !important;
		flex: none !important;
	}

	.shop-top-bar {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.shop-top-bar .shop-sorting {
		width: 100%;
		flex-wrap: wrap;
	}

	.sort-label {
		font-size: 14px;
	}

	.woocommerce-ordering {
		width: 100%;
	}

	.shop-pagination {
		width: 100%;
	}

	.shop-pagination .nav-links {
		justify-content: flex-end;
	}

	#bottom-pagination {
		margin-top: 25px;
	}

	#bottom-pagination .nav-links {
		justify-content: center;
	}

	.autodex-pagination__nav .page-numbers,
	.shop-pagination .page-numbers {
		min-width: 33px;
		height: 33px;
		padding: 0 8px;
		font-size: 13px;
	}
}
