/**
 * Product sidebar frontend styles.
 *
 * Location: /assets/css/frontend/sidebar/product-sidebar.css
 *
 * @package SunTechPortal
 */

.stp-product-sidebar,
.stp-product-sidebar *,
.stp-product-sidebar *::before,
.stp-product-sidebar *::after {
	box-sizing: border-box;
}

.stp-product-sidebar {
	--stp-sidebar-primary: #ff5a00;
	--stp-sidebar-primary-dark: #c2410c;
	--stp-sidebar-text: #111827;
	--stp-sidebar-soft-text: #374151;
	--stp-sidebar-muted: #6b7280;
	--stp-sidebar-border: #e5e7eb;
	--stp-sidebar-border-strong: #d1d5db;
	--stp-sidebar-bg: #ffffff;
	--stp-sidebar-soft: #f9fafb;
	--stp-sidebar-radius: 12px;

	position: relative;
	width: var(--stp-product-sidebar-width, 300px);
	min-width: 0;
	color: var(--stp-sidebar-text);
	font-size: 13px;
	line-height: 1.5;
}

.stp-product-sidebar__stack {
	position: relative;
	display: grid;
	gap: 16px;
	min-width: 0;
}

.stp-product-sidebar-block {
	overflow: hidden;
	background: var(--stp-sidebar-bg);
	border: 1px solid var(--stp-sidebar-border);
	border-radius: var(--stp-sidebar-radius);
}

.stp-product-sidebar-block__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	min-height: 43px;
	margin: 0;
	padding: 12px 15px;
	color: var(--stp-sidebar-text);
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--stp-sidebar-border);
	font-size: 13px;
	font-weight: 900;
	line-height: 1.25;
	text-align: left;
	cursor: pointer;
}

.stp-product-sidebar-block__title:hover,
.stp-product-sidebar-block__title:focus {
	color: var(--stp-sidebar-primary-dark);
	background: #fff7f1;
	outline: none;
}

.stp-product-sidebar-block__title i {
	flex: 0 0 auto;
	color: var(--stp-sidebar-muted);
	font-style: normal;
	font-weight: 900;
}

.stp-product-sidebar-block__body {
	padding: 14px 15px;
}

.stp-product-sidebar-block.is-collapsed .stp-product-sidebar-block__body {
	display: none;
}

.stp-product-sidebar-block.is-collapsed .stp-product-sidebar-block__title i {
	transform: rotate(90deg);
}

.stp-product-sidebar-categories {
	padding: 0;
}

.stp-product-sidebar-categories__all,
.stp-product-sidebar-categories__parent,
.stp-product-sidebar-categories__children a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 11px 13px;
	color: var(--stp-sidebar-text);
	background: #fff;
	border: 0;
	box-shadow: none;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.25;
	text-align: left;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
}

.stp-product-sidebar-categories__all {
	font-size: 14px;
	font-weight: 500;
	border-bottom: 1px solid var(--stp-sidebar-border);
}

.stp-product-sidebar-categories__all:hover,
.stp-product-sidebar-categories__all:focus,
.stp-product-sidebar-categories__parent:hover,
.stp-product-sidebar-categories__parent:focus,
.stp-product-sidebar-categories__children a:hover,
.stp-product-sidebar-categories__children a:focus {
	color: var(--stp-sidebar-primary-dark);
	background: #fff7f1;
	outline: none;
}

.stp-product-sidebar-categories__all.is-active,
.stp-product-sidebar-categories__item.is-active > .stp-product-sidebar-categories__parent,
.stp-product-sidebar-categories__children .is-active > a {
	color: var(--stp-sidebar-primary-dark);
	background: #fff1e8;
}

.stp-product-sidebar-categories__list,
.stp-product-sidebar-categories__children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.stp-product-sidebar-categories__item {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--stp-sidebar-border);
}

.stp-product-sidebar-categories__item:last-child {
	border-bottom: 0;
}

.stp-product-sidebar-categories__parent {
	font-weight: 850;
	text-transform: uppercase;
	letter-spacing: 0.01em;
}

.stp-product-sidebar-categories__parent i {
	flex: 0 0 auto;
	color: var(--stp-sidebar-soft-text);
	font-size: 18px;
	font-style: normal;
	font-weight: 700;
	line-height: 1;
	transform: rotate(0deg);
	transition: transform 0.16s ease;
}

.stp-product-sidebar-categories__item.is-open > .stp-product-sidebar-categories__parent i {
	transform: rotate(90deg);
}

