/* Quattro Design · mobile pass (1.6.3, 18.10 "תעבור על הכל מובייל").
   Findings: qa/mobile-audit-staging.md (phone emulation 360/390/430, hover:none, pointer:coarse).
   Loaded last on every front page. Everything here is scoped to phones unless noted.
   Third-party floating pieces (woo-notification, accessible-poetry button, WoodMart sidebar opener) are moved or hidden,
   never edited in their own plugins. */

@media (max-width: 767px) {

	/* 1 · "X רכש כעת" / "X צופים עכשיו" (woo-notification, #message-purchased): on a phone it covers the sticky
	   add-to-cart bar, the accessibility button and the card grid. Off on phones; desktop unchanged. */
	html body #message-purchased { display: none !important; } /* the plugin writes display:inline-grid inline */

	/* 2 · accessibility button: moved to the end side (left) in header-footer.css; it already lifts above the
	   sticky add-to-cart bar there (body.wd-sticky-btn-on-mb / :has(.wd-sticky-btn-shown)). */

	/* 3 · quantity steppers: 25px wide → a 44px finger target (product + cart) */
	html body .quantity :is(.minus, .plus) { min-inline-size: 44px; min-block-size: 44px; }

	/* 4 · labels under 12px (promo pill, "מבצע / אזל / נמכר ביותר") */
	html body .qc-promo-tag,
	html body .product-label { font-size: 12px; }
}

