/*
Theme Name: H-Furnitures
Theme URI: https://www.hfurnitures.com/
Author: H-Furnitures
Author URI: https://www.hfurnitures.com/
Description: Arabic-first, performance-focused WooCommerce storefront for H-Furnitures.
Version: 1.12.1
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: h-furnitures
Domain Path: /languages
Tags: e-commerce, rtl-language-support, translation-ready, custom-logo, custom-menu, featured-images, full-width-template, threaded-comments
*/

/* Token aliases — real values live in assets/css/ds/*. Migrate --hf-* callers over time. */
:root {
  /* --hf-olive* are SURFACE tokens: button fills, badges, borders, scrims. They
     stay dark in both themes because whatever sits on them is --hf-white.
     They must never be used for text — see --hf-heading / --hf-ink-brand. */
  --hf-olive: var(--olive-600);
  /* INK tokens: brand-coloured *text*. These flip with the theme (overridden in
     assets/css/ds/colors.css), which --hf-olive* never did — every heading,
     eyebrow, category label and filter title used to render #3D3C2C on the dark
     #151512 page, a 1.1:1 contrast ratio. Any rule setting `color:` on brand text
     must use one of these two, not --hf-olive*. */
  --hf-heading: var(--ink);
  --hf-ink-brand: var(--ink);
  --hf-cream: var(--sand-100);
  --hf-sand: var(--sand-300);
  --hf-slate: var(--stone-600);
  --hf-ink: var(--ink);
  --hf-white: var(--white);
  --hf-terracotta: var(--terracotta-600);
  --hf-border: var(--border-subtle);
  --hf-radius: var(--radius-md);
  --hf-radius-lg: var(--radius-lg);
  --hf-radius-pill: var(--radius-pill);
  --hf-focus: var(--focus-shadow);
  --hf-font-latin: var(--font-latin);
  --hf-font-ar: var(--font-arabic);
  --hf-ease: var(--ease-out);
	--wc-form-color-background: var(--surface-card);
	--wc-form-color-text: var(--text-strong);
	--wc-form-border-color: var(--border-default);
	--wc-form-border-radius: var(--radius-sm);
  --hf-content: min(var(--container-xl), calc(100% - 2 * var(--gutter)));

  /* Fluid grid.
   *
   * Every card grid used to be a fixed column count switched by a hard-coded
   * breakpoint (4 → 3 @1360 → 2 @1024 → 1 @640, and a different ladder per
   * section). Between two breakpoints the count is frozen, so cards stretch or
   * squash, and sections re-flow at different widths from each other.
   *
   * This derives the count from the space actually available: each track is the
   * larger of --hf-col-min and an even share of the row, so the grid shows at
   * most --hf-cols columns on a wide screen and sheds one at a time as the
   * container narrows — continuously, at any width, with no breakpoint.
   * min(100%, …) keeps a single card from overflowing a very narrow container.
   *
   * A grid opts in with `grid-template-columns: var(--hf-grid-auto)` and sets
   * --hf-cols (the cap), --hf-col-min (narrowest a card may get) and --hf-gap
   * (must match its own `gap`, or the cap is off by one).
   */
  --hf-grid-auto: repeat(auto-fill, minmax(min(100%, max(var(--hf-col-min), (100% - (var(--hf-cols) - 1) * var(--hf-gap)) / var(--hf-cols))), 1fr));
  --hf-cols: 4;
  --hf-gap: var(--space-5);
  /* Product-card floor, itself fluid: ~150px at 360px (two per row on a phone)
     rising to ~288px, which lands on 2 → 3 → 4 columns without any media query. */
  --hf-col-min: clamp(9.3rem, 6.3rem + 13.5vw, 18rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; } /* clip off-canvas panels (mobile filter drawer) parked off-screen; `clip` keeps position:sticky working, unlike `hidden` */
body { margin: 0; color: var(--hf-ink); background: var(--bg-page); font-family: var(--hf-font-latin); line-height: 1.6; overflow-x: clip; }
/* Arabic pages: the Arabic brand face everywhere. Scoped to `body` so it beats the `body {}` rule above. */
[dir="rtl"] body, [lang="ar"] body { font-family: var(--hf-font-ar); line-height: var(--lh-loose); }
/* Arabic headings use one family, including mixed Arabic/Latin product names. */
/* DESIGN.md: Alexandria headings are 600 (h1 and larger) and 500 (h2, h3). */
h1, h4, h5, h6 { font-family: var(--font-display); font-weight: var(--fw-semibold); line-height: var(--lh-heading); letter-spacing: 0; overflow-wrap: anywhere; }
h2, h3 { font-family: var(--font-display); font-weight: var(--fw-medium); line-height: var(--lh-heading); letter-spacing: 0; overflow-wrap: anywhere; }
[dir="rtl"] :is(h1, h2, h3, h4, h5, h6), [lang="ar"] :is(h1, h2, h3, h4, h5, h6) { font-family: var(--font-display); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: none; box-shadow: var(--hf-focus); border-radius: var(--hf-radius); }
.hf-container { width: var(--hf-content); margin-inline: auto; }
.hf-skip-link { position: absolute; top: -50px; inset-inline-start: 12px; z-index: 100; padding: 8px 14px; color: var(--on-action); background: var(--action); }
.hf-skip-link:focus { top: 12px; }
.hf-button--sm { min-height: 44px; padding: 10px 16px; font-size: var(--fs-sm); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* --- header --- */
.hf-header { position: relative; z-index: 30; }
.hf-header__bar { background: var(--olive-700); color: var(--hf-white); font-size: var(--fs-xs); }
.hf-header__bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2) var(--space-6); min-height: 36px; padding-block: var(--space-2); }
.hf-header__bar-item { position: relative; }
.hf-header__bar-item + .hf-header__bar-item::before { content: "·"; position: absolute; inset-inline-start: calc(-1 * var(--space-3)); opacity: .55; }
.hf-header__bar-wa { font-weight: var(--fw-semibold); direction: ltr; unicode-bidi: isolate; }
.hf-header__row { position: sticky; top: 0; z-index: 30; background: var(--surface-card); border-bottom: 1px solid var(--border-subtle); }
/* The middle track spans the actual gap from the menu to the search control. */
.hf-header__row-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); min-height: 84px; transition: min-height var(--dur-base) var(--ease-out); }
.hf-header--shrink .hf-header__row-inner { min-height: 64px; }
.hf-header__start { justify-self: start; min-width: 0; display: flex; align-items: center; gap: var(--space-2); }
.hf-header__logo { justify-self: center; min-inline-size: 0; max-inline-size: 100%; }
.hf-header__logo img, .hf-header__logo .custom-logo { max-height: 44px; width: auto; transition: max-height var(--dur-base) var(--ease-out); }
.hf-header--shrink .hf-header__logo img, .hf-header--shrink .hf-header__logo .custom-logo { max-height: 36px; }
.hf-header__actions { justify-self: end; display: flex; align-items: center; gap: var(--space-1); }
.hf-icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--text-strong); cursor: pointer; border-radius: var(--radius-sm); }
.hf-icon-btn:hover { color: var(--text-brand); }
.hf-icon-btn i, .hf-icon-btn svg { width: 22px; height: 22px; }
.hf-theme-toggle { background: var(--bg-muted); }
.hf-theme-toggle:hover { background: var(--surface-boucle); }
.hf-theme-toggle__icon { display: inline-grid; place-items: center; }
.hf-icon-btn .hf-cart-count, .hf-icon-btn .hf-wishlist-count { position: absolute; top: 4px; inset-inline-end: 2px; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 var(--space-1); border-radius: var(--radius-pill); background: var(--action); color: var(--on-action); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); line-height: 1; }
/* --- nav --- */
.hf-nav__list { display: flex; align-items: center; gap: var(--space-5); margin: 0; padding: 0; list-style: none; }
.hf-nav__item { position: relative; }
.hf-nav__item--mega { position: static; }
.hf-nav__link { display: inline-flex; align-items: center; padding-block: var(--space-2); font-weight: var(--fw-semibold); color: var(--text-strong); border-bottom: 2px solid transparent; white-space: nowrap; }
.hf-nav__link:hover { color: var(--text-brand); }
.hf-nav__link[aria-current="page"] { color: var(--text-brand); border-bottom-color: currentColor; }
/* --- mega --- */
.hf-mega { position: absolute; inset-inline: 0; top: 100%; z-index: 40; opacity: 0; visibility: hidden; transform: translateY(-6px); pointer-events: none; transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); background: var(--surface-card); box-shadow: var(--shadow-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.hf-nav__item--mega:hover > .hf-mega, .hf-nav__item--mega:focus-within > .hf-mega, .hf-nav__item--mega.is-open > .hf-mega { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.hf-mega__inner { position: static; display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8); padding: var(--space-6) 0 var(--space-8); }
.hf-mega__link { font-weight: var(--fw-semibold); color: var(--text-body); }
.hf-mega__link:hover { color: var(--text-brand); }
/* --- drawer toggle --- */
.hf-drawer-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--text-strong); cursor: pointer; position: relative; z-index: 1; pointer-events: auto; }
.hf-drawer-toggle i, .hf-drawer-toggle svg { width: 24px; height: 24px; }
/* --- header search (slide-down) --- */
.hf-header-search { border-top: 1px solid var(--border-subtle); background: var(--surface-card); }
.hf-header-search__inner { position: relative; display: flex; align-items: center; gap: var(--space-2); padding-block: var(--space-3); }
.hf-header-search input[type="search"] { flex: 1; min-height: 44px; padding-inline: var(--space-3); border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--bg-page); color: var(--text-strong); }
.hf-header-search button[type="submit"] { min-height: 44px; padding: 0 var(--space-5); border: 0; border-radius: var(--radius-pill); background: var(--action); color: var(--on-action); font-weight: var(--fw-semibold); cursor: pointer; }
/* --- drawer --- */
/* Open drawers sit above the WPConsent banner (z 900000), which otherwise covered the cart drawer footer; closed they are [hidden]. */
.hf-drawer { position: fixed; inset: 0; z-index: 900060; }
.hf-drawer__scrim { position: absolute; inset: 0; background: var(--overlay-scrim); border: 0; }
.hf-drawer__panel { position: absolute; inset-block: 0; inset-inline-start: 0; display: flex; flex-direction: column; gap: var(--space-5); width: min(86vw, 340px); height: 100%; padding: var(--space-6); overflow-y: auto; background: var(--surface-card); box-shadow: var(--shadow-2); }
.hf-drawer__close { align-self: flex-end; width: 44px; height: 44px; border: 0; background: transparent; color: var(--text-strong); cursor: pointer; }
.hf-drawer__nav ul { margin: 0; padding: 0; list-style: none; }
.hf-drawer__nav > ul > li > a { display: block; padding-block: var(--space-3); font-weight: var(--fw-semibold); color: var(--text-strong); border-bottom: 1px solid var(--border-subtle); }
.hf-drawer__nav .hf-drawer__sub ul { padding-inline-start: var(--space-4); }
.hf-drawer__nav .hf-drawer__sub a { display: block; padding-block: var(--space-2); font-weight: var(--fw-regular); color: var(--text-body); }
.hf-drawer__search { display: flex; gap: var(--space-2); }
.hf-drawer__search input[type="search"] { flex: 1; min-height: 44px; padding-inline: var(--space-3); border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--bg-page); }
.hf-drawer__search button { min-height: 44px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-pill); background: var(--action); color: var(--on-action); font-weight: var(--fw-semibold); cursor: pointer; }
.hf-drawer__actions { display: flex; flex-direction: column; gap: var(--space-2); margin-top: auto; }
.hf-drawer__actions a { display: flex; align-items: center; gap: var(--space-2); padding-block: var(--space-2); font-weight: var(--fw-semibold); }
.hf-drawer__actions i { width: 20px; height: 20px; }
.hf-cart-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-inline-start: 4px; border-radius: var(--radius-pill); color: var(--on-action); background: var(--action); font-size: var(--fs-xs); }
/* --- cart drawer (flyout) ---
   Anchored inset-inline-end (the left edge in this RTL layout — the same
   side the header cart icon lives on) rather than mirroring the nav
   drawer's inset-inline-start, so it opens from where the shopper's eye
   already expects the cart to be. */
.hf-cart-drawer { position: fixed; inset: 0; z-index: 900070; }
.hf-cart-drawer__scrim { position: absolute; inset: 0; background: var(--overlay-scrim); border: 0; }
.hf-cart-drawer__panel { position: absolute; inset-block: 0; inset-inline-end: 0; display: flex; flex-direction: column; width: min(92vw, 400px); height: 100%; background: var(--surface-card); box-shadow: var(--shadow-2); }
.hf-cart-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-5) var(--space-5) var(--space-4); border-bottom: 1px solid var(--border-subtle); }
.hf-cart-drawer__head h2 { margin: 0; font-size: var(--fs-lead); }
.hf-cart-drawer__close { width: 44px; height: 44px; border: 0; background: transparent; color: var(--text-strong); cursor: pointer; }
.hf-cart-drawer__body { flex: 1 1 auto; overflow-y: auto; padding: var(--space-4) var(--space-5); }
.hf-cart-drawer__list { display: flex; flex-direction: column; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.hf-cart-drawer__item { display: grid; grid-template-columns: 64px 1fr auto; gap: var(--space-3); align-items: start; }
.hf-cart-drawer__thumb { display: block; width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-muted); }
.hf-cart-drawer__thumb img { width: 100%; height: 100%; object-fit: contain; }
.hf-cart-drawer__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hf-cart-drawer__name { font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-cart-drawer__qty, .hf-cart-drawer__price { font-size: var(--fs-sm); color: var(--text-muted); }
.hf-cart-drawer__price { color: var(--text-price); font-weight: var(--fw-semibold); }
.hf-cart-drawer__remove { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--radius-pill); color: var(--text-muted); cursor: pointer; transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.hf-cart-drawer__remove:hover { color: var(--danger); background: var(--danger-bg); }
.hf-cart-drawer__remove i { width: 16px; height: 16px; }
.hf-cart-drawer__empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-8) var(--space-4); text-align: center; color: var(--text-muted); }
.hf-cart-drawer__empty i { width: 40px; height: 40px; }
.hf-cart-drawer__footer { flex: none; padding: var(--space-4) var(--space-5) var(--space-6); border-top: 1px solid var(--border-subtle); }
.hf-cart-drawer__subtotal { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-2); font-size: var(--fs-lead); }
.hf-cart-drawer__subtotal strong { color: var(--text-price); }
.hf-cart-drawer__note { margin: 0 0 var(--space-4); font-size: var(--fs-xs); color: var(--text-muted); }
.hf-cart-drawer__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.hf-cart-drawer__actions .hf-button { text-align: center; }
body.hf-cart-drawer-open { overflow: hidden; }
.hf-main { min-height: 60vh; }
.hf-hero { padding: clamp(36px, 7vw, 92px) 0; background: var(--hf-cream); }
.hf-hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.hf-hero h1 { margin: 0; font-size: var(--fs-display); line-height: var(--lh-heading); color: var(--hf-heading); }
.hf-hero p { max-width: 58ch; font-size: var(--fs-body); }
.hf-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hf-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 26px; border: 2px solid var(--action); border-radius: var(--hf-radius-pill); background: var(--action); color: var(--on-action); font-weight: 600; letter-spacing: 0; cursor: pointer; transition: background var(--dur-base) var(--hf-ease), border-color var(--dur-base) var(--hf-ease), transform var(--dur-fast) var(--hf-ease); }
.hf-button:hover { background: var(--action-hover); border-color: var(--action-hover); }
.hf-button:active { background: var(--action-hover); transform: translateY(1px); }
.hf-button--secondary { background: transparent; color: var(--hf-ink-brand); }
.hf-button--secondary:hover { background: var(--hf-cream); border-color: var(--action); }
/* Single-product "add to cart" while its AJAX request is in flight (see
   assets/js/theme.js) — same idea as [data-hf-shop-region].is-loading. */
.single_add_to_cart_button.is-loading { opacity: .6; pointer-events: none; }
.hf-hero-media { overflow: hidden; border-radius: var(--radius-card); aspect-ratio: 4 / 3; background: var(--hf-sand); background-size: cover; background-position: center; }
.hf-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hf-hero-media .hf-hero__image { display: block; }
.hf-section { padding: clamp(48px, 8vw, 100px) 0; }
.hf-section--white { background: var(--surface-card); }
.hf-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.hf-section-heading h2 { margin: 0; font-size: var(--fs-h2); color: var(--hf-heading); }
/* Text blocks, so they need a wider floor than a product card. */
.hf-trust-grid { --hf-col-min: 14rem; --hf-grid-auto: repeat(auto-fill, minmax(min(100%, max(var(--hf-col-min), (100% - (var(--hf-cols) - 1) * var(--hf-gap)) / var(--hf-cols))), 1fr)); display: grid; grid-template-columns: var(--hf-grid-auto); gap: var(--hf-gap); }
/* Shop-by-space: circular categories in a horizontal scroll strip. Page dir=rtl
   makes the flow (and overflow scroll) run right-to-left natively, no JS. */
.hf-category-grid { display: flex; list-style: none; margin: 0; padding: 0; gap: clamp(14px, 3vw, 28px); overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--hf-sand) transparent; }
.hf-category-grid::-webkit-scrollbar { height: 6px; }
.hf-category-grid::-webkit-scrollbar-thumb { background: var(--hf-sand); border-radius: 999px; }
.hf-category-grid > li { flex: 0 0 auto; min-inline-size: 0; scroll-snap-align: start; }
.hf-category-card { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px; width: clamp(92px, 24vw, 132px); scroll-snap-align: start; color: var(--hf-heading); font-weight: var(--fw-semibold); }
.hf-category-card__img { width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--hf-olive) center / cover no-repeat;  transition: transform var(--dur-base) var(--hf-ease); }
.hf-category-card:hover .hf-category-card__img { transform: translateY(-3px); }
.hf-category-card__label { text-align: center; font-size: var(--fs-sm); line-height: var(--lh-snug); }
.hf-order-badge { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; padding: 4px 12px; border-radius: var(--hf-radius-pill); color: var(--on-action); background: var(--action); font-size: var(--fs-xs); font-weight: 600; }
.hf-order-badge--made-to-order { background: var(--action-hover); }
.hf-order-badge--custom { background: var(--action-soft); color: var(--on-action-soft); }
.hf-loop-discount { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; padding: 4px 10px; border-radius: var(--hf-radius-pill); color: var(--on-sale); background: var(--sale); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.hf-order-type-notice { margin: 18px 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--hf-cream); }
.hf-order-type-notice strong { display: block; margin-bottom: 6px; color: var(--hf-heading); }
.hf-order-type-notice p { margin: 0 0 12px; }
.hf-order-type-notice .hf-button { margin: 0; }
.hf-cta-band { padding: clamp(32px, 6vw, 56px) 0; background: var(--hf-olive); }
.hf-cta-band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.hf-cta-band h2 { margin: 0 0 8px; color: var(--hf-white); font-size: var(--fs-h2); }
.hf-cta-band p { margin: 0; color: var(--hf-white); }
.hf-cta-band .hf-actions { margin-top: 0; }
.hf-cta-band .hf-button--secondary { border-color: var(--hf-white); color: var(--hf-white); }
.hf-trust-item { padding: 20px; border: 1px solid var(--line); background: var(--surface-card); }
.hf-trust-item strong { display: block; color: var(--hf-heading); }
.hf-custom-order-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 76px); align-items: start; }
.hf-custom-order-intro h1 { margin: 0; color: var(--hf-heading); font-size: var(--fs-h1); line-height: var(--lh-heading); }
.hf-steps { display: grid; gap: 14px; margin: 30px 0 0; padding: 0; list-style: none; counter-reset: hf-step; }
.hf-steps li { position: relative; min-height: 54px; padding-inline: 62px 0; counter-increment: hf-step; }
.hf-steps li::before { content: counter(hf-step); position: absolute; inset-inline-start: 0; top: 0; display: grid; width: 40px; height: 40px; place-items: center; border-radius: var(--radius-pill); color: var(--on-action); background: var(--action); font-weight: var(--fw-semibold); }
.hf-steps strong, .hf-steps span { display: block; }
.hf-request-card { padding: clamp(20px, 4vw, 38px); border: 1px solid var(--hf-border); border-radius: var(--hf-radius-lg); background: var(--hf-cream);  }
.hf-request-form p { margin: 0 0 16px; }
.hf-field-grid { --hf-cols: 2; --hf-col-min: 14rem; --hf-gap: 16px; --hf-grid-auto: repeat(auto-fill, minmax(min(100%, max(var(--hf-col-min), (100% - (var(--hf-cols) - 1) * var(--hf-gap)) / var(--hf-cols))), 1fr)); display: grid; grid-template-columns: var(--hf-grid-auto); gap: 0 var(--hf-gap); }
.hf-request-form label { display: inline-block; margin-bottom: 6px; color: var(--hf-heading); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.hf-request-form input, .hf-request-form select, .hf-request-form textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--hf-border); border-radius: var(--radius-sm); color: var(--hf-ink); background: var(--surface-card); }
.hf-request-form textarea { min-height: 130px; resize: vertical; }
.hf-notice { padding: 18px; border-radius: var(--radius-sm); }
.hf-notice p { margin-bottom: 0; }
.hf-notice--success { color: var(--status-ok-fg); background: var(--success-bg); }
.hf-notice--error { color: var(--status-danger-fg); background: var(--danger-bg); }
.hf-hp { width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html .hf-hp { position: absolute; }
/* --- footer --- */
.hf-footer { padding-block: var(--space-16) var(--space-8); color: var(--on-band); background: var(--band); }
.hf-footer a { color: var(--on-band-muted); transition: color var(--dur-fast) var(--ease-out); }
.hf-footer a:hover, .hf-footer a:focus-visible { color: var(--on-band); }
.hf-footer__help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-8); margin-bottom: var(--space-10); padding-bottom: var(--space-8); border-bottom: 1px solid var(--on-band-muted); }
.hf-footer__help-title { margin: 0; color: var(--on-band); font-weight: var(--fw-semibold); }
.hf-footer__help-list { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--on-band-muted); }
.hf-footer__help-list li { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; }
.hf-footer__help-list i { width: 18px; height: 18px; flex: none; }
.hf-footer__help-list span[dir="ltr"] { unicode-bidi: isolate; }
.hf-footer__acc > summary { list-style: none; }
.hf-footer__acc > summary::-webkit-details-marker { display: none; }
@media (min-width: 768px) { .hf-footer__acc > summary { pointer-events: none; } }
@media (max-width: 767px) {
  .hf-footer__col .hf-footer__acc { border-bottom: 1px solid var(--on-band-muted); }
  .hf-footer__acc > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin: 0; cursor: pointer; }
  .hf-footer__acc > summary::after { content: "+"; font-size: var(--fs-lead); line-height: 1; }
  .hf-footer__acc[open] > summary::after { content: "−"; }
  .hf-footer__acc[open] > .hf-footer__list { padding-bottom: var(--space-4); }
  .hf-footer .hf-footer__top { gap: 0 var(--space-8); } /* beats the base rule declared after this block */
  .hf-footer__brand, .hf-footer__newsletter { margin-block: var(--space-6); }
}
.hf-footer__top { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr) 1.5fr; gap: var(--space-10) var(--space-8); }
.hf-footer__top > * { min-width: 0; }
.hf-footer__heading { margin: 0 0 var(--space-4); color: var(--on-band); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.hf-footer__home { display: inline-block; }
.hf-footer__logo { height: 44px; width: auto; margin-bottom: var(--space-4); }
.hf-footer__blurb { margin: 0 0 var(--space-5); max-width: 34ch; color: var(--on-band-muted); font-size: var(--fs-sm); line-height: var(--lh-snug); }
.hf-footer__social { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hf-footer__social-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--on-band-muted); border-radius: var(--radius-pill); color: var(--on-band-muted); transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.hf-footer__social-btn:hover, .hf-footer__social-btn:focus-visible { color: var(--on-band); border-color: var(--on-band); background: var(--band); }
.hf-footer__social-btn i, .hf-footer__social-btn svg { width: 18px; height: 18px; }
.hf-footer__list, .hf-footer__contact { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); }
.hf-footer__contact li { display: grid; grid-template-columns: 18px 1fr; gap: var(--space-3); align-items: start; color: var(--on-band-muted); line-height: var(--lh-snug); }
.hf-footer__contact i { width: 18px; height: 18px; margin-top: 3px; }
.hf-footer__contact a { color: var(--on-band-muted); }
.hf-footer__contact strong { color: var(--on-band); font-weight: var(--fw-semibold); }
.hf-footer__contact span[dir="ltr"] { unicode-bidi: isolate; }
.hf-footer__form { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hf-footer__form input { flex: 1 1 12rem; min-width: 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--on-band-muted); border-radius: var(--radius-pill); background: var(--band); color: var(--on-band); }
.hf-footer__form input::placeholder { color: var(--on-band-muted); }
.hf-footer__form .hf-button { flex: 0 0 auto; }
.hf-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4) var(--space-6); margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--on-band-muted); font-size: var(--fs-xs); color: var(--on-band-muted); }
.hf-footer__copy { margin: 0; }
.hf-footer__pay { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.hf-footer__pay li { padding: var(--space-1) var(--space-3); border: 1px solid var(--on-band-muted); border-radius: var(--radius-pill); color: var(--on-band); font-size: var(--fs-xs); letter-spacing: var(--ls-wide); }
@media (max-width: 1023px) {
  .hf-footer__top { grid-template-columns: repeat(3, 1fr); }
  .hf-footer__brand, .hf-footer__newsletter { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .hf-footer__top { grid-template-columns: 1fr; }
  .hf-footer__brand, .hf-footer__newsletter { grid-column: auto; }
  .hf-footer__bottom { justify-content: flex-start; }
}
.hf-lifestyle-grid { --hf-cols: 3; --hf-gap: 14px; --hf-grid-auto: repeat(auto-fill, minmax(min(100%, max(var(--hf-col-min), (100% - (var(--hf-cols) - 1) * var(--hf-gap)) / var(--hf-cols))), 1fr)); display: grid; grid-template-columns: var(--hf-grid-auto); gap: var(--hf-gap); }
.hf-lifestyle-item { margin: 0; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--hf-radius-lg); background: var(--hf-sand); }
.hf-lifestyle-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--hf-ease); }
.hf-lifestyle-item:hover img { transform: scale(1.04); }
.hf-home-products { margin: 0; }
.hf-prose { max-width: 850px; }
/* Text links in page content keep the brand colour that theme.json used to give every link (it now inherits, see theme.json). */
.hf-prose :is(p, li, td) a:not([class*="button"]) { color: var(--text-brand); }
.hf-prose h1 { margin-top: 0; color: var(--hf-heading); font-size: var(--fs-h1); line-height: var(--lh-heading); }
.hf-prose h2, .hf-prose h3 { margin-top: 1.8em; color: var(--hf-heading); }
.hf-lead { max-width: 65ch; font-size: var(--fs-lead); }
.hf-empty-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 18px; border-radius: var(--hf-radius); background: var(--action); color: var(--on-action); font-weight: var(--fw-semibold); }
.hf-search-page, .hf-404-page { padding: 56px 0; }
.hf-search-page .hf-page-heading, .hf-404-page .hf-page-heading { margin-bottom: 24px; }
.hf-search-results { display: grid; grid-template-columns: var(--hf-grid-auto); gap: var(--hf-gap); margin: 0; padding: 0; list-style: none; }
/* 404: the chair's seat has fallen off its legs. */
.hf-404 { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: var(--space-6); text-align: center; }
.hf-404 .hf-page-heading { margin-bottom: 0; }
.hf-404__mark { position: relative; width: 150px; height: 136px; margin-inline-end: 160px; }
.hf-404__mark::after { content: ""; position: absolute; inset-inline: -8px -168px; bottom: 0; height: 2px; border-radius: var(--radius-sm); background: var(--border-default); }
.hf-404__legs, .hf-404__seat { position: absolute; inset: 0; background: center / contain no-repeat; }
.hf-404__seat { transform: translate(-165px, 41px) rotate(-3deg); }
.hf-404__search { display: flex; gap: var(--space-2); width: min(100%, 560px); }
.hf-404__search input { flex: 1; min-width: 0; min-height: 48px; padding: 0 var(--space-4); border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-strong); font: inherit; }
.hf-404__cats { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }
.hf-404__actions { justify-content: center; margin: 0; }
:root[data-hf-theme="dark"] .hf-404__mark { filter: brightness(0) invert(.86); }
@media (prefers-color-scheme: dark) { :root:not([data-hf-theme="light"]) .hf-404__mark { filter: brightness(0) invert(.86); } }
@media (prefers-reduced-motion: no-preference) {
  .hf-404__seat { animation: hf-404-drop var(--dur-slow) var(--ease-out) var(--dur-base) both; }
  @keyframes hf-404-drop { from { transform: translate(0, 0) rotate(0); } }
}
/* Quote cards need more room than a product card before they wrap. */
.hf-review-grid { --hf-cols: 3; --hf-col-min: 18rem; --hf-grid-auto: repeat(auto-fill, minmax(min(100%, max(var(--hf-col-min), (100% - (var(--hf-cols) - 1) * var(--hf-gap)) / var(--hf-cols))), 1fr)); display: grid; grid-template-columns: var(--hf-grid-auto); gap: var(--hf-gap); }
.hf-review-card { padding: 22px; border: 1px solid var(--hf-border); border-radius: var(--hf-radius); background: var(--hf-cream); }
.hf-review-card blockquote { margin: 14px 0; }
.hf-review-card blockquote p { margin: 0; }
.hf-review-stars { color: var(--ink-2); letter-spacing: .08em; }
.hf-policy-list { display: grid; gap: 12px; margin-top: 30px; }
.hf-policy-list details { padding: 16px 18px; border: 1px solid var(--hf-border); border-radius: var(--radius-sm); background: var(--surface-card); }
.hf-policy-list summary { color: var(--hf-heading); font-weight: var(--fw-semibold); cursor: pointer; }
.hf-policy-list p { margin-bottom: 0; }
.hf-shop-hero, .hf-product-page { padding: 42px 0 86px; background: var(--surface-card); }
.woocommerce-products-header { margin-bottom: 28px; }
.woocommerce-products-header__title.page-title { margin: 0; color: var(--hf-heading); font-size: var(--fs-h1); }
/* catalogue layout moved to the shop block near the end of this file */
/* single-product layout lives in the "--- product ---" block near the end */
.hf-product-question { display: inline-flex; align-items: center; min-height: 46px; margin-top: 12px; color: var(--hf-ink-brand); font-weight: var(--fw-semibold); }
.hf-product-controls { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.hf-text-button, .hf-remove-saved { padding: 0; border: 0; color: var(--hf-ink-brand); background: transparent; font-weight: var(--fw-semibold); cursor: pointer; }
.hf-text-button.is-active { color: var(--action); }
.hf-page-heading { max-width: 760px; margin-bottom: 34px; }
.hf-page-heading h1 { margin: 0; color: var(--hf-heading); font-size: var(--fs-h1); line-height: var(--lh-heading); }
.hf-empty-state { padding: 48px 20px; text-align: center; border: 1px dashed var(--hf-border); border-radius: var(--hf-radius); }
.hf-compare-table { overflow-x: auto; border: 1px solid var(--hf-border); border-radius: var(--hf-radius); background: var(--surface-card); }
.hf-compare-row { display: grid; grid-template-columns: 160px repeat(4, minmax(190px, 1fr)); min-width: 920px; border-top: 1px solid var(--hf-border); }
.hf-compare-row:first-child { border-top: 0; }
.hf-compare-row > * { padding: 14px; border-inline-start: 1px solid var(--hf-border); }
.hf-compare-row > *:first-child { border-inline-start: 0; background: var(--hf-cream); }
.hf-compare-products article { position: relative; }
.hf-compare-products img { width: 100%; aspect-ratio: 1; margin-bottom: 10px; object-fit: contain; background: var(--surface-boucle); }
.woocommerce .woocommerce-breadcrumb, .woocommerce .woocommerce-result-count { color: var(--hf-slate); }

/* breadcrumbs */
.hf-breadcrumb { background: var(--surface-card); border-bottom: 1px solid var(--hf-border); font-size: var(--fs-xs); color: var(--hf-slate); }
.hf-breadcrumb .hf-container { padding: 10px 16px; }
.hf-breadcrumb a { color: var(--hf-ink-brand); font-weight: 600; }
.hf-bc-sep { margin: 0 8px; color: var(--ink-3); }

/* shop filters */
.hf-filter-group + .hf-filter-group { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-subtle); }
.hf-filter-group h3.hf-filter-title { margin: 0 0 10px; font-size: var(--fs-sm); color: var(--hf-heading); }
.hf-filter-group ul { margin: 0; padding: 0; list-style: none; }
.hf-filter-group li + li { margin-top: 6px; }
.hf-filter-opt { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.hf-filter-opt::before { content: ""; width: 15px; height: 15px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); }
.hf-filter-opt.is-active { color: var(--hf-ink-brand); font-weight: var(--fw-semibold); }
.hf-filter-opt.is-active::before { background: var(--action); border-color: var(--action); }
.hf-price-filter { display: flex; flex-direction: column; gap: 12px; }
.hf-price-filter__fields { display: flex; gap: 6px; }
.hf-price-filter input[type="number"] { width: 100%; min-height: 44px; padding: 8px; border: 1px solid var(--hf-border); border-radius: var(--radius-sm); }
.hf-price-filter button { min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--radius-sm); background: var(--action); color: var(--on-action); font-weight: 600; cursor: pointer; }
.hf-filter-reset { display: inline-block; margin-bottom: 14px; color: var(--slate); font-weight: 600; font-size: var(--fs-sm); }

