/* LightSign Product Cards */

/* Shared product-card layout. Grids keep deciding the card width and column count. */
html body ul.products > li.product:not(.ls-canopy-product) {
	--lspc-action-width: 120px;
	background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(241, 253, 250, 0.86));
	border: 1px solid rgba(255, 255, 255, 0.96);
	border-radius: 14px;
	box-shadow: 0 16px 38px rgba(20, 103, 108, 0.1);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	height: 100%;
	margin: 0 !important;
	min-width: 0;
	overflow: hidden;
	padding-bottom: 20px;
	transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
	width: auto !important;
}

html body ul.products > li.product:not(.ls-canopy-product):hover,
html body ul.products > li.product:not(.ls-canopy-product):focus-within {
	border-color: rgba(11, 95, 74, 0.28);
	box-shadow: 0 24px 50px rgba(20, 103, 108, 0.17);
}

html body ul.products > li.product:not(.ls-canopy-product) figure {
	background: #fff;
	margin: 0 0 18px !important;
	overflow: hidden;
}

html body ul.products > li.product:not(.ls-canopy-product) figure .lspc-media {
	min-width: 0;
	width: 100%;
}

html body ul.products > li.product:not(.ls-canopy-product) figure .ct-media-container,
html body ul.products > li.product:not(.ls-canopy-product) figure img {
	aspect-ratio: 5 / 4 !important;
}

html body ul.products > li.product:not(.ls-canopy-product) figure img {
	display: block;
	height: 100% !important;
	object-fit: contain !important;
	width: 100% !important;
}

html body ul.products > li.product:not(.ls-canopy-product) .woocommerce-loop-product__title {
	box-sizing: border-box;
	color: #123f48;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.42;
	margin: 0 20px 12px !important;
	overflow-wrap: anywhere;
	padding: 0 !important;
}

html body ul.products > li.product:not(.ls-canopy-product) .entry-meta {
	display: none !important;
	margin: 0 !important;
}

html body ul.products > li.product:not(.ls-canopy-product) .price {
	align-items: center;
	align-self: stretch;
	color: #344b67;
	display: flex !important;
	font-weight: 700 !important;
	justify-content: flex-end;
	margin: auto 20px 12px !important;
	max-width: calc(100% - 40px);
	min-height: 28px;
	text-align: right !important;
}

html body ul.products > li.product:not(.ls-canopy-product) .price:has(.amount) {
	align-self: flex-end;
	font-size: 19px !important;
	justify-content: center;
	min-width: min(var(--lspc-action-width), calc(100% - 40px));
	text-align: center !important;
}

html body ul.products > li.product:not(.ls-canopy-product) .price .amount {
	font-size: 19px !important;
	font-weight: 700 !important;
}

html body ul.products > li.product:not(.ls-canopy-product) .price del {
	color: #829699;
	font-weight: 500;
	margin-right: 6px;
}

html body ul.products > li.product:not(.ls-canopy-product) .price ins {
	text-decoration: none;
}

html body ul.products > li.product:not(.ls-canopy-product) .ct-woo-card-actions {
	box-sizing: border-box;
	display: flex;
	justify-content: flex-end;
	margin: 0 20px !important;
	padding: 0;
}

html body ul.products > li.product:not(.ls-canopy-product) .ct-woo-card-actions .button {
	align-items: center;
	background: #0b5f4a !important;
	border: 1px solid #0b5f4a !important;
	border-radius: 7px !important;
	box-shadow: 0 8px 18px rgba(11, 95, 74, 0.18);
	box-sizing: border-box;
	color: #fff !important;
	display: inline-flex;
	justify-content: center;
	max-width: 100%;
	min-height: 40px;
	padding-inline: 12px;
	text-align: center;
}

html body ul.products > li.product:not(.ls-canopy-product) .ct-woo-card-actions .add_to_cart_button {
	flex: 0 1 var(--lspc-action-width);
	width: var(--lspc-action-width);
}

.lspc-buy-now.is-loading {
	cursor: wait !important;
	opacity: 0.72;
	pointer-events: none;
}

.lspc-buy-now-error {
	color: #a52218;
	font-size: 12px;
	line-height: 1.4;
	margin: 8px 20px 0;
	width: calc(100% - 40px);
}

/* Keep the loading spinner beside the label without changing card layout. */
html body ul.products .ct-woo-card-actions .add_to_cart_button.loading {
	flex-wrap: nowrap;
	padding-inline: 10px 32px !important;
	position: relative;
	white-space: nowrap;
}