/* 5 · cart + checkout (all sizes): the checkout steps on WoodMart's black title band were ink on black */
html body .page-title.color-scheme-light .wd-checkout-steps :is(li, a, span) { color: rgba(250, 250, 248, .72); }
html body .page-title.color-scheme-light .wd-checkout-steps :is(.step-active, .step-active a) { color: var(--qc-paper, #FAFAF8); }

/* 6 · cart + checkout: WoodMart's sidebar opener (a second floating burger) opens the default blog widgets
   ("Recent Posts", "Archives") in English. These pages need no sidebar. */
html body:is(.woocommerce-cart, .woocommerce-checkout) .wd-sidebar-opener,
html body:is(.woocommerce-cart, .woocommerce-checkout) .sidebar-container { display: none; }
html body:is(.woocommerce-cart, .woocommerce-checkout) .site-content.wd-grid-col { --wd-col-lg: 12; }

/* 7 · the shop "סינון" chip hides itself when there is no filter sidebar (shop.js sets [hidden]) */
html body .qc-chip[hidden] { display: none; }

/* ==========================================================================
   Mobile pass 2 (1.8.1, 18.10: "תעשה מעבר על הכל תוודא שהכל מושלם מובייל"). Report: qa/mobile-audit-2.md.
   ========================================================================== */

/* sold out: a size that cannot be bought for the chosen colour (product.js marks .qc-oos), the button when nothing fits */
html body.single-product .summary-inner .variable-item.qc-oos { opacity: .4; text-decoration: line-through; }
html body.single-product .summary-inner .single_add_to_cart_button.wc-variation-is-unavailable,
html body.single-product .wd-sticky-btn .single_add_to_cart_button.wc-variation-is-unavailable { opacity: .4; pointer-events: none; }
html body .summary-inner .qc-soldout { margin: 8px 0 0; padding: 16px 0; border-block: 1px solid var(--qc-line); font-size: 15px; font-weight: 600; color: var(--qc-ink); }
html body.qc-is-soldout .wd-sticky-btn { display: none !important; }

/* the blog sidebar opener (a second floating burger, English widgets) on every page but the shop */
html body:not(.woocommerce-shop):not(.tax-product_cat):not(.tax-product_tag):not(.search) .wd-sidebar-opener { display: none; }
html body.page:not(.woocommerce-shop) .sidebar-container { display: none; }
html body.page:not(.woocommerce-shop) .site-content.wd-grid-col { --wd-col-lg: 12; --wd-col-md: 12; }

/* cart quantity: − 1 + on one line */
html body .woocommerce-cart-form .quantity { display: inline-flex; align-items: center; flex-wrap: nowrap; }
html body .woocommerce-cart-form .quantity .qty { width: 44px; height: 44px; padding: 0; text-align: center; }

/* checkout: one box for the order summary, real-size radios and checkboxes */
html body.woocommerce-checkout .checkout-order-review { padding: 0 !important; background: none !important; } /* WoodMart: :is(… , .woocommerce-order-pay #order_review) carries an ID's weight */
html body.woocommerce-checkout .checkout-order-review .wd-table-wrapper { padding: 0; background: none; }
html body .woocommerce-checkout :is(input[type="radio"], input[type="checkbox"]) { width: 20px; height: 20px; accent-color: var(--qc-ink); }
@media (max-width: 767px) {
	html body .checkout-order-review #order_review { padding: 16px; border-radius: var(--qc-radius-surface, 16px); }
}

/* mini cart: a real close target, a space after "סכום ביניים:", readable buttons */
html body .cart-widget-side .close-side-widget > a { min-block-size: 44px; display: inline-flex; align-items: center; }
html body .woocommerce-mini-cart__total strong { margin-inline-end: 6px; }
html body .woocommerce-mini-cart__buttons .button { font-size: 15px; }

/* card titles: two lines at most (merged products list every colour) */
html body .wd-product .wd-entities-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html body .wd-product .product-labels .product-label { font-size: 12px; }

/* footer: the WhatsApp button in the 6px family, the legal row clear of the accessibility button */
html body .qcf .qcf__wa { border-radius: var(--qc-pill, 6px); }
@media (max-width: 767px) {
	html body .qcf__bottom { padding-inline-end: 64px; }
}

/* finger targets */
html body .qc-chip { min-block-size: 44px; }
html body .qc-w .qc-qb__chip { min-width: 44px; min-height: 44px; font-size: 14px; }
@media not all and (hover: hover) and (pointer: fine) {
	html body .wd-product .qc-qb__open { inline-size: 44px; block-size: 44px; }
}

/* login panel: "פתיחת חשבון" leads to a closed registration (my-account registration is off on the site) */
html body .create-account-question { display: none; }

/* mobile menu: our close button (assets/footer.js) */
.qc-nav-close {
	position: sticky;
	inset-block-start: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	inline-size: 100%;
	min-block-size: 48px;
	padding: 0 16px;
	border: 0;
	border-block-end: 1px solid var(--qc-line);
	background: var(--qc-paper);
	color: var(--qc-ink);
	font: 600 15px/1 var(--qc-font);
	cursor: pointer;
}
.qc-nav-close svg { inline-size: 18px; block-size: 18px; }

/* product page on phones: a wider (4:3) frame so the title and price come up, and the buy bar from the start */
@media (max-width: 767px) {
	html body.single-product:not(.qc-is-soldout) .wd-sticky-btn { transform: none !important; opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; }
	html body.single-product:not(.qc-is-soldout) { padding-block-end: 72px; }
}

/* ---------- 1.8.9 (20.10: "הנעל לא פרופורציונלית, היא צריכה להיות גדולה יותר"): BUTTERFLY on phones = one big shoe at a
   time, swiped sideways with the next one peeking. A window narrowed below 1024px after the pin started falls back to
   the same (the pin is chosen once, on load). Same as the mock (site/assets/css/home.css, end). ---------- */
@media (max-width: 1023px) {
	html.qc-pinbf body .qc-w .bf__track { height: auto; }
	html.qc-pinbf body .qc-w .bf__stage { position: relative; height: auto; display: grid; max-width: var(--wrap); padding-inline: var(--gutter); }
	html.qc-pinbf body .qc-w .bf__mega { position: static; margin: 0; font-size: clamp(4rem, 18.5vw, 19rem); }
	html.qc-pinbf body .qc-w :is(.bf__head, .bf__list, .bf__item, .bf__cap, .bf__nav) { position: static; }
	html.qc-pinbf body .qc-w .bf__list { display: grid; }
	html.qc-pinbf body .qc-w .bf__item { opacity: 1; transform: none; pointer-events: auto; }
	html.qc-pinbf body .qc-w .bf__fig { position: relative; width: auto; left: auto; top: auto; }
	html.qc-pinbf body .qc-w :is(.bf__count, .bf__thumbs) { display: none; }
}
@media (max-width: 767px) {
	html body .qc-w .bf__list {
		grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; gap: 16px;
		overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
		margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
	}
	html body .qc-w .bf__list::-webkit-scrollbar { display: none; }
	html body .qc-w .bf__item { scroll-snap-align: start; }
}