/* price range slider — two <input type=range> stacked over one track */
.hf-price-range { --lo: 0%; --hi: 100%; display: none; }
.hf-price-range.is-enhanced { display: block; }
.hf-price-range__track { position: relative; height: 28px; }
.hf-price-range__track::before { content: ""; position: absolute; inset-inline: 0; top: 50%; height: 4px; transform: translateY(-50%); border-radius: var(--radius-sm); background: var(--hf-border); }
.hf-price-range__track::after { content: ""; position: absolute; top: 50%; height: 4px; transform: translateY(-50%); border-radius: var(--radius-sm); background: var(--action); inset-inline-start: var(--lo); inset-inline-end: calc(100% - var(--hi)); }
.hf-price-range input[type="range"] { position: absolute; inset-inline: 0; top: 0; width: 100%; height: 28px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.hf-price-range input[type="range"]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-card); border: 2px solid var(--action); cursor: pointer; }
.hf-price-range input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-card); border: 2px solid var(--action); cursor: pointer; }
.hf-price-range input[type="range"]::-moz-range-track { background: none; }
.hf-price-range input[type="range"]:focus-visible { outline: none; }
.hf-price-range input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.hf-price-range__out { display: block; margin-top: 4px; font-size: var(--fs-sm); color: var(--text-muted); }
/* JS on → the number inputs become the fine-tune / no-JS fallback, kept compact */
.hf-price-range.is-enhanced ~ .hf-price-filter__fields input[type="number"] { font-size: var(--fs-sm); }

/* header search suggestions */
.hf-search-form { position: relative; }
.hf-search-suggest { position: absolute; inset-inline: 0; top: calc(100% + 8px); z-index: 40; background: var(--surface-card); border: 1px solid var(--hf-border); border-radius: var(--hf-radius); box-shadow: var(--shadow-2); overflow: hidden; }
.hf-search-suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--hf-border); }
.hf-search-suggest a:last-child { border-bottom: 0; }
.hf-search-suggest a:hover { background: var(--hf-cream); }
.hf-search-suggest img { width: 40px; height: 40px; object-fit: contain; border-radius: var(--radius-sm); background: var(--surface-boucle); }
.hf-search-suggest span { flex: 1; font-size: var(--fs-sm); }
.hf-search-suggest span small { display: block; margin-top: 2px; color: var(--text-muted); font-size: var(--fs-xs); letter-spacing: 0; }
.hf-search-suggest em { color: var(--hf-ink-brand); font-style: normal; font-weight: var(--fw-semibold); font-size: var(--fs-sm); }

/* single product additions */
.hf-buy-now { margin-inline-start: 10px; }
.hf-sticky-buy { position: fixed; inset-inline: 0; bottom: 0; z-index: 45; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--surface-card); border-top: 1px solid var(--hf-border); box-shadow: var(--shadow-1); transform: translateY(110%); transition: transform var(--dur-base) var(--hf-ease); }
.hf-sticky-buy.is-visible { transform: translateY(0); }
.hf-sticky-buy span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--fw-semibold); color: var(--hf-ink); }
.hf-sticky-buy button { flex: none; min-height: 46px; padding: 10px 22px; border: 0; border-radius: var(--hf-radius-pill); background: var(--action); color: var(--on-action); font-weight: 600; cursor: pointer; }
/* The bar is only built for the mobile breakpoint; keep it hidden if the viewport is widened back to desktop after it was created. */
@media (min-width: 768px) { .hf-sticky-buy { display: none; } }

/* account help panel */
.hf-account-help { margin-top: 24px; padding: 20px; border: 1px solid var(--hf-border); border-radius: var(--hf-radius-lg); background: var(--hf-cream); }
.hf-account-help h3 { margin: 0 0 6px; color: var(--hf-heading); }
.hf-account-help p { margin: 0 0 12px; }

/* policy index */
.hf-policy-index { --hf-cols: 2; --hf-col-min: 16rem; --hf-gap: 12px; --hf-grid-auto: repeat(auto-fill, minmax(min(100%, max(var(--hf-col-min), (100% - (var(--hf-cols) - 1) * var(--hf-gap)) / var(--hf-cols))), 1fr)); display: grid; grid-template-columns: var(--hf-grid-auto); gap: var(--hf-gap); margin-top: 28px; }
.hf-policy-link { display: block; padding: 16px 18px; border: 1px solid var(--hf-border); border-radius: var(--hf-radius); background: var(--surface-card); font-weight: var(--fw-semibold); color: var(--hf-heading); }
.hf-policy-link:hover { border-color: var(--action); }

/* pagination */
.hf-pagination, .woocommerce-pagination { margin-top: var(--space-10); text-align: center; }
.hf-pagination ul.page-numbers, .woocommerce-pagination ul { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin: 0; padding: 0; border: 0; list-style: none; }
.hf-pagination .page-numbers, .woocommerce-pagination a.page-numbers, .woocommerce-pagination span.page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 0 var(--space-3); border: 1px solid var(--border-default); border-radius: var(--radius-pill); color: var(--text-body); font-weight: var(--fw-semibold); transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.hf-pagination ul.page-numbers { border: 0; }
.hf-pagination a.page-numbers:hover, .woocommerce-pagination a.page-numbers:hover { border-color: var(--action); color: var(--text-brand); }
.hf-pagination .page-numbers.current, .woocommerce-pagination .page-numbers.current { background: var(--action); color: var(--on-action); border-color: var(--action); }
.hf-pagination .page-numbers.dots, .woocommerce-pagination .page-numbers.dots { border-color: transparent; }
/* WooCommerce's own pagination colours (a lilac #ebe9eb / #8a7e88 current page,
   3.65:1) come from `.woocommerce nav.woocommerce-pagination ul li span.current`
   and its a:hover/a:focus siblings, (0,3,4) — one notch over the rules above.
   Only visible once a shop has more than one page, which the live store does.
   Matched and prefixed with html so the brand wins on specificity. html, not
   body: on the shop the .woocommerce class is on <body> itself, so
   "body .woocommerce" never matched there (caught by the live QA). */
html .woocommerce nav.woocommerce-pagination ul { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); border: 0; white-space: normal; }
html .woocommerce nav.woocommerce-pagination ul li { border: 0; overflow: visible; }
html .woocommerce nav.woocommerce-pagination ul li :is(a, span) { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 var(--space-3); line-height: 1; }
html .woocommerce nav.woocommerce-pagination ul li span.current { background: var(--action); color: var(--on-action); border-color: var(--action); }
html .woocommerce nav.woocommerce-pagination ul li a:hover,
html .woocommerce nav.woocommerce-pagination ul li a:focus { background: transparent; border-color: var(--action); color: var(--text-brand); }
.woocommerce ul.products { display: grid; grid-template-columns: var(--hf-grid-auto); gap: var(--hf-gap); margin: 0; padding: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
/* WooCommerce's late clearfix otherwise becomes the first/last grid cell. */
.woocommerce ul.hf-grid--products.hf-grid::before,
.woocommerce ul.hf-grid--products.hf-grid::after { content: none; display: none; }
.woocommerce ul.products li.product { width: auto; margin: 0; }
.woocommerce div.product { padding: 42px 0; }
.woocommerce-message, .woocommerce-info, .woocommerce-error { border-top-color: var(--action); }
/* Safety net for hf_strip_shipping_debug_notice() in functions.php: a notice
   whose text got emptied out still leaves this wrapper in the markup. */
.woocommerce-message:empty { display: none; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button { border-radius: var(--hf-radius-pill); background: var(--action); color: var(--on-action); font-weight: 600; padding: 12px 24px; }
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover { background: var(--action-hover); }
/* WooCommerce paints its primary `.button.alt` actions purple (#7f54b3) with
   `.woocommerce a.button.alt` — one class more specific than the rule above,
   so the cart's "Proceed to checkout" rendered in WooCommerce's brand colour
   instead of ours. `body` lifts these one step above WooCommerce's, so the
   result does not depend on which stylesheet happens to load last. */
body .woocommerce :is(a, button, input).button.alt { background: var(--action); border-color: var(--action); color: var(--on-action); }
body .woocommerce :is(a, button, input).button.alt:hover { background: var(--action-hover); border-color: var(--action-hover); color: var(--on-action); }
body .woocommerce :is(button, input).button.alt:disabled[disabled] { background: var(--action); border-color: var(--action); color: var(--on-action); opacity: .5; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--hf-ink); font-weight: var(--fw-semibold); }
.woocommerce span.onsale { background: var(--sale); color: var(--on-sale); border-radius: var(--hf-radius-pill); }
/* --- components (shared template-parts) --- */
/* product card */
/* WooCommerce's columns-* percentages can arrive after this stylesheet via
   Jetpack/CDN. Inside CSS Grid they shrink an already-sized grid cell again. */
.woocommerce ul.products.hf-grid--products.hf-grid > li.product { display: flex; width: 100%; min-width: 0; max-width: none; margin: 0; float: none; clear: none; }
/* width: 100% is required, not decorative: .hf-card sits inside a
   `li.product { display: flex }` (the flex-item-in-a-flex-container pattern
   WooCommerce ships), and a flex item with no flex-grow (the default) sizes
   to its own content instead of filling its container — this card's content
   (image + text, no explicit width anywhere) has no natural width to size
   from, so it was shrinking to a narrow default and leaving dead space
   inside every product-grid cell, worse the wider a column got (see
   --hf-cols in the shop grid). Confirmed live before shipping: without this,
   a 329.6px grid column was rendering an ~189px card. */
.hf-card { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; overflow: hidden; background: var(--surface-card); border: 0; border-radius: var(--card-frame-radius); outline: 1px solid var(--card-line); outline-offset: -1px; box-shadow: none; transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.hf-card:hover { box-shadow: var(--shadow-1); transform: translateY(-2px); }
.hf-card__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--hf-photo-ground); border-radius: var(--radius-card); }
.hf-card__media img, .woocommerce ul.products li.product .hf-card__media img { display: block; width: 100%; height: 100%; margin: 0; object-fit: contain; mix-blend-mode: var(--hf-photo-blend); }
/* The card link must cover the whole photo frame. Left unstyled it is an inline box,
   and with the press-and-hold cycling images absolutely positioned inside it, it
   collapsed to 0x0 so tapping a photo never reached the product page. Badges and the
   wishlist heart sit at z-index 2, above it. */
.hf-card__link { position: absolute; inset: 0; display: block; }
/* Press-and-hold image cycling: every candidate image is stacked in the same
   frame and JS toggles [hidden] while the pointer is held down. */
.hf-card__media[data-hf-cycle] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.hf-card__media[data-hf-cycle] .hf-card__img { position: absolute; inset: 0; }
.hf-card__media[data-hf-cycle] .hf-card__img[hidden], .woocommerce ul.products li.product .hf-card__media img[hidden] { display: none; }
/* Explicit "no photo yet" state (product has no featured image or gallery at
   all) instead of WooCommerce's near-blank placeholder blending into the card. */
.hf-card__no-image { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); width: 100%; height: 100%; color: var(--text-muted); background: var(--sunken); }
.hf-card__no-image i { width: 28px; height: 28px; }
.hf-card__no-image span { font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-align: center; padding-inline: var(--space-3); }
.hf-card__badge { position: absolute; top: var(--space-3); inset-inline-start: var(--space-3); z-index: 2; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); background: var(--sale); color: var(--on-sale); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.hf-card__badge--out { background: var(--charcoal); color: var(--hf-white); }
.hf-card .hf-order-badge { position: absolute; top: var(--space-3); inset-inline-end: var(--space-3); inset-inline-start: auto; z-index: 2; }
.hf-card__fav { position: absolute; bottom: var(--space-3); inset-inline-end: var(--space-3); z-index: 2; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-brand); cursor: pointer; transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.hf-card__fav i { width: 18px; height: 18px; }
.hf-card__fav:hover { background: var(--surface-card); }
.hf-card__fav.is-active, .hf-card__fav[aria-pressed="true"] { color: var(--action); }
.hf-card__fav.is-active i, .hf-card__fav[aria-pressed="true"] i { fill: currentColor; }
.hf-card__body { display: flex; flex: 1 1 auto; flex-direction: column; gap: var(--space-2); padding: var(--space-4); }
.hf-card__title, .woocommerce ul.products li.product .hf-card__title { margin: 0; padding: 0; font-size: var(--fs-body); font-weight: var(--fw-semibold); line-height: 1.5; color: var(--text-strong); }
.hf-card--product .hf-card__title { min-block-size: 4.5em; overflow-wrap: anywhere; }
.hf-card--product .hf-card__title-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.hf-card__title a:hover { color: var(--text-brand); }
.hf-stars { display: flex; align-items: center; gap: var(--space-1); min-height: 1.2em; font-size: var(--fs-sm); color: var(--ink-2); letter-spacing: var(--ls-wide); }
.hf-stars .star-rating { margin: 0; }
.hf-stars--empty { opacity: .55; }
.hf-stars__count { color: var(--text-muted); font-size: var(--fs-xs); letter-spacing: 0; }
.hf-price { color: var(--text-price); font-weight: var(--fw-semibold); }
.hf-price del { margin-inline-start: var(--space-2); color: var(--text-muted); font-weight: var(--fw-regular); }
.hf-price ins { text-decoration: none; }
.hf-card__add { margin-top: auto; align-self: stretch; padding-inline: var(--space-3); text-align: center; }
/* The body fills the card and the button sits at its bottom, so buttons line up across a row whatever the title length. WC's `ul.products li.product .button { margin-top: 1em }` (0,3,2) beat the rule above. */
.woocommerce ul.products li.product .hf-card__add { margin-top: auto; }
/* contact capsule */
.hf-capsule { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-5); border-radius: var(--radius-pill); border: 2px solid var(--action); font-weight: var(--fw-semibold); transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.hf-capsule i, .hf-capsule__wa { width: 18px; height: 18px; }
.hf-capsule__num { direction: ltr; unicode-bidi: isolate; font-weight: var(--fw-semibold); }
.hf-capsule--outline { background: transparent; color: var(--text-brand); }
.hf-capsule--outline:hover { background: var(--action); color: var(--on-action); }
.hf-capsule--solid { background: var(--action); color: var(--on-action); }
.hf-capsule--solid:hover { background: var(--action-hover); }
/* headline frame */
.hf-headline-frame { position: relative; display: grid; align-items: center; min-height: clamp(220px, 40vw, 420px); padding: clamp(var(--space-6), 6vw, var(--space-20)); overflow: hidden; border-radius: var(--radius-lg); background: var(--olive-600); background-size: cover; background-position: center; color: var(--hf-white); }
.hf-headline-frame.has-scrim::after { content: ""; position: absolute; inset: 0; background: var(--overlay-olive); }
.hf-headline-frame__inner { position: relative; z-index: 1; display: inline-grid; gap: var(--space-3); padding: clamp(var(--space-4), 3vw, var(--space-8)); }
.hf-headline-frame__inner::before, .hf-headline-frame__inner::after { content: ""; position: absolute; width: 28px; height: 28px; border: 2px solid currentColor; }
.hf-headline-frame__inner::before { top: 0; inset-inline-start: 0; border-inline-end: 0; border-block-end: 0; }
.hf-headline-frame__inner::after { bottom: 0; inset-inline-end: 0; border-inline-start: 0; border-block-start: 0; }
.hf-headline-frame__title { margin: 0; font-size: var(--fs-h2); line-height: var(--lh-tight); font-weight: var(--fw-semibold); }
.hf-headline-frame__title span { display: block; }
.hf-headline-frame__description { margin: var(--space-3) 0 0; font-size: var(--fs-body); line-height: var(--lh-loose); }
/* trust + value strips */
.hf-trust-strip { --hf-col-min: 14rem; --hf-gap: var(--space-4); --hf-grid-auto: repeat(auto-fill, minmax(min(100%, max(var(--hf-col-min), (100% - (var(--hf-cols) - 1) * var(--hf-gap)) / var(--hf-cols))), 1fr)); display: grid; grid-template-columns: var(--hf-grid-auto); gap: var(--hf-gap); margin: 0; padding: 0; list-style: none; }
.hf-trust-strip__item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--surface-card); font-weight: var(--fw-semibold); color: var(--text-body); }
.hf-trust-strip__item i { flex: none; width: 24px; height: 24px; color: var(--text-brand); }
.hf-value-strip { padding: clamp(var(--space-6), 6vw, var(--space-12)) 0; background: var(--surface-inverse); color: var(--text-inverse); }
.hf-value-strip__grid { --hf-col-min: 9rem; --hf-gap: var(--space-6); --hf-grid-auto: repeat(auto-fill, minmax(min(100%, max(var(--hf-col-min), (100% - (var(--hf-cols) - 1) * var(--hf-gap)) / var(--hf-cols))), 1fr)); display: grid; grid-template-columns: var(--hf-grid-auto); gap: var(--hf-gap); width: var(--hf-content); margin: 0 auto; }
.hf-value-strip__item { text-align: center; }
.hf-value-strip__num { display: flex; align-items: center; justify-content: center; min-height: 1.2em; font-size: var(--fs-h2); font-weight: var(--fw-semibold); line-height: var(--lh-tight); }
.hf-value-strip__num i { width: 40px; height: 40px; stroke-width: 1.5; }
.hf-value-strip__label { margin: var(--space-2) 0 0; font-size: var(--fs-sm); opacity: .85; }
/* journey steps */
.hf-journey { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-6) var(--space-4); margin: 0; padding: 0; list-style: none; counter-reset: hf-journey; }
.hf-journey__step { position: relative; display: grid; gap: var(--space-2); padding-top: var(--space-10); }
.hf-journey__num { position: absolute; top: 0; inset-inline-start: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-pill); background: var(--action); color: var(--on-action); font-weight: var(--fw-semibold); }
.hf-journey__step::before { content: ""; position: absolute; top: 20px; inset-inline-start: 40px; inset-inline-end: calc(-1 * var(--space-4)); height: 2px; background: var(--border-default); }
.hf-journey__step:last-child::before { display: none; }
.hf-journey__title { margin: 0; font-size: var(--fs-body); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-journey__text { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); line-height: var(--lh-snug); }
/* .hf-trust-strip and .hf-value-strip__grid reflow on their own now (var(--hf-grid-auto)).
   .hf-journey keeps breakpoints: its connector line is drawn per step and only
   works when the row length is known. */
@media (max-width: 1023px) {
  .hf-journey { grid-template-columns: repeat(3, 1fr); }
  .hf-journey__step:nth-child(3n)::before { display: none; }
}
@media (max-width: 767px) {
  .hf-journey { grid-template-columns: 1fr; }
  .hf-journey__step { padding-top: 0; padding-inline-start: 56px; }
  .hf-journey__step::before { display: none; }
}

/* --- shop --- */
/* Sidebar takes a share of the row rather than a fixed 280px, so on a 1100px
   laptop it gives width back to the catalogue instead of squeezing it. */
/* --hf-cols here is a fallback only — template-parts/shop-body.php sets it
   inline per request (3 columns by default, 4 or 5 when the shopper picks a
   wider layout from the "الأعمدة" control), which wins over this since an
   inline style always beats a class rule for the same custom property. */
.hf-shop { --hf-cols: 3; display: grid; grid-template-columns: clamp(15rem, 22%, 19rem) 1fr; gap: clamp(var(--space-6), 3vw, var(--space-10)); align-items: start; }
.hf-shop__main { min-width: 0; }
/* theme.js AJAX-ifies filter/sort/per-page/pagination inside #hf-shop-region
   (a fetch + swap of this region instead of a full page reload — see
   template-parts/shop-body.php); this is its only visual state, a brief dim
   while the next page's HTML is in flight. Plain links/forms still work with
   JS off, so there is no loading state to show in that case. */
[data-hf-shop-region].is-loading { opacity: .5; pointer-events: none; transition: opacity var(--dur-fast) var(--ease-out); }
.hf-shop__sidebar { align-self: start; padding: var(--space-5); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-card); }
.hf-shop__sidebar-head { display: none; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.hf-shop__sidebar-head h2 { margin: 0; font-size: var(--fs-h4); color: var(--text-strong); }
.hf-shop__sidebar-close { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--text-strong); cursor: pointer; }
.hf-shop__sidebar-close i { width: 22px; height: 22px; }
.hf-shop__sidebar .hf-filter-opt { display: flex; justify-content: flex-start; align-items: center; min-height: 40px; }
@media (max-width: 1023px) { .hf-shop__sidebar .hf-filter-opt { min-height: 44px; } }
.hf-filter-count { margin-inline-start: auto; padding-inline-start: var(--space-2); color: var(--text-muted); font-size: var(--fs-xs); font-weight: var(--fw-regular); }
.hf-filter-opt.is-active .hf-filter-count { color: inherit; }