html body ul.products .ct-woo-card-actions .add_to_cart_button.loading::after {
	flex: 0 0 var(--theme-button-spinner-size, 16px);
	inset-block: 0;
	inset-inline-end: 9px;
	margin: auto 0;
	position: absolute;
}

/* Storefront add-to-cart confirmation modal. */
.woocommerce-notices-wrapper.lspc-notice-source-empty {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.lspc-cart-notice-overlay {
	align-items: center;
	background: rgba(8, 44, 48, 0.3);
	box-sizing: border-box;
	cursor: pointer;
	display: flex;
	inset: 0;
	justify-content: center;
	opacity: 0;
	padding: 24px;
	position: fixed;
	transition: opacity 220ms ease;
	z-index: 1000001;
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.lspc-cart-notice-overlay.is-visible {
	opacity: 1;
}

.lspc-cart-notice-dialog {
	background: linear-gradient(145deg, #ffffff, #effbf8);
	border: 1px solid rgba(11, 95, 74, 0.2);
	border-radius: 8px;
	border-top: 3px solid #16a085;
	box-shadow: 0 22px 58px rgba(8, 44, 48, 0.24);
	box-sizing: border-box;
	cursor: pointer;
	max-width: 100%;
	min-height: 126px;
	outline: none;
	padding: 28px 32px;
	transform: translateY(12px) scale(0.98);
	transition: transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
	width: 480px;
}

.lspc-cart-notice-overlay.is-visible .lspc-cart-notice-dialog {
	transform: translateY(0) scale(1);
}

.lspc-cart-notice-dialog .woocommerce-message {
	align-items: center;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	box-sizing: border-box;
	color: #173f48;
	display: flex !important;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.6;
	margin: 0 !important;
	min-height: 66px;
	padding: 0 0 0 58px !important;
	position: relative;
	width: 100%;
}

.lspc-cart-notice-dialog .woocommerce-message::before {
	align-items: center;
	background: #0b5f4a;
	border-radius: 50%;
	color: #fff;
	content: "\2713" !important;
	display: flex;
	font-family: inherit !important;
	font-size: 19px;
	font-weight: 700;
	height: 38px;
	inset: 50% auto auto 0 !important;
	justify-content: center;
	line-height: 1;
	position: absolute !important;
	transform: translateY(-50%);
	width: 38px;
}

@media (max-width: 520px) {
	.lspc-cart-notice-overlay {
		padding: 18px;
	}

	.lspc-cart-notice-dialog {
		min-height: 112px;
		padding: 22px;
		width: min(100%, 420px);
	}

	.lspc-cart-notice-dialog .woocommerce-message {
		font-size: 15px;
		padding-left: 50px !important;
	}

	.lspc-cart-notice-dialog .woocommerce-message::before {
		height: 34px;
		width: 34px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lspc-cart-notice-overlay,
	.lspc-cart-notice-dialog {
		transition: none;
	}
}

html body ul.products > li.product:not(.ls-canopy-product) .ct-woo-card-actions .button:hover,
html body ul.products > li.product:not(.ls-canopy-product) .ct-woo-card-actions .button:focus-visible {
	background: #084638 !important;
	border-color: #084638 !important;
	box-shadow: 0 11px 22px rgba(8, 70, 56, 0.26);
}

@media (max-width: 480px) {
	html body ul.products > li.product:not(.ls-canopy-product) {
		--lspc-action-width: 112px;
	}

	html body ul.products > li.product:not(.ls-canopy-product) .woocommerce-loop-product__title {
		margin-inline: 14px !important;
	}

	html body ul.products > li.product:not(.ls-canopy-product) .price {
		margin-inline: 14px !important;
		max-width: calc(100% - 28px);
	}

	html body ul.products > li.product:not(.ls-canopy-product) .price:has(.amount) {
		min-width: min(var(--lspc-action-width), calc(100% - 28px));
	}

	html body ul.products > li.product:not(.ls-canopy-product) .ct-woo-card-actions {
		margin-inline: 14px !important;
	}
}

.lspc-media {
	max-width: 100%;
	min-width: 0;
	position: relative;
}

.lspc-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	padding: 6px;
	margin: 0;
	cursor: pointer;
	color: #111;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.lspc-arrow svg {
	width: 22px;
	height: 22px;
	stroke: currentColor;
}

.lspc-prev {
	left: 2px;
}

.lspc-next {
	right: 2px;
}

.lspc-media:hover .lspc-arrow,
.product:hover .lspc-arrow {
	opacity: 1;
}

/* Single product page: widen content to align with the nav bar edges */
body.single-product .is-width-constrained {
	width: calc(100% - 96px);
	max-width: 1464px;
	margin-inline: auto;
}

body.single-product .is-layout-constrained > * {
	width: 100%;
}

body.single-product .woocommerce-tabs .is-layout-constrained {
	width: calc(100% - 96px);
	max-width: 1464px;
	margin-inline: auto;
}

body.single-product .woocommerce-tabs .is-layout-constrained > * {
	width: 100% !important;
	max-width: 100% !important;
	margin-inline: 0 !important;
}

/* Hide the reviews tab and panel on single product pages */
body.single-product .woocommerce-tabs ul.tabs li.reviews_tab {
	display: none !important;
}

/* Tighter spacing inside the Product Introduction panel:
   smaller gap before sub-headings (1) and between text blocks (2) */
body.single-product #tab-description > * {
	margin-block-start: 0;
	margin-block-end: 6px;
}

body.single-product #tab-description > h4 {
	margin-block-start: 14px;
	margin-block-end: 6px;
}

/* First element inside the panel starts flush with the panel padding,
   matching the Product Video tab's distance from the tab line */
body.single-product #tab-description > :first-child {
	margin-block-start: 0;
}

