/**
 * ABIS CWV — CR PhotoSwipe closed-state fix + a11y contrast + gallery visibility.
 * abiselectronics.com only (enqueued by abis-cwv-optimize.php).
 *
 * Homepage LCP lives in abis-home-layout/hero-lcp.php — do not add rules that
 * lazy-load or hide .abis-hero-lcp / .abis-a-hero__media img.
 *
 * Do NOT set width/aspect-ratio on .woocommerce div.product div.images (or
 * flex-viewport / gallery wrapper): that fights Woo/Kadence float columns and
 * FlexSlider thumbnail navigation.
 */

/*
 * Customer Reviews injects .cr-pswp sitewide. Off-product pages dequeue
 * PhotoSwipe CSS, so the closed UI paints as green button rectangles under the footer.
 * Hide when closed; PhotoSwipe adds .pswp--open when the lightbox is active.
 */
.cr-pswp.pswp:not(.pswp--open) {
	display: none !important;
}

/* Keep gallery visible before flexslider init (WC default opacity:0). */
.woocommerce div.product div.images .woocommerce-product-gallery {
	opacity: 1 !important;
}

/*
 * Kadence woocommerce.min.css: `.woocommerce div.product div.images
 * .flex-control-thumbs { margin: -32px 0 0; }` pulls the thumb row up
 * over the flex-viewport. Reset to normal flow below the main image.
 */
.woocommerce div.product div.images ol.flex-control-nav.flex-control-thumbs,
.woocommerce div.product div.images .flex-control-thumbs {
	margin-top: 0.75rem !important;
	position: relative !important;
	clear: both;
}

/* Mobile stack: ensure summary clears floated gallery column (no thumb-over-title). */
@media (max-width: 767px) {
	.woocommerce div.product div.summary {
		clear: both;
		width: 100%;
	}
}

/*
 * Accessibility: brand green #09ba65 fails WCAG AA (2.55:1) with white;
 * muted #8c8c8c is 3.36:1. Keep palette1 for decorative accents; darken
 * button + muted tokens so text/CTAs pass 4.5:1 without redesign.
 */
:root {
	--abis-a11y-green: #057a42; /* 5.43:1 on white */
	--abis-a11y-green-hover: #046636;
	--global-palette-btn-bg: var(--abis-a11y-green);
	--global-palette-btn-bg-hover: var(--abis-a11y-green-hover);
	--global-palette6: #6f6f6f; /* was #8c8c8c; now ≥4.5:1 on white */
}

/* Social circles inherit brand fill — darken so white icons meet AA */
.footer-social-inner-wrap .social-button,
.site-footer-middle-section-2 .footer-social-inner-wrap .social-button {
	background-color: var(--abis-a11y-green) !important;
	border-color: var(--abis-a11y-green) !important;
	color: #ffffff !important;
}

.footer-social-inner-wrap .social-button:hover,
.site-footer-middle-section-2 .footer-social-inner-wrap .social-button:hover {
	background-color: var(--abis-a11y-green-hover) !important;
	border-color: var(--abis-a11y-green-hover) !important;
	color: #ffffff !important;
}