.hf-shop__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-4); margin-bottom: var(--space-6); }
.hf-shop__bar .woocommerce-result-count { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); }
.hf-shop__bar .woocommerce-ordering { margin: 0; }
.hf-shop__bar .woocommerce-ordering::before { content: "الترتيب: "; color: var(--text-muted); font-size: var(--fs-sm); }
.hf-shop__bar .orderby, .hf-sort { min-height: 44px; padding: var(--space-2) var(--space-3); border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-strong); font-weight: var(--fw-semibold); cursor: pointer; }
.hf-shop__bar .hf-per-page { display: flex; align-items: center; gap: var(--space-2); margin: 0; }
@media (max-width: 767px) { .hf-shop__bar .hf-per-page { display: none; } }
.hf-shop__bar .hf-per-page__label { color: var(--text-muted); font-size: var(--fs-sm); white-space: nowrap; }
.hf-shop__bar .hf-per-page__select { min-height: 44px; padding: var(--space-2) var(--space-3); border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-strong); font-weight: var(--fw-semibold); cursor: pointer; }
.hf-per-page__submit { margin-inline-start: var(--space-2); min-height: 44px; padding: 0 var(--space-4); border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-strong); font-weight: var(--fw-semibold); cursor: pointer; }
.hf-filter-toggle { display: none; align-items: center; gap: var(--space-2); min-height: 44px; padding: var(--space-2) var(--space-4); border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-strong); font-weight: var(--fw-semibold); cursor: pointer; }
.hf-filter-toggle i { width: 18px; height: 18px; }

/* --hf-cols comes from .hf-shop's inline style (3 by default, or 4/5 when
   the shopper picks a wider layout from the "الأعمدة" control) — capped
   instead of uncapped at 4, so it no longer silently grows to 4-5 columns on
   wide desktop screens. Tighter gap too (was the default 20px).
   --hf-col-min is overridden here (not the :root default, which is a vw-based
   clamp sized for a FULL viewport width — it maxes out around 288px, which is
   wider than a 5-column track needs once the sidebar eats ~22% of .hf-shop's
   width). A smaller fixed floor still shrinks cards on narrow screens, so
   mobile drops to 2 or 1 column on its own regardless of the chosen column
   count, but no longer overrides --hf-cols on desktop; the fixed
   aspect-ratio on .hf-card__media means cards resize, never distort.
   --hf-grid-auto is ALSO redeclared here, not just inherited from :root's
   copy — this is the actual fix, not the --hf-col-min tweak above. Custom
   properties don't lazily re-evaluate on inheritance: :root's --hf-grid-auto
   is a formula that already had :root's own --hf-cols/--hf-col-min/--hf-gap
   substituted into it the moment :root's value was computed, so a
   descendant that only overrides those three inputs (as every other reused
   grid on this site — .hf-trust-grid, .hf-review-grid, etc. — does) still
   inherits :root's frozen 4-column formula, unchanged. Redeclaring
   --hf-grid-auto on this same rule forces it to be recomputed here, using
   this rule's own --hf-cols/--hf-col-min/--hf-gap. */
.hf-shop ul.hf-grid--products.hf-grid { --hf-gap: 16px; --hf-col-min: 10rem; --hf-grid-auto: repeat(auto-fill, minmax(min(100%, max(var(--hf-col-min), (100% - (var(--hf-cols) - 1) * var(--hf-gap)) / var(--hf-cols))), 1fr)); display: grid; grid-template-columns: var(--hf-grid-auto); gap: var(--hf-gap); margin: 0; padding: 0; list-style: none; }

body.hf-filter-sheet-open, body.hf-drawer-open { overflow: hidden; }
.hf-shop-trust { padding: var(--space-12) 0; background: var(--bg-muted); }

/* The catalogue grid sizes itself; only the sidebar still needs a mode switch,
   because below this width it stops being a column and becomes a drawer. */
@media (max-width: 1023px) {
  .hf-shop { display: block; }
  .hf-filter-toggle { display: inline-flex; }
  .hf-shop__bar { margin-bottom: var(--space-5); }
  .hf-shop__sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 900060; width: min(86vw, 340px); max-block-size: 100dvh; box-sizing: border-box; border: 0; border-radius: 0; overflow-y: auto; overscroll-behavior: contain; box-shadow: var(--shadow-2); transform: translateX(-100%); transition: transform var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base); visibility: hidden; }
  [dir="rtl"] .hf-shop__sidebar { transform: translateX(100%); }
  .hf-shop__sidebar.is-open { transform: none; visibility: visible; transition-delay: 0s; }
  .hf-shop__sidebar-head { display: flex; }
  .hf-shop.is-filter-open::before { content: ""; position: fixed; inset: 0; z-index: 900055; background: var(--overlay-scrim); }
}
/* The full menu needs room beside the centred logo and the icons. Measured: at
   1024-1179px its items broke onto two lines (or, kept on one, ran into the
   logo), and on the live site with a Windows scrollbar it still touched the logo
   at 1180. Below 1280 the menu button takes over, as on tablets; 1280, 1366,
   1440 and wider keep the full menu. */
/* Header exception to the four breakpoints (DESIGN.md, Layout): the full menu
   fits beside the centred logo from 1180px, so laptops at 125% scaling
   (1536px → 1229px) keep the menu instead of the phone drawer. */
@media (max-width: 1179px) { .hf-nav { display: none; } .hf-drawer-toggle { display: inline-flex; } }
/* Menu items read as separate links: a small dot between items, and more room
   on wide screens. 1180-1359 keeps the gaps tight and the text at 15px so the
   menu still clears the centred logo. */
.hf-nav__list > li { display: flex; align-items: center; }
.hf-nav__list > li + li::before { content: ""; inline-size: 4px; block-size: 4px; margin-inline-end: var(--space-5); border-radius: var(--radius-pill); background: var(--line-strong); }
@media (max-width: 1359px) { .hf-nav__list { gap: var(--space-3); } .hf-nav__list > li + li::before { margin-inline-end: var(--space-3); } .hf-nav__link { font-size: var(--fs-sm); } }
@media (min-width: 1180px) { .hf-drawer { display: none; } } /* same switch point as the menu button above */
@media (max-width: 767px) { .hf-header__row-inner { min-height: 64px; } .hf-header__bar-inner { gap: var(--space-1) var(--space-3); font-size: var(--fs-2xs); } .hf-hero-grid, .hf-custom-order-grid { grid-template-columns: 1fr; } .hf-section-heading { align-items: start; flex-direction: column; } .hf-cta-band-inner { flex-direction: column; align-items: start; text-align: start; } .hf-cta-band .hf-actions { width: 100%; } .hf-cta-band .hf-button, .hf-cta-band .hf-button--secondary { flex: 1 1 auto; } }
/* Phone spacing leaves room for the logo and the three main actions. */
@media (max-width: 767px) {
	.hf-header__row-inner { gap: var(--space-1); }
	.hf-header__row .hf-header__logo :is(.hf-logo, .custom-logo-link) { display: flex; max-inline-size: 100%; padding-inline: 0; }
	.hf-header__actions :is(.hf-header__account-link, .hf-header__wishlist-link) { display: none; }
}

/* --- category --- */
.hf-cat-hero { position: relative; display: flex; align-items: flex-end; min-height: 320px; padding: var(--space-10) 0; background-size: cover; background-position: center; background-repeat: no-repeat; }
.hf-cat-hero__scrim { position: absolute; inset: 0; background: var(--overlay-olive); }
.hf-cat-hero__inner { position: relative; color: var(--hf-white); }
.hf-cat-hero__title { margin: 0 0 var(--space-2); font-size: var(--fs-h1); font-weight: var(--fw-semibold); line-height: var(--lh-tight); color: var(--hf-white); }
.hf-cat-hero__text { max-width: 60ch; font-size: var(--fs-lead); line-height: var(--lh-snug); }
.hf-cat-hero__text :is(p, ul) { margin: 0; }

.hf-cat-pills { border-bottom: 1px solid var(--border-subtle); background: var(--surface-card); }
.hf-cat-pills__track { display: flex; flex-wrap: wrap; gap: var(--space-3); padding-block: var(--space-4); }
.hf-cat-pill { display: inline-flex; align-items: center; min-height: 44px; padding: var(--space-2) var(--space-4); border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-strong); font-weight: var(--fw-semibold); white-space: nowrap; text-decoration: none; transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.hf-cat-pill:hover { border-color: var(--action); }
.hf-cat-pill[aria-current="page"] { background: var(--action); border-color: var(--action); color: var(--on-action); }

.hf-cat-body { padding: var(--space-12) 0; }

.hf-cat-guide { padding: var(--space-12) 0; background: var(--bg-muted); }
.hf-cat-guide__inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-10); align-items: center; }
.hf-cat-guide__text h2 { margin: 0 0 var(--space-3); font-size: var(--fs-h2); font-weight: var(--fw-semibold); line-height: var(--lh-tight); color: var(--text-strong); }
.hf-cat-guide__text p { margin: 0 0 var(--space-3); color: var(--text-body); line-height: var(--lh-snug); }
.hf-cat-guide__text .hf-button { margin-top: var(--space-2); }
.hf-cat-guide__media { overflow: hidden; border-radius: var(--radius-lg); aspect-ratio: 4 / 3; }
.hf-cat-guide__media img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 1359px) { .hf-cat-guide__inner { gap: var(--space-8); } }
@media (max-width: 1023px) { .hf-cat-body { padding: var(--space-10) 0; } }
@media (max-width: 767px) {
  .hf-cat-guide__inner { grid-template-columns: 1fr; gap: var(--space-6); }
  .hf-cat-guide__media { order: -1; }
}
@media (max-width: 767px) {
  .hf-cat-hero { min-height: 200px; padding: var(--space-8) 0; }
  .hf-cat-pills__track { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .hf-cat-pills__track::-webkit-scrollbar { display: none; }
}

/* --- product --- */
.hf-product-page .hf-pdp { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: var(--space-16); row-gap: var(--space-10); align-items: start; }
.hf-pdp > .woocommerce-tabs, .hf-pdp > .related, .hf-pdp > .upsells, .hf-pdp > .hf-related-all { grid-column: 1 / -1; }
/* WooCommerce core's woocommerce.css puts `float:left; width:48%` on div.product
   div.summary; our summary carries the `summary` class too, so as a grid item it
   was pinned to 48% with the other 52% left blank. Neutralise it. */
.woocommerce div.product div.hf-pdp__summary.summary { width: auto; max-width: none; float: none; }

/* Grid items must shrink below the intrinsic width of tabs and gallery images. */
.hf-product-page .hf-pdp > * { min-width: 0; }

/* gallery */
.hf-pdp__gallery { position: relative; }
.hf-gallery__main { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-lg); background: var(--hf-photo-ground); }
.hf-gallery__main .woocommerce-product-gallery__image, .hf-gallery__main a { display: block; width: 100%; height: 100%; }
.hf-gallery__main img { width: 100%; height: 100%; display: block; object-fit: contain; mix-blend-mode: var(--hf-photo-blend); }
.hf-gallery__badge { position: absolute; top: var(--space-3); inset-inline-start: var(--space-3); z-index: 2; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); background: var(--action); color: var(--on-action); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.hf-gallery__thumbs { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-4) 0 0; padding: 0; list-style: none; }
.hf-gallery__thumb { flex: 0 0 auto; width: 88px; aspect-ratio: 1; overflow: hidden; border: 2px solid transparent; border-radius: var(--radius-sm); background: var(--hf-photo-ground); cursor: pointer; }
.hf-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; display: block; mix-blend-mode: var(--hf-photo-blend); }
.hf-gallery__thumb.is-active { border-color: var(--action); }

/* summary */
.hf-pdp__summary { display: flex; flex-direction: column; gap: var(--space-4); }
.hf-pdp__summary .product_title { margin: 0; font-size: var(--fs-h1); line-height: var(--lh-heading); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-pdp__summary .woocommerce-product-rating { margin: 0; display: flex; align-items: center; gap: var(--space-2); }
.hf-pdp__summary .woocommerce-product-rating .star-rating { color: var(--ink-2); }
.hf-pdp__summary .woocommerce-review-link { color: var(--text-muted); font-size: var(--fs-sm); }
.hf-pdp__summary .price, .hf-pdp__summary p.price { margin: 0; color: var(--text-price); font-weight: var(--fw-semibold); font-size: var(--fs-h3); }
.hf-pdp__summary .price del { margin-inline-end: var(--space-2); color: var(--text-muted); font-weight: var(--fw-regular); font-size: var(--fs-lead); }
.hf-pdp__summary .price ins { text-decoration: none; }
.hf-pdp__summary .woocommerce-product-details__short-description { color: var(--text-body); line-height: var(--lh-loose); }
.hf-pdp__summary .woocommerce-product-details__short-description p { margin: 0 0 var(--space-2); }

.hf-installment { display: flex; align-items: center; gap: var(--space-2); margin: 0; padding: var(--space-3) var(--space-4); border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--success-bg); color: var(--text-body); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.hf-installment i { flex: none; width: 18px; height: 18px; color: var(--text-brand); }
.hf-installment .amount { font-weight: var(--fw-semibold); color: var(--text-strong); }
/* Purchase-decision line: deposit now, remainder before delivery. */
.hf-deposit { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--bg-muted); color: var(--text-body); font-size: var(--fs-sm); line-height: var(--lh-snug); }
.hf-deposit i { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--text-brand); }
.hf-deposit strong { color: var(--text-strong); font-weight: var(--fw-semibold); white-space: nowrap; }
.hf-deposit[hidden] { display: none; }

.hf-swatch { display: grid; gap: var(--space-2); }
.hf-swatch__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-swatch__opts { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hf-swatch__opt { display: inline-flex; align-items: center; min-height: 44px; padding: var(--space-2) var(--space-4); border: 2px solid var(--border-default); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-body); font-weight: var(--fw-semibold); cursor: pointer; transition: border-color var(--dur-fast) var(--ease-out); }
.hf-swatch__opt:hover { border-color: var(--action); }
.hf-swatch__opt.is-active { border-color: var(--action); color: var(--text-brand); }
.hf-swatch--color .hf-swatch__opt { gap: var(--space-2); padding-inline-start: var(--space-3); }
.hf-swatch__dot { width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--hf-swatch-color, var(--border-strong));  }
.hf-swatch--color .hf-swatch__opt.is-active .hf-swatch__dot {  }
/* JS enhanced the swatches → hide WooCommerce's own attribute select rows. max-width because core's
   `.woocommerce div.product form.cart .variations { width: 100% }` out-specifies the
   width here, and 100% of an absolute box is the whole product grid (1360px hanging
   off-screen). */
form.variations_form.hf-has-swatches .variations { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; max-width: 1px; }

/* qty stepper — CSS-only treatment of WC's number input; the +/- buttons come from theme.js */
.hf-pdp__summary form.cart { display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--space-3); margin: 0; }
/* WooCommerce's clearfix ::before/::after would be two empty flex items here,
   each costing a --space-3 gap around the quantity + add-to-cart row. */
/* Selector repeats WooCommerce's own `.woocommerce div.product form.cart::before`
   plus one theme class, so it wins on specificity, not on stylesheet order. */
.woocommerce div.hf-pdp.product .hf-pdp__summary form.cart::before,
.woocommerce div.hf-pdp.product .hf-pdp__summary form.cart::after { content: none; }
.hf-qty { display: inline-flex; align-items: center; border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--surface-card); overflow: hidden; }
.hf-qty .quantity { display: inline-flex; align-items: center; }
.hf-qty .qty { width: 64px; min-height: 48px; padding: var(--space-2); border: 0; background: transparent; text-align: center; font-weight: var(--fw-semibold); color: var(--text-strong); font-size: var(--fs-body); }
.hf-qty__btn { display: inline-grid; place-items: center; width: 44px; min-height: 48px; padding: 0; border: 0; background: transparent; color: var(--text-strong); cursor: pointer; transition: background var(--dur-fast) var(--ease-out); }
.hf-qty__btn:hover { background: var(--bg-muted); }
.hf-qty__btn:disabled { opacity: .4; cursor: default; }
.hf-qty__btn i { width: 16px; height: 16px; }
.hf-pdp__summary form.cart .single_add_to_cart_button, .hf-pdp__summary .hf-buy-now { min-height: 48px; }
/* WC's added_to_cart listener appends «عرض السلة» after the button; the cart drawer already has it. */
.hf-pdp__summary form.cart .added_to_cart { display: none; }
.hf-pdp__summary form.cart .single_add_to_cart_button { flex: 1 1 auto; }
@media (max-width: 767px) {
  .hf-pdp__summary form.cart:not(.variations_form),
  .hf-pdp__summary .woocommerce-variation-add-to-cart { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .hf-pdp__summary form.cart :is(.hf-qty, .quantity) { grid-column: 1 / -1; justify-self: start; }
  .woocommerce div.hf-pdp.product .hf-pdp__summary form.cart :is(.single_add_to_cart_button, .hf-buy-now) { width: 100%; min-width: 0; margin: 0; padding-inline: var(--space-2); border-radius: var(--radius-pill); float: none; }
}
.hf-pdp__summary .variations_form .variations td, .hf-pdp__summary .variations_form .variations th { padding: var(--space-2) 0; }

/* Change request on the product page (inc/product-custom-order.php). A native
   <details>, so it opens without JavaScript; the summary is the button. */
.hf-modify { margin-top: var(--space-3); }
.hf-modify > summary { display: inline-flex; list-style: none; cursor: pointer; }
.hf-modify > summary::-webkit-details-marker { display: none; }
.hf-modify > summary:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.hf-modify__body { margin-top: var(--space-4); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); }
.hf-modify__intro, .hf-modify__hint, .hf-modify__wa-note { margin: 0 0 var(--space-4); color: var(--text-body); font-size: var(--fs-sm); line-height: var(--lh-snug); }
.hf-modify__piece { display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-4); margin: 0 0 var(--space-5); padding: var(--space-4); border-radius: var(--radius-sm); background: var(--sunken); font-size: var(--fs-sm); }
.hf-modify__piece dt { color: var(--text-muted); }
.hf-modify__piece dd { margin: 0; color: var(--text-strong); text-align: start; }
.hf-modify__title { margin: var(--space-5) 0 var(--space-2); font-size: var(--fs-lead); color: var(--text-strong); }
.hf-modify__form .hf-field-grid { --hf-col-min: 11rem; }
.hf-modify__form input, .hf-modify__form select, .hf-modify__form textarea { border-color: var(--line-strong); }
.hf-modify__form small { display: block; margin-top: var(--space-1); color: var(--text-muted); font-size: var(--fs-xs); }
.hf-modify__checks { grid-column: 1 / -1; margin: 0 0 var(--space-4); padding: 0; border: 0; }
.hf-modify__checks legend { margin-bottom: var(--space-2); padding: 0; color: var(--hf-heading); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.hf-modify__checks label { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; margin: 0; margin-inline-end: var(--space-5); font-weight: var(--fw-regular); }
.hf-modify__checks input { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--action); }
/* order type: one-line summary above the buttons (full terms live in .hf-terms) */
.hf-pdp__summary .hf-order-type-notice { margin: 0; padding: var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-muted); }
.hf-pdp__summary .hf-order-type-notice strong { display: inline; margin: 0; color: var(--text-strong); }
.hf-pdp__summary .hf-order-type-notice p { margin: 0; color: var(--text-body); font-size: var(--fs-sm); line-height: var(--lh-snug); }
.hf-pdp__summary .hf-order-type-notice--custom .hf-button { margin-top: var(--space-2); }
/* Made-to-order deposit notice: informational, so the action-soft pair, not the warning colour. */
.hf-order-type-notice--made-to-order,
.hf-pdp__summary .hf-order-type-notice--made-to-order { background: var(--action-soft); border-color: var(--action-soft); color: var(--on-action-soft); }
.hf-order-type-notice--made-to-order strong,
.hf-pdp__summary .hf-order-type-notice--made-to-order strong { color: var(--on-action-soft); }
.hf-order-type-notice--made-to-order p,
.hf-pdp__summary .hf-order-type-notice--made-to-order p { color: var(--on-action-soft); }

/* the single terms box under the buttons (hf_product_facts()) */
.hf-terms { border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--surface-card); color: var(--text-body); }
.hf-terms > summary { display: flex; align-items: center; min-height: 44px; padding: var(--space-3) var(--space-4); color: var(--text-strong); font-weight: var(--fw-semibold); cursor: pointer; }
.hf-terms > summary:focus-visible { outline: 2px solid var(--text-brand); outline-offset: 2px; }
.hf-terms__intro { margin: 0; padding: 0 var(--space-4) var(--space-3); font-size: var(--fs-sm); line-height: var(--lh-snug); }
.hf-terms .hf-facts { padding-block: 0 var(--space-3); border: 0; background: none; }
.hf-terms .hf-policy-quick { margin: 0; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border-subtle); }
/* the SKU already shows as «الكود» under the title (hf_product_code_line()) */
.hf-pdp__summary .product_meta .sku_wrapper { display: none; }
/* Tags are search keywords («كنبة مودرن», «كرسي بيج»), not something a shopper uses; the category stays. */
.hf-pdp__summary .product_meta .tagged_as { display: none; }

.hf-pdp__summary .hf-product-controls { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: 0; }
.hf-pdp__summary .hf-product-controls .hf-text-button { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; color: var(--text-body); font-weight: var(--fw-semibold); }
.hf-pdp__summary .hf-product-controls .hf-text-button:hover { color: var(--text-brand); }
.hf-pdp__summary .hf-product-question { color: var(--text-brand); }
.hf-pdp__summary .product_meta { font-size: var(--fs-sm); color: var(--text-muted); }

/* meta: dimensions + specs */
.hf-pdp__meta { display: grid; gap: var(--space-5); margin-top: var(--space-2); padding-top: var(--space-5); border-top: 1px solid var(--border-subtle); }
/* inside the «الخامات والمقاسات» tab (hf_render_materials_tab()) the tab panel is the frame */
.woocommerce-Tabs-panel .hf-pdp__meta { margin: 0 0 var(--space-5); padding-top: 0; border-top: 0; }
.hf-dims { display: grid; gap: var(--space-3); }
.hf-dims__title { margin: 0; font-size: var(--fs-h4); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-dims__list { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin: 0; padding: 0; list-style: none; }
.hf-dims__list li { display: grid; }
.hf-dims__list span { font-size: var(--fs-xs); color: var(--text-muted); }
.hf-dims__list strong { color: var(--text-strong); }
.hf-specs { display: grid; gap: 0; margin: 0; }
.hf-specs__row { display: grid; grid-template-columns: 120px 1fr; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--border-subtle); }
.hf-specs__row dt { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); }
.hf-specs__row dd { margin: 0; color: var(--text-body); }

/* tabs */
.hf-pdp .woocommerce-tabs { margin-top: var(--space-12); }
.hf-pdp .woocommerce-tabs ul.tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-6); padding: 0 0 var(--space-2); border-bottom: 1px solid var(--border-subtle); list-style: none; }
/* Same clearfix; ::before is WooCommerce's absolutely-positioned border line and stays. */
.woocommerce div.hf-pdp.product .woocommerce-tabs ul.tabs::after { content: none; }
.hf-pdp .woocommerce-tabs ul.tabs li { margin: 0; padding: 0; border: 0; background: none; }
.hf-pdp .woocommerce-tabs ul.tabs li a { display: inline-flex; align-items: center; min-height: 44px; padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill); color: var(--text-body); font-weight: var(--fw-semibold); white-space: nowrap; }
.woocommerce div.product.hf-pdp .woocommerce-tabs ul.tabs li.active a { background: var(--action); color: var(--on-action); }
.hf-pdp .woocommerce-tabs .panel { margin: 0; padding: 0; color: var(--text-body); line-height: var(--lh-loose); }
.hf-pdp .woocommerce-tabs .panel h2 { font-size: var(--fs-h4); color: var(--text-strong); }

/* related */
.hf-pdp .related > h2, .hf-pdp .upsells > h2 { margin: 0 0 var(--space-6); font-size: var(--fs-h2); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-related-all { display: inline-flex; align-items: center; gap: var(--space-1); margin-top: var(--space-4); color: var(--text-brand); font-weight: var(--fw-semibold); }
.hf-related-all i { width: 16px; height: 16px; }

@media (max-width: 1023px) {
  .hf-product-page .hf-pdp { column-gap: var(--space-6); row-gap: var(--space-8); }
  .hf-pdp__summary { gap: var(--space-3); }
  .hf-gallery__thumbs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .hf-gallery__thumbs::-webkit-scrollbar { display: none; }
  .hf-pdp .woocommerce-tabs ul.tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .hf-pdp .woocommerce-tabs ul.tabs::-webkit-scrollbar { display: none; }
}
@media (max-width: 767px) {
  .hf-product-page .hf-pdp { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-5); }
}
@media (max-width: 479px) {
  .hf-specs__row { grid-template-columns: 96px 1fr; }
}

/* --- WooCommerce's classic float layout, neutralised where the theme owns it ---
 *
 * woocommerce-layout.css lays cart, checkout and account out with a float +
 * percentage-width two-column system, for themes that don't position those
 * regions themselves. This theme positions all three with grid, so the
 * percentages land inside an already-sized track and compound:
 *
 *   .cart_totals      width:48%  ->  48% of the 360px summary column
 *   .col-1 / .col-2   width:48%  ->  48% of a checkout column that is already 1fr
 *   .form-row-first   width:47%  ->  47% of that 48%, i.e. a ~22% wide name field
 *
 * Grid items ignore `float` but not `width`, so both have to go. The theme
 * already did this one selector at a time (product cards, PDP summary); this
 * covers the rest of the float system in one place.
 *
 * !important because these widths come from a third-party stylesheet whose
 * selectors shift between WooCommerce releases -- out-specifying it by hand
 * would go quietly stale on the next update.
 */
.hf-cart .cart-collaterals,
.hf-cart .cart_totals,
.hf-cart .cross-sells,
.hf-cart .shipping_calculator,
.hf-checkout .col2-set,
.hf-checkout .col-1,
.hf-checkout .col-2,
.hf-checkout .form-row-first,
.hf-checkout .form-row-last,
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
	float: none !important;
	width: auto !important;
	clear: none !important;
}
/* Same stylesheet floats the terms text and the submit button to opposite
   sides, and #payment never clears them -- which is what clipped the
   reassurance line underneath. Drop the float only: the theme sets
   #place_order to width:100% and that must survive. */
.hf-checkout #payment .terms,
.hf-checkout #payment .wc-terms-and-conditions,
.hf-checkout #payment #place_order {
	float: none !important;
}
/* hf_checkout_ssl_row() prints this under the submit button and it had no
   styling of its own. */
.hf-checkout__ssl { display: flex; align-items: center; justify-content: center; gap: var(--space-2); margin: var(--space-3) 0 0; color: var(--text-muted); font-size: var(--fs-sm); line-height: var(--lh-snug); }
.hf-checkout__ssl i { width: 16px; height: 16px; flex: none; }

