/* Minimal interface adjustments layered on the stable security baseline. */

/* Account tabs must stay below the header's dropdowns. */
body.woocommerce-account #masthead {
	z-index: 1100;
}

/* Disabled banners can leave an empty row above the home carousel. */
body:is(.home, .page-template-template-home-php) #content .entry-content > .stellar:has(> .container > .row > div:empty):not(:has(> .container > .row > :not(:empty))):has(+ .stellar .pt-woo-shortcode.with-slider) {
	display: none;
}

#colophon #footer-bottom {
	padding-block: 8px;
}

#colophon #footer-bottom .site-info {
	margin-block: 0;
}

#colophon #footer-bottom .widget_pt_pay_icons_widget {
	margin-block: 0;
}

#colophon #footer-bottom .pt-widget-pay-icons {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
}

#colophon #footer-bottom .pt-widget-pay-icons li {
	margin: 0;
}

#colophon #footer-bottom .pt-widget-pay-icons img {
	block-size: 26px;
	display: block;
	inline-size: 40px;
	object-fit: contain;
}

@media (min-width: 768px) {
	#colophon #footer-bottom .site-info {
		margin-block-start: 4px;
	}
}

@media (width < 768px) {
	#colophon #footer-bottom .widget_pt_pay_icons_widget {
		margin-block: 0;
	}

	#colophon .footer-middle .fotter-bg-img:has(.widget_pt_contacts_widget) {
		display: grid;
		float: none;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
		width: 100%;
	}

	#colophon .footer-middle .fotter-bg-img:has(.widget_pt_contacts_widget) > div {
		float: none;
		grid-column: 1;
		min-width: 0;
		padding-inline: 8px;
		width: auto;
	}

	#colophon .footer-middle .fotter-bg-img:has(.widget_pt_contacts_widget) > div:has(.widget_pt_contacts_widget) {
		grid-column: 2;
		grid-row: 1 / span 3;
	}

	#colophon .footer-middle .fotter-bg-img > div:not(:has(.widget)) {
		display: none;
	}

	#colophon .footer-middle .widget {
		font-size: 12px;
		line-height: 1.5;
		margin-block: 16px;
		overflow-wrap: anywhere;
	}

	#colophon .footer-middle .widget .widget-title {
		font-size: 15px;
		letter-spacing: 0;
		margin-block: 0 12px;
	}

	#colophon #menu-footer-bottom-menu li {
		padding-block: 6px;
	}

	#colophon .footer-middle .widget_pt_contacts_widget .pt-widget-contacts li {
		margin-bottom: 10px;
		padding-left: 20px;
	}

	#colophon .footer-middle .widget_pt_contacts_widget .pt-widget-contacts li::before {
		font-size: 15px;
	}

	#colophon #footer-bottom:has(> .col-xs-12),
	#colophon #footer-bottom > .container > .row {
		align-items: center;
		display: grid;
		gap: 8px;
		grid-template-columns: minmax(0, 1fr) auto;
	}

	#colophon #footer-bottom .col-xs-12 {
		float: none;
		min-width: 0;
		padding-inline: 0;
		width: auto;
	}

	#colophon #footer-bottom .site-info {
		font-size: 11px;
		line-height: 1.4;
		white-space: nowrap;
	}

	#colophon #footer-bottom .pt-widget-pay-icons {
		flex-wrap: nowrap;
		gap: 4px;
	}

	#colophon #footer-bottom .pt-widget-pay-icons li,
	#colophon #footer-bottom .pt-widget-pay-icons img {
		inline-size: 30px;
	}

	#colophon #footer-bottom .pt-widget-pay-icons img {
		block-size: 20px;
	}
}

/* Keep room for the digits inside StoreX's 55px mobile quantity field. */
@media (max-width: 480px) {
	body.single-product.woocommerce :is(#content, div.product) form.cart .quantity input.qty[type="number"] {
		padding-inline: 4px;
		font-size: 16px !important;
	}
}

/* Compact storefront ribbons without shrinking their text or links. */
body:is(.woocommerce-cart, .woocommerce-checkout, .tax-product_cat, .single-product) .header-stripe {
	padding-block: 8px;
}

body.single-product .header-stripe {
	padding-block: 6px;
}

body:is(.woocommerce-cart, .woocommerce-checkout, .tax-product_cat) .header-stripe h1.title {
	margin-block: 0 !important;
}