/* Reduce the gap between the tab row and the panel content (theme uses 40px) */
body.single-product .woocommerce div.product div.woocommerce-tabs div.woocommerce-Tabs-panel.panel {
	padding-top: 11px !important;
}

/* Larger body text inside the description panel (headings keep their own size) */
body.single-product #tab-description > :where(:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6)) {
	font-size: 17px;
}

/* Remove the category row from the single product summary (keep SKU) */
body.single-product .product_meta .posted_in {
	display: none !important;
}

/* SKU row relocated right below the price */
body.single-product .entry-summary .price + .sku_wrapper {
	display: block;
	margin: -10px 0 12px;
}

/* Tab labels (Product Introduction / Product Video) not uppercase */
body.single-product .woocommerce-tabs .tabs {
	text-transform: none;
	font-size: 17px;
}

body.single-product .woocommerce-Tabs-panel--reviews {
	display: none !important;
}

/* Product Video tab panel: video left, description right */
.lspc-video-panel {
	display: flex;
	gap: 40px;
	align-items: center;
}

.lspc-video-left {
	flex: 0 0 58%;
	max-width: 58%;
}

.lspc-video-right {
	flex: 1 1 auto;
	min-width: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
	font-size: 18px;
	line-height: 2;
	color: #4a4a4a;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.lspc-video-right p {
	margin: 0 0 24px;
}

.lspc-video-right p:last-child {
	margin-bottom: 0;
}

/* Quantity box & add-to-cart button: font size +2px */
body.single-product .quantity input.qty {
	--theme-form-font-size: calc(0.9em + 2px);
}

body.single-product .quantity .ct-increase:before,
body.single-product .quantity .ct-decrease:before {
	font-size: calc(var(--quantity-height, 55px) / 5.5 + 2px);
}

body.single-product .ct-product-add-to-cart {
	--theme-button-font-size: 17px;
}

.lspc-video-wrap video,
.lspc-video-wrap iframe {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border: 0;
}

@media (max-width: 860px) {
	.lspc-video-panel {
		flex-direction: column;
	}

	.lspc-video-left {
		flex-basis: auto;
		max-width: 100%;
	}
}

/* Main gallery preview image ratio 5:4 */
body.single-product .woocommerce-product-gallery .flexy-item .ct-media-container,
body.single-product .woocommerce-product-gallery .flexy-item img {
	aspect-ratio: 5 / 4 !important;
	object-fit: contain;
}

@media (max-width: 860px) {
	body.single-product .is-width-constrained {
		width: calc(100% - 32px);
	}
}

/* Narrow the vertical gaps around the breadcrumb row */
body.single-product .ct-container-full[data-vertical-spacing*="top"] {
	padding-top: 24px;
}

body.single-product .hero-section[data-type="type-1"] {
	margin-bottom: 24px;
}

/* Breadcrumb text: normal case instead of uppercase */
body.single-product .ct-breadcrumbs {
	text-transform: none;
}

/* Gallery thumbnails ratio 5:4 */
body.single-product .woocommerce-product-gallery ol > li .ct-media-container,
body.single-product .woocommerce-product-gallery ol > li img {
	aspect-ratio: 5 / 4 !important;
	object-fit: contain;
}

/* Thumbnails on a single row, five per view */
body.single-product .woocommerce-product-gallery .flexy-pills ol {
	flex-wrap: nowrap;
	overflow: hidden;
}

