/*!
 * Native storefront shell fixes: sidebar filter accordion, unified red sale
 * badges and search presentation. These target theme/widget markup only.
 */

/* ---------------------------------------------------------------- Sidebar */
#shop-sidebar .htw-acc,
.shop-sidebar .htw-acc,
.sidebar-shop .htw-acc {
	border-bottom: 1px solid #e6e6e6;
	padding: 0;
	margin: 0 0 2px;
}

#shop-sidebar .htw-acc .widget-title,
.shop-sidebar .htw-acc .widget-title,
.sidebar-shop .htw-acc .widget-title {
	margin: 0;
	padding: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

#shop-sidebar .htw-acc .widget-title,
.shop-sidebar .htw-acc .widget-title {
	border: 0;
}

.htw-acc__btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 16px 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	text-align: left;
	cursor: pointer;
}

.htw-acc__icon {
	position: relative;
	flex: 0 0 14px;
	width: 14px;
	height: 14px;
}

.htw-acc__icon::before,
.htw-acc__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	background: currentColor;
	transform: translate(-50%, -50%);
	transition: transform 0.18s ease, opacity 0.18s ease;
}

.htw-acc__icon::before {
	width: 14px;
	height: 1.5px;
}

.htw-acc__icon::after {
	width: 1.5px;
	height: 14px;
}

.htw-acc__btn[aria-expanded="true"] .htw-acc__icon::after {
	transform: translate(-50%, -50%) scaleY(0);
	opacity: 0;
}

.htw-acc__panel {
	padding: 0 0 18px;
}

.htw-acc__panel[hidden] {
	display: none !important;
}

.htw-acc__panel ul {
	margin: 0;
}

#shop-sidebar .htw-acc__panel .product-categories,
.shop-sidebar .htw-acc__panel .product-categories {
	margin: 0;
}

/* ----------------------------------------------------------------- Badges */
/* One red discount treatment everywhere: home cards, shop loop, PDP, quick view */
.badge-inner,
.badge .badge-inner,
.badge-frame .badge-inner,
.badge-container .badge-inner,
.onsale,
span.onsale,
.woocommerce span.onsale,
.mfp-content .product-lightbox .badge-container .badge-inner.on-sale,
.mfp-content .product-quick-view-container .badge-inner.on-sale,
body .badge-container .badge-inner.on-sale {
	background-color: #d0021b !important;
	background: #d0021b !important;
	color: #ffffff !important;
	border: 0 !important;
	border-radius: 4px !important;
	font-weight: 700 !important;
}

.badge-inner::before,
.badge-inner::after {
	border-color: transparent !important;
}

/* Product card sale price stays red as well. */
.product-small .price ins,
.product-small .price ins .amount,
ul.products .price ins,
ul.products .price ins .amount {
	color: #d0021b !important;
	text-decoration: none;
}

.product-small .price del,
ul.products .price del {
	color: #8a8a8a !important;
	opacity: 1;
}

/* Search form should never sit half-open on mobile. */
.header-search-form .search-form {
	width: 100%;
}

/* --------------------------------------------------------- Header search */
.header-search-dropdown.is-htw-open > .nav-dropdown,
.header-search-dropdown.is-htw-open ul.nav-dropdown {
	display: block !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: none !important;
	max-height: none !important;
}

.header-search-dropdown.is-htw-open > a.nav-top-link {
	color: inherit;
}

.header-search-dropdown .nav-dropdown {
	z-index: 120;
}

/* Sidebar submenu toggles (first level open, children collapsed). */
#shop-sidebar .widget .htw-sub,
.smi-shop-archive-sidebar .widget .htw-sub,
.shop-sidebar .widget .htw-sub {
	position: relative;
}

.htw-sub__btn {
	position: absolute;
	top: 6px;
	right: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.htw-sub__btn span {
	position: relative;
	width: 11px;
	height: 11px;
}

.htw-sub__btn span::before,
.htw-sub__btn span::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	background: currentColor;
	transform: translate(-50%, -50%);
}

.htw-sub__btn span::before {
	width: 11px;
	height: 1.5px;
}

.htw-sub__btn span::after {
	width: 1.5px;
	height: 11px;
}

.htw-sub__btn[aria-expanded="true"] span::after {
	display: none;
}

.htw-sub__btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

#shop-sidebar .widget ul.children[hidden],
#shop-sidebar .widget ul.sub-menu[hidden],
.smi-shop-archive-sidebar .widget ul.children[hidden],
.smi-shop-archive-sidebar .widget ul.sub-menu[hidden] {
	display: none !important;
}