.stp-product-sidebar-categories__children {
	display: none;
	padding: 4px 0 8px;
	background: #fff;
	border-top: 1px solid var(--stp-sidebar-border);
}

.stp-product-sidebar-categories__item.is-open > .stp-product-sidebar-categories__children {
	display: block;
}

.stp-product-sidebar-categories__children a {
	min-height: 34px;
	padding: 8px 13px 8px 28px;
	color: var(--stp-sidebar-soft-text);
	font-size: 13px;
	font-weight: 650;
	text-transform: none;
}

.stp-product-sidebar-list,
.stp-product-sidebar-rating,
.stp-product-sidebar-products {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.stp-product-sidebar-list li,
.stp-product-sidebar-rating li,
.stp-product-sidebar-products li {
	margin: 0;
	padding: 0;
}

.stp-product-sidebar-list a,
.stp-product-sidebar-list li > span,
.stp-product-sidebar-rating a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 28px;
	color: var(--stp-sidebar-soft-text);
	font-size: 12px;
	font-weight: 650;
	line-height: 1.25;
	text-decoration: none;
}

.stp-product-sidebar-list--checks a::before {
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	background: #fff;
	border: 1px solid var(--stp-sidebar-border-strong);
	border-radius: 3px;
	content: "";
}

.stp-product-sidebar-list--checks a span {
	flex: 1 1 auto;
}

.stp-product-sidebar-list li.is-active a,
.stp-product-sidebar-rating li.is-active a {
	padding: 5px 8px;
	color: var(--stp-sidebar-primary-dark);
	background: #fff1e8;
	border-radius: 7px;
	font-weight: 900;
}

.stp-product-sidebar-list a:hover,
.stp-product-sidebar-list a:focus,
.stp-product-sidebar-rating a:hover,
.stp-product-sidebar-rating a:focus {
	color: var(--stp-sidebar-primary-dark);
	outline: none;
}

.stp-product-sidebar-list small,
.stp-product-sidebar-rating small {
	flex: 0 0 auto;
	color: var(--stp-sidebar-muted);
	font-size: 11px;
	font-weight: 800;
}

.stp-product-sidebar-price__line {
	position: relative;
	height: 20px;
	margin: 2px 2px 10px;
}

.stp-product-sidebar-price__line span {
	position: absolute;
	top: 8px;
	right: 0;
	left: 0;
	height: 5px;
	background: #fee4d3;
	border-radius: 999px;
}

.stp-product-sidebar-price__line span::before,
.stp-product-sidebar-price__line span::after {
	position: absolute;
	top: 50%;
	width: 14px;
	height: 14px;
	background: #fff;
	border: 4px solid var(--stp-sidebar-primary);
	border-radius: 50%;
	transform: translateY(-50%);
	content: "";
}

.stp-product-sidebar-price__line span::before {
	left: 0;
}

.stp-product-sidebar-price__line span::after {
	right: 0;
}

.stp-product-sidebar-price__line i {
	position: absolute;
	top: 8px;
	right: 12px;
	left: 12px;
	height: 5px;
	background: var(--stp-sidebar-primary);
	border-radius: 999px;
}

.stp-product-sidebar-price__fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 7px;
}

.stp-product-sidebar-price label {
	display: grid;
	gap: 4px;
	margin: 0;
	color: var(--stp-sidebar-muted);
	font-size: 11px;
	font-weight: 750;
}

.stp-product-sidebar-price input {
	width: 100%;
	min-height: 32px;
	padding: 5px 8px;
	color: var(--stp-sidebar-text);
	background: #fff;
	border: 1px solid var(--stp-sidebar-border);
	border-radius: 7px;
	font-size: 12px;
	font-weight: 750;
}

.stp-product-sidebar-price button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 32px;
	margin: 9px 0 0;
	padding: 7px 10px;
	color: #fff;
	background: var(--stp-sidebar-primary);
	border: 1px solid var(--stp-sidebar-primary);
	border-radius: 7px;
	font-size: 12px;
	font-weight: 900;
	line-height: 1.2;
	cursor: pointer;
}

.stp-product-sidebar-price button:hover,
.stp-product-sidebar-price button:focus {
	background: var(--stp-sidebar-primary-dark);
	border-color: var(--stp-sidebar-primary-dark);
	outline: none;
}

.stp-product-sidebar-rating a {
	justify-content: flex-start;
	color: #f59e0b;
}

.stp-product-sidebar-rating small {
	color: var(--stp-sidebar-soft-text);
}

