/* Final readability overrides loaded last. */

/* Cart / menu-cart buttons: keep white text on green background. */
.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle .elementor-button,
.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle .elementor-button:hover,
.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__footer-buttons .elementor-button,
.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__footer-buttons .elementor-button:hover,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .button,
.wc-block-components-button:not(.is-link),
.wc-block-components-button:not(.is-link):hover {
	color: #ffffff !important;
}

/* Make sure cart icon and counter stay readable. */
.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle .elementor-button-icon,
.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle .elementor-button-text,
.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle .elementor-button-icon-qty {
	color: #ffffff !important;
}

/* Search: smaller, regular-weight text for better balance. */
.elementor-widget-search-form input[type="search"].elementor-search-form__input,
.elementor-widget-search-form .elementor-search-form__submit,
.elementor-widget-search-form .elementor-search-form__icon,
.search-form input[type="search"],
.search-form button[type="submit"] {
	font-size: 14px !important;
	font-weight: 400 !important;
}

/* Preserve legibility for placeholder text in search fields. */
.elementor-widget-search-form input[type="search"].elementor-search-form__input::placeholder,
.search-form input[type="search"]::placeholder {
	color: #6a7f6a;
	opacity: 1;
}

/* WooCommerce amount text: explicit class targeting. */
.woocommerce .woocommerce-Price-amount.amount {
	color: var(--gm-color-primary) !important;
	font-weight: 600 !important;
}

/* Keep amount text white when shown inside green cart/menu buttons. */
.elementor-widget-woocommerce-menu-cart .elementor-button .woocommerce-Price-amount.amount,
.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__footer-buttons .woocommerce-Price-amount.amount,
.woocommerce a.button .woocommerce-Price-amount.amount,
.woocommerce button.button .woocommerce-Price-amount.amount,
.woocommerce input.button + .woocommerce-Price-amount.amount {
	color: #ffffff !important;
}

/* AWS search input: smaller, non-bold text. */
.aws-search-field {
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
}

.aws-search-field::placeholder {
	font-size: 14px !important;
	font-weight: 400 !important;
	color: #6a7f6a !important;
	opacity: 1;
}

/* B2B reorder search: white + green palette, theme-consistent control styling. */
.b2b-search-wrap label {
	color: var(--gm-color-text);
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 6px;
	display: inline-block;
}

.b2b-product-search {
	width: 100%;
	background: #ffffff !important;
	color: var(--gm-color-text) !important;
	border: 1px solid var(--gm-color-border) !important;
	border-radius: 10px !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
	padding: 10px 12px !important;
	box-shadow: none !important;
}

.b2b-product-search:focus {
	border-color: var(--gm-color-primary) !important;
	box-shadow: 0 0 0 3px rgba(107, 180, 47, 0.18) !important;
	outline: none !important;
}

.b2b-product-search::placeholder {
	color: #6a7f6a !important;
	font-size: 13px !important;
	font-weight: 400 !important;
}

.b2b-search-dropdown {
	background: #ffffff !important;
	border: 1px solid var(--gm-color-border) !important;
	border-radius: 10px !important;
	box-shadow: 0 8px 24px rgba(25, 61, 31, 0.08) !important;
	max-height: 320px;
	overflow-y: auto;
	overflow-x: hidden;
	scroll-behavior: smooth;
}

.b2b-search-dropdown button {
	color: var(--gm-color-text) !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	border-bottom: 1px solid #e8f0e4;
}

.b2b-search-dropdown button:last-child {
	border-bottom: 0;
}

/* Themed scrollbar for long search result lists. */
.b2b-search-dropdown {
	scrollbar-width: thin;
	scrollbar-color: var(--gm-color-primary) #edf6e8;
}

.b2b-search-dropdown::-webkit-scrollbar {
	width: 10px;
}

.b2b-search-dropdown::-webkit-scrollbar-track {
	background: #edf6e8;
	border-radius: 999px;
}