/* Cart thumbnails. WooCommerce sizes and hides them out from under the theme:
 *   .woocommerce-cart table.cart img            width:32px    (0,2,2)
 *   .woocommerce table.cart .product-thumbnail  display:none  (0,3,1)
 * Both out-specify the theme's own cart rules, so desktop thumbnails rendered
 * as 32x80 slivers and below 768px they disappeared altogether. On a furniture
 * catalogue the photo is the thing being bought, so match WooCommerce's
 * specificity and take the sizing back. */
.woocommerce .hf-cart__table td.product-thumbnail { display: table-cell; }
.woocommerce .hf-cart__table td.product-thumbnail img { width: 80px; height: 80px; max-width: none; object-fit: contain; border-radius: var(--radius-sm); display: block; }

/* Checkout order-review thumbnail. td.product-name is a flex row, and this
   wrapper is a plain span, so it inherited flex-shrink:1 and collapsed to
   12-26px wide against its fixed 56px height whenever the summary column got
   narrow -- a thin vertical strip instead of a thumbnail. */
.hf-checkout__review-thumb { flex: none; }

/* Same shrink trap as above: these labels are inline-flex, so the checkbox is a
   flex item and squashed to a sliver next to a long Arabic label carrying three
   links. Pin it and let only the text wrap. */
.hf-mto-ack .hf-mto-ack__check label input[type="checkbox"],
.hf-delivery-access .hf-delivery-access__check label input[type="checkbox"] { flex: none; }

/* WooCommerce scrolls to a validation notice but the sticky header sits over
   the landing spot, so the shopper saw red fields without the reason. */
.woocommerce-error, .woocommerce-message, .woocommerce-info { scroll-margin-top: 96px; }

/* --- cart --- */
.woocommerce-cart .hf-section, .woocommerce-cart .hf-container { overflow: visible; }
/* Same 850px .hf-prose reading-width cap that squeezed My Account (HF-036):
   the cart's own grid is items + a 360px summary, ~1075px, so inside 850px it
   overflowed its box and wrapped every product name onto four lines. */
.woocommerce-cart .hf-prose { max-width: var(--hf-content); }
.hf-cart { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--space-10); align-items: start; margin: 0 0 var(--space-8); }
.hf-cart__summary { position: sticky; top: var(--space-6); }

/* line-item table */
.hf-cart__table { width: 100%; border-collapse: collapse; }
.hf-cart__table thead th { padding: 0 var(--space-3) var(--space-3); text-align: start; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-muted); border-bottom: 1px solid var(--border-default); }
.hf-cart__table td { padding: var(--space-4) var(--space-3); border-bottom: 1px solid var(--border-subtle); vertical-align: middle; color: var(--text-body); }
.hf-cart__table .product-thumbnail { width: 96px; }
.hf-cart__table .product-thumbnail img { width: 80px; height: 80px; object-fit: contain; border-radius: var(--radius-sm); display: block; }
.hf-cart__table .product-name a { color: var(--text-strong); font-weight: var(--fw-semibold); }
.hf-cart__table .product-name .variation, .hf-cart__table .product-name dl { margin: var(--space-1) 0 0; font-size: var(--fs-sm); color: var(--text-muted); }
.hf-cart__table .product-price { color: var(--text-body); }
.hf-cart__table .product-subtotal { font-weight: var(--fw-semibold); color: var(--text-price); }
.hf-cart__table .product-remove { width: 44px; text-align: center; }
.hf-cart__table a.remove { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-pill); color: var(--text-muted); transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.hf-cart__table a.remove:hover { color: var(--danger); background: var(--danger-bg); }
.hf-cart__table a.remove i { width: 18px; height: 18px; }
.hf-cart__table .product-quantity .hf-qty { margin: 0; }

/* actions row: coupon + update */
.hf-cart__table td.actions { padding: var(--space-5) 0 0; border-bottom: 0; }
.hf-coupon { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-bottom: var(--space-4); }
.hf-coupon__field { display: inline-flex; align-items: center; gap: var(--space-2); padding-inline-start: var(--space-3); border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--surface-card); }
.hf-coupon__field i { width: 16px; height: 16px; color: var(--text-muted); flex: none; }
.hf-coupon__field .input-text { min-height: 44px; min-width: 150px; border: 0; background: transparent; padding: var(--space-2) var(--space-3); color: var(--text-strong); font: inherit; }
.hf-coupon__field .input-text:focus { outline: 0; }
.hf-coupon button { min-height: 44px; }
.hf-cart__items .actions button.hf-cart__update { min-height: 44px; padding: var(--space-2) var(--space-5); background: transparent; color: var(--text-brand); border: 1px solid var(--border-strong); font-weight: var(--fw-semibold); }
.hf-cart__items .actions button.hf-cart__update:hover { background: var(--bg-muted); }

/* Cross-sells are a full-width RTL rail. They used to render inside the 360px
   totals column, which collapsed four product cards into a vertical sliver. */
.hf-cart__recommendations { width: 100%; min-width: 0; margin: var(--space-9) 0 var(--space-10); }
.hf-cart__recommendations .cross-sells > h2 { margin: 0 0 var(--space-5); color: var(--text-strong); font-size: var(--fs-h3); text-align: start; }
.woocommerce .hf-cart__recommendations ul.products.products { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: clamp(250px, 27vw, 320px); gap: var(--space-5); width: 100%; margin: 0; padding: 0 0 var(--space-4); overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: inline mandatory; scroll-padding-inline: var(--space-2); direction: rtl; scrollbar-width: thin; scrollbar-color: var(--olive-500) var(--bg-muted); }
.woocommerce .hf-cart__recommendations ul.products::before,
.woocommerce .hf-cart__recommendations ul.products::after { content: none; }
.woocommerce .hf-cart__recommendations ul.products li.product.product { float: none; clear: none; width: auto; min-width: 0; margin: 0; scroll-snap-align: start; direction: rtl; }
.hf-cart__recommendations ul.products::-webkit-scrollbar { height: 8px; }
.hf-cart__recommendations ul.products::-webkit-scrollbar-track { background: var(--bg-muted); border-radius: var(--radius-pill); }
.hf-cart__recommendations ul.products::-webkit-scrollbar-thumb { background: var(--olive-500); border-radius: var(--radius-pill); }

/* summary card */
.hf-summary { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-6);  }
.hf-summary__title { margin: 0 0 var(--space-4); font-size: var(--fs-h4); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-summary__table { width: 100%; border-collapse: collapse; margin: 0 0 var(--space-5); }
.hf-summary__table th { text-align: start; font-weight: var(--fw-regular); color: var(--text-body); padding: var(--space-2) 0; }
.hf-summary__table td { text-align: end; color: var(--text-strong); padding: var(--space-2) 0; }
.hf-summary__shipping-tbd td { color: var(--text-muted); font-size: var(--fs-sm); }
.hf-summary__calc td { padding-top: 0; text-align: start; }
.hf-shipping-calc summary { cursor: pointer; color: var(--text-brand); font-size: var(--fs-sm); font-weight: var(--fw-semibold); padding: var(--space-2) 0; }
.hf-shipping-calc[open] summary { margin-bottom: var(--space-2); }
.hf-shipping-calc .shipping-calculator-form { display: grid; gap: var(--space-3); }
.hf-summary__table .order-total th { font-weight: var(--fw-semibold); color: var(--text-strong); border-top: 1px solid var(--border-default); padding-top: var(--space-3); }
.hf-summary__table .order-total td { font-weight: var(--fw-semibold); color: var(--text-price); font-size: var(--fs-lead); border-top: 1px solid var(--border-default); padding-top: var(--space-3); }
.hf-summary .wc-proceed-to-checkout { display: grid; gap: var(--space-3); }
.hf-summary .wc-proceed-to-checkout .checkout-button { width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.hf-summary__reassure { display: flex; gap: var(--space-2); align-items: flex-start; margin: 0; font-size: var(--fs-sm); color: var(--text-body); line-height: 1.6; }
.hf-summary__reassure i { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--text-brand); }
.hf-delivery-eta { color: var(--text-muted); }
.hf-cart__continue { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; color: var(--text-brand); font-weight: var(--fw-semibold); }
.hf-cart__continue:hover { color: var(--text-strong); }

/* trust + pay logos band */
.hf-cart__foot { margin-top: var(--space-10); display: grid; gap: var(--space-6); }
.hf-paylogos { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.hf-paylogos li { padding: var(--space-1) var(--space-3); border: 1px solid var(--border-default); border-radius: var(--radius-pill); color: var(--text-muted); font-size: var(--fs-xs); letter-spacing: var(--ls-wide); }

/* WC notices (made-to-order flow message etc.) */
.woocommerce-info, .woocommerce-message, .woocommerce-noreviews { margin: 0 0 var(--space-6); padding: var(--space-4) var(--space-5); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-muted); color: var(--text-body); font-size: var(--fs-sm); line-height: var(--lh-snug); list-style: none; }
.woocommerce-message { background: var(--success-bg); }
/* WC puts its ::before icon 1.5em in from the start edge; the padding above sat under it and the icon covered the first word. */
.woocommerce-info, .woocommerce-message { padding-inline-start: 3.5em; }
.woocommerce-error { margin: 0 0 var(--space-6); padding: var(--space-4) var(--space-5); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--danger-bg); color: var(--text-body); font-size: var(--fs-sm); list-style: none; }

/* Cart: one column with card rows up to 1099px. Two columns (items + a 360px
   summary) need ~1100px; between 768 and 1099 the table could not shrink and,
   on this RTL page, pushed the summary and «التقدم لإتمام الطلب» off the left
   edge (1.10.4, iPad portrait 820px). Tablets now get the phone layout. */
@media (max-width: 1099px) {
  .hf-cart { grid-template-columns: 1fr; gap: var(--space-8); }
  .hf-cart__summary { position: static; }
  .hf-cart__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .hf-cart__table tbody, .hf-cart__table tr, .hf-cart__table td { display: block; }
  /* Each line item becomes a card: photo, name, price, quantity, subtotal and
     a reachable remove button. A bare bottom border read as a squashed table
     once the photo came back. */
  .hf-cart__table tr.woocommerce-cart-form__cart-item { position: relative; display: grid; grid-template-columns: 80px 1fr; gap: var(--space-1) var(--space-4); margin-bottom: var(--space-3); padding: var(--space-4); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-card);  }
  .woocommerce .hf-cart__table tr:nth-child(2n) td { background: transparent; }
  .hf-cart__table tr.woocommerce-cart-form__cart-item td { padding: 0; border: 0; }
  .hf-cart__table .product-thumbnail { grid-row: 1 / span 4; width: auto; }
  .hf-cart__table .product-thumbnail img { width: 80px; height: 80px; }
  .hf-cart__table .product-remove { position: absolute; inset-inline-end: var(--space-2); top: var(--space-2); }
  /* woocommerce-smallscreen.css turns every cart cell into a labelled block:
     it injects `content: attr(data-title) ": "` with float:right on td::before
     (0,3,2) and forces text-align:left!important -- on an RTL page, over a grid
     the theme lays out itself. That is the text landing on top of itself below
     768px. Drop WooCommerce's label everywhere, keep the theme's on the two
     cells that want one, and put the alignment back to the reading direction. */
  .woocommerce .hf-cart__table.hf-cart__table tr td { text-align: start; }
  .woocommerce .hf-cart__table tr td::before { content: none; float: none; }
  .woocommerce .hf-cart__table td.product-price::before,
  .woocommerce .hf-cart__table td.product-subtotal::before { content: attr(data-title) ": "; float: none; color: var(--text-muted); font-size: var(--fs-xs); }
  .woocommerce .hf-cart__table td.product-thumbnail { display: block; }
  .hf-cart__table td.actions { display: block; padding-top: var(--space-5); }
  .hf-coupon { flex-direction: column; align-items: stretch; }
  .hf-coupon__field, .hf-coupon button, .hf-cart__items .actions button.hf-cart__update { width: 100%; }
  .hf-coupon__field { justify-content: flex-start; }
  /* Mobile cart: the line-item table is wider than a 390px column; the column
     may shrink and the table scrolls inside its own box instead of being clipped. */
  .hf-cart { grid-template-columns: minmax(0, 1fr); }
  /* The scroll box is LTR so its overflow scrolls (RTL overflow to the left is unreachable);
     the table keeps the reading direction. */
  .hf-cart__items { min-width: 0; overflow-x: auto; direction: ltr; }
  .hf-cart__items .hf-cart__table { direction: rtl; }
  .hf-coupon, .hf-coupon__field { width: 100%; min-width: 0; max-width: 100%; }
  .hf-coupon__field .input-text { min-width: 0; flex: 1 1 auto; width: 100%; }
}

@media (max-width: 767px) {
  .woocommerce .hf-cart__recommendations ul.products { grid-auto-columns: minmax(240px, 82vw); gap: var(--space-4); }
}

/* --- checkout --- */

/* shared reassurance note (deposit reminder etc.) */
.hf-note { display: flex; gap: var(--space-3); margin: var(--space-5) 0; padding: var(--space-4) var(--space-5); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-muted); color: var(--text-body); font-size: var(--fs-sm); line-height: var(--lh-snug); }
.hf-note i { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--ink-2); }

/* 3-step indicator — horizontal variant overriding the vertical base .hf-steps */
.hf-steps--checkout { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0 0 var(--space-8); padding: 0; list-style: none; counter-reset: none; }
.hf-steps--checkout .hf-steps__step { position: static; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); flex: 1 1 0; min-height: 0; padding: 0; text-align: center; color: var(--text-muted); }
.hf-steps--checkout .hf-steps__step::before { content: none; }
.hf-steps--checkout .hf-steps__dot { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-pill); background: var(--bg-muted); border: 1px solid var(--border-default); color: var(--text-muted); font-weight: var(--fw-semibold); }
.hf-steps--checkout .hf-steps__dot i { width: 18px; height: 18px; }
.hf-steps--checkout .hf-steps__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.hf-steps--checkout .is-done .hf-steps__dot { background: var(--action); border-color: var(--action); color: var(--on-action); }
.hf-steps--checkout .is-done { color: var(--text-body); }
.hf-steps--checkout .is-current .hf-steps__dot { background: var(--surface-card); border-color: var(--action); border-width: 2px; color: var(--text-brand); }
.hf-steps--checkout .is-current { color: var(--text-strong); }

/* two-column layout: form + sticky summary */
.hf-checkout { display: grid; grid-template-columns: 1fr 380px; gap: var(--space-10); align-items: start; }
.hf-checkout__form, .hf-checkout__summary { min-width: 0; }
.hf-checkout__summary { position: sticky; top: var(--space-6); background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-6);  }
.hf-checkout__summary #order_review_heading { margin: 0 0 var(--space-4); font-size: var(--fs-h4); font-weight: var(--fw-semibold); color: var(--text-strong); }

/* customer detail fields */
.hf-checkout .col2-set { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.hf-checkout .col2-set .col-1, .hf-checkout .col2-set .col-2 { min-width: 0; }
.hf-checkout #customer_details h3 { margin: 0 0 var(--space-4); font-size: var(--fs-h4); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-checkout .woocommerce-additional-fields { margin-top: var(--space-6); }
.hf-checkout .form-row { display: flex; flex-direction: column; gap: var(--space-1); margin: 0 0 var(--space-4); padding: 0; }
.hf-checkout .form-row label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-body); }
.hf-checkout .form-row .required { color: var(--danger); border: 0; }
.hf-checkout .form-row .input-text,
.hf-checkout .form-row select,
.hf-checkout .form-row textarea,
.hf-checkout .select2-selection { width: 100%; min-height: 44px; padding: var(--space-2) var(--space-3); border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: var(--surface-card); color: var(--text-strong); font: inherit; }
.hf-checkout .form-row textarea { min-height: 88px; padding: var(--space-3); resize: vertical; }
.hf-checkout .form-row .input-text:focus,
.hf-checkout .form-row select:focus,
.hf-checkout .form-row textarea:focus { outline: none; border-color: var(--action); box-shadow: var(--focus-shadow); }
.hf-checkout .woocommerce-input-wrapper { display: block; }
/* selectWoo hides the native governorate <select> with position:absolute but no
   width, so WooCommerce's width:100% turned it into a page-wide box anchored
   outside the RTL form: a 19px sideways scroll on every phone checkout. */
.woocommerce form .form-row .woocommerce-input-wrapper { position: relative; }
.hf-checkout #ship-to-different-address label { display: flex; align-items: center; gap: var(--space-2); font-weight: var(--fw-semibold); }

/* choice cards — WC's #shipping_method / ul.wc_payment_methods list items */
.hf-checkout #shipping_method li,
.woocommerce-checkout #payment ul.wc_payment_methods li { list-style: none; margin: 0 0 var(--space-3); padding: var(--space-4); border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--surface-card); transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.hf-checkout #shipping_method, .woocommerce-checkout #payment ul.wc_payment_methods { margin: 0; padding: 0; }
.hf-checkout #shipping_method li label,
.woocommerce-checkout #payment ul.wc_payment_methods li > label { display: flex; align-items: center; gap: var(--space-3); margin: 0; font-weight: var(--fw-semibold); color: var(--text-strong); cursor: pointer; }
.hf-checkout #shipping_method li input[type="radio"],
.woocommerce-checkout #payment ul.wc_payment_methods li input[type="radio"] { width: 20px; height: 20px; accent-color: var(--action); flex: none; }
.hf-checkout #shipping_method li:has(input:checked),
.woocommerce-checkout #payment ul.wc_payment_methods li:has(input:checked) { border-color: var(--action);  background: var(--bg-muted); }
.woocommerce-checkout #payment ul.wc_payment_methods li.hf-choice--soon { opacity: 0.55; }
.hf-choice__hint { display: block; margin: var(--space-1) 0 0; font-size: var(--fs-sm); font-weight: var(--fw-regular); color: var(--text-muted); }
.woocommerce-checkout #payment .payment_box { margin: var(--space-3) 0 0; padding: var(--space-3); border-radius: var(--radius-sm); background: var(--bg-muted); font-size: var(--fs-sm); color: var(--text-body); }
.woocommerce-checkout #payment .payment_box p { margin: 0; }

/* order summary review table */
/* table-layout: fixed so the long fallback shipping note ("يُحدَّد بعد تأكيد
   الطلب") in the totals column can't force auto table-layout to steal width
   from the product column and crush the thumbnail + name together. */
.hf-checkout__review { width: 100%; border-collapse: collapse; margin: 0 0 var(--space-5); table-layout: fixed; }
.hf-checkout__review th.product-name, .hf-checkout__review td.product-name { width: 56%; }
.hf-checkout__review th.product-total, .hf-checkout__review td.product-total { width: 44%; }
.hf-checkout__review thead th { padding: 0 0 var(--space-2); text-align: start; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-muted); border-bottom: 1px solid var(--border-default); }
.hf-checkout__review thead th.product-total { text-align: end; }
.hf-checkout__review tbody td { padding: var(--space-3) 0; border-bottom: 1px solid var(--border-subtle); vertical-align: top; color: var(--text-body); }
/* Stays a table cell (display:flex took it out of the fixed column widths and squeezed the name to one word per line); the thumb floats beside the text. */
.hf-checkout__review-thumb { float: inline-end; margin-inline-start: var(--space-3); }
.hf-checkout__review td.product-name .hf-checkout__review-info { overflow: hidden; }
.hf-checkout__review-thumb img { width: 64px; height: 64px; object-fit: contain; border-radius: var(--radius-sm); display: block; }
.hf-checkout__review-info { display: block; font-size: var(--fs-sm); color: var(--text-strong); }
.hf-checkout__review .product-quantity { color: var(--text-muted); font-weight: var(--fw-regular); }
.hf-checkout__review td.product-total { text-align: end; white-space: normal; font-weight: var(--fw-semibold); color: var(--text-price); }
.hf-checkout__review tfoot th { text-align: start; font-weight: var(--fw-regular); color: var(--text-body); padding: var(--space-2) 0; }
.hf-checkout__review tfoot td { text-align: end; color: var(--text-strong); padding: var(--space-2) 0; }
.hf-checkout__review .hf-checkout__shipping-tbd td, .hf-checkout__review .hf-checkout__shipping-tbd th { color: var(--text-muted); font-size: var(--fs-sm); }
.hf-checkout__review .order-total th { font-weight: var(--fw-semibold); color: var(--text-strong); border-top: 1px solid var(--border-default); padding-top: var(--space-3); }
.hf-checkout__review .order-total td { font-weight: var(--fw-semibold); color: var(--text-price); font-size: var(--fs-lead); border-top: 1px solid var(--border-default); padding-top: var(--space-3); }

/* terms + place order + SSL */
.hf-checkout .woocommerce-terms-and-conditions-wrapper { margin: 0 0 var(--space-4); font-size: var(--fs-sm); }
.hf-checkout .woocommerce-terms-and-conditions-wrapper .woocommerce-form__label-for-checkbox { display: flex; gap: var(--space-2); align-items: flex-start; line-height: var(--lh-snug); }
.hf-checkout .woocommerce-terms-and-conditions-wrapper input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--action); flex: none; }
.hf-checkout #place_order { width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; font-weight: var(--fw-semibold); }
.hf-checkout__ssl { display: flex; align-items: center; justify-content: center; gap: var(--space-2); margin: var(--space-3) 0 0; font-size: var(--fs-sm); color: var(--text-muted); }
.hf-checkout__ssl i { width: 16px; height: 16px; color: var(--success); }
/* What happens after the order: four steps on a thin rail. */

@media (max-width: 1023px) {
  .hf-checkout { grid-template-columns: 1fr; gap: var(--space-8); }
  .hf-checkout__summary { position: static; }
  .hf-checkout .col2-set { grid-template-columns: 1fr; }
  .hf-steps--checkout .hf-steps__dot { width: 32px; height: 32px; }
  .hf-steps--checkout .hf-steps__label { font-size: var(--fs-xs); }
}

/* Checkout visual refresh — matches the approved H-Furnitures checkout mockup. */
.woocommerce-checkout .hf-prose > article > h1:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.woocommerce-checkout .hf-prose { max-width: 1640px; }
.woocommerce-checkout .hf-section { padding-block-start: clamp(28px, 4vw, 56px); }
.woocommerce-checkout .woocommerce-notices-wrapper,
.woocommerce-checkout .woocommerce-info { max-width: 1180px; margin-inline: auto; }
.woocommerce-checkout .woocommerce-info { border-radius: var(--radius-md); border: 1px solid var(--border-subtle); background: var(--bg-muted); color: var(--text-body); }

.woocommerce-checkout .hf-steps--checkout { max-width: 660px; margin: 0 auto clamp(28px, 4vw, 52px); align-items: flex-start; }
.woocommerce-checkout .hf-steps--checkout .hf-steps__step { position: relative; }
.woocommerce-checkout .hf-steps--checkout .hf-steps__step:not(:last-child)::after { content: ""; position: absolute; top: 20px; inset-inline-start: calc(50% + 32px); width: calc(100% - 64px); height: 1px; background: var(--line-strong); }
.woocommerce-checkout .hf-steps--checkout .hf-steps__dot { width: 48px; height: 48px; background: var(--surface-card);  }
.woocommerce-checkout .hf-steps--checkout .is-done .hf-steps__dot,
.woocommerce-checkout .hf-steps--checkout .is-current .hf-steps__dot { background: var(--action-hover); border-color: var(--action-hover); color: var(--on-action); }
.woocommerce-checkout .hf-steps--checkout .is-current .hf-steps__dot {  }