.stp-product-sidebar-products a {
	display: grid;
	grid-template-columns: 46px minmax(0, 1fr);
	gap: 10px;
	align-items: center;
	min-height: 54px;
	color: var(--stp-sidebar-text);
	text-decoration: none;
}

.stp-product-sidebar-products__image {
	display: block;
	overflow: hidden;
	width: 46px;
	height: 46px;
	background: var(--stp-sidebar-soft);
	border: 1px solid var(--stp-sidebar-border);
	border-radius: 8px;
}

.stp-product-sidebar-products__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.stp-product-sidebar-products__content {
	display: grid;
	gap: 3px;
	min-width: 0;
}

.stp-product-sidebar-products__content strong {
	overflow: hidden;
	font-size: 12px;
	font-weight: 850;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.stp-product-sidebar-products__content small {
	color: var(--stp-sidebar-primary-dark);
	font-size: 12px;
	font-weight: 900;
}

.stp-product-sidebar-empty {
	margin: 0;
	color: var(--stp-sidebar-muted);
	font-size: 12px;
}

.stp-product-sidebar__mobile-toggle,
.stp-product-sidebar__close,
.stp-product-sidebar__overlay,
.stp-product-sidebar__mobile-head {
	display: none;
}

.stp-product-archive__layout:not(.has-sidebar-right) .stp-product-sidebar {
	justify-self: start;
}

.stp-product-archive__layout.has-sidebar-right .stp-product-sidebar {
	justify-self: end;
}

@media screen and (max-width: 1100px) {
	.stp-product-archive .stp-product-sidebar,
	.suntech-portal-product-page .stp-product-sidebar {
		display: none !important;
	}
}

/* Sidebar widget-panel update: categories and big product card. */
.stp-product-sidebar-categories__all,
.stp-product-sidebar-categories__parent,
.stp-product-sidebar-categories__children a {
	color: var(--stp-sidebar-text);
	background: #ffffff;
	font-weight: 400;
}

.stp-product-sidebar-categories__all {
	cursor: default;
}

.stp-product-sidebar-categories__all:hover,
.stp-product-sidebar-categories__all:focus,
.stp-product-sidebar-categories__parent:hover,
.stp-product-sidebar-categories__parent:focus,
.stp-product-sidebar-categories__children a:hover,
.stp-product-sidebar-categories__children a:focus,
.stp-product-sidebar-categories__all.is-active,
.stp-product-sidebar-categories__item.is-active > .stp-product-sidebar-categories__parent,
.stp-product-sidebar-categories__children .is-active > a {
	color: var(--stp-sidebar-text);
	background: #f3f4f6;
	outline: none;
}

.stp-product-sidebar-categories__item.is-active > .stp-product-sidebar-categories__parent,
.stp-product-sidebar-categories__children .is-active > a {
	font-weight: 600;
}

.stp-product-sidebar-categories__parent {
	font-weight: 500;
}

.stp-product-sidebar-categories__children a {
	font-weight: 400;
}

.stp-product-sidebar-big-card {
	display: grid;
	gap: 7px;
	min-width: 0;
	padding: 10px;
	background: #ffffff;
	border: 2px solid var(--stp-sidebar-primary);
	border-radius: 14px;
}

.stp-product-sidebar-big-card__badges {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.stp-product-sidebar-big-card__badges span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 22px;
	padding: 4px 9px;
	color: #ffffff;
	background: #16a34a;
	border-radius: 999px;
	font-size: 9px;
	font-weight: 760;
	line-height: 1.1;
	text-transform: uppercase;
}

.stp-product-sidebar-big-card__image {
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	width: 100%;
	padding: 0;
	background: #fff;
	border: 1px solid var(--stp-sidebar-border);
	border-radius: 13px;
	text-decoration: none;
}

.stp-product-sidebar-big-card__image img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center;
	image-rendering: auto;
	transform: none;
	transform-origin: var(--stp-big-card-zoom-x, 50%) var(--stp-big-card-zoom-y, 50%);
	backface-visibility: hidden;
	transition: transform 0.18s ease;
}

.stp-product-sidebar-big-card__image:hover img,
.stp-product-sidebar-big-card__image.is-hovering img {
	transform: scale(1.6);
}

.stp-product-sidebar-big-card h3 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	min-height: 38px;
	margin: 0;
	font-size: 15px;
	font-weight: 780;
	line-height: 1.28;
	text-align: center;
}

.stp-product-sidebar-big-card h3 a {
	color: #2563eb;
	text-decoration: none;
}