.b2b-search-dropdown::-webkit-scrollbar-thumb {
	background: var(--gm-color-primary);
	border-radius: 999px;
	border: 2px solid #edf6e8;
}

.b2b-search-dropdown::-webkit-scrollbar-thumb:hover {
	background: var(--gm-color-primary-hover);
}

.b2b-search-dropdown button:hover {
	background: #f4faef !important;
}

.b2b-search-result-thumb {
	border: 1px solid var(--gm-color-border) !important;
	background: #ffffff !important;
}

.b2b-search-result-text strong {
	color: var(--gm-color-primary) !important;
	font-weight: 700 !important;
}

/* B2B reorder buttons: remove blue defaults and keep green palette always. */
.b2b-widget,
.b2b-order-edit-wrap {
	--b2b-primary: var(--gm-color-primary);
	--b2b-success: var(--gm-color-primary);
	--b2b-border: var(--gm-color-border);
	--b2b-bg: #f4faef;
}

.b2b-btn,
.b2b-widget .b2b-btn,
.b2b-order-edit-wrap .b2b-btn {
	border-color: var(--gm-color-primary) !important;
	color: var(--gm-color-primary) !important;
	background: #ffffff !important;
}

.b2b-btn--primary,
.b2b-widget .b2b-btn--primary,
.b2b-order-edit-wrap .b2b-btn--primary {
	background: var(--gm-color-primary) !important;
	border-color: var(--gm-color-primary) !important;
	color: #ffffff !important;
}

.b2b-btn:hover,
.b2b-widget .b2b-btn:hover,
.b2b-order-edit-wrap .b2b-btn:hover {
	background: #f4faef !important;
	border-color: var(--gm-color-primary-hover) !important;
	color: var(--gm-color-primary-hover) !important;
}

.b2b-btn--primary:hover,
.b2b-widget .b2b-btn--primary:hover,
.b2b-order-edit-wrap .b2b-btn--primary:hover {
	background: var(--gm-color-primary-hover) !important;
	border-color: var(--gm-color-primary-hover) !important;
	color: #ffffff !important;
}

/* Shop Card Unification: same card height, fixed image frame, no image distortion. */
.woocommerce ul.products,
.elementor-wc-products ul.products {
	align-items: stretch;
}

.woocommerce ul.products li.product,
.elementor-wc-products ul.products li.product {
	display: flex;
	flex-direction: column;
	text-align: center;
	height: 100%;
}

/* Product title: truncate after 3 lines for equal card rhythm. */
.woocommerce .products .product .woocommerce-loop-product__title,
.elementor-wc-products ul.products li.product .woocommerce-loop-product__title {
	display: -webkit-box;
	line-clamp: 3;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	min-height: 4.5em;
	font-size: 14px;
	color: var(--gm-color-text);
	margin-bottom: 10px;
	line-height: 1.5;
}

/* Price styling inside product cards only. */
.elementor-wc-products ul.products li.product .woocommerce-Price-amount.amount,
.woocommerce ul.products li.product .woocommerce-Price-amount.amount {
	color: var(--gm-color-primary) !important;
	font-size: 17px;
	font-weight: 600;
	margin-bottom: 10px;
}

.elementor-wc-products ul.products li.product .price .woocommerce-price-suffix,
.woocommerce ul.products li.product .price .woocommerce-price-suffix {
	color: #4f6f4f;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 10px;
}

/* Add to cart button in product grid. */
.woocommerce ul.products li.product .button,
.elementor-wc-products ul.products li.product .button {
	align-self: center;
	width: 85%;
	background-color: #4c8c2b;
	color: #ffffff !important;
	text-align: center;
	padding: 10px;
	font-size: 14px;
	border: none;
	border-radius: 4px;
	transition: background-color 0.3s ease;
}

.woocommerce ul.products li.product .button:hover,
.elementor-wc-products ul.products li.product .button:hover {
	background-color: #3b6f23;
	color: #ffffff !important;
}