.hf-checkout { grid-template-columns: minmax(0, 1fr) minmax(320px, 430px); gap: clamp(28px, 5vw, 72px); direction: rtl; align-items: start; }
.hf-checkout__form { display: flex; flex-direction: column; gap: var(--space-6); }
.hf-checkout > .hf-checkout__form { grid-column: 1; grid-row: 1; }
.hf-checkout > .hf-checkout__summary { grid-column: 2; grid-row: 1 / span 2; }
.hf-checkout > .hf-checkout__payment-panel { grid-column: 1; grid-row: 2; min-width: 0; }
.hf-checkout .hf-country-field { display: none; }
.hf-checkout__brief { padding: var(--space-4); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--surface-card); }
.hf-checkout__brief h2 { margin: 0 0 var(--space-2); color: var(--text-strong); font-size: var(--fs-lead); }
.hf-checkout__brief dl { display: grid; gap: var(--space-1); margin: 0; font-size: var(--fs-sm); }
.hf-checkout__brief dl > div { display: flex; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.hf-checkout__brief dd { margin: 0; font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-checkout__brief p { margin: var(--space-2) 0 0; font-size: var(--fs-sm); color: var(--text-muted); }
.hf-checkout__heading { text-align: start; }
.hf-checkout__heading h1 { margin: 0; color: var(--text-strong); font-size: var(--fs-h1); line-height: var(--lh-heading); font-weight: var(--fw-semibold); }
.hf-checkout__heading h1::after { content: ""; display: block; width: 56px; height: 2px; margin-block: var(--space-3) 0; margin-inline: 0 auto; background: var(--action); }

.hf-checkout .col2-set { display: block; }
.hf-checkout .col2-set .col-2 { margin-top: var(--space-6); }
.hf-checkout #customer_details h3,
.hf-checkout .woocommerce-shipping-fields h3,
.hf-checkout .woocommerce-additional-fields h3,
.hf-checkout__payment-panel h2 { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); margin: 0 0 var(--space-4); color: var(--text-strong); font-size: var(--fs-lead); font-weight: var(--fw-semibold); }
.hf-checkout__payment-panel h2 i { width: 20px; height: 20px; color: var(--ink-2); }
.hf-checkout .woocommerce-billing-fields__field-wrapper,
.hf-checkout .woocommerce-shipping-fields__field-wrapper { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-6); }
.hf-checkout .woocommerce-billing-fields__field-wrapper::before,
.hf-checkout .woocommerce-billing-fields__field-wrapper::after,
.hf-checkout .woocommerce-shipping-fields__field-wrapper::before,
.hf-checkout .woocommerce-shipping-fields__field-wrapper::after { content: none; }
.hf-checkout .form-row { margin: 0; }
.hf-checkout .form-row-wide,
.hf-checkout #billing_address_1_field,
.hf-checkout #shipping_address_1_field,
.hf-checkout #order_comments_field,
.hf-checkout .hf-delivery-access__check { grid-column: 1 / -1; }
.hf-checkout .form-row label { align-self: flex-end; font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.hf-checkout .form-row .input-text,
.hf-checkout .form-row select,
.hf-checkout .form-row textarea,
.hf-checkout .select2-selection { min-height: 52px; border-radius: var(--radius-sm); border-color: var(--line-strong); background: color-mix(in srgb, var(--surface-card) 74%, transparent);  text-align: end; }
.hf-checkout .form-row textarea { min-height: 86px; }
.hf-checkout .form-row .description { margin-top: 4px; color: var(--text-muted); font-size: var(--fs-xs); text-align: end; }
.hf-checkout .select2-container--default .select2-selection--single { display: grid; align-items: center; position: relative; box-sizing: border-box; block-size: auto; padding: 0; }
.hf-checkout .select2-container--default .select2-selection--single .select2-selection__rendered { padding-inline: var(--space-3) var(--space-8); color: var(--text-strong); line-height: var(--lh-body); text-align: start; }
.hf-checkout .select2-container--default .select2-selection--single .select2-selection__arrow { top: 50%; inset-inline: auto var(--space-2); transform: translateY(-50%); }

.hf-checkout__payment-panel,
.hf-delivery-access { padding: var(--space-5); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: color-mix(in srgb, var(--surface-card) 62%, transparent);  }
.hf-delivery-access { margin: 0; }
.hf-delivery-access__hint { text-align: end; }
.hf-checkout #payment { background: transparent; border: 0; border-radius: 0; }
.hf-checkout #payment div.form-row { padding: 0; }
.hf-checkout #payment ul.wc_payment_methods { border: 0; padding: 0; }
.hf-checkout #shipping_method li,
.woocommerce-checkout #payment ul.wc_payment_methods li { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--surface-card) 78%, transparent); }
.woocommerce-checkout #payment ul.wc_payment_methods li > label { flex-direction: row-reverse; justify-content: flex-end; text-align: end; }
.woocommerce-checkout #payment .payment_box { text-align: end; }
/* Shipping in the order summary: plain text, not the choice card the form
   uses, and only the pending note — the card squeezed the long method name
   into one word per line in the 44% column. */
.hf-checkout .hf-checkout__review #shipping_method li { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.hf-checkout .hf-checkout__review #shipping_method li label { display: inline; font-weight: var(--fw-regular); }
.hf-checkout__review .hf-ship-method { display: none; }
/* WooCommerce's lilac payment note (#dcd7e2, (1,2,2)) beat the theme's muted panel. */
.woocommerce-checkout #payment div.payment_box { background: var(--bg-muted); color: var(--text-body); }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--bg-muted); }


.hf-checkout__summary { position: sticky; top: var(--space-6); align-self: start; border-radius: var(--radius-md); padding: 0; overflow: hidden;  }
.hf-checkout__summary #order_review_heading { margin: 0; padding: var(--space-6); border-bottom: 1px solid var(--border-subtle); text-align: end; font-size: var(--fs-h3); }
.hf-checkout__summary #order_review { padding: var(--space-5); }
.hf-checkout__review thead th { font-size: var(--fs-sm); }
.hf-checkout__review td.product-name { display: table-cell; text-align: start; }
.hf-checkout__review-thumb img { border-radius: var(--radius-sm); }

.hf-checkout__review-info a,
.hf-checkout__review-info .product-name { color: var(--text-strong); font-weight: var(--fw-semibold); text-decoration: none; }
.hf-checkout__review tbody td { padding-block: var(--space-4); }
.hf-checkout__review .order-total th,
.hf-checkout__review .order-total td { padding-top: var(--space-5); font-size: var(--fs-lead); }
.hf-checkout__trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin: var(--space-5) 0 0; padding: var(--space-5) 0 0; border-top: 1px solid var(--border-subtle); list-style: none; text-align: center; }
/* The list now sits after #order_review (form-checkout.php), so it takes that box's side padding itself. */
.hf-checkout__summary > .hf-checkout__trust { margin: 0 var(--space-5) var(--space-5); }
.hf-checkout__trust li { display: grid; justify-items: center; gap: var(--space-2); color: var(--text-body); font-size: var(--fs-xs); line-height: var(--lh-snug); }
.hf-checkout__trust i { width: 26px; height: 26px; color: var(--ink-2); }
.hf-mto-ack { padding: 0; border: 0; background: transparent; color: var(--text-body); }
.hf-mto-ack .hf-mto-ack__check label { justify-content: flex-end; font-weight: var(--fw-semibold); }
/* HF-031 (UX/CRO Sprint): unify #place_order on the brand-olive token used
 * for every other primary CTA (Audit #07's PDP button, header search, etc.)
 * instead of the one-off --walnut-800 brown. Scope: this button only. */
.hf-checkout #place_order { min-height: 58px; border-radius: var(--radius-sm); background: var(--action); border-color: var(--action); color: var(--on-action); font-size: var(--fs-lead); }
.hf-checkout #place_order:hover { background: var(--action-hover); border-color: var(--action-hover); }
/* HF-031 R2 (superseded by R3 below): the sitewide global `:focus-visible`
 * rule (line ~87) should already cover this button, but Staging's post-purge
 * Live Acceptance found the focused button computed outline:none AND
 * box-shadow:none, even though this same fix's color/background change
 * delivered correctly -- isolating the failure to that one pseudo-class-
 * conditional declaration rather than the button's unconditional styling. A
 * dedicated `#place_order:focus-visible { box-shadow: ...; }` rule (id +
 * pseudo-class specificity, no !important) was added on the theory that
 * specificity alone was sufficient. A second live manual test (real keyboard
 * Tab, DevTools computed-style read) proved that theory wrong: `:focus-visible`
 * matched, but the LIVE computed box-shadow was still `none` and outline-style
 * was still `none` -- two independent, CSS-correct, server-byte-verified
 * attempts have now both failed to render live for a reason that could not be
 * pinned to a specific cascade rule, delivery layer, or token failure (every
 * candidate -- missing rule, broken token chain, WooCommerce-core conflict,
 * theme-selector conflict -- was checked and ruled out both times). This
 * two-strikes history is the cascade-analysis justification for using
 * !important below: normal specificity/source-order has now been
 * empirically shown insufficient in this live environment for this specific
 * button/state combination. */
/* HF-031 R3 (guaranteed fallback): explicit longhand outline properties
 * (not the `outline` shorthand, which resets width/color to their initial
 * values and was one plausible -- though unconfirmed -- contributor to the
 * R2 failure) on BOTH `:focus` and `:focus-visible`, so the indicator does
 * not depend on `:focus-visible` support/matching alone and renders
 * identically for keyboard and mouse activation (accessibility guarantee
 * takes priority over hiding the ring from mouse users here, per the
 * approved criterion). `--text-strong` is reused rather than a new color:
 * it already flips near-black-on-light / near-white-on-dark
 * (`assets/css/ds/colors.css`), giving a solid, high-contrast ring against
 * the page background in both themes without a new dark-mode-scoped rule.
 * The box-shadow is a second, independent visual layer (not a dependency of
 * the outline) using the existing `--focus-ring` token for a soft outer glow
 * -- if one of the two properties is ever again dropped by whatever caused
 * R2's failure, the other still renders a visible indicator. */
.hf-checkout #place_order:focus,
.hf-checkout #place_order:focus-visible {
	outline-style: solid !important;
	outline-width: 3px !important;
	outline-color: var(--text-strong) !important;
	outline-offset: 3px !important;
	box-shadow: 0 0 0 6px var(--focus-ring) !important;
	border-radius: var(--radius-sm);
}
.hf-checkout__security { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); margin: var(--space-3) 0 0; padding: var(--space-3); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--bg-muted), var(--surface-card) 35%); list-style: none; color: var(--text-muted); font-size: var(--fs-xs); }
.hf-checkout__security li { display: inline-flex; justify-content: center; align-items: center; gap: var(--space-2); text-align: center; }
.hf-checkout__security i { width: 16px; height: 16px; color: var(--success); flex: none; }

@media (max-width: 1023px) {
  .hf-checkout { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: var(--space-7); }
  .hf-checkout__trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* The summary column is at most 360px here: the photo goes above the name and the total drops a size, or the name wraps word by word and the total runs past the card. */
@media (min-width: 768px) and (max-width: 1023px) {
  .hf-checkout__review-thumb { float: none; margin: 0 0 var(--space-2); }
  .hf-checkout__review .order-total th, .hf-checkout__review .order-total td { font-size: var(--fs-body); }
}

@media (max-width: 1023px) {
  .woocommerce-checkout .hf-section { padding-block-start: var(--space-6); }
  .woocommerce-checkout .hf-steps--checkout { margin-bottom: var(--space-7); }
  .woocommerce-checkout .hf-steps--checkout .hf-steps__step:not(:last-child)::after { top: 16px; inset-inline-start: calc(50% + 24px); width: calc(100% - 48px); }
  .woocommerce-checkout .hf-steps--checkout .hf-steps__dot { width: 36px; height: 36px; }
  .hf-checkout { display: flex; flex-direction: column; gap: var(--space-6); }
  .hf-checkout__summary { order: 2; width: 100%; position: static; }
  .hf-checkout__form { order: 1; width: 100%; }
  .hf-checkout > .hf-checkout__payment-panel { order: 3; width: 100%; }
  .hf-checkout__heading { text-align: start; }
  .hf-checkout__heading h1::after { margin-inline: 0 auto; }
  .hf-checkout .woocommerce-billing-fields__field-wrapper,
  .hf-checkout .woocommerce-shipping-fields__field-wrapper { grid-template-columns: 1fr; }
  .hf-checkout__payment-panel,
  .hf-delivery-access,
  .hf-checkout__summary #order_review { padding: var(--space-4); }
  .hf-checkout__summary #order_review_heading { padding: var(--space-4); }
  .hf-checkout__summary > .hf-checkout__trust { margin-inline: var(--space-4); margin-bottom: var(--space-4); }
}

@media (max-width: 767px) {
  .hf-checkout .form-row .input-text,
  .hf-checkout .form-row select,
  .hf-checkout .form-row textarea,
  .hf-checkout .select2-selection { min-height: 48px; }

  .hf-checkout__trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hf-checkout__security { grid-template-columns: 1fr; }
}

/* --- account --- */
/* HF-036 (corrected 2026-09-26, live-DOM-confirmed on Production): the real
 * cause of the reported "navigation takes ~2/3 of the page, content squeezed"
 * symptom was never the float system below -- it was `.hf-prose` (see line
 * ~292), a 850px reading-width cap meant for long-form text pages, applied to
 * every page's `<article>` including `/my-account/` and all its endpoints.
 * That collapsed the *entire* account area (nav + content together) into an
 * 850px column floating in the middle of the viewport, which independent
 * review (`LIVE-REVIEW-HF036-01`) correctly flagged the original float theory
 * as unable to explain: a float inside `.woocommerce-MyAccount-content` can't
 * resize its sibling `.woocommerce-MyAccount-navigation`, by CSS mechanics.
 * `.woocommerce-checkout` already had its own override for this exact
 * problem (`.woocommerce-checkout .hf-prose { max-width: 1640px; }`, line
 * ~1033); it was simply never extended to `.woocommerce-account`. Fixed the
 * same way, but reusing the site's own standard content width instead of a
 * new magic number. */
.woocommerce-account .hf-prose { max-width: var(--hf-content); }
.woocommerce-account .woocommerce { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--space-8); align-items: start; }
/* HF-036, the rest of it (measured live, 2026-09-26): WooCommerce gives
 * `.woocommerce` a float-era clearfix — ::before and ::after with
 * `content:" "; display:table`. Inside a grid a generated box is a grid item,
 * so ::before quietly took the first cell (the 260px track), pushed the nav
 * into the wide track, and wrapped the account content onto a second row in
 * the 260px track: nav huge, content squeezed underneath it. Widening
 * .hf-prose (above) was needed too, but on its own it only made the wrong
 * layout wider. Same fix for .col2-set, which is a flex row below. */
.woocommerce-account .woocommerce::before,
.woocommerce-account .woocommerce::after,
.woocommerce-account .col2-set::before,
.woocommerce-account .col2-set::after { content: none; }
.woocommerce-account .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
.woocommerce-account .woocommerce-MyAccount-content { min-width: 0; }
/* Logged out (login, lost password) there is no account nav, so the two
 * tracks above put the "Login" heading alone in the 260px column and the form
 * beside it. One centred column instead; wide again only when registration is
 * on and WooCommerce shows login and register side by side (.col2-set). */
body:not(.logged-in).woocommerce-account .woocommerce { display: block; max-width: 34rem; margin-inline: auto; }
body:not(.logged-in).woocommerce-account .woocommerce:has(> .col2-set) { max-width: none; }
/* Separate, still-valid issue: WooCommerce core's own float-based two-column
 * system (`.col2-set`/`.col-1`/`.col-2`/`.form-row-first`/`.form-row-last`
 * -- confirmed against WooCommerce 11.1.1's own woocommerce-layout.scss:
 * `.form-row-first,.form-row-last{width:47%;float:left/right}`,
 * `.col2-set .col-1,.col-2{float:left/right;width:48%}`) was never
 * neutralised for `.woocommerce-account`, only for `.hf-checkout` (line
 * ~785). This affects Edit Account's paired name fields
 * (`woocommerce-EditAccountForm`), Edit Address's paired fields
 * (`woocommerce-address-fields__field-wrapper`), and the Addresses
 * overview's two cards (`col2-set`) -- real, independent bugs, just not the
 * cause of the nav-width symptom above. Reset them, then give the same
 * elements a flex-wrap layout (not a fixed pixel width -- `flex-basis` is a
 * sizing hint the item can still shrink/grow from) so paired fields/cards
 * sit side by side when there's room and wrap to one column when there
 * isn't, without reintroducing WooCommerce's fixed float percentages. */
html .woocommerce-account .col2-set,
html .woocommerce-account .form-row-first,
html .woocommerce-account .form-row-last,
html .woocommerce-account .col2-set .col-1,
html .woocommerce-account .col2-set .col-2,
html .woocommerce-account .col-1,
html .woocommerce-account .col-2 {
	float: none;
	width: auto;
	clear: none;
}
.woocommerce-account .col2-set,
.woocommerce-account .woocommerce-EditAccountForm,
.woocommerce-account .woocommerce-address-fields__field-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4);
}
.woocommerce-account .col2-set > .col-1,
.woocommerce-account .col2-set > .col-2,
.woocommerce-account .woocommerce-EditAccountForm > .form-row-first,
.woocommerce-account .woocommerce-EditAccountForm > .form-row-last,
.woocommerce-account .woocommerce-address-fields__field-wrapper > .form-row-first,
.woocommerce-account .woocommerce-address-fields__field-wrapper > .form-row-last {
	flex: 1 1 240px;
	min-width: 0;
}
.woocommerce-account .woocommerce-address-fields__field-wrapper > .form-row-wide {
	flex: 1 1 100%;
}
/* form-edit-account.php's real direct children (verified against WooCommerce
 * 11.1.1's actual template) are form-row-first/-last, two more form-row-wide
 * rows, a <fieldset> (password section), a final submit <p>, and three
 * <div class="clear"> clearfix helpers interspersed between them --
 * everything except the paired name fields should behave as a full-width
 * row, not just the two elements initially handled. A `:not()` rule covers
 * all of them, including any future hook-added child, instead of enumerating
 * each one (regression gap flagged by independent review, `LIVE-REVIEW-HF036-01`). */
.woocommerce-account .woocommerce-EditAccountForm > *:not(.form-row-first):not(.form-row-last) {
	flex: 1 1 100%;
}
/* The .clear divs existed only to force a line-break around WooCommerce's
 * float-based fields; floats no longer apply here, so they're inert but
 * still counted by flex-wrap's line-breaking and would otherwise sit in the
 * layout as an empty row (extra vertical gap). Removing them from flow
 * entirely is simpler and safer than trying to size them. */
.woocommerce-account .woocommerce-EditAccountForm > .clear {
	display: none;
}
/* Note: the real /my-account/orders/ endpoint's table already carries
 * WooCommerce core's own `table.shop_table { width: 100% }` (woocommerce.scss);
 * a theme-added `width: 100%` rule here would be redundant dead code
 * (flagged by independent review, `LIVE-REVIEW-HF036-01`) -- intentionally
 * not added. */

/* nav sidebar */
.hf-account__nav { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-4);  }
.hf-account__nav-user { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); padding: var(--space-2) 0 var(--space-4); border-bottom: 1px solid var(--border-subtle); }
.hf-account__avatar { width: 64px; height: 64px; border-radius: var(--radius-pill); object-fit: cover; background: var(--bg-muted); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-lead); font-weight: var(--fw-semibold); color: var(--text-brand); }
.hf-account__nav-name { font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-account__nav ul { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.hf-account__nav li a { display: flex; align-items: center; gap: var(--space-3); min-height: 44px; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--text-body); font-weight: var(--fw-semibold); text-decoration: none; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.hf-account__nav li a i { width: 18px; height: 18px; flex: none; color: var(--text-muted); }
.hf-account__nav li a:hover { background: var(--bg-muted); color: var(--text-strong); }
.hf-account__nav li.is-active a { background: var(--action); color: var(--on-action); }
.hf-account__nav li.is-active a i { color: var(--hf-white); }

/* body */
.hf-account__body { display: flex; flex-direction: column; gap: var(--space-8); }
.hf-account__welcome h2 { margin: 0 0 var(--space-2); color: var(--text-strong); }
.hf-account__welcome p { margin: 0; color: var(--text-muted); }
.hf-account__orders h3, .hf-account__card h3 { margin: 0 0 var(--space-3); font-size: var(--fs-lead); color: var(--text-strong); }

/* orders table */
.hf-account__orders-table { width: 100%; border-collapse: collapse; }
.hf-account__orders-table thead th { padding: 0 0 var(--space-2); text-align: start; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-muted); border-bottom: 1px solid var(--border-default); }
.hf-account__orders-table tbody td { padding: var(--space-3) var(--space-3) var(--space-3) 0; border-bottom: 1px solid var(--border-subtle); color: var(--text-body); vertical-align: middle; }
.hf-account__order-action { text-align: end; }
.hf-account__order-action .hf-button { min-height: 44px; }

/* empty state */
.hf-account__empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding: var(--space-6); background: var(--bg-muted); border-radius: var(--radius-md); }
.hf-account__empty p { margin: 0; color: var(--text-muted); }

/* status pills */
.hf-status { display: inline-block; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap; }
.hf-status--processing { color: var(--info); background: var(--info-bg); }
.hf-status--completed, .hf-status--delivered { color: var(--status-ok-fg); background: var(--success-bg); }
.hf-status--on-hold, .hf-status--pending { color: var(--status-warn-fg); background: var(--warning-bg); }
.hf-status--cancelled, .hf-status--failed { color: var(--status-danger-fg); background: var(--danger-bg); }
.hf-status--refunded, .hf-status--neutral { color: var(--status-muted-fg); background: var(--bg-muted); }

/* info cards */
.hf-account__cards { --hf-cols: 3; --hf-col-min: 16rem; --hf-gap: var(--space-4); --hf-grid-auto: repeat(auto-fill, minmax(min(100%, max(var(--hf-col-min), (100% - (var(--hf-cols) - 1) * var(--hf-gap)) / var(--hf-cols))), 1fr)); display: grid; grid-template-columns: var(--hf-grid-auto); gap: var(--hf-gap); }
.hf-account__card { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-5);  }
.hf-account__card-line { margin: 0 0 var(--space-1); color: var(--text-body); }
.hf-account__card-address { font-style: normal; color: var(--text-body); line-height: var(--lh-body); }
.hf-account__card-link { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 44px; margin-top: var(--space-2); color: var(--text-brand); font-weight: var(--fw-semibold); text-decoration: none; }
.hf-account__card-link i { width: 16px; height: 16px; }
.hf-account__card-link:hover { text-decoration: underline; }

/* WooCommerce's own account screens (Orders, Addresses), dressed like the
 * dashboard above. The dashboard is this theme's template; these two are
 * WooCommerce's untouched ones, so they rendered as a grey bordered table with
 * solid olive "View" buttons and bare address text — visibly a different site
 * one click away. CSS only, on WooCommerce's own classes and data-title
 * attributes: no extra template override to keep in step with WooCommerce. */
.woocommerce-account .woocommerce table.woocommerce-orders-table { margin: 0; border: 0; border-radius: 0; border-collapse: collapse; }
.woocommerce-account .woocommerce table.woocommerce-orders-table thead th { padding: 0 var(--space-3) var(--space-2); background: none; border: 0; border-bottom: 1px solid var(--border-default); text-align: start; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-muted); }
.woocommerce-account .woocommerce table.woocommerce-orders-table tbody :is(td, th) { padding: var(--space-3); background: none; border: 0; border-bottom: 1px solid var(--border-subtle); color: var(--text-body); font-weight: var(--fw-regular); vertical-align: middle; text-align: start; }
.woocommerce-account .woocommerce table.woocommerce-orders-table tbody th a { color: var(--text-strong); font-weight: var(--fw-semibold); text-decoration: none; }
.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions { text-align: end; }
/* Status as coloured text: the cell holds bare text, so it cannot become a
   pill without a template override. Same AA status inks as the dashboard pills.
   Scoped like the cell rule above, or that rule's colour wins. */
.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-status { font-weight: var(--fw-semibold); }
.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__row--status-completed .woocommerce-orders-table__cell-order-status { color: var(--status-ok-fg); }
.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__row--status-processing .woocommerce-orders-table__cell-order-status { color: var(--info); }
.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__row--status-on-hold .woocommerce-orders-table__cell-order-status,
.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__row--status-pending .woocommerce-orders-table__cell-order-status { color: var(--status-warn-fg); }
.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__row--status-cancelled .woocommerce-orders-table__cell-order-status,
.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__row--status-failed .woocommerce-orders-table__cell-order-status { color: var(--status-danger-fg); }
.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__row--status-refunded .woocommerce-orders-table__cell-order-status { color: var(--status-muted-fg); }
/* Row actions are secondary: outlined, like the dashboard's "عرض الطلب". */
.woocommerce-account .woocommerce table.woocommerce-orders-table a.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: 8px 20px; border: 1.5px solid currentColor; border-radius: var(--radius-pill); background: transparent; color: var(--hf-ink-brand); font-weight: var(--fw-semibold); line-height: 1.2; }
.woocommerce-account .woocommerce table.woocommerce-orders-table a.button:hover { background: var(--bg-muted); color: var(--hf-heading); }
.woocommerce-account .woocommerce table.woocommerce-orders-table a.button + a.button { margin-inline-start: var(--space-2); }

.woocommerce-account .woocommerce-Address { padding: var(--space-5); background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);  }
.woocommerce-account .woocommerce-Address-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }
.woocommerce-account .woocommerce-Address-title::before, .woocommerce-account .woocommerce-Address-title::after { content: none; }
.woocommerce-account .woocommerce-Address-title h2 { margin: 0; font-size: var(--fs-lead); color: var(--text-strong); }
.woocommerce-account .woocommerce-Address-title a.edit { float: none; display: inline-flex; align-items: center; min-height: 44px; color: var(--text-brand); font-weight: var(--fw-semibold); text-decoration: none; }
.woocommerce-account .woocommerce-Address-title a.edit:hover { text-decoration: underline; }
.woocommerce-account .woocommerce-Address address { margin: 0; font-style: normal; color: var(--text-body); line-height: var(--lh-body); }
.hf-account__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.hf-account__links a { display: flex; align-items: center; gap: var(--space-3); min-height: 44px; color: var(--text-body); text-decoration: none; }
.hf-account__links a i { width: 18px; height: 18px; color: var(--text-muted); }
.hf-account__links a:hover { color: var(--text-strong); }

.hf-account__body .hf-account-help { background: var(--bg-muted); border-radius: var(--radius-md); padding: var(--space-5); }
.hf-account__body .hf-account-help h3 { margin: 0 0 var(--space-2); }
.hf-account__body .hf-account-help p { margin: 0 0 var(--space-3); color: var(--text-muted); }

@media (max-width: 767px) {
  /* minmax(0, 1fr), not 1fr: a bare 1fr track cannot shrink below its content's
     min-content width, and the account menu below is a single non-wrapping row
     of pills (~890px). That one row was stretching the whole column — menu and
     content alike — to ~890px on a 390px phone; html/body clip overflow, so the
     orders table values, the second address card and every form field were
     silently cut off at the left edge instead of scrolling. */
  .woocommerce-account .woocommerce { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .hf-account__nav { padding: var(--space-3); }
  .hf-account__nav-user { flex-direction: row; text-align: start; padding-bottom: var(--space-3); }
  .hf-account__avatar { width: 44px; height: 44px; }
  .hf-account__nav ul { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: var(--space-2); margin-top: var(--space-3); -webkit-overflow-scrolling: touch; }
  .hf-account__nav li a { white-space: nowrap; border: 1px solid var(--border-default); }
  .hf-account__cards { grid-template-columns: 1fr; }
  .hf-account__orders-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .hf-account__orders-table, .hf-account__orders-table tbody, .hf-account__order-card, .hf-account__orders-table td { display: block; width: 100%; }
  .hf-account__order-card { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: var(--space-3); margin-bottom: var(--space-3); }
  .hf-account__orders-table tbody td { border: 0; padding: var(--space-1) 0; }
  .hf-account__orders-table tbody td[data-label]::before { content: attr(data-label) ": "; font-weight: var(--fw-semibold); color: var(--text-muted); }
  .hf-account__order-action { text-align: start; margin-top: var(--space-2); }

  /* WooCommerce's orders table as one card per order, matching the dashboard.
     WooCommerce's small-screen CSS floats each data-title label to the left,
     which in RTL splits label and value across the width; a flex row keeps
     them paired and readable. */
  .woocommerce-account .woocommerce table.woocommerce-orders-table tbody tr { display: block; margin-bottom: var(--space-3); padding: var(--space-3); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--surface-card); }
  /* Block + floated label, not flex: a cell like Total holds the price AND a
     trailing "for 1 item" text run, and flex made those two separate items and
     pushed them apart. */
  .woocommerce-account .woocommerce table.woocommerce-orders-table tbody :is(td, th) { display: block; padding: var(--space-1) 0; border: 0; }
  .woocommerce-account .woocommerce table.woocommerce-orders-table tbody :is(td, th):is(td, th) { text-align: end; }
  .woocommerce-account .woocommerce table.woocommerce-orders-table tbody :is(td, th)::before { content: attr(data-title); float: inline-start; margin-inline-end: var(--space-3); font-weight: var(--fw-semibold); color: var(--text-muted); }
  .woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions.woocommerce-orders-table__cell-order-actions { margin-top: var(--space-2); text-align: start; }
  .woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions::before { content: none; }
}

/* --- forms and plugin panels drawn inside the theme's pages ------------- */
/* WooCommerce's own forms (account details, addresses, sign-in, lost password,
 * the cart's shipping calculator) take their field colours from these
 * variables, white/black by default: white boxes on the dark page. Checkout has
 * its own .hf-checkout rules. */
:root {
}
/* The password section's heading was #333: 1.4:1 on the dark page. */
.woocommerce-account fieldset legend { color: var(--text-strong); font-weight: var(--fw-semibold); }
/* WooCommerce's account wishlist block colours its notes black at 70%. */
.wc-block-wishlist :is(.wc-block-wishlist__empty, .wc-block-shopper-list-item__quantity) { color: var(--text-muted); }
/* Their eye / chevron icons are black SVGs, lost on a dark field. */
:root[data-hf-theme="dark"] .woocommerce form .show-password-input::before,
:root[data-hf-theme="dark"] .select2-selection__arrow b { filter: invert(.88); }
:root[data-hf-theme="dark"] .woocommerce form .form-row select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D9D9D9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
	:root:not([data-hf-theme="light"]) .woocommerce form .show-password-input::before,
	:root:not([data-hf-theme="light"]) .select2-selection__arrow b { filter: invert(.88); }
	:root:not([data-hf-theme="light"]) .woocommerce form .form-row select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D9D9D9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); }
}

