/* Global child-theme overrides for PathSoft components. */

/* Mobile menu: indent the third nested level more deeply. */
.mmsm > li > ul > li > ul > li > a {
	padding-left: 4rem;
}

/* Desktop header menu: PathSoft styles only position up to the 2nd dropdown level.
   Add support for deeper nested submenus (3rd level and beyond). */
@media (min-width: 1200px) {
	.main-mnu-list > li:not(.mega-menu) > ul ul li {
		position: relative;
	}

	.main-mnu-list > li:not(.mega-menu) > ul ul li > a {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.main-mnu-list > li:not(.mega-menu) > ul ul li > a i {
		margin-left: 0.25rem;
		font-size: 1.125rem;
		width: 1.125rem;
		height: 1.125rem;
		color: var(--accent-color);
		transition: all 0.4s;
	}

	.main-mnu-list > li:not(.mega-menu) > ul ul li > ul {
		position: absolute;
		left: 100%;
		top: 0;
		min-width: 12.5rem;
		background-color: var(--background-color);
		border-radius: calc(var(--el-border-radius) * 0.6);
		border-top-left-radius: 0;
		padding: 0.75rem 0;
		opacity: 0;
		visibility: hidden;
		box-shadow: var(--el-box-shadow);
		transform: translateY(15px);
		transition: all 0.2s;
		z-index: 11;
	}

	.main-mnu-list > li:not(.mega-menu) > ul ul li:hover > ul {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}
}

/* WooCommerce product cards: force product titles to wrap on archive grid/list. */
.woocommerce ul.products li.product h2.item-heading.card-heading,
.woocommerce-page ul.products li.product h2.item-heading.card-heading {
	display: block;
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
}

.woocommerce ul.products li.product h2.item-heading.card-heading > a,
.woocommerce-page ul.products li.product h2.item-heading.card-heading > a {
	display: block;
	white-space: normal;
	overflow: visible; 
	text-overflow: clip;
	overflow-wrap: anywhere;
	word-break: break-word;
}

/* Product card layout: do not distribute content with space-between. */
.product .card-grid {
	justify-content: flex-start;
}

/* Sidebar filters: add image swatches for attribute terms. */
.woocommerce-widget-layered-nav-list .pathsoft-attr-swatch,
.widget_layered_nav .pathsoft-attr-swatch {
	display: inline-block;
	width: 18px;
	height: 18px;
	margin-right: 8px;
	border-radius: 3px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	vertical-align: middle;
	border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Image items: disable Isotope's absolute masonry layout for equal-height cards. */
.pitems-equal-height {
	position: static !important;
	height: auto !important;
}

.pitems-equal-height > .pitem-col {
	position: static !important;
	left: auto !important;
	top: auto !important;
	transform: none !important;
	display: flex;
}

.pitems-equal-height > .pitem-col > .pitem {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.pitems-equal-height > .pitem-col > .pitem > .pitem-info {
	flex: 1 1 auto;
}

/* Page 13310 gallery: match the rounded accent border used by product media. */
.page-id-13310 .gallery-col .gallery-item {
	border: 1px solid var(--accent-color);
	border-radius: 18px;
	overflow: hidden;
}

/* Page 61: normalize paragraph spacing. */
.page-id-61 p {
	margin-bottom: 1rem;
}

/* WooCommerce checkout: show the company purchase checkbox in PathSoft forms. */
#billing_is_company_field label.checkbox {
	align-items: center;
	cursor: pointer;
	display: inline-flex;
	gap: 0.5rem;
	margin: 0;
}

#billing_is_company_field input[type="checkbox"] {
	appearance: auto;
	-webkit-appearance: checkbox;
	border: 1px solid currentColor;
	display: inline-block;
	flex: 0 0 1rem;
	height: 1rem;
	margin: 0;
	opacity: 1;
	position: static;
	visibility: visible;
	width: 1rem;
	z-index: auto;
}
