/* Desktop QA round 2 fixes (QA-ROUND2-DESKTOP.md).
   Pairs with inc/areas/zw-desktop-fixes.php and assets/js/areas/zw-desktop-fixes.js.
   Loads after the other area files and before zx-mobile-fixes.css / zy / zz.
   Global rules first (bugs at every width), then @media (min-width: 1025px).
   Not touched here: the Quick Shop "View details" bar (#6, zx-mobile-fixes.css). */

/* ===============================================================
   #4 Category: WoodMart's "Loading..." twin shows only while loading
   (category-grid.css forces every .wd-load-more to inline-flex)
   =============================================================== */
body.yb .wd-loop-footer .wd-load-more.wd-load-more-loader,
body.yb .products-footer .wd-load-more.wd-load-more-loader { display: none !important; }
body.yb .wd-loop-footer .wd-load-more.loading:not(.wd-load-more-loader),
body.yb .products-footer .wd-load-more.loading:not(.wd-load-more-loader) { display: none !important; }
body.yb .wd-loop-footer .wd-load-more.loading + .wd-load-more-loader,
body.yb .products-footer .wd-load-more.loading + .wd-load-more-loader { display: inline-flex !important; }

/* ===============================================================
   #5 Quick shop backdrop: 30% dim (beats Magnific's .mfp-move-horizontal.mfp-ready.mfp-bg)
   =============================================================== */