.stp-product-sidebar-big-card h3 a:hover,
.stp-product-sidebar-big-card h3 a:focus {
	color: #1d4ed8;
	text-decoration: underline;
	text-underline-offset: 3px;
	outline: none;
}

.stp-product-sidebar-big-card__price {
	margin: -1px 0 0;
	color: #111827;
	font-size: 21px;
	font-weight: 900;
	line-height: 1.12;
	text-align: center;
}

.stp-product-sidebar-big-card__features {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 5px;
	padding-top: 0;
}

.stp-product-sidebar-big-card__features span {
	display: grid;
	gap: 1px;
	align-content: center;
	min-height: 31px;
	padding: 4px 3px;
	color: #ffffff;
	background: var(--stp-sidebar-primary);
	border-radius: 8px;
	text-align: center;
}

.stp-product-sidebar-big-card__features strong {
	font-size: 9px;
	font-weight: 720;
	line-height: 1.05;
}

.stp-product-sidebar-big-card__features small {
	font-size: 8px;
	font-weight: 520;
	line-height: 1.05;
}

.stp-product-sidebar-big-card__feature-stock.is-in-stock {
	color: #166534;
	background: #f0fdf4;
	border: 1px solid #86efac;
}

.stp-product-sidebar-big-card__feature-stock.is-out-of-stock {
	color: #991b1b;
	background: #fef2f2;
	border: 1px solid #fecaca;
}

.stp-product-sidebar-big-card__actions {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 36px;
	gap: 8px;
	align-items: center;
	margin-top: 4px;
}

.stp-product-sidebar-big-card__actions > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 8px 10px;
	color: #ffffff;
	background: var(--stp-sidebar-primary);
	border: 1px solid var(--stp-sidebar-primary);
	border-radius: 9px;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
}

.stp-product-sidebar-big-card__actions > a:hover,
.stp-product-sidebar-big-card__actions > a:focus {
	background: var(--stp-sidebar-primary-dark);
	border-color: var(--stp-sidebar-primary-dark);
	outline: none;
}

.stp-product-sidebar-big-card__actions button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-height: 36px;
	padding: 0;
	color: var(--stp-sidebar-text);
	background: #ffffff;
	border: 1px solid var(--stp-sidebar-border-strong);
	border-radius: 999px;
	cursor: pointer;
}

.stp-product-sidebar-big-card__actions button:hover,
.stp-product-sidebar-big-card__actions button:focus,
.stp-product-sidebar-big-card__actions button.is-added {
	color: var(--stp-sidebar-primary);
	border-color: var(--stp-sidebar-primary);
	outline: none;
}

.stp-product-sidebar-big-card__wishlist-icon,
.stp-product-sidebar-big-card__actions img {
	display: block;
	width: 18px;
	height: 18px;
	object-fit: contain;
}

.stp-product-sidebar-big-card__wishlist-icon[hidden] {
	display: none !important;
}

/* Step 21: compact sidebar width and always-open price filter. */
.stp-product-sidebar-block__title--static {
	cursor: default;
}

.stp-product-sidebar-block__title--static:hover,
.stp-product-sidebar-block__title--static:focus {
	color: var(--stp-sidebar-text);
	background: transparent;
}

.stp-product-sidebar-block--price .stp-product-sidebar-block__body {
	display: block !important;
}

.stp-product-sidebar-price__sliders {
	position: relative;
	height: 24px;
	margin: 2px 2px 12px;
}