/* Wordfence's passkey and two-factor tabs in My Account draw white and pale-blue
 * cards but let their text inherit the page colour — light on white in dark
 * mode. Its cards, notes, fields and buttons take the theme's tokens instead. */
:is(#wfls-management-embedded, #wfls-passkey-management-embedded) { color: var(--text-body); }
:is(#wfls-management-embedded, #wfls-passkey-management-embedded) .wfls-block { background-color: var(--surface-card); border-color: var(--border-subtle); color: var(--text-body); }
:is(#wfls-management-embedded, #wfls-passkey-management-embedded) :is(.wfls-block-header, .wfls-block-content) { background-color: transparent; color: inherit; }
:is(#wfls-management-embedded, #wfls-passkey-management-embedded) .wfls-block-header-border-bottom { border-bottom-color: var(--border-subtle); }
:is(#wfls-management-embedded, #wfls-passkey-management-embedded) :is(strong, h3, .wfls-block-title, .wfls-passkey-password-auth-choice-title > span) { color: var(--text-strong); }
:is(#wfls-management-embedded, #wfls-passkey-management-embedded) .wfls-passkey-password-auth-choice-title > .wfls-passkey-password-auth-recommended-badge { color: var(--text-brand); border-color: currentColor; }
:is(#wfls-management-embedded, #wfls-passkey-management-embedded) :is(small, .wfls-option-subtitle) { color: var(--text-muted); }
:is(#wfls-management-embedded, #wfls-passkey-management-embedded) :is(a:not(.wfls-btn), .wfls-passkey-information-learn-more, .wfls-passkey-information-list-icon, .wfls-passkey-card-title-icon, .wfls-two-factor-card-title-icon, .wfls-passkey-information-illustration) { color: var(--text-brand); }
#wfls-passkey-management-embedded .wfls-passkey-information { background-color: var(--bg-muted); border-color: var(--border-subtle); color: var(--text-body); }
#wfls-passkey-management-embedded .wfls-passkey-information-list { border-color: var(--border-subtle); }
:is(#wfls-management-embedded, #wfls-passkey-management-embedded) input:is([type="text"], [type="number"], [type="password"], :not([type])) { background-color: var(--surface-card); color: var(--text-strong); border-color: var(--border-default);  }
:is(#wfls-management-embedded, #wfls-passkey-management-embedded) input::placeholder { color: var(--ink-3); opacity: 1; }
:is(#wfls-management-embedded, #wfls-passkey-management-embedded) .wfls-btn-default { background-color: transparent; color: var(--text-strong); border-color: var(--border-strong); }
:is(#wfls-management-embedded, #wfls-passkey-management-embedded) .wfls-btn-default:is(:hover, :focus) { background-color: var(--bg-muted); color: var(--text-strong); border-color: var(--border-strong); }
:is(#wfls-management-embedded, #wfls-passkey-management-embedded) .wfls-btn-primary { background-color: var(--action); border-color: var(--action); color: var(--on-action); }

/* --- track order --- */
.hf-note--error { background: var(--danger-bg); }
.hf-note--error i { color: var(--danger); }

.hf-track { max-width: 860px; }
.hf-track__heading { margin-inline: auto; text-align: center; }
.hf-track__divider { margin: var(--space-3) 0; color: var(--olive-400); font-size: var(--fs-sm); letter-spacing: var(--ls-wider); }

.hf-track__form { display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--space-4); align-items: end; margin-bottom: var(--space-8); }
.hf-track__field { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; }
.hf-track__field label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-track__field input { min-height: 44px; padding: 0 var(--space-3); border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: var(--bg-page); color: var(--text-body); font: inherit; }
.hf-track__field input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.hf-track__form .hf-button { min-height: 44px; gap: var(--space-2); }
.hf-track__form .hf-button i { width: 18px; height: 18px; }

/* status timeline — horizontal on desktop */
.hf-timeline { display: flex; margin: 0 0 var(--space-8); padding: 0; list-style: none; }
.hf-timeline__node { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: 0 var(--space-2); text-align: center; }
.hf-timeline__node::before { content: ""; position: absolute; top: 15px; inset-inline-start: -50%; width: 100%; height: 2px; background: var(--border-default); z-index: 0; }
.hf-timeline__node:first-child::before { display: none; }
.hf-timeline__node.is-done::before { background: var(--action); }
.hf-timeline__dot { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 32px; height: 32px; border: 2px solid var(--border-strong); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-muted); }
.hf-timeline__node.is-done .hf-timeline__dot { border-color: var(--action); background: var(--action); color: var(--on-action); }
.hf-timeline__dot i { width: 16px; height: 16px; }
.hf-timeline__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-muted); }
.hf-timeline__node.is-done .hf-timeline__label { color: var(--text-strong); }
.hf-timeline__date { font-size: var(--fs-xs); color: var(--text-muted); }

/* summary + address cards */
.hf-track__cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.hf-track__summary, .hf-track__address { padding: var(--space-5); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-card);  }
.hf-track__summary h2, .hf-track__address h2 { margin: 0 0 var(--space-4); font-size: var(--fs-lead); color: var(--text-strong); }
.hf-track__summary dl { display: flex; flex-direction: column; gap: var(--space-2); margin: 0 0 var(--space-4); }
.hf-track__summary dl > div { display: flex; justify-content: space-between; gap: var(--space-3); }
.hf-track__summary dt { color: var(--text-muted); }
.hf-track__summary dd { margin: 0; font-weight: var(--fw-semibold); color: var(--text-strong); text-align: end; }
.hf-track__items { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: var(--space-4) 0 0; border-top: 1px solid var(--border-subtle); list-style: none; }
.hf-track__item { display: flex; align-items: center; gap: var(--space-3); }
.hf-track__item-thumb img { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: contain; background: var(--surface-boucle); }
.hf-track__item-name { flex: 1; color: var(--text-body); }
.hf-track__item-qty { color: var(--text-muted); font-size: var(--fs-sm); }
.hf-track__address-name { margin: 0 0 var(--space-1); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-track__address-phone { margin: 0 0 var(--space-2); color: var(--text-body); }
.hf-track__address address { color: var(--text-body); font-style: normal; line-height: var(--lh-body); }

@media (max-width: 1023px) {
  .hf-track__form { grid-template-columns: 1fr; }
  .hf-track__form .hf-button { width: 100%; }
}
@media (max-width: 767px) {
  .hf-timeline { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  .hf-timeline__node { flex-direction: row; align-items: center; width: 100%; padding: 0; text-align: start; }
  .hf-timeline__node::before { top: auto; inset-inline-start: 15px; inset-block-start: -50%; width: 2px; height: 100%; }
  .hf-track__cards { grid-template-columns: 1fr; }
}

/* --- about --- */
.hf-about-hero { position: relative; }
.hf-about-hero__capsule { margin-top: var(--space-4); }
.hf-about-heading { margin: 0 0 var(--space-6); color: var(--text-strong); }
.hf-about-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--space-8), 5vw, var(--space-16)); align-items: center; }
.hf-about-split__text h2 { margin: 0 0 var(--space-4); font-size: var(--fs-h2); font-weight: var(--fw-semibold); line-height: var(--lh-tight); color: var(--text-strong); }
.hf-about-split__text p { margin: 0 0 var(--space-4); color: var(--text-body); }
.hf-about-split__text p:last-child { margin-bottom: 0; }
.hf-about-split__media { margin: 0; }
.hf-about-split__media img { display: block; width: 100%; height: auto; border-radius: var(--radius-card); object-fit: cover; }
.hf-about-values { --hf-col-min: 14rem; --hf-gap: var(--space-6); --hf-grid-auto: repeat(auto-fill, minmax(min(100%, max(var(--hf-col-min), (100% - (var(--hf-cols) - 1) * var(--hf-gap)) / var(--hf-cols))), 1fr)); display: grid; grid-template-columns: var(--hf-grid-auto); gap: var(--space-8) var(--hf-gap); margin: 0; padding: 0; list-style: none; }
.hf-about-values > li { display: grid; gap: var(--space-2); align-content: start; }
.hf-about-values i, .hf-about-values svg { width: 32px; height: 32px; color: var(--text-brand); stroke-width: 1.5; }
.hf-about-values h3 { margin: 0; font-size: var(--fs-h4); color: var(--text-strong); }
.hf-about-values p { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); line-height: var(--lh-snug); }
.hf-about-workshop { --hf-cols: 5; --hf-gap: var(--space-4); --hf-grid-auto: repeat(auto-fill, minmax(min(100%, max(var(--hf-col-min), (100% - (var(--hf-cols) - 1) * var(--hf-gap)) / var(--hf-cols))), 1fr)); display: grid; grid-template-columns: var(--hf-grid-auto); gap: var(--hf-gap); margin: 0; padding: 0; list-style: none; }
.hf-about-workshop img { display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: var(--radius-card); object-fit: cover; background: var(--surface-boucle); }
@media (min-width: 768px) {
  .hf-about-hero__capsule { position: absolute; inset-block-end: var(--space-6); inset-inline-start: var(--space-6); margin-top: 0; }
}
@media (max-width: 1023px) {
  .hf-about-split { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .hf-about-workshop { grid-auto-flow: column; grid-auto-columns: 78%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .hf-about-workshop > li { scroll-snap-align: start; }
}

/* --- contact --- */
.hf-note--success { background: var(--success-bg); }
.hf-note--success i { color: var(--success); }

.hf-contact-cards { --hf-col-min: 14rem; --hf-gap: var(--space-6); --hf-grid-auto: repeat(auto-fill, minmax(min(100%, max(var(--hf-col-min), (100% - (var(--hf-cols) - 1) * var(--hf-gap)) / var(--hf-cols))), 1fr)); display: grid; grid-template-columns: var(--hf-grid-auto); gap: var(--hf-gap); }
.hf-contact-card .hf-card__body { gap: var(--space-3); height: 100%; }
.hf-contact-card i, .hf-contact-card svg { width: 28px; height: 28px; color: var(--text-brand); stroke-width: 1.5; }
.hf-contact-card h2 { margin: 0; font-size: var(--fs-h4); color: var(--text-strong); }
.hf-contact-card p { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); line-height: var(--lh-snug); }
.hf-contact-card__link { display: inline-flex; align-items: center; min-height: 44px; margin-top: auto; font-weight: var(--fw-semibold); color: var(--text-brand); }
.hf-contact-card__link span[dir="ltr"] { unicode-bidi: isolate; }
.hf-contact-card__link:hover { color: var(--text-brand); }

.hf-contact-reach { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(var(--space-8), 5vw, var(--space-16)); align-items: start; }
.hf-contact-reach__form h2, .hf-hours-card h2 { margin: 0 0 var(--space-5); font-size: var(--fs-h3); color: var(--text-strong); }

.hf-contact-form__field { display: flex; flex-direction: column; gap: var(--space-2); margin: 0 0 var(--space-4); }
.hf-contact-form__field label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-contact-form__field input,
.hf-contact-form__field textarea { min-height: 44px; padding: var(--space-3); border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: var(--bg-page); color: var(--text-body); font: inherit; }
.hf-contact-form__field textarea { min-height: 120px; resize: vertical; }
.hf-contact-form__field input:focus-visible,
.hf-contact-form__field textarea:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.hf-contact-form .hf-button { min-height: 44px; }

.hf-hours-card { padding: var(--space-6); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-card);  }
.hf-hours-card__days { margin: 0 0 var(--space-1); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-hours-card__time { margin: 0 0 var(--space-5); color: var(--text-body); unicode-bidi: isolate; }

.hf-contact-maps { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.hf-contact-maps .hf-map { display: flex; flex-direction: column; gap: var(--space-4); min-height: 0; background: none; }
.hf-contact-maps .hf-map iframe { width: 100%; height: auto; border: 0; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); display: block; background: var(--surface-boucle); }
.hf-contact-maps .hf-map .hf-button { align-self: flex-start; }

@media (max-width: 767px) {
  .hf-contact-reach { grid-template-columns: 1fr; }
  .hf-contact-maps { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .hf-contact-cards { grid-template-columns: 1fr; }
}

/* --- faq --- */
.hf-faq__hero { display: grid; grid-template-columns: 240px 1fr; gap: clamp(var(--space-6), 5vw, var(--space-12)); align-items: center; }
.hf-faq__hero-media { align-self: stretch; min-height: 220px; border-radius: var(--radius-card); background-color: var(--surface-boucle); background-size: cover; background-position: center; }
.hf-faq__hero-text > p { margin: 0 0 var(--space-5); max-width: 52ch; color: var(--text-body); }
.hf-faq__search { position: relative; display: flex; align-items: center; margin: 0; }
.hf-faq__search i { position: absolute; inset-inline-start: var(--space-4); width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.hf-faq__search input { width: 100%; min-height: 48px; padding: 0 var(--space-4); padding-inline-start: var(--space-10); border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--bg-page); color: var(--text-body); font: inherit; }
.hf-faq__search input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }

.hf-faq__tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-6); padding-bottom: var(--space-1); }
.hf-faq__tab { flex: none; min-height: 44px; padding: 0 var(--space-5); border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-body); font-weight: var(--fw-semibold); white-space: nowrap; cursor: pointer; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.hf-faq__tab:hover { border-color: var(--border-strong); }
.hf-faq__tab.is-active { background: var(--action); border-color: var(--action); color: var(--on-action); }
.hf-faq__tab:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.hf-accordion { display: flex; flex-direction: column; gap: var(--space-3); }
.hf-accordion__item { overflow: hidden; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-card);  }
.hf-accordion__head { margin: 0; font-size: inherit; font-weight: inherit; }
.hf-accordion__trigger { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); width: 100%; min-height: 56px; padding: var(--space-4) var(--space-5); border: 0; background: transparent; color: var(--text-strong); font: inherit; font-weight: var(--fw-semibold); text-align: start; cursor: pointer; }
.hf-accordion__trigger i { flex: none; width: 20px; height: 20px; color: var(--text-brand); }
.hf-accordion__trigger[aria-expanded="true"] { color: var(--text-brand); }
.hf-accordion__trigger:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.hf-accordion__panel { padding: 0 var(--space-5) var(--space-5); }
.hf-accordion__panel p { margin: 0; color: var(--text-body); line-height: var(--lh-body); }
.hf-faq__empty { margin: var(--space-4) 0 0; padding: var(--space-4) var(--space-5); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-muted); color: var(--text-muted); text-align: center; }

.hf-faq__support { background: var(--surface-inverse); color: var(--text-inverse); }
.hf-faq__support-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-6); }
.hf-faq__support-text h2 { margin: 0 0 var(--space-2); font-size: var(--fs-h3); }
.hf-faq__support-text p { margin: 0; opacity: .85; }
.hf-faq__support-actions { display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
.hf-faq__support .hf-button { min-height: 48px; gap: var(--space-2); background: var(--surface-card); border-color: var(--surface-card); color: var(--text-brand); }
.hf-faq__support .hf-button i { width: 18px; height: 18px; }
.hf-faq__support-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); }
.hf-faq__support-meta li { display: flex; align-items: center; gap: var(--space-2); }
.hf-faq__support-meta i { width: 16px; height: 16px; opacity: .85; }
.hf-faq__support-meta a { text-decoration: underline; }
.hf-faq__support-meta span[dir="ltr"] { unicode-bidi: isolate; }

@media (max-width: 767px) {
  .hf-faq__hero { grid-template-columns: 1fr; }
  .hf-faq__hero-media { display: none; }
}
@media (max-width: 767px) {
  .hf-faq__tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .hf-faq__support-inner { flex-direction: column; align-items: flex-start; }
}

/* --- policy --- */
.hf-policy__crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-6); font-size: var(--fs-sm); color: var(--text-muted); }
.hf-policy__crumbs a { color: var(--text-brand); font-weight: var(--fw-semibold); }
.hf-policy__crumbs a:hover { color: var(--text-brand); }
.hf-policy__crumbs span[aria-hidden="true"] { color: var(--text-muted); }

.hf-policy__hero { display: grid; grid-template-columns: 1fr 380px; gap: clamp(var(--space-6), 5vw, var(--space-16)); align-items: center; }
.hf-policy__hero-text h1 { margin: var(--space-3) 0; font-size: var(--fs-h2); font-weight: var(--fw-semibold); line-height: var(--lh-tight); color: var(--text-strong); }
.hf-policy__diamond { margin: 0 0 var(--space-3); font-size: var(--fs-h4); color: var(--olive-400); }
.hf-policy__intro { margin: 0; max-width: 60ch; font-size: var(--fs-lead); line-height: var(--lh-snug); color: var(--text-body); }
.hf-policy__callout { display: flex; gap: var(--space-3); max-width: 60ch; margin: var(--space-4) 0 0; padding: var(--space-4) var(--space-5); border: 1px solid var(--warning); border-radius: var(--radius-md); background: var(--warning-bg); color: var(--status-warn-fg); font-size: var(--fs-sm); font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
.hf-policy__callout i { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.hf-policy__hero-media { position: relative; }
.hf-policy__hero-media img { display: block; width: 100%; height: auto; border-radius: var(--radius-card); object-fit: cover; background: var(--surface-boucle); }
.hf-policy__tag { position: absolute; inset-inline-start: var(--space-4); inset-block-end: var(--space-4); display: flex; align-items: center; gap: var(--space-2); margin: 0; padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill); background: var(--surface-card); border: 1px solid var(--line); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-policy__tag i { width: 16px; height: 16px; color: var(--text-brand); }

/* Help card above the contents list. A sticky box may travel the whole grid, not
   just its own row: with the list on top it slid down over the help card while
   reading. Last in the column, it has nothing below to cover. */
.hf-policy__body { display: grid; grid-template-columns: 1fr 300px; grid-template-rows: auto 1fr; grid-template-areas: "main support" "main toc"; gap: clamp(var(--space-6), 4vw, var(--space-12)); align-items: start; }
.hf-policy__main { grid-area: main; min-width: 0; }
.hf-policy__section { position: relative; padding-inline-start: var(--space-12); padding-bottom: var(--space-8); }
.hf-policy__section:not(:last-child) { margin-bottom: var(--space-8); border-bottom: 1px solid var(--border-subtle); }
.hf-policy__section h2 { margin: 0 0 var(--space-3); font-size: var(--fs-h3); color: var(--text-strong); }
.hf-policy__section p { margin: 0 0 var(--space-3); color: var(--text-body); line-height: var(--lh-body); }
.hf-policy__section p:last-child { margin-bottom: 0; }
.hf-policy__section ul { margin: 0 0 var(--space-3); padding-inline-start: var(--space-5); color: var(--text-body); line-height: var(--lh-body); }
.hf-policy__section li { margin-bottom: var(--space-2); }
.hf-policy__section ul:last-child { margin-bottom: 0; }
.hf-policy__icon { position: absolute; inset-inline-start: 0; inset-block-start: 0; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-pill); background: var(--brand-subtle); color: var(--text-brand); }
.hf-policy__icon i { width: 20px; height: 20px; }

.hf-policy__toc { grid-area: toc; align-self: start; position: sticky; top: var(--space-8); padding: var(--space-5); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-card);  }
.hf-policy__toc summary { font-weight: var(--fw-semibold); color: var(--text-strong); cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.hf-policy__toc ol { display: flex; flex-direction: column; gap: var(--space-1); margin: var(--space-2) 0 0; padding-inline-start: var(--space-5); }
.hf-policy__toc a { display: flex; align-items: center; min-height: 44px; color: var(--text-body); }
.hf-policy__toc a:hover { color: var(--text-brand); }

.hf-policy__support { grid-area: support; padding: var(--space-6); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-boucle); }
.hf-policy__support h2 { margin: 0 0 var(--space-2); font-size: var(--fs-h4); color: var(--text-strong); }
.hf-policy__support p { margin: 0 0 var(--space-4); font-size: var(--fs-sm); color: var(--text-body); line-height: var(--lh-snug); }
.hf-policy__support .hf-button { width: 100%; min-height: 44px; gap: var(--space-2); }
.hf-policy__support .hf-button i { width: 18px; height: 18px; }
.hf-policy__support-meta { display: flex; flex-direction: column; gap: var(--space-2); margin: var(--space-4) 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); }
.hf-policy__support-meta li { display: flex; align-items: center; gap: var(--space-2); min-height: 32px; color: var(--text-body); }
.hf-policy__support-meta i { flex: none; width: 16px; height: 16px; color: var(--text-brand); }
.hf-policy__support-meta a { color: var(--text-brand); }
.hf-policy__support-meta span[dir="ltr"] { unicode-bidi: isolate; }

@media (min-width: 1024px) {
  .hf-policy__toc summary { display: none; }
  .hf-policy__toc > nav { display: block; }
}
@media (max-width: 1023px) {
  .hf-policy__hero { grid-template-columns: 1fr; }
  .hf-policy__body { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "toc" "main" "support"; }
  .hf-policy__toc { position: static; }
  .hf-policy__section { padding-inline-start: 0; }
  .hf-policy__icon { position: static; margin-bottom: var(--space-3); }
}

/* --- wishlist --- */
.hf-wishlist__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-4); margin-bottom: var(--space-6); }
.hf-wishlist__count { color: var(--text-muted); font-weight: var(--fw-semibold); }
.hf-wishlist__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hf-wishlist__actions[hidden] { display: none; }
.hf-wishlist__action { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: var(--space-2) var(--space-4); border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-strong); font-weight: var(--fw-semibold); cursor: pointer; transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.hf-wishlist__action:hover { background: var(--bg-muted); border-color: var(--border-strong); }
.hf-wishlist__action i { width: 18px; height: 18px; }
.hf-wishlist__grid { display: grid; grid-template-columns: var(--hf-grid-auto); gap: var(--hf-gap); }
.hf-wishlist__grid .hf-empty-state { grid-column: 1 / -1; }
.hf-wishlist__grid .hf-card__fav.is-active i { fill: currentColor; }
.hf-wishlist__grid .hf-card__add { margin-top: var(--space-2); }
.hf-recently__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.hf-recently__head h2 { margin: 0; font-size: var(--fs-h3); color: var(--text-brand); }
.hf-recently__nav { display: flex; gap: var(--space-2); }
.hf-recently__btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-strong); cursor: pointer; transition: background var(--dur-fast) var(--ease-out); }
.hf-recently__btn:hover { background: var(--bg-muted); }
.hf-recently__btn i { width: 20px; height: 20px; }
.hf-recently__track { display: flex; gap: var(--space-4); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: var(--space-2); }
.hf-recently__track::-webkit-scrollbar { display: none; }
.hf-recently__card { flex: 0 0 220px; scroll-snap-align: start; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-card); }
.hf-recently__card img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: contain; background: var(--surface-boucle); }
.hf-recently__name { display: block; margin: var(--space-3) var(--space-3) var(--space-1); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-recently__card .hf-price { display: block; margin: 0 var(--space-3) var(--space-3); }
@media (max-width: 767px) { .hf-recently__card { flex-basis: 60vw; } }

/* --- reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :root:root *, :root:root *::before, :root:root *::after {
    animation-duration: 0s;
    animation-iteration-count: 1;
    transition-duration: 0s;
    scroll-behavior: auto;
  }
}

/* --- UX/CRO remediation bundle --- */

/* dual logo: show the tone that reads on the current header surface */
.hf-logo { display: inline-flex; align-items: center; }
.hf-header__logo .hf-logo__img { width: 180px; max-width: 100%; height: auto; }
@media (max-width: 767px) { .hf-header__logo .hf-logo__img { width: 110px; } }
.hf-logo__img--on-dark { display: none; }
.hf-header__row .hf-logo,
.hf-header__row .custom-logo-link { min-height: 48px; padding: 4px 8px; border-radius: var(--radius-sm); background: color-mix(in sRGB, var(--surface-card) 82%, transparent); }
.hf-logo__img--on-dark,
.hf-header__row .custom-logo.hf-logo__img--on-dark { filter: brightness(0) invert(1) contrast(1.16) drop-shadow(0 1px 2px rgba(0,0,0,.36)); }
:root[data-hf-theme="dark"] .hf-logo__img--on-light { display: none; }
:root[data-hf-theme="dark"] .hf-logo__img--on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-hf-theme="light"]) .hf-logo__img--on-light { display: none; }
  :root:not([data-hf-theme="light"]) .hf-logo__img--on-dark { display: block; }
}

/* Footer is an always-dark band; its base text used --text-inverse, which flips
   to near-black in dark mode. Pin it to a warm light in dark so footer copy
   stays readable. (Headings / links carry their own colours.) */
:root[data-hf-theme="dark"] .hf-footer { color: var(--sand-300); }
@media (prefers-color-scheme: dark) {
  :root:not([data-hf-theme="light"]) .hf-footer { color: var(--sand-300); }
}

/* gallery zoom trigger + lightbox */
.hf-gallery__zoom { position: absolute; inset-block-end: var(--space-3); inset-inline-end: var(--space-3); z-index: 3; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-strong); box-shadow: var(--shadow-2); cursor: zoom-in; }
.hf-gallery__zoom i { width: 20px; height: 20px; }
body.hf-lightbox-open { overflow: hidden; }
.hf-lightbox { position: fixed; inset: 0; z-index: 900200; display: grid; place-items: center; animation: hf-fade var(--dur-fast) var(--ease-out); }
.hf-lightbox__scrim { position: absolute; inset: 0; background: var(--overlay-scrim); border: 0; }
.hf-lightbox__stage { position: relative; z-index: 1; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; width: min(92vw, 1100px); height: min(88dvh, 900px); padding: var(--space-6); }
.hf-lightbox__img { min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; border-radius: var(--radius-md); }
.pswp { z-index: 900200; }
.pswp__img { max-width: none; object-fit: fill; }
.hf-lightbox__close, .hf-lightbox__nav { position: absolute; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-strong); box-shadow: var(--shadow-2); cursor: pointer; }
.hf-lightbox__close { inset-block-start: 0; inset-inline-end: 0; }
.hf-lightbox__nav i { width: 22px; height: 22px; }
.hf-lightbox__prev { inset-inline-end: 0; inset-block-start: 50%; transform: translateY(-50%); }
.hf-lightbox__next { inset-inline-start: 0; inset-block-start: 50%; transform: translateY(-50%); }
.hf-lightbox__count { position: absolute; inset-block-end: 0; inset-inline-start: 50%; transform: translateX(-50%); padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-body); font-size: var(--fs-xs); }
@keyframes hf-fade { from { opacity: 0; } to { opacity: 1; } }

/* static (informational) attribute rows */
.hf-attr-static { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); margin: 0; }
.hf-attr-static__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-attr-static__values { display: inline-flex; flex-wrap: wrap; gap: var(--space-2); }
.hf-attr-static__chip { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-muted); color: var(--text-body); font-size: var(--fs-sm); }

