/**
 * Eir Site Fixes
 * Site-wide patches for XStore theme quirks - not My Account specific.
 * Loaded on every page (see eir_myau_enqueue_site_fixes()).
 */

:root {
	--eir-accent: #6F7D6A;
	--eir-btn-radius: 6px;
	--eir-radius-sm: 10px;
	--eir-border: var(--et_border-color, #e7e5e0);
}

/* ---------- Kill the theme's global UPPERCASE transform ----------
 * The compiled theme CSS forces text-transform: uppercase on every
 * .btn/.button/input[type=submit] and on most headings/widget titles.
 * Overriding here instead of per-element keeps it in one place. */

.btn,
.button,
form #qna-ask-input button,
form button,
input[type="button"],
input[type="submit"],
.read-more,
.read-more.btn,
.btn-advanced {
	text-transform: none !important;
}

.woocommerce-account header.title,
.woocommerce-MyAccount-title,
.woocommerce-account .woocommerce > h2,
.title h1,
.title h2,
.woocommerce-account .page-heading .title,
.woocommerce-compare .page-heading .title,
.woocommerce-waitlist .page-heading .title,
.woocommerce-wishlist .page-heading .title,
.empty-cart-block h1,
.empty-cart-block h2,
.empty-category-block h1,
.empty-category-block h2,
.woocommerce-thankyou-order-received {
	text-transform: none !important;
}

.cart_totals > h2,
.widget-title,
.widgettitle,
.woocommerce-cart-form table thead th,
.step-title,
#reviews #comments > h2,
span.comment-reply-title,
#reviews .comment-reply-title,
.tabs .tab-title,
.tab-seller h2,
.et-tabs-wrapper .tabs .tab-title,
.menu-element h5,
.copyrights-widget.etheme_widget_socials .widget-title {
	text-transform: none !important;
}

.cart-order-details .order-total td,
.cart-order-details .order-total th,
.cart_totals .order-total td,
.cart_totals .order-total th {
	text-transform: none !important;
}

/* Full sweep of the theme's compiled CSS (xstore.min.css, general-all,
 * woocommerce-all, elementor-all-widgets, and every css/modules/*.min.css
 * bundle) for every remaining text-transform: uppercase rule, so nothing
 * is left to chase down one screenshot at a time. A few of these target
 * plugins (bbPress, WCFM/WCMP, Multivendor) that may not even be active
 * here - harmless no-ops if so, but future-proof if they ever are. */
#bbpress-forums .bbp-forum-info .bbp-forum-title,
#bbpress-forums .bbp-topic-permalink,
#bbpress-forums .forum-titles li,
#bbpress-forums div.bbp-reply-author .bbp-author-ip,
#bbpress-forums div.bbp-topic-author .bbp-author-ip,
#bbpress-forums div.bbp-reply-author .bbp-author-role,
#bbpress-forums div.bbp-topic-author .bbp-author-role,
#bbpress-forums div.bbp-reply-author a.bbp-author-name,
#bbpress-forums div.bbp-topic-author a.bbp-author-name,
#bbpress-forums div.bbp-topic-header .bbp-topic-title h3,
#bbpress-forums fieldset.bbp-form label,
#bbpress-forums fieldset.bbp-form legend,
#bbpress-forums li.bbp-footer .bbp-reply-author,
#bbpress-forums li.bbp-footer .bbp-search-author,
#bbpress-forums li.bbp-header .bbp-reply-author,
#bbpress-forums li.bbp-header .bbp-search-author,
#bbpress-forums li.bbp-footer .bbp-reply-content,
#bbpress-forums li.bbp-footer .bbp-search-content,
#bbpress-forums li.bbp-header .bbp-reply-content,
#bbpress-forums li.bbp-header .bbp-search-content,
#cookie-notice #cn-notice-text h4,
#cookie-notice .button.bootstrap,
#subscription-toggle,
.banner .banner-subtitle,
.banner .banner-title,
.bc-type-default .bbp-breadcrumb-current,
.bc-type-default .title,
.bc-type-left .bbp-breadcrumb-current,
.bc-type-left .title,
.categories-menu-element .cat-item a,
.categories-menu-element li > ul.children li > a,
.categories-products-two-rows .category-title h4 a,
.categories-products-two-rows .show-products a,
.content-product .available-on-backorder,
.content-product .stock,
.content-product .footer-product2 .button,
.content-product .footer-product2 .footer-inner > *,
.et-masonry-filters-list li a,
.et-mini-content-head .et-element-label,
.et-mobile-panel .et-content_toggle .et-mini-content,
.et-off-canvas .cart-widget-subtotal .small-h,
.et-off-canvas.et_b_header-account ul.menu,
.et-timer .time-block,
.et_b_header-search .clear,
.et_shop-load-more:not(.finished) a,
.sb-infinite-scroll-load-more:not(.finished) a,
.etheme-category-grid-image-ghost span,
.etheme-elementor-nav-menu-item-label,
.etheme-elementor-off-canvas .cart-widget-subtotal .small-h,
.etheme-elementor-off-canvas-design-separated .etheme-elementor-nav-menu.vertical .etheme-elementor-nav-menu-item-parent .elementor-item,
.etheme-elementor-off-canvas-design-separated .woocommerce-MyAccount-navigation-link a,
.etheme-elementor-off-canvas-design-separated .etheme-elementor-off-canvas_content .etheme-elementor-off-canvas__toggle,
.etheme-elementor-off-canvas-design-separated .widget > ul > .cat-item > a,
.etheme-elementor-off-canvas_content-head-label,
.etheme-icon-list-item-label,
.etheme-search-form-more,
.etheme-search-form-title,
.etheme-search-form-tab,
.etheme-search-tags-title,
.footer .wpb_widgetised_column_heading,
.prefooter .wpb_widgetised_column_heading,
.multivendorx-registration:has(form.woocommerce-form) > h2,
.multivendorxstep-actions button,
.my_account_orders td,
.onsale,
.order_details .woocommerce-notice,
.popup-added-to-cart .order-total,
.product-info-wrapper .fixed-content > .product_brand,
.product-info-wrapper .fixed-content > .product_seller,
.product-information .fixed-content > .product_brand,
.product-information .fixed-content > .product_seller,
.product-summary-center .fixed-content > .product_brand,
.product-summary-center .fixed-content > .product_seller,
.quick-view-popup .product-cats,
.slide-button,
.st-item-meta .st-swatch-preview.type-label a,
.st-item-meta .st-swatch-preview.type-label span,
ul.st-swatch-preview li.type-label a,
ul.st-swatch-preview li.type-label span,
.vc_tta-color-grey.vc_general .vc_tta-panel-title > a,
.vc_tta-color-grey.vc_tta-style-classic .vc_tta-tab a,
.vc_tta-panel-body h3.title,
.vc_tta-style-classic .vc_tta-panel .vc_tta-panel-heading a span,
.woocommerce-order-details tfoot tr:last-child th,
body #mvx-store-conatiner input[type="submit"],
body #wcmp-store-conatiner input[type="submit"],
body.woocommerce table.compare-list tr th,
.et_b-tabs .et-tab {
	text-transform: none !important;
}

/* ---------- Boxed content width vs. full-width header ----------
 * .container.content-page (Cart, Checkout, and any other page still on
 * the classic page.php template) is capped narrower than the header's
 * .template-container, which is unconstrained - misaligning every page
 * that still uses this wrapper. Un-cap it so it matches the header. */

.container.content-page {
	max-width: none !important;
}

/* ---------- Misc theme tweaks (moved out of the theme's Custom CSS
   field so they're versioned and survive a theme reset/switch) ---------- */

.header-wrapper .header-main-menu2.et_element-top-level .menu > li {
	opacity: 0.6;
}

.header-wrapper .header-main-menu2.et_element-top-level .menu > .current-menu-item,
.header-wrapper .header-main-menu2.et_element-top-level .menu > li:hover {
	opacity: 1;
}

/* Secondary menu images */
.et_b_header-menu.et_element-top-level .menu .type-img img {
	max-width: 36px;
}

/* Header cart - was hovering to a white background, which all but
   disappears against this site's light header; use the brand color
   instead so it stays visible. */
.et_b_header-cart.et_element-top-level > a:hover {
	background: var(--eir-accent);
	color: #fff;
	opacity: 1;
}

.after-shop-loop {
	margin-top: 30px;
}

.post-header .wp-picture {
	border-radius: var(--eir-radius-sm);
}

/* Product tabs - was a full pill (border-radius: 100px), which
   contradicts the flat 6px corners used everywhere else on the site now. */
.woocommerce-tabs.type-folders .wc-tabs .et-woocommerce-tab:not(.active) a {
	background-color: #fff;
}

.woocommerce-tabs.type-folders .wc-tabs .et-woocommerce-tab {
	border-radius: var(--eir-btn-radius);
	border: none;
	margin-bottom: 15px;
}

/* Shop grid hover overlay */
.product-view-mask2 .footer-product {
	border: 1px solid #222;
	border-radius: var(--eir-radius-sm);
}

/* Single post */
.single-post .content-page {
	margin-top: 15px;
}

/* Pagination */
.etheme-pagination li span {
	border-radius: var(--eir-btn-radius) !important;
}

/* Every remaining button-shaped element the theme still hardcodes at
 * 5px corners (add-to-cart, checkout, login/register, account forms,
 * empty-state CTAs, search, wishlist/compare actions, mini-cart, etc.) -
 * bumped to our 6px standard so nothing is a half-pixel off from the
 * buttons this plugin draws itself. */
.btn.small.black,
.btn.medium.black,
.btn.big.black,
.before-checkout-form .button,
.etheme-above-checkout-form .button,
.checkout-button,
.shipping-calculator-form .button,
.single_add_to_cart_button.button,
.single_add_to_cart_button.button:focus,
.single_add_to_cart_button.button.disabled,
.single_add_to_cart_button.button.disabled:hover,
.et-quick-view-wrapper .single_add_to_cart_button.button,
.et-quick-view-wrapper .single_add_to_cart_button.button:focus,
.et-quick-view-wrapper .single_add_to_cart_button.button.disabled,
.et-quick-view-wrapper .single_add_to_cart_button.button.disabled:hover,
form.login .button,
form.register .button,
form.register .button.woocommerce-Button,
form.lost_reset_password .button,
.woocommerce-EditAccountForm .woocommerce-Button,
.empty-cart-block .btn,
.empty-wishlist-block .btn,
.empty-compare-block .btn,
.empty-category-block .btn,
.woocommerce-mini-cart__empty-message .btn,
.form-submit input[type="submit"],
#commentform input[type="button"],
.form-submit input[type="submit"]:focus,
.my_account_orders .view,
.et-quick-view-wrapper .product_type_variable,
.et-quick-view-wrapper .product_type_variation,
.coupon input[type="submit"],
.widget_search button,
.widget_product_search button,
.woocommerce-product-search button,
form.wpcf7-form .wpcf7-submit:not(.active),
.woocommerce table.wishlist_table td.product-add-to-cart a,
.wcmp-quick-info-wrapper form input[type="submit"],
.product_list_widget .buttons a,
.et-wishlist-widget .wishlist-dropdown .buttons .btn-view-wishlist,
.btn-checkout,
.form-row.place-order .button,
.search-full-width form .btn,
.xstore-wishlist-action .button,
.xstore-compare-button .button,
.form-actions .add-all-products,
.form-actions .compare-more-products,
.form-actions .xstore-wishlist-actions,
.form-actions .xstore-compare-actions,
.et-cookies-popup-wrapper .cookies-button,
body .etheme-checkout-page-next-step,
.etheme-checkout-page-steps-footer #place_order,
body .etheme-checkout-page-previous-step,
.etheme-elementor-cart-checkout-page-coupon .button,
.etheme-elementor-cart-checkout-page-login-form .button,
.mini-cart-buttons a {
	border-radius: var(--eir-btn-radius) !important;
}

/* ---------- Mini-cart popup: primary vs. secondary action ----------
 * Matches the site's own established pair (same as "Ask For An
 * Estimate"/checkout-button on Wishlist): primary = brand green filled,
 * secondary = muted gold (#C6A96B) filled, both invert to an outline on
 * hover. "Shopping cart (N)" is a plain nav link, not a button, so it's
 * left as text rather than boxed. */

.mini-cart-buttons a.button,
.widget_shopping_cart .buttons a.button {
	font-family: "Inter", sans-serif;
	font-size: 1rem;
	font-weight: 600;
	border: var(--eir-btn-border, 1px) solid #C6A96B;
	background-color: #C6A96B;
	color: #fff;
	-webkit-text-fill-color: #fff;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.mini-cart-buttons a.button:hover,
.widget_shopping_cart .buttons a.button:hover {
	background-color: transparent;
	color: #C6A96B;
	-webkit-text-fill-color: #C6A96B;
}

.mini-cart-buttons a.btn-checkout,
.widget_shopping_cart .buttons a.checkout {
	border-color: var(--eir-accent);
	background-color: var(--eir-accent);
	color: #fff;
	-webkit-text-fill-color: #fff;
}

.mini-cart-buttons a.btn-checkout:hover,
.widget_shopping_cart .buttons a.checkout:hover {
	background-color: transparent;
	color: var(--eir-accent);
	-webkit-text-fill-color: var(--eir-accent);
}

.btn-view-cart {
	font-size: 1rem;
	color: var(--eir-text, #2c2c2c);
	font-weight: 600;
	text-decoration: underline;
}