.stp-product-sidebar-price__track {
	position: absolute;
	top: 10px;
	right: 0;
	left: 0;
	height: 5px;
	background: linear-gradient(to right, #fee4d3 var(--stp-price-left, 0%), var(--stp-sidebar-primary) var(--stp-price-left, 0%), var(--stp-sidebar-primary) var(--stp-price-right, 100%), #fee4d3 var(--stp-price-right, 100%));
	border-radius: 999px;
}

.stp-product-sidebar-price__sliders input[type="range"] {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 24px;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.stp-product-sidebar-price__sliders input[type="range"]::-webkit-slider-thumb {
	width: 15px;
	height: 15px;
	background: #fff;
	border: 4px solid var(--stp-sidebar-primary);
	border-radius: 999px;
	cursor: pointer;
	pointer-events: auto;
	-webkit-appearance: none;
	appearance: none;
}

.stp-product-sidebar-price__sliders input[type="range"]::-moz-range-thumb {
	width: 15px;
	height: 15px;
	background: #fff;
	border: 4px solid var(--stp-sidebar-primary);
	border-radius: 999px;
	cursor: pointer;
	pointer-events: auto;
}

.stp-product-sidebar-price__line {
	display: none;
}

/* Compact product-list widgets used by brand/color/rating sidebar widgets. */
.stp-product-sidebar-products-widget {
	overflow: hidden;
	background: var(--stp-sidebar-bg);
	border: 1px solid var(--stp-sidebar-border);
	border-radius: var(--stp-sidebar-radius);
}

.stp-product-sidebar-products-widget__title {
	padding: 12px 14px;
	color: var(--stp-sidebar-text);
	background: var(--stp-sidebar-soft);
	border-bottom: 1px solid var(--stp-sidebar-border);
	font-size: 13px;
	font-weight: 750;
	line-height: 1.3;
}

.stp-product-sidebar-products-widget__list {
	display: grid;
	gap: 0;
	padding: 8px;
}

.stp-product-sidebar-mini-product {
	display: grid;
	grid-template-columns: 54px minmax(0, 1fr);
	gap: 10px;
	align-items: center;
	min-height: 66px;
	padding: 8px;
	color: var(--stp-sidebar-text);
	border-radius: 9px;
	text-decoration: none;
	transition: background-color 0.16s ease, color 0.16s ease;
}

.stp-product-sidebar-mini-product:hover,
.stp-product-sidebar-mini-product:focus {
	color: var(--stp-sidebar-primary-dark);
	background: #f3f4f6;
	outline: none;
}

.stp-product-sidebar-mini-product__image {
	display: grid;
	place-items: center;
	overflow: hidden;
	width: 54px;
	height: 54px;
	background: #fff;
	border: 1px solid var(--stp-sidebar-border);
	border-radius: 9px;
	color: var(--stp-sidebar-muted);
	font-size: 10px;
	font-weight: 700;
	text-align: center;
}

.stp-product-sidebar-mini-product__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.stp-product-sidebar-mini-product__content {
	display: grid;
	gap: 4px;
	min-width: 0;
}

.stp-product-sidebar-mini-product__content strong {
	display: -webkit-box;
	overflow: hidden;
	color: inherit;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.stp-product-sidebar-mini-product__content small {
	color: var(--stp-sidebar-primary-dark);
	font-size: 12px;
	font-weight: 800;
	line-height: 1.2;
}

.stp-product-sidebar-mini-product__stars {
	color: #f59e0b;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1;
}


/* Big card: per-instance sticky and hover/wishlist polish. */
.stp-product-sidebar-big-card--sticky {
	position: sticky;
	top: 30px;
	z-index: 20;
	align-self: start;
}

.admin-bar .stp-product-sidebar-big-card--sticky {
	top: 62px;
}

.stp-product-sidebar-big-card__actions button.is-added .stp-product-sidebar-big-card__wishlist-icon--normal,
.stp-product-sidebar-big-card__actions button[data-stp-added="yes"] .stp-product-sidebar-big-card__wishlist-icon--normal {
	display: none !important;
}

.stp-product-sidebar-big-card__actions button.is-added .stp-product-sidebar-big-card__wishlist-icon--added,
.stp-product-sidebar-big-card__actions button[data-stp-added="yes"] .stp-product-sidebar-big-card__wishlist-icon--added {
	display: block !important;
	filter: brightness(0) saturate(100%);
}

.stp-product-sidebar-big-card__actions button.is-added,
.stp-product-sidebar-big-card__actions button[data-stp-added="yes"] {
	color: #111827;
	border-color: var(--stp-sidebar-border-strong);
}

@media screen and (max-width: 1100px) {
	.stp-product-sidebar-big-card--sticky {
		position: static;
		top: auto;
	}
}

/* Category accordion behavior polish. */
.stp-product-sidebar-categories__item.is-open > .stp-product-sidebar-categories__parent,
.stp-product-sidebar-categories__item.is-active > .stp-product-sidebar-categories__parent,
.stp-product-sidebar-categories__children .is-active > a {
	color: var(--stp-sidebar-text);
	background: #ffffff;
	font-weight: 700;
}

.stp-product-sidebar-categories__parent:hover,
.stp-product-sidebar-categories__parent:focus,
.stp-product-sidebar-categories__children a:hover,
.stp-product-sidebar-categories__children a:focus {
	color: var(--stp-sidebar-text);
	background: #f3f4f6;
	outline: none;
}

.stp-product-sidebar-categories__parent:not(:hover):not(:focus),
.stp-product-sidebar-categories__children a:not(:hover):not(:focus) {
	background: #ffffff;
}

.stp-product-sidebar-categories__children .is-active > a:not(:hover):not(:focus) {
	font-weight: 700;
}