/* Compact actions for Read More and Quick View in product cards. */
.woocommerce ul.products li.product .button.product_type_simple,
.woocommerce ul.products li.product .button.yith-wcqv-button,
.elementor-wc-products ul.products li.product .button.product_type_simple,
.elementor-wc-products ul.products li.product .button.yith-wcqv-button {
	width: auto;
	min-width: 120px;
	max-width: 85%;
	padding: 7px 10px;
	font-size: 12px;
	line-height: 1.2;
	border-radius: 8px;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	margin: 6px auto 0;
}

@media (max-width: 767px) {
	.woocommerce ul.products li.product .button.product_type_simple,
	.woocommerce ul.products li.product .button.yith-wcqv-button,
	.elementor-wc-products ul.products li.product .button.product_type_simple,
	.elementor-wc-products ul.products li.product .button.yith-wcqv-button {
		min-width: 104px;
		max-width: 92%;
		padding: 6px 9px;
		font-size: 11px;
	}
}

/* Fixed image frame; keep proportions with contain (no stretch/crop). */
.woocommerce ul.products li.product a img,
.woocommerce-page ul.products li.product a img,
.elementor-wc-products ul.products li.product a img {
	width: 100% !important;
	height: 200px !important;
	object-fit: contain !important;
	object-position: center;
	display: block !important;
	padding: 12px !important;
	background: #ffffff !important;
	transition: transform 0.3s ease !important;
}

/* Cart + checkout buttons: white background with green text. */
body.woocommerce-cart .woocommerce a.button,
body.woocommerce-cart .woocommerce button.button,
body.woocommerce-cart .woocommerce input.button,
body.woocommerce-checkout .woocommerce a.button,
body.woocommerce-checkout .woocommerce button.button,
body.woocommerce-checkout .woocommerce input.button,
body.woocommerce-checkout .woocommerce #payment #place_order,
body.woocommerce-checkout .woocommerce-page #payment #place_order,
body.woocommerce-cart .wc-block-components-button:not(.is-link),
body.woocommerce-checkout .wc-block-components-button:not(.is-link),
.wc-block-cart .wc-block-components-button:not(.is-link),
.wc-block-checkout .wc-block-components-button:not(.is-link) {
	background: #ffffff !important;
	color: var(--gm-color-primary) !important;
	border: 1px solid var(--gm-color-primary) !important;
}

body.woocommerce-cart .woocommerce a.button:hover,
body.woocommerce-cart .woocommerce button.button:hover,
body.woocommerce-cart .woocommerce input.button:hover,
body.woocommerce-checkout .woocommerce a.button:hover,
body.woocommerce-checkout .woocommerce button.button:hover,
body.woocommerce-checkout .woocommerce input.button:hover,
body.woocommerce-checkout .woocommerce #payment #place_order:hover,
body.woocommerce-checkout .woocommerce-page #payment #place_order:hover,
body.woocommerce-cart .wc-block-components-button:not(.is-link):hover,
body.woocommerce-checkout .wc-block-components-button:not(.is-link):hover,
.wc-block-cart .wc-block-components-button:not(.is-link):hover,
.wc-block-checkout .wc-block-components-button:not(.is-link):hover {
	background: #f4faef !important;
	color: var(--gm-color-primary-hover) !important;
	border-color: var(--gm-color-primary-hover) !important;
}

body.woocommerce-cart .woocommerce a.button *,
body.woocommerce-cart .woocommerce button.button *,
body.woocommerce-cart .woocommerce input.button *,
body.woocommerce-checkout .woocommerce a.button *,
body.woocommerce-checkout .woocommerce button.button *,
body.woocommerce-checkout .woocommerce input.button *,
body.woocommerce-checkout .woocommerce #payment #place_order *,
body.woocommerce-checkout .woocommerce-page #payment #place_order *,
.wc-block-cart .wc-block-components-button:not(.is-link) *,
.wc-block-checkout .wc-block-components-button:not(.is-link) * {
	color: inherit !important;
}