body.yb .mfp-bg.mfp-ready,
body.yb .mfp-bg.mfp-move-horizontal.mfp-ready { background: #000 !important; opacity: .3 !important; }
body.yb .mfp-bg.mfp-removing,
body.yb .mfp-bg.mfp-move-horizontal.mfp-removing { opacity: 0 !important; }

/* ===============================================================
   #7 Quick shop ADD TO BAG = PDP red commerce button
   =============================================================== */
body.yb .product-quick-view .single_add_to_cart_button,
body.yb .popup-quick-view .single_add_to_cart_button {
	min-height: 54px;
	padding: 14px 20px;
	border: 1px solid #D31334 !important;
	border-radius: 4px;
	background: #D31334 !important;
	color: #fff !important;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .08em;
	text-transform: uppercase;
	box-shadow: none;
	opacity: 1 !important;
	cursor: pointer;
}
body.yb .product-quick-view .single_add_to_cart_button:hover,
body.yb .product-quick-view .single_add_to_cart_button:focus-visible,
body.yb .popup-quick-view .single_add_to_cart_button:hover,
body.yb .popup-quick-view .single_add_to_cart_button:focus-visible {
	border-color: #B81C29 !important;
	background: #B81C29 !important;
	color: #fff !important;
}
body.yb .product-quick-view .single_add_to_cart_button.loading { opacity: .85 !important; }

/* ===============================================================
   #10 Stores: filtered-out cards really hide
   =============================================================== */
.yb-store[hidden] { display: none !important; }

/* ===============================================================
   #20 One red for commerce CTAs (#D31334 / hover #B81C29)
   =============================================================== */
body.yb.single-product { --yb-pdp-red: #D31334; --yb-pdp-red-dark: #B81C29; }
html body.yb.yb-co { --yb-co-red: #D31334; }
.yb .yb-atb-modal,
.yb .yb-atb-minibag { --yb-atb-red: #D31334; --yb-atb-red-dark: #B81C29; }
body.yb .yb-pdp-sticky__btn { background: #D31334 !important; }
body.yb .yb-pdp-sticky__btn:hover { background: #B81C29 !important; }
body.yb.woocommerce-cart .cart_totals .wc-proceed-to-checkout .checkout-button { background: #D31334; }
body.yb.woocommerce-cart .cart_totals .wc-proceed-to-checkout .checkout-button:hover,
body.yb.woocommerce-cart .cart_totals .wc-proceed-to-checkout .checkout-button:focus-visible { background: #B81C29; }

/* Non-commerce buttons: black */
body.yb .yb-locator .yb-btn { background: #111; }
body.yb .yb-locator .yb-btn:hover { background: #333; }
body.yb .yb-hp-sg .yb-hp-pills button.is-active { border-color: #111; background: #111; color: #fff; }
body.yb.woocommerce-cart.yb-bag-empty .return-to-shop .button { background: #111; }
body.yb.woocommerce-cart.yb-bag-empty .return-to-shop .button:hover { background: #333; }
body.yb.woocommerce-cart .yb-bag-promo__submit { background: #111; }
body.yb.woocommerce-cart .yb-bag-promo__submit:hover { background: #333; }

/* ===============================================================
   #14 Promo bar font
   =============================================================== */
.yb .yb-promo { font-family: var(--yb-font, "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif); }

/* ===============================================================
   #16 PDP "Size guide": one underline
   =============================================================== */
body.yb.single-product .summary .yb-pdp-sizeguide a.yb-link { border-bottom: 0; padding-bottom: 0; }

/* ===============================================================
   #18 Category promo tile ("Join us / Sign in") only for guests
   =============================================================== */
body.yb.logged-in .yb-cat-grid-promo { display: none !important; }

/* ===============================================================
   #24 PDP gallery: no focus ring after the popup closes (keyboard focus still shows)
   =============================================================== */
body.yb.single-product .woocommerce-product-gallery :focus:not(:focus-visible) { outline: 0; }

/* ===============================================================
   Desktop only
   =============================================================== */
@media (min-width: 1025px) {

	/* ---- #8 Promo bar before JS: only the first message (no stacked 3-line bar) ---- */
	.yb .yb-promo:not(.yb-promo--js) .yb-promo__msg:not(:first-child) { display: none !important; }
	.yb .yb-promo:not(.yb-promo--js) .yb-promo__track { height: auto; }

	/* ---- #9 PDP: the product bar replaces the sticky site header ---- */
	body.yb.single-product .whb-header .whb-main-header { transition: clip-path .25s ease, visibility 0s linear 0s; }
	body.yb.single-product.yb-zwfix-pdp-sticky .whb-header.whb-sticked .whb-main-header {
		clip-path: inset(0 0 100% 0);
		visibility: hidden;
		pointer-events: none;
		transition: clip-path .25s ease, visibility 0s linear .25s;
	}
	body.yb.single-product.yb-zwfix-pdp-sticky .yb-pdp-sticky { top: 0 !important; }
	body.yb.single-product.admin-bar.yb-zwfix-pdp-sticky .yb-pdp-sticky { top: 32px !important; }
	body.yb .yb-pdp-sticky .yb-pdp-sticky__title { font-size: 20px; }

	/* ---- #13 Bag notices: neutral info style instead of WoodMart green ---- */
	body.yb.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message {
		border: 1px solid #D5D5D5;
		background: #fff;
		color: #111;
	}
	body.yb.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message a { color: #111; text-decoration: underline; }

	/* ---- #15 Search: the promo bar dims with the rest of the page ---- */
	body.yb.yb-search-open .yb-promo { z-index: 370; }

	/* ---- #22 Search results: sort select like the category page ---- */
	body.yb.search-results select.orderby {
		height: 44px;
		padding: 0 40px 0 14px;
		border: 1px solid #D5D5D5;
		border-radius: 4px;
		background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23111' stroke-width='1.5'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E") right 14px center / 14px 14px no-repeat;
		color: #111;
		font-size: 15px;
		-webkit-appearance: none;
		appearance: none;
		cursor: pointer;
	}

	/* ---- #23 PDP heading scale ---- */
	body.yb.single-product #reviews .woocommerce-Reviews-title,
	body.yb.single-product #reviews .wd-reviews-heading h2 { font-size: 28px !important; font-weight: 700 !important; line-height: 1.2; }
	body.yb.single-product .related-and-upsells .slider-title { font-size: 28px !important; line-height: 1.2; }
	body.yb.single-product .woocommerce-tabs .wd-accordion-title-text,
	body.yb.single-product .woocommerce-tabs .wd-accordion-title-text span { font-size: 20px !important; line-height: 1.3 !important; }

	/* ---- #24 Account: title aligned with the links; one "Sign out" (sidebar) ---- */
	body.yb .wd-my-account-sidebar .woocommerce-MyAccount-title { padding-left: 0; padding-right: 0; }
	body.yb .yb-acc-dash .yb-acc-dash__out { display: none; }

	/* ---- #24 404: readable text over the hero ---- */
	body.yb.error404 .yb-404__panel::before { background: linear-gradient(160deg, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, .28) 55%, rgba(0, 0, 0, .1) 100%); }
	body.yb.error404 .yb-404__title,
	body.yb.error404 .yb-404__text { text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }

	/* ---- #24 Footer: back-to-top button clear of the copyright ---- */
	body.yb .yb-footer.yb-gf .yb-footer__bottom { padding-right: 80px; }
}