body.single-product .woocommerce-product-gallery .flexy-pills ol li {
	width: 20%;
	flex-shrink: 0;
}

/* Draw the active state inside the thumbnail so its top edge is not clipped. */
body.single-product .woocommerce-product-gallery .flexy-pills ol li.active {
	border-radius: 6px;
	outline: 2px solid #0b7f68 !important;
	outline-offset: -2px;
	position: relative;
	z-index: 2;
}

/* Product-gallery image controls use the site's green action color. */
body.single-product .woocommerce-product-gallery .flexy > .flexy-arrow-prev,
body.single-product .woocommerce-product-gallery .flexy > .flexy-arrow-next {
	background: #0b5f4a !important;
	box-shadow: 0 8px 20px rgba(11, 95, 74, 0.24);
	color: #fff !important;
}

body.single-product .woocommerce-product-gallery .flexy > .flexy-arrow-prev:hover,
body.single-product .woocommerce-product-gallery .flexy > .flexy-arrow-prev:focus-visible,
body.single-product .woocommerce-product-gallery .flexy > .flexy-arrow-next:hover,
body.single-product .woocommerce-product-gallery .flexy > .flexy-arrow-next:focus-visible {
	background: #084638 !important;
	color: #fff !important;
}

body.single-product .woocommerce-product-gallery .flexy-pills > [class*="flexy-arrow"] {
	background: #0b5f4a !important;
	box-shadow: 0 6px 16px rgba(11, 95, 74, 0.24);
	color: #fff !important;
}

body.single-product .woocommerce-product-gallery .flexy-pills > [class*="flexy-arrow"]:hover,
body.single-product .woocommerce-product-gallery .flexy-pills > [class*="flexy-arrow"]:focus-visible {
	background: #084638 !important;
	color: #fff !important;
}

/* Prev/next controls for the thumbnail strip (added when > 5 images) */
body.single-product .flexy-pills .lspc-thumbs-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 1px solid #0b5f4a !important;
	border-radius: 50%;
	background: #0b5f4a !important;
	color: #fff !important;
	box-shadow: 0 6px 16px rgba(11, 95, 74, 0.24);
	cursor: pointer;
	padding: 0;
}

body.single-product .flexy-pills .lspc-thumbs-nav:hover,
body.single-product .flexy-pills .lspc-thumbs-nav:focus-visible {
	background: #084638 !important;
	border-color: #084638 !important;
	color: #fff !important;
}

body.single-product .flexy-pills .lspc-thumbs-nav svg {
	width: 16px;
	height: 16px;
}

body.single-product .flexy-pills .lspc-thumbs-prev {
	left: 2px;
}

body.single-product .flexy-pills .lspc-thumbs-next {
	right: 2px;
}

body.single-product .flexy-pills .lspc-thumbs-nav[disabled] {
	opacity: 0.42;
	cursor: default;
}

/* ===== Cart page: align the title and the cart block with the nav bar
   (the nav content sits in a centered 1464px-wide block) ===== */
body.woocommerce-cart .hero-section.is-width-constrained {
	width: calc(100% - 96px);
	max-width: 1464px;
	margin-inline: auto;
}

body.woocommerce-cart .wp-block-woocommerce-cart {
	width: calc(100% - 96px) !important;
	max-width: 1464px !important;
	margin-inline: auto !important;
}

@media (max-width: 860px) {
	body.woocommerce-cart .hero-section.is-width-constrained,
	body.woocommerce-cart .wp-block-woocommerce-cart {
		width: calc(100% - 32px);
	}
}

/* Cart line-item thumbnails at a 5:4 ratio */
body.woocommerce-cart .wc-block-cart-item__image img {
	aspect-ratio: 5 / 4 !important;
	object-fit: contain !important;
	width: 100% !important;
	height: auto !important;
	background: #fff;
}

/* Cart line-item text a bit larger */
body.woocommerce-cart .wc-block-cart-item__product .wc-block-components-product-name {
	font-size: 17px;
	line-height: 1.45;
}

body.woocommerce-cart .wc-block-cart-item__product .wc-block-components-product-price,
body.woocommerce-cart .wc-block-cart-item__product .wc-block-cart-item__prices {
	font-size: 16px;
}

body.woocommerce-cart .wc-block-cart-item__product .wc-block-components-product-details,
body.woocommerce-cart .wc-block-cart-item__product .wc-block-components-product-details__description,
body.woocommerce-cart .wc-block-cart-item__product .wc-block-components-product-metadata {
	font-size: 15px;
}