@media (min-width: 993px) {
	body:is(.woocommerce-cart, .woocommerce-checkout, .tax-product_cat) .header-stripe > .row,
	body:is(.woocommerce-cart, .woocommerce-checkout, .tax-product_cat) .header-stripe > .container > .row {
		align-items: center;
		display: flex;
	}

	body:is(.woocommerce-cart, .woocommerce-checkout, .tax-product_cat, .single-product) #masthead .logo-wrapper:not(.stuck) .site-logo:not(.center-pos) {
		margin-bottom: 24px;
	}

	body:is(.woocommerce-cart, .woocommerce-checkout, .tax-product_cat, .single-product) #masthead .logo-wrapper:not(.stuck) .header-primary-nav .wr-mega-menu.nav-menu > li:is(.menu-item-has-children, .mega-item) > a {
		height: 52px;
	}
}

.header-top .top-widgets .unibrain-header-product-search .woocommerce-product-search {
	max-width: 100%;
}

/* Keep the native checkout radios aligned even when a label wraps. */
body.woocommerce-checkout #order_review ul:is(#shipping_method, .woocommerce-shipping-methods),
body.woocommerce-checkout #payment ul.woocommerce-SavedPaymentMethods {
	padding-inline-start: 0;
}

body.woocommerce-checkout #order_review ul:is(#shipping_method, .woocommerce-shipping-methods) > li,
body.woocommerce-checkout #payment ul.woocommerce-SavedPaymentMethods > li {
	align-items: start;
	column-gap: 0.55em;
	display: grid;
	float: none;
	grid-template-columns: 1em minmax(0, 1fr);
	text-align: start;
}

body.woocommerce-checkout #order_review ul:is(#shipping_method, .woocommerce-shipping-methods) > li > input.shipping_method[type="radio"],
body.woocommerce-checkout #payment li input[type="radio"]:is(.woocommerce-SavedPaymentMethods-tokenInput, [name$="-payment-token"]) {
	-webkit-appearance: radio !important;
	appearance: auto !important;
	clip: auto !important;
	clip-path: none !important;
	display: block !important;
	float: none;
	grid-column: 1;
	height: 1em !important;
	margin: 0.25em 0 0 !important;
	opacity: 1 !important;
	position: static !important;
	visibility: visible !important;
	width: 1em !important;
}

body.woocommerce-checkout #order_review ul:is(#shipping_method, .woocommerce-shipping-methods) > li > input.shipping_method[type="radio"] + label,
body.woocommerce-checkout #payment li input[type="radio"]:is(.woocommerce-SavedPaymentMethods-tokenInput, [name$="-payment-token"]) + label {
	grid-column: 2;
	margin: 0;
	overflow-wrap: anywhere;
	padding: 0;
}

body.woocommerce-checkout #order_review ul:is(#shipping_method, .woocommerce-shipping-methods) > li > input.shipping_method[type="radio"] + label::before,
body.woocommerce-checkout #order_review ul:is(#shipping_method, .woocommerce-shipping-methods) > li > input.shipping_method[type="radio"] + label::after,
body.woocommerce-checkout #payment li input[type="radio"]:is(.woocommerce-SavedPaymentMethods-tokenInput, [name$="-payment-token"]) + label::before,
body.woocommerce-checkout #payment li input[type="radio"]:is(.woocommerce-SavedPaymentMethods-tokenInput, [name$="-payment-token"]) + label::after {
	content: none !important;
}

body.woocommerce-checkout #order_review input.shipping_method[type="radio"]:focus-visible,
body.woocommerce-checkout #payment input[type="radio"]:is(.woocommerce-SavedPaymentMethods-tokenInput, [name$="-payment-token"]):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Keep extension-provided shipping details below the label. */
body.woocommerce-checkout #order_review ul:is(#shipping_method, .woocommerce-shipping-methods) > li > input.shipping_method[type="radio"] + label ~ * {
	grid-column: 2;
}

/* Reclaim the space around item thumbnails after the table allocates widths.
 * Percentage margins preserve the original thumbnail footprint during sizing.
 */
body.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name > .product-thumbnail {
	margin-inline-start: max(-4px, -4%);
	margin-inline-end: max(4px, 20px - 12%);
}

/* Widen the rendered list into unused space in the Shipment cell.
 * The percentage width leaves the table's intrinsic column sizing intact.
 */
body.woocommerce-checkout #order_review {
	container: storex-order-review / inline-size;
}

@container storex-order-review (min-width: 22rem) {
	body.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table tfoot tr.shipping > td > ul:is(#shipping_method, .woocommerce-shipping-methods):has(> li > input.shipping_method[value^="ups_drop_shipping_rate"]) {
		--storex-ups-extra-width: clamp(0px, 15rem - 100%, 6rem);
		inline-size: calc(100% + var(--storex-ups-extra-width));
		inset-inline-start: calc(-1 * var(--storex-ups-extra-width));
		position: relative;
	}
}