/* near-CTA facts block */
.hf-facts { display: grid; gap: var(--space-2); margin: 0; padding: var(--space-4); list-style: none; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--surface-card); }
.hf-facts__row { display: grid; grid-template-columns: 20px 8rem 1fr; align-items: start; gap: var(--space-2) var(--space-3); font-size: var(--fs-sm); }
.hf-facts__row i { width: 18px; height: 18px; color: var(--text-brand); margin-top: 2px; }
.hf-facts__k { color: var(--text-muted); }
.hf-facts__v { color: var(--text-body); }
.hf-facts__links { margin-top: var(--space-1); padding-top: var(--space-2); border-top: 1px solid var(--border-subtle); font-size: var(--fs-xs); color: var(--text-muted); }
.hf-facts__links a { color: var(--text-brand); font-weight: var(--fw-semibold); }
@media (max-width: 479px) { .hf-facts__row { grid-template-columns: 20px 1fr; } .hf-facts__k { grid-column: 2; } .hf-facts__v { grid-column: 2; } }

/* catalog card meta + details CTA */
.hf-card__meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); margin: 0 0 var(--space-1); font-size: var(--fs-xs); color: var(--text-muted); }
.hf-card__details { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; text-align: center; white-space: normal; }

/* quick policy links near purchase decisions */
.hf-policy-quick { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.hf-policy-quick a { display: inline-flex; align-items: center; min-height: 36px; padding: var(--space-1) var(--space-3); border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); color: var(--text-brand); background: var(--surface-card); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.hf-policy-quick a:hover { border-color: var(--action); color: var(--text-brand); }
@media (max-width: 767px) { .hf-policy-quick a { min-height: 44px; } }

/* applied-filter chips */
.hf-applied-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); width: 100%; margin-bottom: var(--space-4); }
.hf-applied-filters__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-applied-filters__list { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.hf-chip { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 36px; padding: var(--space-1) var(--space-3); border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-body); font-size: var(--fs-sm); }
.hf-chip:hover { border-color: var(--danger); color: var(--danger); }
.hf-chip i { width: 14px; height: 14px; }
.hf-applied-filters__clear { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-brand); text-decoration: underline; }
@media (max-width: 767px) { .hf-chip { min-height: 44px; } }

/* numeric dimension filter */
.hf-dim-filter { display: grid; gap: var(--space-2); }
.hf-dim-filter label { display: grid; gap: var(--space-1); font-size: var(--fs-sm); color: var(--text-body); }
.hf-dim-filter input { min-height: 44px; padding-inline: var(--space-3); border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: var(--surface-card); color: var(--text-strong); }
.hf-dim-filter button { min-height: 44px; border: 0; border-radius: var(--radius-pill); background: var(--action); color: var(--on-action); font-weight: var(--fw-semibold); cursor: pointer; }

/* empty-catalog fallback */
.hf-preview-grid { display: grid; grid-template-columns: var(--hf-grid-auto); gap: var(--hf-gap); }
.hf-preview-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-card);  }
.hf-preview-card__media { display: block; aspect-ratio: 1; background-color: var(--surface-boucle); background-position: center; background-size: contain; background-repeat: no-repeat; }
.hf-preview-card__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: var(--space-4); }
.hf-preview-card h3 { margin: 0; color: var(--text-strong); font-size: var(--fs-body); line-height: var(--lh-snug); }
.hf-preview-card p { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); line-height: var(--lh-snug); }
.hf-preview-card .hf-button { margin-top: auto; }
.hf-shop-empty { display: grid; gap: var(--space-8); }
.hf-shop-empty__text { max-width: 760px; }
.hf-shop-empty__text h2 { margin: var(--space-2) 0; color: var(--text-strong); font-size: var(--fs-h2); line-height: var(--lh-heading); }
.hf-shop-empty__text p { margin: 0 0 var(--space-5); color: var(--text-body); }
/* Shipping line: "يُحدَّد بعد مراجعة الطلب" replaces the misleading "مجانية". */
.hf-ship-pending { color: var(--text-muted); font-weight: var(--fw-semibold); }

/* Product code beside the name — its own LTR line, never baked into the name
   string (that garbles in the narrow RTL cart/checkout summary column). */
.hf-card__sku,
.hf-product-code { margin: 2px 0 0; font-size: var(--fs-xs); color: var(--text-muted); line-height: var(--lh-snug); letter-spacing: 0; }
.hf-product-code { margin: var(--space-1) 0 var(--space-2); font-size: var(--fs-sm); }
.hf-card__sku span,
.hf-product-code__label { color: var(--text-subtle, var(--text-muted)); }
.hf-product-code__value { color: var(--text-body); font-weight: var(--fw-semibold); }

/* WooCommerce block checkout dumps each item's full description into the tiny
   order-summary column, truncated mid-word. Not useful at checkout. */
.wc-block-components-order-summary-item__description { display: none; }

/* Reformatted run-on product specs (hf_format_spec_runon). */
.hf-spec-list { display: grid; gap: var(--space-2); margin: var(--space-4) 0; padding: 0; }
.hf-spec-list__row { display: grid; grid-template-columns: minmax(7rem, 34%) 1fr; gap: var(--space-2) var(--space-4); padding: var(--space-2) 0; border-bottom: 1px solid var(--border-subtle); }
.hf-spec-list__row:last-child { border-bottom: 0; }
.hf-spec-list dt { margin: 0; font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-spec-list dd { margin: 0; color: var(--text-body); }
@media (max-width: 479px) {
  .hf-spec-list__row { grid-template-columns: 1fr; gap: 2px; }
}

/* structured checkout access fields + made-to-order acknowledgement */
.hf-delivery-access { margin: var(--space-6) 0; }
.hf-delivery-access summary { min-height: 44px; padding-block: var(--space-2); cursor: pointer; font-size: var(--fs-body); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-delivery-access[open] summary { margin-block-end: var(--space-2); }
.hf-delivery-access__hint { margin: 0 0 var(--space-3); font-size: var(--fs-sm); color: var(--text-muted); }
.hf-delivery-access .hf-delivery-access__check label { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; }
.hf-mto-ack { margin: var(--space-4) 0; padding: var(--space-4); border: 1px solid var(--warning); border-radius: var(--radius-md); background: var(--warning-bg); color: var(--status-warn-fg); }
.hf-mto-ack ul { margin: 0 0 var(--space-3); padding-inline-start: 1.2em; font-size: var(--fs-sm); line-height: var(--lh-snug); }
.hf-mto-ack li { margin-bottom: var(--space-1); }
.hf-mto-ack .hf-mto-ack__check label { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-2); min-height: 44px; font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
.hf-mto-ack .hf-mto-ack__check a { text-decoration: underline; color: inherit; font-weight: var(--fw-semibold); }
.hf-order-access { margin-top: var(--space-6); }
.hf-order-access h2, .hf-order-access h3 { color: var(--text-strong); }

/* =============================================================================
 * v1.5.0 — audit remediation (contrast, mobile chrome, brand consistency)
 *
 * Everything below fixes a defect found in the live-site UX/QA audit. Each block
 * says which one. Kept at the end of the file so the ordering wins over the
 * older rules it corrects without having to out-specify them by hand.
 * ========================================================================== */

/* --- Audit #07: WooCommerce's own purple on the PDP buy button ---------------
 * woocommerce.css ships `.woocommerce div.product form.cart .button { background:#7f54b3 }`
 * (0,3,2). The theme's `.woocommerce button.button` rule is (0,2,0), so on the
 * product page — and only there — the single most important button in the store
 * rendered WooCommerce purple while the same button rendered brand olive
 * everywhere else. Match core's specificity and take it back. */
.woocommerce div.product form.cart .button,
.woocommerce div.product form.cart button.button,
.woocommerce div.product .single_add_to_cart_button,
.woocommerce #respond input#submit {
  background: var(--action);
  border-color: var(--action);
  color: var(--on-action);
}
.woocommerce div.product form.cart .button:hover,
.woocommerce div.product form.cart button.button:hover,
.woocommerce div.product .single_add_to_cart_button:hover,
.woocommerce #respond input#submit:hover {
  background: var(--action-hover);
  border-color: var(--action-hover);
  color: var(--on-action);
}
/* «اشترِ الآن» is the secondary action: one primary per view (DESIGN.md, Buttons).
 * Surface fill, 1px line-strong border, ink text; the tokens flip in dark mode. */
.woocommerce .hf-buy-now {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  min-height: 48px; /* matches the add-to-cart button beside it */
  border-radius: var(--radius-pill);
}
.woocommerce .hf-buy-now:hover {
  background: var(--sunken);
  border-color: var(--line-strong);
  color: var(--ink);
}
.woocommerce div.product .single_add_to_cart_button.disabled,
.woocommerce div.product .single_add_to_cart_button:disabled { opacity: .55; }

/* --- Audit #01 (cont.): outline button border on the dark theme --------------
 * .hf-button--secondary inherits `border: 2px solid var(--hf-olive)` from
 * .hf-button. --hf-olive is a *surface* token and stays dark, so on the dark
 * page the outline button was dark-olive-on-near-black: the text was fixed by
 * the ink token, the border still was not. */
.hf-button--secondary { border-color: currentColor; }
.hf-button--secondary:hover { background: var(--hf-cream); border-color: currentColor; color: var(--hf-heading); }
/* The CTA band paints its own olive ground in both themes, so it keeps white. */
.hf-cta-band .hf-button--secondary { border-color: var(--hf-white); color: var(--hf-white); }
.hf-cta-band .hf-button--secondary:hover { background: rgba(255,255,255,.14); border-color: var(--hf-white); color: var(--hf-white); }

/* --- Audit #09: category strip on mobile ------------------------------------
 * The strip is an overflow-x flex row. With no scroll-padding the first card sat
 * flush against the container edge and read as clipped in half, and the labels
 * were clamped to one line so "غرفة المعيشة" showed as "غرفة". */
.hf-category-grid { scroll-padding-inline: var(--gutter, 16px); padding-inline: 2px; }
.hf-category-card { width: clamp(104px, 26vw, 132px); }
.hf-category-card__label {
  display: block; width: 100%;
  white-space: normal; overflow-wrap: anywhere; hyphens: auto;
  color: var(--hf-heading);
}
/* Scroll affordance: fade the trailing edge so the row reads as continuing. */
.hf-category-strip { position: relative; }
.hf-category-strip::after {
  content: ""; position: absolute; inset-block: 0; inset-inline-end: 0; width: 42px;
  pointer-events: none; background: linear-gradient(to left, var(--bg-page), transparent);
}
[dir="rtl"] .hf-category-strip::after { background: linear-gradient(to right, var(--bg-page), transparent); }
.hf-section--white .hf-category-strip::after { background: linear-gradient(to left, var(--surface-card), transparent); }
[dir="rtl"] .hf-section--white .hf-category-strip::after { background: linear-gradient(to right, var(--surface-card), transparent); }
@media (hover: none) { .hf-category-grid { scrollbar-width: none; } .hf-category-grid::-webkit-scrollbar { display: none; } }

/* --- Audit #08: mobile header ate 124px before any content ------------------
 * The announcement bar wrapped its three items onto two cramped lines and the
 * phone link was a 19px-tall tap target. Make the bar a single scrollable line
 * on phones and give the link a real target. */
.hf-header__bar-wa { display: inline-flex; align-items: center; min-height: 32px; }
@media (max-width: 767px) {
  /* Items wrap onto a second line instead of scrolling off-canvas (the WhatsApp
   * number was cut off in RTL at 390px). Phone number never breaks. */
  .hf-header__bar-inner {
    flex-wrap: wrap; justify-content: safe center; overflow: visible;
    min-height: 32px; padding-block: var(--space-1); gap: 2px var(--space-3);
  }
  .hf-header__bar-item { white-space: normal; }
  .hf-header__bar-wa { white-space: nowrap; }
  .hf-header__row-inner { min-height: 56px; }
  .hf-header--shrink .hf-header__row-inner { min-height: 52px; }
}

/* --- Audit #06 (mobile): floating chat widget covering content ---------------
 * Joinchat parks a ~60px FAB in the bottom corner with a high z-index. It sat on
 * top of product-card titles and the PDP "المفضلة / المقارنة" row. Reserve the
 * space at the end of the document instead of letting it overlap, and keep the
 * theme's own sticky buy bar above it. */
@media (max-width: 1023px) {
  body { padding-bottom: env(safe-area-inset-bottom, 0px); }
  .hf-footer { padding-bottom: calc(var(--space-8) + 72px); }
  .hf-sticky-buy { z-index: 100; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  /* Push the chat bubble clear of the sticky buy bar while that bar is showing. */
  body.hf-sticky-buy-visible .joinchat, body.hf-sticky-buy-visible .hf-wa:not(.is-moved) { bottom: 84px; }
}

/* --- Audit: footer tap targets were 26px tall on mobile --------------------- */
@media (max-width: 767px) {
  .hf-footer__list a, .hf-footer__contact a {
    display: inline-flex; align-items: center; min-height: 44px;
  }
  .hf-footer__list { gap: 0; }
}

/* --- Audit #10: gallery zoom affordance ------------------------------------ */
.hf-gallery__zoom {
  position: absolute; bottom: var(--space-3); inset-inline-end: var(--space-3); z-index: 2;
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-pill);
  background: var(--surface-card); color: var(--text-strong); cursor: pointer;
}
.hf-gallery__zoom i { width: 20px; height: 20px; }

/* --- Audit: Lucide star rating (replaces the broken WC star font) -----------
 * WooCommerce draws stars with a @font-face that fails to load on this site and
 * renders as literal "SSSSS". The theme already loads Lucide, so the rating is
 * drawn with real icons instead. */
.hf-rating { display: inline-flex; align-items: center; gap: 1px; color: var(--ink-2); }
.hf-rating i, .hf-rating svg { width: 15px; height: 15px; }
.hf-rating .is-filled { fill: currentColor; }
.hf-rating .is-empty { opacity: .38; }

/* --- Audit: lifestyle grid was 7 unsized boxes that shifted on load --------- */
.hf-lifestyle-item img { background: var(--surface-boucle); }


/* --- Audit #15: mega panel is now a real category index -------------------- */
.hf-mega__inner { align-items: baseline; }
.hf-mega__link { display: inline-flex; align-items: baseline; gap: var(--space-2); min-height: 32px; }
.hf-mega__link--all { font-weight: var(--fw-semibold); color: var(--hf-ink-brand); }
.hf-mega__count {
  padding: 1px 7px; border-radius: var(--radius-pill);
  background: var(--bg-muted); color: var(--text-muted);
  font-size: var(--fs-2xs); font-weight: var(--fw-semibold); line-height: 1.6;
}

/* --- Audit #05: deposit next-steps block (thank-you page + email) ---------- */
.hf-next-steps {
  margin: var(--space-8) 0; padding: var(--space-6);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md); background: var(--bg-muted);
}
.hf-next-steps h2 { margin: 0 0 var(--space-3); font-size: var(--fs-h4); color: var(--text-strong); }
.hf-next-steps ol { margin: 0 0 var(--space-4); padding-inline-start: 1.3em; color: var(--text-body); line-height: var(--lh-loose); }
.hf-next-steps li + li { margin-top: var(--space-2); }
.hf-next-steps .amount, .hf-next-steps .woocommerce-Price-amount { font-weight: var(--fw-semibold); color: var(--text-strong); }

/* On phones the hero follows its reading order: headline, actions, photo. */
@media (max-width: 767px) {
  .hf-hero { padding-block: clamp(16px, 5vw, 24px); }
  .hf-hero-grid { gap: clamp(16px, 4vw, 24px); }
  .hf-hero-media { width: 100%; order: 0; }
  .hf-hero h1 { font-size: var(--fs-display); line-height: var(--lh-heading); }
  .hf-hero p { font-size: var(--fs-body); margin-block: var(--space-2) 0; }
  .hf-hero .hf-actions { margin-top: var(--space-4); }
  .hf-hero .hf-actions .hf-button { flex: 1 1 auto; justify-content: center; }
}

/* --- Audit #16 (HF-030): WooCommerce core clips and re-backgrounds the PDP
 * active tab on mobile ------------------------------------------------------
 * woocommerce.css (verified against the official 11.1.1 source) sets:
 *   .woocommerce div.product .woocommerce-tabs ul.tabs { overflow: hidden }         (0,4,1)
 *   .woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: … }  (0,5,3)
 * This theme's own `.hf-pdp .woocommerce-tabs ul.tabs { overflow-x: auto }`
 * responsive rule (0,3,1) loses that specificity fight, so core's
 * `overflow: hidden` can win and clip the tab row instead of letting it
 * scroll horizontally on mobile — and the active tab's own reset,
 * `.hf-pdp .woocommerce-tabs ul.tabs li { background: none }` (0,3,2), loses
 * to core's `li.active` background rule (0,5,3). Match core's selector chain
 * (div.product carries the theme's own .hf-pdp class on the same element —
 * see woocommerce/content-single-product.php) and take both back, same
 * pattern as Audit #07. The active link above also beats core's active-link
 * color rule and uses fixed --hf-white on olive: --text-inverse becomes
 * near-black in dark mode and fails contrast. */
@media (max-width: 1023px) {
  .woocommerce div.product.hf-pdp .woocommerce-tabs ul.tabs {
    overflow: visible;
    overflow-x: auto;
  }
}
/* Same fight for the inactive tabs: core's li rule (0,4,3) kept its lilac
 * #e9e6ed box, border and corner pseudo-elements over the .hf-pdp tab reset. */
.woocommerce div.product.hf-pdp .woocommerce-tabs ul.tabs li {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.woocommerce div.product.hf-pdp .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product.hf-pdp .woocommerce-tabs ul.tabs li::after {
  display: none;
}
.woocommerce div.product.hf-pdp .woocommerce-tabs ul.tabs li a {
  padding: var(--space-2) var(--space-4);
  color: var(--text-body);
}
.woocommerce div.product.hf-pdp .woocommerce-tabs ul.tabs li.active {
  background: none;
}

/* --- motion --------------------------------------------------------------
 * Page transitions and micro-interactions. The brand's motion rule (design
 * system readme): calm, ease-out entrances, no bounce, no springy overshoot.
 * Everything here stands down under prefers-reduced-motion. The first-visit
 * preloader lives in inc/motion.php (it has to be inline in <head>).
 */

/* Cross-document view transitions: same-origin navigations crossfade instead
   of flashing white. Chrome/Edge 126+, Safari 18.2+; other browsers just
   navigate normally. The product photo morphs from its card into the product
   page: theme.js names the clicked card's photo, and the product page's photo
   is named here so it is ready at the first render. */
@view-transition { navigation: auto; }
::view-transition-group(root) { animation-duration: var(--dur-base); animation-timing-function: var(--ease-out); }
::view-transition-group(hf-product-photo) { animation-duration: var(--dur-slow); animation-timing-function: var(--ease-out); }
::view-transition-old(hf-product-photo), ::view-transition-new(hf-product-photo) { height: 100%; object-fit: contain; }
.hf-gallery__main .wp-post-image { view-transition-name: hf-product-photo; }
/* The header is the same on both pages: naming it keeps it still while the
   page underneath changes, instead of crossfading with everything else. */
.hf-header { view-transition-name: hf-header; }

/* Discoverable hero image with a stable, motion-free frame. */
.hf-hero-media { position: relative; }
.hf-hero-media::before { content: none; }
@keyframes hf-kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }

/* Wishlist heart: a small pop when the shopper saves (class added on click
   only, so hearts already saved don't all pop on page load). */
.hf-card__fav.hf-pop svg, .hf-card__fav.hf-pop i { animation: hf-pop var(--dur-slow) var(--ease-out); }
@keyframes hf-pop { 50% { transform: scale(1.22); } }

/* Add to cart: the product photo travels to the header cart, the count pulses. */
.hf-fly { position: fixed; z-index: 2147482000; pointer-events: none; object-fit: cover; border-radius: var(--radius-md); box-shadow: var(--shadow-1); }
.hf-cart-count.hf-bump { animation: hf-bump var(--dur-slow) var(--ease-out); }
@keyframes hf-bump { 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* Sections below the first screen rise in as they arrive. theme.js only hides
   sections that start below the fold, so nothing a visitor sees on arrival is
   ever hidden, and nothing is hidden at all without JavaScript. */
.hf-reveal { opacity: 0; transform: translateY(24px); }
.hf-reveal.is-in { opacity: 1; transform: none; transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :root:root *, :root:root *::before, :root:root *::after {
    animation-duration: 0s; animation-iteration-count: 1;
    transition-duration: 0s; scroll-behavior: auto;
  }
  @view-transition { navigation: none; }
  .hf-hero-media::before { animation: none; }
  .hf-card__fav.hf-pop svg, .hf-card__fav.hf-pop i, .hf-cart-count.hf-bump { animation: none; }
  .hf-reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Homepage v2 (1.6.1): hero facts, category tiles, photo mosaic.
   ========================================================================== */
/* Hero: the three facts a shopper weighs first, straight from the business rules. */
.hf-quick { padding-block: var(--space-4); border-block: 1px solid var(--border-subtle); background: var(--surface-card); }
.hf-quick__list { display: flex; gap: var(--space-3); margin: 0 auto; padding-block: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.hf-quick__list::-webkit-scrollbar { display: none; }
.hf-quick__list li { flex: none; }
.hf-quick__link { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-4); border: 1px solid var(--border-default); border-radius: var(--radius-pill); color: var(--text-strong); font-size: var(--fs-sm); font-weight: var(--fw-medium, 500); text-decoration: none; white-space: nowrap; transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.hf-quick__link:hover, .hf-quick__link:focus-visible { border-color: var(--action); background: var(--bg-subtle, var(--surface-card)); }
.hf-quick__link i { width: 18px; height: 18px; color: var(--text-brand); }
@media (min-width: 1024px) { .hf-quick__list { justify-content: center; flex-wrap: wrap; overflow: visible; } }
.hf-hero-facts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: var(--space-6) 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--text-body); }
.hf-hero-facts li { display: inline-flex; align-items: center; gap: var(--space-2); }
.hf-hero-facts i { flex: none; width: 18px; height: 18px; color: var(--text-brand); }

/* Shop by space: circular photos, native swipe on phones, static desktop grid. */
.hf-category-card { align-items: center; gap: var(--space-1); width: 120px; text-align: center; }
.hf-category-card__img { width: 144px; max-width: 100%; aspect-ratio: 1; border: 1px solid var(--border-subtle); border-radius: 50%; background-color: var(--bg-muted); box-shadow: none; transition: none; }
.hf-category-card__label { margin-top: var(--space-2); text-align: center; font-size: var(--fs-body); font-weight: var(--fw-semibold); color: var(--text-strong); }
.hf-category-card__count { text-align: center; font-size: var(--fs-xs); font-weight: var(--fw-regular); color: var(--text-muted); }
.hf-category-card:hover .hf-category-card__img { transform: none; }
@media (min-width: 1024px) {
  .hf-category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); overflow: visible; padding-bottom: 0; }
  .hf-category-card { width: auto; }
  .hf-category-strip::after { display: none; }
}

/* Ideas for your home: a mosaic that fills its grid exactly with seven photos
   (one large, two wide, four single = 12 cells, 3 x 4). The old auto-fill grid
   left the last photo alone on a row with a wide gap beside it. Every photo
   is a room scene now (hf_lifestyle_images()), so any tile can crop. */
.hf-lifestyle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(170px, 18vw, 250px); grid-auto-flow: dense; gap: var(--space-3); }
.hf-lifestyle-item { aspect-ratio: auto; height: 100%; }
.hf-lifestyle-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.hf-lifestyle-item:nth-child(2), .hf-lifestyle-item:nth-child(6) { grid-column: span 2; }
.hf-lifestyle-item:nth-child(2) img { object-position: center 80%; } /* the sofa sits low in the frame */
@media (max-width: 767px) {
  .hf-lifestyle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; gap: var(--space-2); }
  .hf-lifestyle-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .hf-lifestyle-item:nth-child(2), .hf-lifestyle-item:nth-child(6) { grid-column: span 1; } /* 2 + 6 = 8 cells = 4 full rows */
}

/* How we work, on the homepage: a quiet band between the value strip and the photos. */

/* Homepage builder spacing (Customizer → الصفحة الرئيسية → المسافة حوالين القسم).
   Attribute + element beats .hf-section / .hf-hero / .hf-value-strip padding. */
[data-hf-home][data-hf-space="compact"] { padding-block: clamp(24px, 4vw, 48px); }
[data-hf-home][data-hf-space="spacious"] { padding-block: clamp(80px, 12vw, 150px); }

/* Floating WhatsApp (inc/whatsapp.php) — replaces Joinchat, same corner.
   WhatsApp's own green, with the white logo and name as WhatsApp prints them
   (a logo/brand name, so the text-contrast minimum does not apply). Below the
   drawers (z 60+).
   The shopper can drag it anywhere (theme.js remembers the spot) or close it
   for the visit: the × is the label of .hf-wa__keep, so closing is pure CSS and
   works before LiteSpeed releases the scripts. */
