/*
Theme Name: GE Sealants
Theme URI: https://sfwresults.com/
Author: https://sfwresults.com/
Author URI: sfwresults.com
Description:
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: GE Sealants
Tags:
*/

/*** Product grid (All Products + category grids): Learn More + PriceSpider WTB
 *  Scoped with .products_grids — WP body class page-template-template-all_products does NOT apply
 *  when the template lives under template-parts/ (actual class is longer / different).
 */

.products_grids .product {
	cursor: default;
}

.products_grids .product:hover {
	box-shadow: 0px 0px 6px rgba(0, 0, 0, .25) !important;
}
.products_grids .product:hover .button:not(.ps-disabled),
.products_grids .product:hover .cc-fi-button:not(.ps-disabled) {
	background: var(--blue) !important;
	color: white !important;
}

.products_grids .product .button,
.products_grids .product .button_row .cc-fi-button:not(.ps-disabled) {
	cursor: pointer;
}
.products_grids .product .button:not(.ps-disabled):hover,
.products_grids .product .button_row .cc-fi-button:not(.ps-disabled):hover {
	cursor: pointer;
	background: white !important;
	color: var(--blue) !important;
	border: 2px solid var(--blue) !important;
}
.products_grids .product .button_row {
	margin-top: 1rem;
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}
.products_grids .product .button_row > * {
	flex-grow: 1 !important;
}
.products_grids .product .button_row .button {
	text-decoration: none;
	padding: 8px 8px !important;
	margin: 0px !important;
	line-height: 16px !important;
	max-width: 180px !important;
	min-width: 150px !important;
	border-width: 2px !important;
}
/* PriceSpider WTB: match Foundation .button — pill shape, colors (overrides PS black / square) */
.products_grids .product .button_row .cc-fi-button.ps-widget {
	text-decoration: none;
	padding: 8px 8px !important;
	margin: 0px !important;
	line-height: 16px !important;
	max-width: 180px !important;
	min-width: 150px !important;
	box-sizing: border-box !important;
	height: auto !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	text-align: center;
	flex-wrap: nowrap;
	border-radius: 1.3rem !important;
	border: 2px solid transparent !important;
	box-shadow: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	font-family: inherit !important;
	font-size: 0.9rem !important;
	transition: background-color 0.25s ease-out, color 0.25s ease-out !important;
}
/* Active WTB (“Where To Buy”): solid blue + white text like Learn More */
.products_grids .product .button_row .cc-fi-button.ps-widget:not(.ps-disabled) {
	background: var(--blue) !important;
	color: #fff !important;
	border: 2px solid var(--blue) !important;
}
/* Direct hover: must beat .ps-widget default specificity so it matches Learn More (lines 36–40) */
.products_grids .product .button_row .cc-fi-button.ps-widget:not(.ps-disabled):hover {
	background: white !important;
	color: var(--blue) !important;
	border: 2px solid var(--blue) !important;
}
.products_grids .product .button_row .cc-fi-button.ps-widget:not(.ps-disabled) .ps-button-label {
	color: inherit !important;
}

/* PriceSpider duplicates the message in <small> when .ps-button-label exists; do not hide all
 * `small` or the only label can disappear on the grid (same PS render paths as single product). */
.products_grids .product .button_row .cc-fi-button.ps-widget .ps-button-label ~ small {
	display: none !important;
}

.products_grids .product .button_row .cc-fi-button.ps-widget .ps-button-label {
	line-height: 16px !important;
	display: block;
	font-weight: bold;
	margin: 0;
}

/* No sellers on grid: muted pill (single product hides .ps-disabled in its own block below) */
.products_grids .product .button_row .cc-fi-button.ps-widget.ps-disabled {
	cursor: not-allowed !important;
	opacity: 1 !important;
	background-color: #fefefe !important;
	color: #8a8a8a !important;
	border: 2px solid #cacaca !important;
	border-radius: 1.3rem !important;
}
.products_grids .product .button_row .cc-fi-button.ps-widget.ps-disabled .ps-button-label {
	color: inherit !important;
}
.products_grids .product:hover .button_row .cc-fi-button.ps-widget.ps-disabled {
	background-color: #fefefe !important;
	color: #8a8a8a !important;
	border: 2px solid #cacaca !important;
}

.products_grids .product .button_row span,
.products_grids .product .button_row small {
	line-height: 16px !important;
	display: block;
	font-weight: bold;
}

/*** Single product: PriceSpider WTB + “No sellers” (.ps-disabled) ***/
/* Hidden until PS injects label (see scripts-products.php: ps-wtb-ready). Grid is unchanged. */
.single-products #main .cc-fi-button.ps-widget.showButton {
	display: none !important;
}
.single-products #main .cc-fi-button.ps-widget.showButton.ps-wtb-ready:not(.ps-disabled) {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-wrap: nowrap !important;
	min-height: 40px !important;
	box-sizing: border-box !important;
	padding: 8px 12px !important;
}
.single-products #main .cc-fi-button.ps-widget.showButton .ps-button-label,
.single-products #main .cc-fi-button.ps-widget.showButton small {
	color: #fff !important;
	line-height: 1.25 !important;
}

/* No sellers (PriceSpider .ps-disabled): hide WTB */
.single-products #main .cc-fi-button.ps-widget.ps-disabled {
	display: none !important;
}