/* On phones, give UPS choices a line below the heading across both columns.
 * Keep the cells in the table so item prices and totals retain their columns.
 */
@media (max-width: 768px) {
	@container storex-order-review (width < 22rem) {
		body.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table tfoot tr.shipping:has(> td > ul:is(#shipping_method, .woocommerce-shipping-methods) > li > input.shipping_method[type="radio"][value^="ups_drop_shipping_rate"]) > th {
			padding-block: 0.7em 0;
			vertical-align: top;
		}

		body.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table tfoot tr.shipping:has(> td > ul:is(#shipping_method, .woocommerce-shipping-methods) > li > input.shipping_method[type="radio"][value^="ups_drop_shipping_rate"]) > td {
			padding-block-start: 2.6em;
		}

		body.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table tfoot tr.shipping > td > ul:is(#shipping_method, .woocommerce-shipping-methods):has(> li > input.shipping_method[type="radio"][value^="ups_drop_shipping_rate"]) {
			/* The percentage width preserves the table's intrinsic column sizes. */
			inline-size: max(100%, 100cqi - 16px);
			inset-inline-start: min(0px, 100% - 100cqi + 16px);
			margin-block: 0;
			position: relative;
		}

		body.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table tfoot tr.shipping > td > ul:is(#shipping_method, .woocommerce-shipping-methods):has(> li > input.shipping_method[type="radio"][value^="ups_drop_shipping_rate"]) > li > label {
			min-block-size: 32px;
		}
	}
}

/* Compact only cart item rows. Keep inline spacing and the column grid. */
body.woocommerce-cart .shop_table.cart > tbody > tr.cart_item > td.product-quantity input.qty {
	margin-block: 0;
}

@media (width > 800px) {
	body.woocommerce-cart .shop_table.cart > tbody > tr.cart_item > td:not(.avail, .product-remove) {
		padding-block: 12px;
	}
}

@media (max-width: 800px) {
	body.woocommerce-cart .header-stripe {
		padding-block: 6px;
	}

	body.woocommerce-cart .header-stripe :is(.breadcrumbs, .back-to-home) {
		line-height: 1.35;
		margin-block: 2px;
	}

	body.woocommerce-cart form .update-cart-checkout {
		display: grid;
		gap: 8px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-areas: "shop shop" "update checkout";
		reading-flow: grid-rows;
	}

	body.woocommerce-cart .update-cart-checkout > .button-go-shop {
		grid-area: shop;
		justify-self: start;
	}

	body.woocommerce-cart form .update-cart-checkout > .wc-proceed-to-checkout {
		grid-area: checkout;
		margin: 0;
	}

	body.woocommerce-cart .update-cart-checkout > .update_cart {
		grid-area: update;
	}

	body.woocommerce-cart .update-cart-checkout :is(input.update_cart, a.checkout-button) {
		box-sizing: border-box;
		font-size: 14px;
		line-height: 1.2;
		margin: 0;
		min-height: 44px;
		padding: 8px 6px;
		text-align: center;
		width: 100%;
	}

	body.woocommerce-cart .update-cart-checkout .wc-proceed-to-checkout > a.checkout-button {
		align-items: center;
		display: flex !important;
		justify-content: center;
	}

	body.woocommerce-cart .shop_table.cart > tbody > tr.cart_item > td:is(.product-name, .product-subtotal) {
		padding-block: 12px !important;
	}

	/* Keep subtotal and tax labels alongside their amounts on stacked mobile carts. */
	body.woocommerce-cart .shop_table.cart td.cart-totals .cart_totals tr:is(.cart-subtotal, .tax-total, .tax-rate) {
		align-items: baseline;
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
	}

	body.woocommerce-cart .shop_table.cart td.cart-totals .cart_totals tr:is(.cart-subtotal, .tax-total, .tax-rate) > :is(th, td) {
		padding-block: 8px !important;
	}

	body.woocommerce-cart .shop_table.cart td.cart-totals .cart_totals tr:is(.cart-subtotal, .tax-total, .tax-rate) > th {
		overflow-wrap: anywhere;
		text-align: start;
	}

	body.woocommerce-cart .shop_table.cart td.cart-totals .cart_totals tr:is(.cart-subtotal, .tax-total, .tax-rate) > td {
		text-align: end;
		white-space: nowrap;
	}

	body.woocommerce-cart .shop_table.cart td.cart-totals .cart_totals tr.shipping > th {
		text-align: start;
	}
}

/* Match the parent's switch from stacked rows to table cells at 800px. */
@media (width > 800px) {
	/* Freeze StoreX's desktop cart grid so long totals content cannot take space
	 * away from the product description. The visible columns total 100%:
	 * Remove 2 + Image 12 + Product 44 + Price 12 + Quantity 12 + Total 18.
	 */
	body.woocommerce-cart .shop_table.cart {
		table-layout: fixed;
		width: 100%;
	}

	body.woocommerce-cart .shop_table.cart th.product-remove,
	body.woocommerce-cart .shop_table.cart td.product-remove {
		padding-inline: 2px;
		width: 2% !important;
	}

	body.woocommerce-cart .shop_table.cart th.product-thumbnail,
	body.woocommerce-cart .shop_table.cart td.product-thumbnail {
		width: 12% !important;
	}

	body.woocommerce-cart .shop_table.cart th.product-name,
	body.woocommerce-cart .shop_table.cart td.product-name {
		width: 44% !important;
	}

	body.woocommerce-cart .shop_table.cart th.product-price,
	body.woocommerce-cart .shop_table.cart td.product-price {
		width: 12% !important;
	}

	body.woocommerce-cart .shop_table.cart th.product-quantity,
	body.woocommerce-cart .shop_table.cart td.product-quantity {
		width: 12% !important;
	}

	body.woocommerce-cart .shop_table.cart th.product-subtotal,
	body.woocommerce-cart .shop_table.cart td.product-subtotal {
		width: 18% !important;
	}
}

@media (min-width: 993px) {
	/* StoreX reserves three desktop header columns on product pages although
	 * the middle title is hidden. Let the breadcrumb use the available row.
	 * Normal wrapping is retained if the complete trail genuinely cannot fit.
	 */
	body.single-product .header-stripe > .row,
	body.single-product .header-stripe > .container > .row {
		align-items: center;
		display: flex;
	}

	body.single-product .header-stripe > .row > div:first-child,
	body.single-product .header-stripe > .container > .row > div:first-child {
		flex: 1 1 auto;
		float: none !important;
		min-width: 0;
		width: auto !important;
	}

	body.single-product .header-stripe > .row > div:nth-child(2),
	body.single-product .header-stripe > .container > .row > div:nth-child(2) {
		display: none !important;
	}

	body.single-product .header-stripe > .row > div:nth-child(3),
	body.single-product .header-stripe > .container > .row > div:nth-child(3) {
		flex: 0 0 auto;
		float: none !important;
		margin-left: auto;
		width: auto !important;
	}

	body.single-product .header-stripe .woocommerce-breadcrumb {
		display: block !important;
		max-width: 100% !important;
		white-space: normal !important;
		width: 100% !important;
	}
}

@media (width > 800px) {
	/* Preserve StoreX's seven-column table structure and colspans while making
	 * its unconditional Avail heading/checkmark consume no visible space.
	 */
	body.woocommerce-cart .shop_table.cart th.product-avail,
	body.woocommerce-cart .shop_table.cart td.avail {
		border-left: 0 !important;
		border-right: 0 !important;
		color: transparent !important;
		display: table-cell;
		font-size: 0 !important;
		line-height: 0 !important;
		max-width: 0 !important;
		overflow: hidden;
		padding: 0 !important;
		width: 0 !important;
	}

	body.woocommerce-cart .shop_table.cart td.avail > * {
		display: none !important;
	}

	/* Price is 12% of the complete table and the final three columns total 42%.
	 * Therefore 12 / 42 aligns the nested divider exactly with Price–Quantity;
	 * the remaining 30 / 42 matches the combined Quantity + Total width.
	 */
	body.woocommerce-cart .shop_table.cart td.cart-totals .cart_totals table {
		table-layout: fixed;
		width: 100%;
	}

	body.woocommerce-cart .shop_table.cart td.cart-totals .cart_totals table th {
		box-sizing: border-box;
		padding-left: 12px !important;
		padding-right: 12px !important;
		text-align: right;
		vertical-align: middle;
		width: 28.5714% !important;
	}

	body.woocommerce-cart .shop_table.cart td.cart-totals .cart_totals tr.shipping > th {
		overflow-wrap: anywhere;
		text-align: center;
	}

	body.woocommerce-cart .shop_table.cart td.cart-totals .cart_totals table td {
		box-sizing: border-box;
		max-width: none !important;
		text-align: right;
		vertical-align: middle;
		width: 71.4286% !important;
	}

	body.woocommerce-cart .shop_table.cart td.cart-totals ul#shipping_method {
		box-sizing: border-box;
		margin: 0;
		max-width: none;
		text-align: left !important;
		width: 100%;
	}
}

@media (800px < width < 993px) {
	body.woocommerce-cart .shop_table.cart :is(th, td):is(.product-thumbnail, .product-price, .product-quantity, .product-subtotal) {
		padding-inline: 6px;
	}

	body.woocommerce-cart .shop_table.cart td.product-quantity :is(.quantity, .qty) {
		max-width: 100%;
	}

	body.woocommerce-cart .shop_table.cart td.cart-totals .cart_totals table th {
		padding-inline: 5px !important;
	}
}

/* StoreX reserves a left column even when the shop sidebar is absent. */
@media (min-width: 768px) {
	body.layout-two-col-left:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag) .row:not(:has(> #sidebar-shop)) > #content.site-content.woocommerce {
		left: auto;
		width: 100%;
	}
}

/* Hide the home-page slider row on phones so it leaves no empty space. */
@media (width < 768px) {
	body:is(.home, .page-template-template-home-php) .row.ig_fullwidth:has(> div:only-child > .ig_text:only-child > sr7-module[data-alias="slider2"]) {
		display: none;
	}
}

/* Collapse the inactive columns and spacer after the home page carousel. */
body:is(.home, .page-template-template-home-php) #content .entry-content > .stellar:has(.pt-woo-shortcode.with-slider) ~ :is(
	.stellar.text-align-left:has(> .container > .row > .col-md-4:empty):not(:has(> .container > .row > :not(:empty))),
	.container.hiddenmobile:has(> .row.hiddenmobile > div:only-child > div[style*="margin-bottom:80px"]:only-child:empty)
) {
	display: none;
}