.hf-wa { position: fixed; inset-block-end: 20px; inset-inline-end: 20px; z-index: 55; translate: 0 calc(-1 * var(--hf-consent-offset, 0px)); }
.hf-wa.is-moved { inset: auto; translate: none; } /* theme.js sets left/top */
.hf-wa__keep { position: absolute; inset-block-start: 0; inset-inline-start: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.hf-wa-float { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 56px; min-height: 56px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--whatsapp); color: var(--on-whatsapp); box-shadow: var(--shadow-2); font-weight: var(--fw-semibold); text-decoration: none; cursor: grab; touch-action: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
.hf-wa.is-dragging .hf-wa-float { cursor: grabbing; }
.hf-wa-float:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.hf-wa-float__label { font-size: var(--fs-sm); }
.hf-wa__close { position: absolute; inset-block-start: -12px; inset-inline-start: -12px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-strong); box-shadow: var(--shadow-2); font-size: 20px; line-height: 1; cursor: pointer; }
.hf-wa__keep:focus-visible ~ .hf-wa__close { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.hf-wa__keep:checked ~ .hf-wa-float, .hf-wa__keep:checked ~ .hf-wa__close { display: none; }
@media (max-width: 767px) { .hf-wa { inset-block-end: 16px; inset-inline-end: 16px; } .hf-wa-float { padding: 0; justify-content: center; } .hf-wa-float__label { display: none; } }
@media (max-width: 767px) { body.single-product .hf-wa { display: none; } }
body.hf-drawer-open .hf-wa, body.hf-cart-drawer-open .hf-wa, body.hf-filter-sheet-open .hf-wa, body.hf-lightbox-open .hf-wa { display: none; }
/* While the WPConsent banner is open at the bottom of the screen, the button
   (above) and the sticky buy bar lift over it (theme.js sets
   --hf-consent-offset to the banner's height, 0 once closed). */
.hf-sticky-buy.is-visible { translate: 0 calc(-1 * var(--hf-consent-offset, 0px)); } /* hidden bar stays below the screen */
.hf-sticky-buy:not(.is-visible) { translate: none; }
@media (prefers-reduced-motion: no-preference) {
  .hf-wa { animation: hf-wa-in var(--dur-slow) var(--ease-out) var(--dur-slow) both; }
  @keyframes hf-wa-in { from { opacity: 0; transform: translateY(12px) scale(.9); } }
}

/* Shop the Room (home builder "room"): a photo with product points. Point
   positions are percentages of the photo (physical left/top, set inline). */
.hf-room__stage { position: relative; }
.hf-room__img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); }
.hf-room__dot { position: absolute; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; transform: translate(-50%, -50%); }
.hf-room__dot span { display: block; width: 22px; height: 22px; border: 3px solid var(--hf-white); border-radius: 50%; background: var(--action); }
.hf-room__dot[aria-expanded="true"] span { background: var(--hf-white); border-color: var(--action); }
.hf-room__dot:focus-visible { outline: 3px solid var(--hf-white); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .hf-room__dot span { animation: hf-room-pulse var(--dur-slow) var(--ease-out) infinite; }
  @keyframes hf-room-pulse { 0% {  } 70% {  } 100% {  } }
}
.hf-room__card { --tx: 18px; --ty: 18px; position: absolute; z-index: 3; width: 240px; transform: translate(var(--tx), var(--ty)); padding: var(--space-3); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--surface-card); box-shadow: var(--shadow-2); }
.hf-room__card.is-left { --tx: calc(-100% - 18px); }
.hf-room__card.is-up { --ty: calc(-100% - 18px); }
.hf-room__card a { display: grid; gap: var(--space-1); color: var(--text-strong); text-decoration: none; }
.hf-room__thumb { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: var(--radius-sm); background: var(--surface-boucle); }
.hf-room__name { font-weight: var(--fw-semibold); }
.hf-room__price { color: var(--text-body); font-size: var(--fs-sm); }
.hf-room__go { color: var(--text-brand); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.hf-room__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--space-3); margin: var(--space-5) 0 0; padding: 0; list-style: none; }
.hf-room__list a { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: var(--space-3); align-items: center; padding: var(--space-2); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); color: var(--text-strong); text-decoration: none; }
.hf-room__list img { grid-row: span 2; width: 56px; height: 56px; object-fit: contain; border-radius: var(--radius-sm); }
.hf-room__list span:first-of-type { font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
@media (max-width: 767px) {
  /* On a phone the card docks to the bottom of the photo instead of the point. */
  .hf-room__card, .hf-room__card.is-left, .hf-room__card.is-up { left: var(--space-2) !important; right: var(--space-2); top: auto !important; bottom: var(--space-2); width: auto; transform: none; }
  .hf-room__card a { grid-template-columns: 72px 1fr; column-gap: var(--space-3); align-items: center; }
  .hf-room__thumb { grid-row: span 3; width: 72px; }
}

.hf-gallery__main { touch-action: pan-y pinch-zoom; }
.hf-gallery__main img { -webkit-user-drag: none; user-select: none; }
.hf-gallery__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--border-default); border-radius: 50%; background: var(--surface-card); color: var(--text-strong); font: 32px/1 sans-serif; box-shadow: var(--shadow-2); cursor: pointer; }
.hf-gallery__prev { right: 12px; }
.hf-gallery__next { left: 12px; }
.hf-gallery__nav:focus-visible, .hf-category-card:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

/* Checkout agreement not ticked: point at it right above the button. */
.hf-mto-ack.is-missing { outline: 2px solid var(--danger); outline-offset: 6px; border-radius: var(--radius-sm); }
.hf-mto-ack__hint { margin: 8px 0 0; color: var(--danger); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
/* 1.7.28: missing / malformed checkout fields are named next to the field. */
.hf-checkout .form-row.woocommerce-invalid .input-text,
.hf-checkout .form-row.woocommerce-invalid .select2-selection { border-color: var(--danger); }
.hf-field-error { color: var(--danger); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }

/* 1.7.20: focused catalogue and contact usability. */
.hf-gallery__thumbs > li { list-style:none; flex:0 0 auto; }
.hf-gallery__thumb { padding:0; display:block; font:inherit; }
.woocommerce-privacy-policy-text a { text-decoration:underline; text-underline-offset:.2em; }
.hf-compare-status { flex-basis:100%; color:var(--text-muted); font-size: var(--fs-sm); }
.hf-saved-facts { font-size: var(--fs-xs); line-height:1.8; overflow-wrap:anywhere; }
.hf-pending-cost td { text-align:start; line-height:1.8; }
/* The note spans both columns and has no label: drop WooCommerce's phone-size ": " prefix. */
.woocommerce table.shop_table_responsive tr.hf-pending-cost td::before,
.woocommerce-page table.shop_table_responsive tr.hf-pending-cost td::before { content: none; }

/* --- 1.7.28: storefront review (2026-10-19) -------------------------------- */
/* Remove button in the cart drawer measured 24x24: WooCommerce's
   `.woocommerce a.remove` (1em box) out-ranked the 32px rule above. */
.hf-cart-drawer a.hf-cart-drawer__remove { width: 44px; height: 44px; font-size: inherit; line-height: 1; }
/* Checkout checkboxes (ship elsewhere, installation, made-to-order consent)
   rendered at the browser's 13px; match the terms box. */
.hf-checkout input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--action); flex: none; }
/* Breadcrumb links were 19px tall on phones. Grow the hit area, not the bar. */
.hf-breadcrumb a { display: inline-block; padding-block: 12px; margin-block: -12px; }
/* "واتساب" in white on #25D366 was 1.98:1. */
.hf-wa-float { color: var(--on-whatsapp); }
/* Shipping note under the totals was #767676 on the dark card: 3.8:1. */
.hf-pending-cost small { color: var(--text-body); }
.hf-deposit-row th, .hf-deposit-row td { font-weight: var(--fw-semibold); }
.hf-deposit-row--rest th, .hf-deposit-row--rest td { font-weight: var(--fw-regular, 400); color: var(--text-body); }
.hf-cart-drawer__deposit { font-size: var(--fs-body, 1rem); }
/* Card code / size / made-to-order lines sat at 12px — the most common text
   size on the shop grid. */
.hf-card__meta, .hf-card__sku { font-size: var(--fs-xs); }

/* --- 1.7.30: shop the set (inc/set-items.php) ------------------------------ */
.hf-set-pieces { margin: var(--space-6) 0; padding: var(--space-4); border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--surface-card); }
.hf-set-pieces__title { margin: 0 0 var(--space-2); font-size: var(--fs-h4); color: var(--text-strong); }
.hf-set-pieces__saving { margin: 0 0 var(--space-3); color: var(--text-body); }
.hf-set-pieces__saving strong { color: var(--text-price); }
.hf-set-pieces__list { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.hf-set-pieces__item { display: grid; grid-template-columns: auto 64px 1fr auto; align-items: center; gap: var(--space-3); padding: var(--space-2); border-radius: var(--radius-md); transition: background-color var(--dur-base) var(--ease-out); }
.hf-set-pieces__item.is-highlighted { background: var(--action-soft); }
.hf-set-pieces__num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--action); color: var(--on-action); font-weight: var(--fw-semibold); font-size: var(--fs-sm); line-height: 1; }
.hf-set-pieces__thumb img { display: block; width: 64px; height: 64px; object-fit: contain; border-radius: var(--radius-sm); background: var(--surface-boucle); }
.hf-set-pieces__info { display: grid; gap: 2px; min-width: 0; }
.hf-set-pieces__name { color: var(--text-strong); font-weight: var(--fw-semibold); }
.hf-set-pieces__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); color: var(--text-body); font-size: var(--fs-sm); }
.hf-set-pieces__add { min-height: 44px; white-space: nowrap; }
@media (max-width: 479px) {
  .hf-set-pieces__item { grid-template-columns: auto 56px 1fr; }
  .hf-set-pieces__thumb img { width: 56px; height: 56px; }
  .hf-set-pieces__add { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
}
/* Pins: the layer matches the drawn photo, so x/y are photo percentages. */
.hf-set-pins { position: absolute; z-index: 2; pointer-events: none; }
/* 44px hit area around a 28px visible dot. */
.hf-set-pin { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--on-action); font-weight: var(--fw-semibold); font-size: var(--fs-sm); line-height: 1; transform: translate(-50%, -50%); pointer-events: auto; cursor: pointer; }
.hf-set-pin::before { content: ""; position: absolute; inset: 8px; border: 2px solid var(--surface); border-radius: 50%; background: var(--action); }
.hf-set-pin span { position: relative; z-index: 1; }
.hf-set-pin::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); padding: 4px 8px; border-radius: var(--radius-sm); background: var(--surface-inverse); color: var(--text-inverse); font-size: var(--fs-xs); font-weight: var(--fw-medium, 500); white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity var(--dur-fast) var(--ease-out); pointer-events: none; }
.hf-set-pin:hover::after, .hf-set-pin:focus-visible::after { opacity: 1; visibility: visible; }
.hf-set-pin:focus-visible { outline: 3px solid var(--surface); outline-offset: 0; border-radius: 50%; }
.hf-set-pin.is-low::after { bottom: auto; top: calc(100% + 4px); }
/* The drawer already shows the cart; WooCommerce's "View cart" link broke the row grid. */
.hf-set-pieces .added_to_cart { display: none; }
.hf-set-pieces__add--gone { display: inline-grid; place-items: center; padding: 0 var(--space-3); color: var(--text-body); font-size: var(--fs-sm); }

/* ==========================================================================
   Migration: WooCommerce controls and form fields on the new tokens.
   Tokens only, no hex values. Scoped to the Woo wrapper and the theme's own
   cart and checkout (the preview has no .woocommerce wrapper). html body
   prefixes give these rules enough specificity to beat the older
   .hf-checkout .form-row rules above. Appended last, so ties go here.
   ========================================================================== */

/* (a) Secondary pill buttons: coupon, update cart and every plain Woo button */
html body :is(.woocommerce, .hf-cart, .hf-checkout) :is(button.button, a.button, input.button) {
  box-sizing: border-box;
  min-height: 44px;
  height: 44px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: 600 0.9375rem/1 var(--font-arabic);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
html body :is(.woocommerce, .hf-cart, .hf-checkout) :is(button.button, a.button, input.button):hover {
  background: var(--sunken);
  border-color: var(--ink-3);
  color: var(--ink);
}
html body :is(.woocommerce, .hf-cart, .hf-checkout) :is(button.button, a.button, input.button):focus-visible {
  outline: 2px solid transparent;
  
}

/* (a) Primary: checkout, place order, add to cart on the single product page */
html body :is(.woocommerce, .hf-cart, .hf-checkout) :is(.checkout-button, #place_order, .single_add_to_cart_button).button {
  background: var(--action);
  border-color: var(--action);
  color: var(--on-action);
}
html body :is(.woocommerce, .hf-cart, .hf-checkout) :is(.checkout-button, #place_order, .single_add_to_cart_button).button:hover {
  background: var(--action-hover);
  border-color: var(--action-hover);
  color: var(--on-action);
}
/* Keyboard focus on the product page buttons: WooCommerce's button rules reset
   the sitewide :focus-visible ring here, so restore it (WCAG 2.4.7). */
html body .woocommerce div.product form.cart :is(.single_add_to_cart_button, .hf-buy-now):focus-visible {
  outline: none;
  box-shadow: var(--hf-focus);
}

/* (b) Text-like fields, selects and textareas. The coupon field keeps its
   borderless look inside its own pill. */
html body :is(.woocommerce, .hf-cart, .hf-checkout, main) :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], input[type="search"], select):not(.hf-coupon__field *) {
  box-sizing: border-box;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-field);
  background: var(--surface);
  color: var(--ink);
  font: 400 1rem/1.5 var(--font-arabic);
}
html body :is(.woocommerce, .hf-cart, .hf-checkout, main) textarea:not(.hf-coupon__field *) {
  box-sizing: border-box;
  min-height: 120px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-field);
  background: var(--surface);
  color: var(--ink);
  font: 400 1rem/1.5 var(--font-arabic);
}
html body .hf-checkout .form-row.woocommerce-invalid :is(input[type="text"], input[type="email"], input[type="tel"], select, textarea) {
  border-color: var(--danger);
}
html body :is(.woocommerce, .hf-cart, .hf-checkout, main) :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], input[type="search"], select, textarea):focus-visible {
  outline: 2px solid transparent;
  
}

/* (c) Product card add-to-cart: small secondary pill, full width */
html body .hf-card__add.button,
html body a.hf-card__add {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  min-height: 36px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: 600 0.875rem/1 var(--font-arabic);
  text-decoration: none;
}
html body .hf-card__add.button:hover,
html body a.hf-card__add:hover {
  background: var(--sunken);
  border-color: var(--ink-3);
}
html body .hf-card__add.button:focus-visible,
html body a.hf-card__add:focus-visible {
  outline: 2px solid transparent;
  
}

/* (a) Update-cart uses the same secondary treatment as the other cart actions */
html body .hf-cart__items .actions button.hf-cart__update {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
html body .hf-cart__items .actions button.hf-cart__update:hover {
  background: var(--sunken);
  border-color: var(--ink-3);
}


/* --- Audit fixes: image tiles, checkout hit targets, disabled payment ------ */
/* Image category tiles: 4:3 photo, solid label band at the bottom (was 30px tall, olive on olive). */
.hf-category-card--image {
  width: clamp(160px, 40vw, 240px);
  min-height: 160px;
  aspect-ratio: 4 / 3;
  justify-content: flex-end;
  gap: 0;
  padding: 0;
  background-color: var(--sunken);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius-card);
  overflow: hidden;
  color: var(--on-band);
}
.hf-category-card--image .hf-category-card__band {
  align-self: stretch;
  display: block;
  padding: var(--space-3) var(--space-4);
  background: var(--band);
  color: var(--on-band);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-align: center;
}

/* Checkout choice rows: the whole label row is the hit target, at least 44px tall. */
.woocommerce-checkout #payment ul.wc_payment_methods li > label,
.woocommerce-checkout .woocommerce-shipping-methods li > label,
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  cursor: pointer;
}

/* Disabled payment option: informational text, not faded below contrast. */
.woocommerce-checkout #payment ul.wc_payment_methods li.hf-choice--soon { opacity: 1; }
.woocommerce-checkout #payment ul.wc_payment_methods li.hf-choice--soon > label { color: var(--ink-3); }

/* --- Wave 1 (phone touch targets, checkout choice rows) -----------------------
 * Small text links: 24px minimum tap height. Checkout radio and terms rows: the
 * whole label row is the target, at least 44px tall. */
@media (max-width: 767px) {
  .hf-footer__list a, .hf-footer__bottom a, .hf-footer__contact a,
  .hf-policy-link { display: inline-block; min-height: 24px; padding-block: 4px; }
  .hf-card__title a { display: inline-block; min-height: 24px; }
}
.hf-checkout #shipping_method li > label,
.woocommerce-checkout #payment ul.wc_payment_methods li > label { min-height: 44px; padding-block: 2px; }
.hf-checkout .woocommerce-terms-and-conditions-wrapper .woocommerce-form__label-for-checkbox { min-height: 44px; align-items: center; }

/* --- factory story (PDP), shared steps, arch divider, custom-order process --- */
.hf-arch-divider { display: block; inline-size: 48px; block-size: 24px; margin: 0 auto var(--space-4); background: var(--line-strong); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24'%3E%3Cpath d='M3 23A21 21 0 0 1 45 23' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 48px 24px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24'%3E%3Cpath d='M3 23A21 21 0 0 1 45 23' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 48px 24px no-repeat; }
.hf-product-page .hf-pdp > .hf-factory { grid-column: 1 / -1; }
.hf-factory { margin-block: var(--space-16) 0; padding: var(--space-10) var(--space-4); background: var(--sunken); }
@media (min-width: 768px) { .hf-factory { padding: var(--space-16) var(--space-10); } }
.hf-factory__head { max-inline-size: 42rem; margin: 0 auto var(--space-8); text-align: center; }
.hf-factory__title { margin: 0; color: var(--ink); font-size: var(--fs-h2); font-weight: 500; line-height: 1.35; }
.hf-factory__photos { display: flex; gap: var(--space-4); margin: 0 0 var(--space-8); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hf-factory__photos::-webkit-scrollbar { display: none; }
.hf-factory__photo { flex: 0 0 calc((100% - var(--space-4)) / 2); min-inline-size: 0; margin: 0; scroll-snap-align: start; }
.hf-factory__photo img { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-card); background: var(--surface); }
@media (min-width: 768px) { .hf-factory__photos { overflow: visible; } .hf-factory__photo { flex: 1 1 0; } }
.hf-factory .hf-steps { margin: 0; }
@media (min-width: 768px) { .hf-factory .hf-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); } }
.hf-factory__note { max-inline-size: 42rem; margin: var(--space-6) auto 0; color: var(--ink-2); font-size: var(--fs-sm); text-align: center; }
.hf-customer-homes { margin-block: 0 var(--space-16); }
.hf-custom-order-start { display: none; }
@media (max-width: 767px) {
  .hf-custom-order-start { display: inline-flex; margin-block-end: var(--space-5); }
  #hf-custom-order-form { scroll-margin-block-start: 112px; }
}
.hf-process__note { margin: var(--space-6) 0 0; color: var(--ink-2); font-size: var(--fs-sm); }

/* Footer link that reopens the cookie preferences (WPConsent). */
.hf-footer__consent { color: var(--on-band-muted); text-decoration: underline; text-underline-offset: 3px; }
.hf-footer__consent:hover { color: var(--on-band); }

/* --- Photo ground: one photo language in grids and on the PDP stage --- */
/* Multiply turns the white backgrounds of the (opaque) cut-out JPEGs into the tile tone.
   Light: the sunken tone. Dark: a light tile (sand-50) under the same multiply, so the
   white box still disappears and the photos are not darkened by a dark ground. */
:root { --hf-photo-ground: var(--sunken); --hf-photo-blend: multiply; }
:root[data-hf-theme="dark"] { --hf-photo-ground: var(--photo-paper); }
@media (prefers-color-scheme: dark) { :root:not([data-hf-theme="light"]) { --hf-photo-ground: var(--photo-paper); } }
/* .hf-card__link is z-index:1 (WooCommerce), which makes it a stacking context: the
   multiply on the photo can only see what is painted inside it, so it carries the ground too. */
.hf-card__media .hf-card__link { background: var(--hf-photo-ground); }

/* --- Phone PDP buy path: title, price and add-to-cart sit higher, notices follow --- */
@media (max-width: 767px) {
  .hf-pdp__gallery .hf-gallery__main { aspect-ratio: 5 / 3; }
  .hf-pdp__summary { gap: var(--space-2); }
  .hf-gallery__thumbs { margin-top: var(--space-3); }
  .hf-gallery__thumb { width: 64px; }
  .hf-pdp__summary > * { order: 20; }
  .hf-pdp__summary > .product_title { order: 1; }
  .hf-pdp__summary > .price { order: 2; }
  .hf-pdp__summary > .hf-deposit { order: 3; }
  .hf-pdp__summary > form.cart, .hf-pdp__summary > [data-hf-cart-notice] { order: 4; }
  .hf-pdp__summary > .woocommerce-product-details__short-description { order: 5; }
  .hf-pdp__summary > .hf-order-type-notice { order: 6; }
  .hf-pdp__summary > .hf-attr-static { order: 7; }
  .hf-pdp__summary > .hf-product-question { order: 8; }
  .hf-pdp__summary > .hf-modify { order: 8; }
  .hf-pdp__summary > .hf-product-controls { order: 9; }
  .hf-pdp__summary > .hf-terms { order: 10; }
  .hf-pdp__summary > .product_meta { order: 11; }
}

/* --- Phone header: captions under the main controls --- */
.hf-tool-label { display: none; }
@media (max-width: 767px) {
  .hf-tool--labeled { flex-direction: column; justify-content: center; gap: 2px; width: 44px; min-width: 44px; height: 52px; padding: 0; }
  .hf-tool-label { display: block; font-size: var(--fs-xs); font-weight: var(--fw-medium); line-height: 1; white-space: nowrap; color: var(--text-strong); }
}

/* Phones: the product page started ~80px below the breadcrumb (two 42px paddings
   stacked). One small gap keeps the photo and price in the first screen. */
@media (max-width: 767px) {
  .hf-product-page { padding-block-start: var(--space-4); }
  .woocommerce div.product { padding-block-start: 0; }
}

/* Theme 1.8.5 polish: forms, narrow filter grids, touch targets and mobile overlap. */
.wpforms-container .wpforms-form label,
.wpforms-container .wpforms-form .wpforms-field-description,
.wpforms-container .wpforms-form .wpforms-required-label { color: var(--text-body); }
.wpforms-container .wpforms-form .wpforms-required-label { color: var(--danger); }
.wpforms-container .wpforms-form input:not([type="checkbox"]):not([type="radio"]),
.wpforms-container .wpforms-form select,
.wpforms-container .wpforms-form textarea { background: var(--surface-card); color: var(--text-strong); border: 1px solid var(--border-default); }
.wpforms-container .wpforms-form input::placeholder,
.wpforms-container .wpforms-form textarea::placeholder { color: var(--text-muted); }
.wpforms-container .wpforms-form button[type="submit"],
.wpforms-container .wpforms-form input[type="submit"] { min-height: 44px; border: 0; border-radius: var(--radius-pill); background: var(--action); color: var(--on-action); }
.wpforms-container .wpforms-form button[type="submit"]:hover,
.wpforms-container .wpforms-form input[type="submit"]:hover { background: var(--action-hover); color: var(--on-action); }
.required { color: var(--danger); }

.hf-dim-filter { grid-template-columns: minmax(0, 1fr); }
.hf-dim-filter > *, .hf-dim-filter input, .hf-dim-filter button { min-width: 0; width: 100%; }

@media (max-width: 767px) {
  html body .hf-card__add.button, html body a.hf-card__add { min-height: 44px; height: 44px; }
  .hf-footer__list a, .hf-footer__bottom a, .hf-footer__contact a { min-height: 44px; display: inline-flex; align-items: center; }
  .woocommerce form .show-password-input { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; }
  .hf-related-all { min-height: 44px; align-items: center; }
  .woocommerce .hf-cart__table td.product-thumbnail::before { content: none !important; }
  .hf-404__mark { max-width: calc(100vw - 48px); margin-inline-end: 0; transform: scale(.78); transform-origin: center; }
  .hf-404__mark::after { inset-inline: -8px; }
  .hf-404__seat { transform: translate(-105px, 41px) rotate(-3deg); }
  @keyframes hf-404-drop { from { transform: translate(0, 0) rotate(0); } to { transform: translate(-105px, 41px) rotate(-3deg); } }
}

.hf-brand-name { white-space: nowrap; }

/* WPForms ships selectors with a full-container prefix; keep theme tokens in charge. */
div.wpforms-container-full .wpforms-form :is(.wpforms-field-label, .wpforms-field-sublabel, .wpforms-field-description) { color: var(--text-body); }
div.wpforms-container-full .wpforms-form .wpforms-required-label { color: var(--danger); }
div.wpforms-container-full .wpforms-form :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { background: var(--surface-card); color: var(--text-strong); border-color: var(--border-default); }
div.wpforms-container-full .wpforms-form :is(button[type="submit"], input[type="submit"]) { background: var(--action); color: var(--on-action); border-color: var(--action); }
div.wpforms-container-full .wpforms-form :is(button[type="submit"], input[type="submit"]):hover { background: var(--action-hover); color: var(--on-action); border-color: var(--action-hover); }

/* WPForms paints its submit button from its own custom properties with a
   :not(:hover):not(:active) selector that outranks theme rules, so point the
   variables at the theme tokens instead of fighting the selector. */
html body div.wpforms-container-full {
  --wpforms-button-background-color: var(--action) !important;
  --wpforms-button-border-color: var(--action) !important;
  --wpforms-button-text-color: var(--on-action) !important;
  --wpforms-button-background-color-alt: var(--action-hover) !important;
}

/* 1.8.8: «اطلب تعديل على القطعة» sits at the top of the summary and
   «هل القطعة هتدخل؟» moved under the buy buttons (the two swapped places). A soft brand fill with an olive border makes it easy to find
   while staying quieter than the filled «إضافة إلى السلة» button. */
.hf-modify { margin-block: var(--space-3) 0; }
.hf-modify > summary.hf-button {
  align-items: center; justify-content: center; gap: var(--space-2);
  min-block-size: 44px; padding-block: 0; padding-inline: var(--space-6);
  background: var(--action-soft); color: var(--on-action-soft);
  border: 1.5px solid var(--action); border-radius: var(--radius-pill);
  font-weight: var(--fw-semibold);
}
.hf-modify > summary.hf-button:hover { background: var(--action-soft); color: var(--on-action-soft); border-color: var(--action-hover); box-shadow: inset 0 0 0 1px var(--action-hover); }
.hf-modify[open] > summary.hf-button { border-color: var(--action-hover); }

/* WPConsent exposes these parts across its shadow root. Keep all three
   choices visible while leaving more space for the page on phones. */
@media (max-width: 479px) {
  #wpconsent-container::part(wpconsent-banner-footer) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  #wpconsent-container::part(wpconsent-banner) {
    padding: 10px 12px;
  }

  #wpconsent-container::part(wpconsent-banner-body) {
    margin-block: 0 8px;
    font-size: 14px;
    line-height: 1.45;
  }

  #wpconsent-container::part(wpconsent-button-preferences),
  #wpconsent-container::part(wpconsent-button-cancel),
  #wpconsent-container::part(wpconsent-button-accept) {
    box-sizing: border-box;
    inline-size: 100%;
    min-block-size: 44px;
    margin: 0;
    padding-inline: 4px;
    font-size: 14px;
  }
}


/* Manual recommendation rails. Original product cards rotate only on user scroll. */
html .woocommerce :is(.related, .upsells, .cross-sells) ul.products.hf-recommendations-rail {
  --hf-rail-visible: 1.65;
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  overflow-anchor: none;
  scrollbar-width: thin;
  padding-block: 4px 16px;
  margin: 0;
  touch-action: pan-x pan-y pinch-zoom;
  cursor: grab;
}
html .woocommerce :is(.related, .upsells, .cross-sells) ul.products.hf-recommendations-rail > li.product {
  flex: 0 0 calc((100% - (var(--hf-rail-visible) - 1) * 16px) / var(--hf-rail-visible));
  width: auto;
  min-width: 0;
  max-width: none;
  float: none;
  clear: none;
  margin: 0;
}
html .woocommerce :is(.related, .upsells, .cross-sells) ul.products.hf-recommendations-rail::before,
html .woocommerce :is(.related, .upsells, .cross-sells) ul.products.hf-recommendations-rail::after {
  display: none;
  content: none;
}
.hf-recommendations-controls { display: flex; justify-content: flex-end; gap: 8px; margin-block: 0 12px; }
.hf-recommendations-controls button { width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--border-default); border-radius: 50%; background: var(--surface-card); color: var(--text-strong); font-size: 24px; cursor: pointer; }
.hf-recommendations-controls button:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }

/* Filter sheet: a sticky «عرض N منتج» button closes the sheet on phones and
   tablets; the count is the current result total (re-rendered on each filter). */
.hf-shop__sidebar-foot { display: none; }
@media (max-width: 1023px) {
  .hf-shop__sidebar-foot { position: sticky; bottom: 0; display: block; margin-top: var(--space-6); padding: var(--space-4) 0 calc(var(--space-4) + env(safe-area-inset-bottom, 0px)); background: var(--surface-card); border-top: 1px solid var(--border-subtle); }
  .hf-shop__sidebar-apply { width: 100%; min-height: 48px; justify-content: center; }
}