/* Keep the desktop home page aligned even if a cached layout has trailing rows. */
body:is(.home, .page-template-template-home-php) #content .entry-content > .stellar:has(.pt-woo-shortcode.with-slider) > .container {
	padding-bottom: 0 !important;
}

body:is(.home, .page-template-template-home-php) #content .entry-content > .stellar:has(#featuredProductsId) {
	padding-block: 12px !important;
}

@media (min-width: 993px) {
	body:is(.home, .page-template-template-home-php) #content .entry-content {
		padding-bottom: 0;
	}

	body:is(.home, .page-template-template-home-php) #content .entry-content > .stellar:has(.pt-woo-shortcode.with-slider) {
		padding-top: 12px !important;
		padding-bottom: 12px !important;
	}

	body:is(.home, .page-template-template-home-php) #colophon .footer-middle .widget {
		margin-top: 24px;
	}

	body:is(.home, .page-template-template-home-php) #content .entry-content > .stellar .pt-woo-shortcode.with-slider .owl-wrapper {
		display: flex !important;
	}

	body:is(.home, .page-template-template-home-php) #content .entry-content > .stellar .pt-woo-shortcode.with-slider .owl-item {
		display: flex;
		flex: 0 0 auto;
	}

	body:is(.home, .page-template-template-home-php) #content .entry-content > .stellar .pt-woo-shortcode.with-slider :is(.owl-item > li.product, .product-wrapper, .product-description-wrapper) {
		display: flex;
		flex-direction: column;
	}

	body:is(.home, .page-template-template-home-php) #content .entry-content > .stellar .pt-woo-shortcode.with-slider :is(.product-wrapper, .product-description-wrapper) {
		flex: 1;
	}

	body:is(.home, .page-template-template-home-php) #content .entry-content > .stellar .pt-woo-shortcode.with-slider .product-img-wrapper > img:is(.attachment-woocommerce_thumbnail, .attachment-shop_catalog) {
		display: block;
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 3;
		object-fit: contain;
	}

	body:is(.home, .page-template-template-home-php) #content .entry-content > .stellar .pt-woo-shortcode.with-slider .product-price-wrapper {
		margin-top: auto;
	}

}

/* Center the sticky header on every page using StoreX's container widths. */
@media (min-width: 801px) {
	body #masthead .logo-wrapper.stuck {
		left: 0;
		right: 0;
		width: 100%;
		max-width: 750px;
		margin-left: auto;
		margin-right: auto;
	}
}

@media (min-width: 992px) {
	body #masthead .logo-wrapper.stuck {
		max-width: 970px;
	}
}

@media (min-width: 1200px) {
	body #masthead .logo-wrapper.stuck {
		max-width: 1170px;
	}
}
