/* ==========================================================================
   MediMix — base.css
   Design system + global components (every page).

   Layout is written with logical properties (inline-start/end), so the same
   rules serve RTL (the store) and LTR without a second stylesheet.

   Breakpoints (mobile first):  sm 600px · md 900px · lg 1200px
   ========================================================================== */

/* ---------- Fonts: Tajawal, self-hosted, Arabic + Latin subsets ---------- */
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/tajawal-400-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/tajawal-500-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/tajawal-700-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/tajawal-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/tajawal-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/tajawal-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
	/* Brand: the logo's ink; the Messenger button's red for buttons, hover and active states, and for offers. */
	--mx-ink: #141418;          /* text, primary buttons */
	--mx-ink-2: #3a3a42;        /* secondary text */
	--mx-muted: #66666f;        /* meta text (5.6:1 on white) */
	--mx-line: #e5e2db;
	--mx-line-2: #f0eee9;
	--mx-bg: #ffffff;
	--mx-surface: #f8f6f2;
	--mx-surface-2: #f1ede5;
	--mx-brand: #ec5454;        /* the Messenger chat button's red: buttons, hover/active borders, decoration (white on it 3.5:1) */
	--mx-brand-ink: #d43d3d;    /* red for small text, icons, pressed buttons (4.6:1 on white) */
	--mx-brand-dark: #c03434;   /* filled red buttons on hover */
	--mx-brand-soft: #fdeeee;   /* tinted backgrounds of active items */
	--mx-accent: #ec5454;       /* offers, discounts — the old store's red */
	--mx-accent-soft: #fdeeee;
	--mx-success: #1b7547;
	--mx-success-soft: #e6f3eb;
	--mx-warning: #8a5700;
	--mx-warning-soft: #fdf3de;
	--mx-error: #b42318;
	--mx-error-soft: #fdecea;
	--mx-star: #d69a00;
	--mx-focus: #2155c9;

	/* Type */
	--mx-font: "Tajawal", "Segoe UI", Tahoma, system-ui, sans-serif;
	--mx-fs-xs: 0.75rem;     /* 12 */
	--mx-fs-sm: 0.875rem;    /* 14 */
	--mx-fs-md: 1rem;        /* 16 body */
	--mx-fs-lg: 1.125rem;    /* 18 */
	--mx-fs-h4: 1.125rem;
	--mx-fs-h3: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
	--mx-fs-h2: clamp(1.3rem, 1.15rem + 0.7vw, 1.75rem);
	--mx-fs-h1: clamp(1.55rem, 1.3rem + 1.1vw, 2.25rem);
	--mx-fs-price: 1.0625rem;
	--mx-lh: 1.75;
	--mx-lh-tight: 1.35;

	/* Space (4px grid) */
	--mx-s1: 4px;  --mx-s2: 8px;  --mx-s3: 12px; --mx-s4: 16px;
	--mx-s5: 20px; --mx-s6: 24px; --mx-s8: 32px; --mx-s10: 40px;
	--mx-s12: 48px; --mx-s16: 64px;

	/* Shape */
	--mx-r-sm: 6px;
	--mx-r-md: 10px;
	--mx-r-lg: 14px;
	--mx-r-pill: 999px;
	--mx-shadow-sm: 0 1px 2px rgb(20 20 24 / 6%);
	--mx-shadow-md: 0 8px 24px rgb(20 20 24 / 10%);

	/* Layout */
	--mx-container: 1320px;
	--mx-gutter: 16px;
	--mx-header-h: 64px;
	--mx-tabbar-h: 64px;
	--mx-ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 900px) {
	:root { --mx-gutter: 24px; --mx-header-h: 68px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
	margin: 0;
	font-family: var(--mx-font);
	font-size: var(--mx-fs-md);
	line-height: var(--mx-lh);
	color: var(--mx-ink);
	background: var(--mx-bg);
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
.mx-icon { display: inline-block; flex: none; vertical-align: middle; }
[dir="ltr"] .mx-icon--start, [dir="ltr"] .mx-icon--end { transform: scaleX(-1); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--mx-brand-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p { margin: 0 0 var(--mx-s4); }
h1, h2, h3, h4, h5, h6 { margin: 0 0 var(--mx-s3); font-weight: 700; line-height: var(--mx-lh-tight); color: var(--mx-ink); }
h1 { font-size: var(--mx-fs-h1); }
h2 { font-size: var(--mx-fs-h2); }
h3 { font-size: var(--mx-fs-h3); }
h4 { font-size: var(--mx-fs-h4); }
small { font-size: var(--mx-fs-sm); }
hr { border: 0; border-top: 1px solid var(--mx-line); margin: var(--mx-s8) 0; }
table { border-collapse: collapse; width: 100%; }

:focus-visible { outline: 2px solid var(--mx-focus); outline-offset: 2px; border-radius: 2px; }
:focus:not(:focus-visible) { outline: none; }

.screen-reader-text, .mx-sr {
	position: absolute !important; /* WP core convention: must win over component rules. */
	width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.mx-skip {
	position: absolute; inset-inline-start: var(--mx-s4); top: -100px; z-index: 1000;
	padding: var(--mx-s3) var(--mx-s4); background: var(--mx-ink); color: #fff; border-radius: var(--mx-r-sm);
}
.mx-skip:focus { top: var(--mx-s2); color: #fff; }

.mx-container { width: 100%; max-width: calc(var(--mx-container) + var(--mx-gutter) * 2); margin-inline: auto; padding-inline: var(--mx-gutter); }
.mx-container--narrow { max-width: calc(820px + var(--mx-gutter) * 2); }
.mx-main { display: block; min-height: 50vh; }
.mx-main:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Buttons ----------
   .mx-btn is the component; WooCommerce's buttons are mapped onto it so the
   cart, checkout and account buttons are the same object. */
.mx-btn,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce-page a.button, .woocommerce-page button.button,
.wc-forward, .single_add_to_catalog_button {
	--_bg: var(--mx-ink);
	--_fg: #fff;
	--_bd: var(--mx-ink);
	display: inline-flex; align-items: center; justify-content: center; gap: var(--mx-s2);
	min-height: 46px; padding: 10px 22px;
	border: 1px solid var(--_bd); border-radius: var(--mx-r-md);
	background: var(--_bg); color: var(--_fg);
	font-size: var(--mx-fs-md); font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none;
	cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
	-webkit-tap-highlight-color: transparent;
}
.mx-btn:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce-page a.button:hover, .woocommerce-page button.button:hover, .wc-forward:hover {
	--_bg: #2d2d35; --_bd: #2d2d35; color: var(--_fg);
}
.mx-btn--accent, .woocommerce .button.checkout, .woocommerce a.checkout-button, #place_order, .mx-buy-now { --_bg: var(--mx-brand); --_bd: var(--mx-brand); }
.mx-btn--accent:hover, .woocommerce .button.checkout:hover, .woocommerce a.checkout-button:hover, #place_order:hover, .mx-buy-now:hover { --_bg: var(--mx-brand-dark); --_bd: var(--mx-brand-dark); }
.mx-btn--outline { --_bg: transparent; --_fg: var(--mx-ink); --_bd: var(--mx-line); }
.mx-btn--outline:hover { --_bg: var(--mx-surface); --_fg: var(--mx-ink); --_bd: var(--mx-ink-2); }
.mx-btn--ghost { --_bg: var(--mx-surface); --_fg: var(--mx-ink-2); --_bd: var(--mx-surface); }
.mx-btn--ghost:hover { --_bg: var(--mx-surface-2); --_fg: var(--mx-ink); --_bd: var(--mx-surface-2); }
.mx-btn--light { --_bg: #fff; --_fg: var(--mx-ink); --_bd: #fff; }
.mx-btn--light:hover { --_bg: var(--mx-brand-soft); --_fg: var(--mx-ink); --_bd: var(--mx-brand-soft); }
.mx-btn--block { width: 100%; }
.mx-btn[disabled], .mx-btn.disabled, .woocommerce .button.disabled, .woocommerce .button:disabled, .woocommerce button.button[disabled] {
	opacity: .5; cursor: not-allowed;
}
.woocommerce .button.loading, .mx-btn.loading { position: relative; color: transparent; }
.woocommerce .button.loading::after, .mx-btn.loading::after {
	content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px;
	border: 2px solid #fff; border-inline-end-color: transparent; border-radius: 50%;
	animation: mx-spin .7s linear infinite;
}
.woocommerce .button.added::before { content: none; }
.mx-btn.mx-just-added, .mx-btn.mx-just-added:hover { --_bg: var(--mx-success); --_bd: var(--mx-success); color: #fff; }
[data-mx-quiet-focus]:focus-visible { outline: none; }
@keyframes mx-spin { to { transform: rotate(360deg); } }

.mx-iconbtn {
	display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
	border: 0; border-radius: var(--mx-r-md); background: transparent; color: var(--mx-ink);
}
.mx-iconbtn:hover { background: var(--mx-surface); }

/* ---------- Forms ---------- */
.mx-input,
.woocommerce form .input-text, .woocommerce form select, .woocommerce-page form .input-text,
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"],
input[type="search"], input[type="url"], input[type="date"], select, textarea {
	width: 100%; min-height: 46px; padding: 10px 14px;
	border: 1px solid var(--mx-line); border-radius: var(--mx-r-md);
	background-color: #fff; color: var(--mx-ink); font-size: var(--mx-fs-md); line-height: 1.4;
	transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
select {
	appearance: none; padding-inline-end: 38px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23141418' stroke-width='1.75' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: left 14px center;
}
[dir="ltr"] select { background-position: right 14px center; }
input:hover, select:hover, textarea:hover { border-color: #cfcac0; }
input:focus, select:focus, textarea:focus, .mx-input:focus { border-color: var(--mx-ink-2); box-shadow: 0 0 0 3px rgb(33 85 201 / 18%); outline: none; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--mx-ink); margin: 0; }
label { font-weight: 500; }

.woocommerce form .form-row { margin: 0 0 var(--mx-s4); padding: 0; }
.woocommerce form .form-row label { display: block; margin-bottom: 6px; font-size: var(--mx-fs-sm); color: var(--mx-ink-2); }
.woocommerce form .form-row .required { color: var(--mx-error); text-decoration: none; border: 0; }
.woocommerce form .form-row .optional { color: var(--mx-muted); font-weight: 400; }
.woocommerce form .form-row.woocommerce-invalid .input-text,
.woocommerce form .form-row.woocommerce-invalid select { border-color: var(--mx-error); }
.woocommerce form .form-row.woocommerce-validated .input-text { border-color: var(--mx-line); }
.woocommerce form .form-row .woocommerce-input-wrapper { display: block; }
.woocommerce form .form-row .description { font-size: var(--mx-fs-sm); color: var(--mx-muted); margin-top: 4px; }
.woocommerce form .form-row label.checkbox, .woocommerce form .form-row label.woocommerce-form__label-for-checkbox { display: inline-flex; align-items: center; gap: var(--mx-s2); font-weight: 400; color: var(--mx-ink); }
.woocommerce .col2-set::after, .woocommerce-page .col2-set::after { content: ""; display: table; clear: both; }
@media (min-width: 600px) {
	.woocommerce form .form-row-first, .woocommerce form .form-row-last { width: calc(50% - 8px); float: inline-start; }
	.woocommerce form .form-row-last { float: inline-end; }
	.woocommerce form .form-row-wide { clear: both; }
}

/* Quantity stepper (core.js adds the buttons around WooCommerce's input). */
.quantity { display: inline-flex; align-items: stretch; }
.quantity input.qty { width: 64px; min-height: 46px; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.quantity .qty::-webkit-outer-spin-button, .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mx-qty { display: inline-flex; align-items: stretch; border: 1px solid var(--mx-line); border-radius: var(--mx-r-md); background: #fff; }
.quantity .mx-qty input.qty { border: 0; border-radius: 0; width: 52px; min-height: 44px; padding-inline: 4px; box-shadow: none; }
.mx-qty .qty:focus { box-shadow: none; }
.mx-qty:focus-within { border-color: var(--mx-ink-2); box-shadow: 0 0 0 3px rgb(33 85 201 / 18%); }
.mx-qty__btn { width: 44px; border: 0; background: transparent; color: var(--mx-ink); display: grid; place-items: center; border-radius: var(--mx-r-md); }
.mx-qty__btn:hover { background: var(--mx-surface); }
.mx-qty__btn:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- Badges, chips, counts ---------- */
.mx-badge, .onsale {
	display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px;
	border-radius: var(--mx-r-sm); font-size: var(--mx-fs-xs); font-weight: 700; line-height: 1.4;
	background: var(--mx-ink); color: #fff;
}
.mx-badge--sale, .onsale { background: var(--mx-accent); color: #fff; }
.mx-badge--muted { background: #fff; color: var(--mx-ink-2); border: 1px solid var(--mx-line); }
.mx-badge-count {
	display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
	border-radius: var(--mx-r-pill); background: var(--mx-accent); color: #fff;
	font-size: 11px; font-weight: 700; line-height: 1;
}
.mx-badge-count[data-count="0"] { background: var(--mx-surface-2); color: var(--mx-ink-2); }

.mx-chips { display: flex; flex-wrap: wrap; gap: var(--mx-s2); margin: 0; padding: 0; list-style: none; }
.mx-chips--center { justify-content: center; }
.mx-chip {
	display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px;
	border: 1px solid var(--mx-line); border-radius: var(--mx-r-pill); background: #fff;
	font-size: var(--mx-fs-sm); font-weight: 500; text-decoration: none; color: var(--mx-ink); white-space: nowrap;
}
.mx-chip:hover { border-color: var(--mx-ink-2); color: var(--mx-ink); }
.mx-chip.is-active { background: var(--mx-ink); border-color: var(--mx-ink); color: #fff; }
.mx-chip.is-active:hover { background: #2d2d35; }
.mx-chip--clear { border-style: dashed; color: var(--mx-ink-2); }

/* ---------- Star rating (replaces WooCommerce's icon font) ---------- */
.star-rating {
	--_star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 3.5 2.6 5.4 5.9.8-4.3 4.1 1 5.8L12 16.9l-5.2 2.7 1-5.8-4.3-4.1 5.9-.8z'/%3E%3C/svg%3E");
	position: relative; display: inline-block; width: 80px; height: 16px; flex: none;
	background: var(--mx-line); -webkit-mask: var(--_star) repeat-x 0 0 / 16px 16px; mask: var(--_star) repeat-x 0 0 / 16px 16px;
	font-size: 0; overflow: hidden; vertical-align: middle;
}
.star-rating span { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--mx-star); font-size: 0; }
[dir="rtl"] .star-rating { transform: scaleX(-1); } /* fill from the right, like the text */

/* ---------- Notices ---------- */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews, .wc-block-components-notice-banner {
	position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--mx-s3);
	margin: 0 0 var(--mx-s5); padding: 14px 18px; list-style: none;
	border: 1px solid var(--mx-line); border-inline-start: 4px solid var(--mx-ink); border-radius: var(--mx-r-md);
	background: var(--mx-surface); font-size: var(--mx-fs-md);
}
.woocommerce-message { border-inline-start-color: var(--mx-success); background: var(--mx-success-soft); }
.woocommerce-info { border-inline-start-color: var(--mx-brand); background: var(--mx-brand-soft); }
.woocommerce-error { border-inline-start-color: var(--mx-error); background: var(--mx-error-soft); display: block; }
.woocommerce-error li { margin: 2px 0; }
.woocommerce-message .button, .woocommerce-info .button { margin-inline-start: auto; order: 2; min-height: 38px; padding: 6px 14px; font-size: var(--mx-fs-sm); }
.woocommerce-message a:not(.button), .woocommerce-info a:not(.button) { font-weight: 700; }

/* ---------- Prices ---------- */
.price { font-weight: 700; color: var(--mx-ink); }
.price del { color: var(--mx-muted); font-weight: 400; font-size: .85em; text-decoration-thickness: 1px; }
.price ins { text-decoration: none; color: var(--mx-accent); }
.price .woocommerce-Price-currencySymbol { font-size: .85em; }

/* ---------- Top bar ----------
   A slim, light strip: the store's promises (or the announcement) and a few
   quick links. Phones show one message at a time (core.js rotates them). */
.mx-topbar { background: var(--mx-surface); border-bottom: 1px solid var(--mx-line-2); color: var(--mx-ink-2); font-size: var(--mx-fs-xs); line-height: 1.4; }
.mx-topbar__inner { display: flex; align-items: center; justify-content: center; gap: var(--mx-s5); min-height: 32px; }
.mx-topbar a { color: inherit; text-decoration: none; }
.mx-topbar a:hover { color: var(--mx-ink); }
.mx-topbar .mx-icon { flex: none; color: var(--mx-brand-ink); }
.mx-topbar__msg { flex: 1 1 auto; min-width: 0; text-align: center; }
.mx-topbar__announce { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 0; font-weight: 700; color: var(--mx-ink); }
a.mx-topbar__announce:hover { text-decoration: underline; text-underline-offset: 3px; }
.mx-topbar.has-announce { background: var(--mx-ink); border-bottom-color: var(--mx-ink); color: #fff; }
.mx-topbar.has-announce .mx-topbar__announce, .mx-topbar.has-announce a:hover { color: #fff; }
.mx-topbar.has-announce .mx-icon { color: var(--mx-brand); }
.mx-topbar.has-announce .mx-topbar__links a { color: #d9d5cc; }
.mx-topbar__trust { display: grid; margin: 0; padding: 0; list-style: none; }
.mx-topbar__trust-item {
	grid-area: 1 / 1; display: flex; justify-content: center; min-width: 0;
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .35s, transform .35s, visibility 0s .35s;
}
.mx-topbar__trust-item.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mx-topbar__trust-item > a, .mx-topbar__trust-item > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 6px 0; white-space: nowrap; }
.mx-topbar__trust-item > * > span { overflow: hidden; text-overflow: ellipsis; }
.mx-topbar__links { display: none; }
@media (min-width: 900px) {
	.mx-topbar__inner { justify-content: space-between; }
	.mx-topbar__msg { text-align: start; }
	.mx-topbar__trust { display: flex; }
	.mx-topbar__trust-item { grid-area: auto; opacity: 1; visibility: visible; transform: none; transition: none; }
	.mx-topbar__trust-item:nth-child(n+3) { display: none; }
	.mx-topbar__trust-item + .mx-topbar__trust-item { margin-inline-start: var(--mx-s4); padding-inline-start: var(--mx-s4); border-inline-start: 1px solid var(--mx-line); }
	.mx-topbar__links { display: flex; align-items: center; gap: var(--mx-s5); margin: 0; padding: 0; list-style: none; }
	.mx-topbar__links a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; white-space: nowrap; }
}
@media (min-width: 1200px) {
	.mx-topbar__trust-item:nth-child(3) { display: flex; }
}

/* ---------- Header ---------- */
.mx-header {
	position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--mx-line);
	transition: transform .3s var(--mx-ease), box-shadow .2s;
}
.admin-bar .mx-header { top: 0; }
@media (min-width: 783px) { .admin-bar .mx-header { top: 32px; } }
.mx-header.is-scrolled { box-shadow: 0 4px 16px rgb(20 20 24 / 6%); border-bottom-color: transparent; }
/* Slides away while scrolling down, back on scroll up (core.js). */
.mx-header.is-hidden { transform: translateY(calc(-100% - 48px)); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .mx-header { transition: none; } }

.mx-header__main {
	display: grid; align-items: center; gap: var(--mx-s2);
	grid-template-columns: auto 1fr auto;
	grid-template-areas: "menu logo actions" "search search search";
	padding-block: 6px var(--mx-s2);
}
.mx-header__menu { grid-area: menu; }
.mx-header__logo { grid-area: logo; justify-self: center; }
.mx-search { grid-area: search; }
.mx-header__actions { grid-area: actions; display: flex; align-items: center; gap: 2px; }

.mx-logo { display: inline-flex; align-items: center; text-decoration: none; }
.mx-logo__img { width: auto; height: 34px; }
.mx-logo__text { font-size: 1.4rem; font-weight: 700; }

.mx-action {
	position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-width: 44px; min-height: 44px; padding: 0 8px; border: 0; border-radius: var(--mx-r-md);
	background: none; color: var(--mx-ink); font: inherit; text-decoration: none; cursor: pointer;
	transition: background .15s;
}
.mx-action:hover { background: var(--mx-surface); color: var(--mx-ink); }
.mx-action:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px var(--mx-focus); border-radius: var(--mx-r-md); }
.mx-action__icon { position: relative; display: grid; place-items: center; }
.mx-action__icon .mx-badge-count { position: absolute; top: -6px; inset-inline-end: -9px; min-width: 18px; height: 18px; padding: 0 4px; font-size: 10.5px; box-shadow: 0 0 0 2px #fff; }
.mx-action__label { display: none; }
.mx-action--account, .mx-action--wishlist, .mx-acct { display: none; }

@media (min-width: 900px) {
	.mx-header__main {
		grid-template-columns: auto minmax(280px, 640px) auto;
		grid-template-areas: "logo search actions";
		justify-content: space-between; gap: var(--mx-s6);
		min-height: var(--mx-header-h); padding-block: 0;
	}
	.mx-header__menu { display: none; }
	.mx-header__logo { justify-self: start; }
	.mx-logo__img { height: 42px; }
	.mx-header__actions { gap: var(--mx-s1); }
	.mx-action--account, .mx-action--wishlist, .mx-acct { display: inline-flex; }
	.mx-action { padding: 0 10px; }
	/* A hairline between the account and the wishlist / cart icons. */
	.mx-acct, .mx-header__actions > .mx-action--account { margin-inline-end: var(--mx-s2); padding-inline-end: var(--mx-s3); border-inline-end: 1px solid var(--mx-line); border-radius: 0; }
}
@media (min-width: 1200px) {
	.mx-header__main { gap: var(--mx-s8); }
	.mx-action__label { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; text-align: start; }
	.mx-action__hint { max-width: 18ch; overflow: hidden; font-size: 11.5px; color: var(--mx-muted); white-space: nowrap; text-overflow: ellipsis; }
	.mx-action__main { display: inline-flex; align-items: center; gap: 4px; font-size: var(--mx-fs-sm); font-weight: 700; white-space: nowrap; }
}
.mx-cart-total.is-empty { font-weight: 500; color: var(--mx-ink-2); }

/* Phones: menu and cart as matching round buttons either side of a centred logo, and a light full-width search. */
@media (max-width: 899px) {
	.mx-header__main { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: var(--mx-s2) var(--mx-s3); padding-block: 8px 10px; }
	.mx-logo__img { height: 30px; }
	.mx-header__menu, .mx-header__actions .mx-action--cart {
		width: 42px; height: 42px; min-width: 0; min-height: 0; padding: 0; border-radius: 50%;
		background: var(--mx-surface); color: var(--mx-ink);
	}
	.mx-header__menu:active, .mx-header__actions .mx-action--cart:active { background: var(--mx-surface-2); }
	.mx-header__actions { justify-content: flex-end; gap: 0; }
	.mx-header__actions .mx-action--cart .mx-badge-count { top: -9px; inset-inline-end: -11px; min-width: 18px; height: 18px; font-size: 10px; box-shadow: 0 0 0 2px #fff; }
	.mx-header__actions .mx-action--cart .mx-badge-count[data-count="0"] { display: none; }
	.mx-header.is-scrolled { box-shadow: 0 6px 18px rgb(20 20 24 / 8%); }
}

/* Account menu */
.mx-acct { position: relative; }
.mx-acct__chev { transition: transform .15s; }
.mx-acct [aria-expanded="true"] { background: var(--mx-surface); }
.mx-acct [aria-expanded="true"] .mx-acct__chev { transform: rotate(180deg); }
.mx-menu {
	position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 120; min-width: 250px;
	padding: var(--mx-s2); background: #fff; border: 1px solid var(--mx-line); border-radius: var(--mx-r-lg); box-shadow: var(--mx-shadow-md);
}
.mx-menu[hidden] { display: none; }
.mx-menu__list { margin: 0; padding: 0; list-style: none; }
.mx-menu__link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--mx-r-sm); font-size: var(--mx-fs-sm); color: var(--mx-ink); text-decoration: none; }
.mx-menu__link:hover { background: var(--mx-surface); color: var(--mx-ink); }
.mx-menu__link .mx-icon { color: var(--mx-brand-ink); }
.mx-menu__item.is-logout { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--mx-line-2); }
.mx-menu__item.is-logout .mx-menu__link, .mx-menu__item.is-logout .mx-icon { color: var(--mx-error); }

/* Search */
.mx-search { position: relative; display: flex; width: 100%; }
/* Scoped under .mx-search: the generic input[type="search"] rule (Forms) is more specific than a lone class. */
.mx-search .mx-search__input {
	-webkit-appearance: none; appearance: none;
	min-height: 44px; padding: 0 52px 0 18px; padding-inline: 18px 52px; border: 1px solid var(--mx-line-2); border-radius: var(--mx-r-pill);
	background: var(--mx-surface); font-size: var(--mx-fs-sm);
}
.mx-search .mx-search__input::placeholder { color: var(--mx-muted); opacity: 1; }
.mx-search .mx-search__input:hover { border-color: var(--mx-line); }
.mx-search .mx-search__input:focus { background: #fff; border-color: var(--mx-ink-2); box-shadow: 0 0 0 3px rgb(236 84 84 / 20%); }
.mx-search .mx-search__input::-webkit-search-cancel-button, .mx-search .mx-search__input::-webkit-search-decoration { -webkit-appearance: none; }
.mx-search__submit {
	position: absolute; inset-inline-end: 4px; top: 50%; width: 36px; height: 36px; margin-top: -18px;
	display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
	background: var(--mx-ink); color: #fff;
}
.mx-search__submit:hover { background: #2d2d35; }
/* Phones (header): a light pill with a grey search icon at its start; 16px text so iOS doesn't zoom on focus. */
@media (max-width: 899px) {
	.mx-header .mx-search .mx-search__input { min-height: 44px; padding-inline: 46px 16px; font-size: 16px; }
	.mx-header .mx-search__submit { inset-inline-start: 5px; inset-inline-end: auto; background: none; color: var(--mx-muted); }
	.mx-header .mx-search__submit:hover { background: none; color: var(--mx-ink); }
}
.mx-search__panel {
	position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 120;
	max-height: min(70vh, 560px); overflow-y: auto; padding: var(--mx-s2);
	background: #fff; border: 1px solid var(--mx-line); border-radius: var(--mx-r-lg); box-shadow: var(--mx-shadow-md);
}
.mx-search__group { padding: var(--mx-s2); font-size: var(--mx-fs-xs); font-weight: 700; color: var(--mx-muted); }
.mx-search__item {
	display: grid; grid-template-columns: 52px 1fr; gap: var(--mx-s3); align-items: center;
	padding: var(--mx-s2); border-radius: var(--mx-r-md); text-decoration: none; color: var(--mx-ink);
}
.mx-search__item[aria-selected="true"], .mx-search__item:hover { background: var(--mx-surface); color: var(--mx-ink); }
.mx-search__item img { width: 52px; height: 52px; object-fit: contain; border-radius: var(--mx-r-sm); background: #fff; border: 1px solid var(--mx-line-2); }
.mx-search__item > span { min-width: 0; }
.mx-search__name { display: block; font-size: var(--mx-fs-sm); font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.mx-search__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 2px; font-size: var(--mx-fs-sm); line-height: 1.4; }
.mx-search__price { font-weight: 700; color: var(--mx-ink); }
.mx-search__price.is-sale { color: var(--mx-accent); }
.mx-search__was { font-size: var(--mx-fs-xs); color: var(--mx-muted); }
.mx-search__off { padding: 1px 6px; border-radius: var(--mx-r-pill); background: var(--mx-accent-soft); color: var(--mx-accent); font-size: var(--mx-fs-xs); font-weight: 700; }
.mx-search__term { display: flex; justify-content: space-between; gap: var(--mx-s3); padding: 10px var(--mx-s2); border-radius: var(--mx-r-md); text-decoration: none; }
.mx-search__term:hover, .mx-search__term[aria-selected="true"] { background: var(--mx-surface); }
.mx-search__term small { color: var(--mx-muted); }
.mx-search__all { display: block; margin-top: var(--mx-s2); padding: 12px; text-align: center; font-weight: 700; border-top: 1px solid var(--mx-line-2); text-decoration: none; }
.mx-search__empty { padding: var(--mx-s4); color: var(--mx-ink-2); font-size: var(--mx-fs-sm); }
/* Clear / voice button: before the submit button (desktop), at the far end (phones). */
.mx-search .mx-search__input { padding-inline-end: 86px; }
.mx-search__tool {
	position: absolute; inset-inline-end: 44px; top: 50%; width: 34px; height: 34px; margin-top: -17px;
	display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--mx-muted); cursor: pointer;
}
.mx-search__tool[hidden] { display: none; }
.mx-search__tool:hover { color: var(--mx-ink); background: var(--mx-surface-2); }
.mx-search__tool[data-mode="clear"] .mx-search__tool-mic, .mx-search__tool[data-mode="mic"] .mx-search__tool-clear { display: none; }
.mx-search__tool > span { display: grid; place-items: center; }
.mx-search.is-listening .mx-search__tool { color: #fff; background: var(--mx-accent); animation: mx-pulse 1.2s ease-in-out infinite; }
@keyframes mx-pulse { 50% { box-shadow: 0 0 0 7px rgb(196 47 56 / 18%); } }
.mx-search.is-loading .mx-search__submit .mx-icon { animation: mx-spin .8s linear infinite; }
@keyframes mx-spin { to { transform: rotate(360deg); } }
@media (max-width: 899px) {
	.mx-header .mx-search .mx-search__input { padding-inline-end: 44px; }
	.mx-header .mx-search__tool { inset-inline-end: 5px; }
	/* Phones: an edge-to-edge sheet under the search box; height set by core.js (keyboard aware). */
	.mx-header .mx-search__panel {
		inset-inline: calc(var(--mx-gutter) * -1); top: calc(100% + var(--mx-s2));
		padding: var(--mx-s1) var(--mx-s2) var(--mx-s3);
		border-inline: 0; border-radius: 0 0 var(--mx-r-lg) var(--mx-r-lg);
		box-shadow: 0 16px 24px rgb(20 20 24 / 12%);
		overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
	}
	.mx-header .mx-search__item { grid-template-columns: 48px minmax(0, 1fr); gap: var(--mx-s2); padding: 8px 6px; }
	.mx-header .mx-search__item img { width: 48px; height: 48px; }
	.mx-header .mx-search__name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.45; }
	.mx-header .mx-search__term, .mx-header .mx-search__fix { padding: 10px 6px; }
	.mx-header .mx-search__term small { white-space: nowrap; }
	.mx-header .mx-search__group { padding: 10px 6px 6px; }
	.mx-header .mx-search__chips { padding: 0 6px; }
	.mx-header .mx-search__chip { padding: 8px 14px; }
	.mx-header .mx-search__all { position: sticky; bottom: calc(var(--mx-s3) * -1); margin-inline: calc(var(--mx-s2) * -1); margin-bottom: calc(var(--mx-s3) * -1); background: #fff; }
}
@media (prefers-reduced-motion: reduce) {
	.mx-search.is-listening .mx-search__tool, .mx-search.is-loading .mx-search__submit .mx-icon { animation: none; }
}
.mx-search__panel mark { padding: 0; background: none; color: inherit; font-weight: 700; box-shadow: inset 0 -0.45em 0 var(--mx-brand-soft); }
.mx-search__brand { display: block; font-size: var(--mx-fs-xs); font-weight: 700; color: var(--mx-brand-ink); letter-spacing: .02em; line-height: 1.4; }
.mx-search__oos { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: var(--mx-r-pill); background: var(--mx-surface-2); color: var(--mx-muted); font-size: var(--mx-fs-xs); font-weight: 700; }
.mx-search__item.is-oos img { opacity: .55; }
.mx-search__fix { display: block; margin-bottom: var(--mx-s1, 4px); padding: 10px var(--mx-s2); border-radius: var(--mx-r-md); background: var(--mx-brand-soft); color: var(--mx-ink); font-size: var(--mx-fs-sm); text-decoration: none; }
.mx-search__fix strong { color: var(--mx-brand-ink); }
.mx-search__fix:hover, .mx-search__fix[aria-selected="true"] { background: var(--mx-surface-2); }
.mx-search__terms { display: grid; gap: 2px; }
.mx-search__term { align-items: center; justify-content: flex-start; color: var(--mx-ink); }
.mx-search__term img, .mx-search__term-ico { flex: none; width: 32px; height: 32px; border-radius: var(--mx-r-sm); object-fit: contain; background: #fff; border: 1px solid var(--mx-line-2); }
.mx-search__term-ico { display: grid; place-items: center; color: var(--mx-brand-ink); font-weight: 700; background: var(--mx-brand-soft); border-color: transparent; }
.mx-search__term-name { flex: 1; min-width: 0; font-weight: 500; }
.mx-search__term small { flex: none; }
.mx-search__group--row { display: flex; align-items: center; justify-content: space-between; }
.mx-search__clear-recent { padding: 2px 6px; border: 0; background: none; color: var(--mx-brand-ink); font: inherit; font-weight: 700; cursor: pointer; }
.mx-search__clear-recent:hover { text-decoration: underline; }
.mx-search__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--mx-s2); padding: 0 var(--mx-s2); list-style: none; }
.mx-search__chip-item { display: inline-flex; align-items: center; border: 1px solid var(--mx-line); border-radius: var(--mx-r-pill); background: #fff; }
.mx-search__chip { padding: 6px 12px; color: var(--mx-ink); font-size: var(--mx-fs-sm); text-decoration: none; border-radius: var(--mx-r-pill); }
.mx-search__chip:hover, .mx-search__chip[aria-selected="true"] { background: var(--mx-surface); }
.mx-search__chip-x { margin-inline-start: -6px; padding: 0 10px 0 8px; border: 0; background: none; color: var(--mx-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.mx-search__chip-x:hover { color: var(--mx-error); }
.mx-search__all span { color: var(--mx-muted); font-weight: 500; }

/* Results page: spelling fix, unavailable words, matching brands/categories. */
.mx-search-notice { display: grid; gap: var(--mx-s2); margin-bottom: var(--mx-s4); }
.mx-search-notice:empty { display: none; }
.mx-search-notice p { margin: 0; font-size: var(--mx-fs-sm); color: var(--mx-ink-2); }
.mx-search-notice__fix { padding: 10px 14px; border-radius: var(--mx-r-md); background: var(--mx-brand-soft); }
.mx-search-notice__fix a { color: var(--mx-brand-ink); }
.mx-search-notice__fix span { color: var(--mx-muted); }
.mx-search-notice__terms, .mx-search-notice__popular { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mx-s2); font-size: var(--mx-fs-sm); color: var(--mx-muted); }
.mx-search-notice__terms .mx-chips, .mx-search-notice__popular .mx-chips { margin: 0; }
.mx-search-notice .mx-chip small { color: var(--mx-muted); font-weight: 400; }
.mx-empty .mx-search-notice { justify-items: center; margin-top: var(--mx-s4); }

/* Navigation row (desktop only; mobile uses the drawer). */
.mx-nav { display: none; border-top: 1px solid var(--mx-line-2); }
@media (min-width: 900px) { .mx-nav { display: block; } }
.mx-nav__inner { display: flex; align-items: center; gap: var(--mx-s4); min-height: 46px; }
.mx-nav__list { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.mx-nav__item { position: relative; display: flex; align-items: center; }
.mx-nav__link { position: relative; display: block; padding: 11px 12px; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--mx-ink); white-space: nowrap; }
.mx-nav__link::after {
	content: ""; position: absolute; inset-inline: 12px; bottom: 5px; height: 2px; border-radius: 2px;
	background: var(--mx-brand); transform: scaleX(0); transition: transform .2s var(--mx-ease);
}
.mx-nav__link:hover, .mx-nav__item.is-current > .mx-nav__link { color: var(--mx-brand-ink); }
.mx-nav__link:hover::after, .mx-nav__item.is-current > .mx-nav__link::after { transform: scaleX(1); }
.mx-nav__toggle { width: 24px; height: 24px; margin-inline-start: -10px; padding: 0; border: 0; background: none; display: grid; place-items: center; border-radius: var(--mx-r-sm); color: var(--mx-ink-2); }
.mx-nav__toggle:hover { background: var(--mx-surface); }
.mx-nav__sub {
	position: absolute; top: 100%; inset-inline-start: 0; z-index: 110; min-width: 230px;
	margin: 0; padding: var(--mx-s2); list-style: none;
	background: #fff; border: 1px solid var(--mx-line); border-radius: var(--mx-r-lg); box-shadow: var(--mx-shadow-md);
	visibility: hidden; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility 0s .15s;
}
.mx-nav__item:hover > .mx-nav__sub, .mx-nav__item:focus-within > .mx-nav__sub, .mx-nav__toggle[aria-expanded="true"] + .mx-nav__sub {
	visibility: visible; opacity: 1; transform: none; transition-delay: 0s;
}
.mx-nav__sublink { display: block; padding: 8px 12px; border-radius: var(--mx-r-sm); text-decoration: none; font-size: var(--mx-fs-sm); }
.mx-nav__sublink:hover { background: var(--mx-surface); color: var(--mx-ink); }
.mx-nav__highlight {
	flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 14px;
	border-radius: var(--mx-r-pill); background: var(--mx-accent-soft); color: var(--mx-accent);
	font-size: var(--mx-fs-sm); font-weight: 700; text-decoration: none; transition: background .15s, color .15s;
}
.mx-nav__highlight:hover { background: var(--mx-accent); color: #fff; }

/* Shop by category (mega panel) */
.mx-cats { position: static; flex: none; }
.mx-cats__btn {
	display: inline-flex; align-items: center; gap: var(--mx-s2); min-height: 34px; padding: 0 12px 0 14px;
	border: 0; border-radius: var(--mx-r-sm); background: var(--mx-ink); color: #fff; font-size: var(--mx-fs-sm); font-weight: 700;
}
.mx-cats__btn:hover { background: #2d2d35; }
.mx-cats__chev { transition: transform .15s; }
.mx-cats__btn[aria-expanded="true"] .mx-cats__chev { transform: rotate(180deg); }
.mx-cats__panel {
	position: absolute; inset-inline: 0; top: 100%; z-index: 110;
	background: #fff; border-top: 1px solid var(--mx-line); box-shadow: 0 18px 40px rgb(20 20 24 / 12%);
}
.mx-cats__panel[hidden] { display: none; }
.mx-cats__inner { display: grid; grid-template-columns: 270px minmax(0, 1fr); padding-block: var(--mx-s4) var(--mx-s6); max-height: calc(100vh - 200px); }
.mx-cats__side { margin: 0; padding: 0; padding-inline-end: var(--mx-s3); list-style: none; border-inline-end: 1px solid var(--mx-line-2); overflow-y: auto; }
.mx-cats__top {
	display: flex; align-items: center; gap: var(--mx-s3);
	padding: 6px 8px; border-radius: var(--mx-r-md); font-weight: 500; color: var(--mx-ink); text-decoration: none;
}
.mx-cats__thumb { flex: none; display: grid; place-items: center; width: 36px; height: 36px; overflow: hidden; border-radius: 10px; background: var(--mx-surface); color: var(--mx-brand-ink); }
.mx-cats__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mx-cats__name { flex: 1; min-width: 0; }
.mx-cats__top > .mx-icon { flex: none; color: var(--mx-muted); opacity: .7; }
.mx-cats__top.is-active { background: var(--mx-brand-soft); color: var(--mx-brand-ink); font-weight: 700; }
.mx-cats__top.is-active .mx-cats__thumb { background: #fff; }
.mx-cats__top.is-active > .mx-icon { color: var(--mx-brand-ink); opacity: 1; }
.mx-cats__panes { min-width: 0; overflow-y: auto; padding-inline-start: var(--mx-s8); }
.mx-cats__pane { display: none; }
.mx-cats__pane.is-active { display: block; }
.mx-cats__head { display: flex; align-items: baseline; gap: var(--mx-s3); margin-bottom: var(--mx-s4); padding: 6px 0 var(--mx-s3); border-bottom: 1px solid var(--mx-line-2); }
.mx-cats__head h3 { margin: 0; font-size: var(--mx-fs-lg); }
.mx-cats__head h3 a { color: inherit; text-decoration: none; }
.mx-cats__meta { font-size: var(--mx-fs-sm); color: var(--mx-muted); }
.mx-cats__head .mx-cats__all { margin-inline-start: auto; }
.mx-cats__all { display: inline-flex; align-items: center; gap: 4px; font-size: var(--mx-fs-sm); font-weight: 700; color: var(--mx-brand-ink); text-decoration: none; }
.mx-cats__all:hover { text-decoration: underline; }
.mx-cats__side-all { margin-top: var(--mx-s2); padding: var(--mx-s3) 12px 0; border-top: 1px solid var(--mx-line-2); }

/* Sub-category (or main category) tiles, each with the category's image */
.mx-cats__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: var(--mx-s3); margin: 0; padding: 0; list-style: none; }
.mx-cats__tile {
	display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%; padding: var(--mx-s3) var(--mx-s2);
	border: 1px solid var(--mx-line-2); border-radius: var(--mx-r-lg); text-align: center; color: var(--mx-ink); text-decoration: none;
	transition: border-color .15s, box-shadow .15s, transform .15s var(--mx-ease);
}
.mx-cats__tile:hover { border-color: var(--mx-brand); box-shadow: var(--mx-shadow-sm); transform: translateY(-2px); }
.mx-cats__tile-img { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 6px; overflow: hidden; border-radius: 50%; background: var(--mx-surface); color: var(--mx-brand-ink); }
.mx-cats__tile-img img { width: 100%; height: 100%; object-fit: cover; }
.mx-cats__tile-name { font-size: var(--mx-fs-sm); font-weight: 700; line-height: 1.4; }
.mx-cats__tile-count { font-size: var(--mx-fs-xs); color: var(--mx-muted); }

/* A category without sub-categories */
.mx-cats__solo { display: flex; align-items: center; gap: var(--mx-s6); max-width: 560px; padding: var(--mx-s5); border-radius: var(--mx-r-lg); background: var(--mx-surface); color: var(--mx-ink); text-decoration: none; }
.mx-cats__solo-img { flex: none; width: 160px; aspect-ratio: 1; overflow: hidden; border-radius: var(--mx-r-lg); background: #fff; }
.mx-cats__solo-img img { width: 100%; height: 100%; object-fit: cover; }
.mx-cats__solo-text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--mx-s3); font-size: var(--mx-fs-lg); }
@media (prefers-reduced-motion: reduce) { .mx-cats__tile { transition: none; } .mx-cats__tile:hover { transform: none; } }

/* ---------- Drawers (<dialog>) ---------- */
.mx-drawer {
	position: fixed; inset-block: 0; margin: 0; padding: 0; border: 0;
	width: min(420px, 92vw); max-width: none; height: 100%; max-height: none;
	background: #fff; color: var(--mx-ink); display: flex; flex-direction: column;
}
.mx-drawer:not([open]) { display: none; }
.mx-drawer--start { inset-inline-start: 0; inset-inline-end: auto; }
.mx-drawer--end { inset-inline-end: 0; inset-inline-start: auto; }
.mx-drawer::backdrop { background: rgb(20 20 24 / 45%); }
.mx-drawer[open] { animation: mx-drawer-in .22s var(--mx-ease); }
.mx-drawer--start[open] { --_from: 100%; }
.mx-drawer--end[open] { --_from: -100%; }
[dir="ltr"] .mx-drawer--start[open] { --_from: -100%; }
[dir="ltr"] .mx-drawer--end[open] { --_from: 100%; }
@keyframes mx-drawer-in { from { transform: translateX(var(--_from)); } to { transform: none; } }
.mx-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--mx-s3); padding: var(--mx-s3) var(--mx-s4); border-bottom: 1px solid var(--mx-line); }
.mx-drawer__title { margin: 0; font-size: var(--mx-fs-lg); }
.mx-drawer__body { flex: 1; overflow-y: auto; padding: var(--mx-s4); overscroll-behavior: contain; }
body.mx-lock { overflow: hidden; }

/* Mobile menu drawer (template-parts/drawer-menu.php) */
.mx-mdrawer { width: min(400px, 88vw); }
.mx-mdrawer__head { padding: 10px var(--mx-s4); border-bottom-color: var(--mx-line-2); }
.mx-mdrawer__logo .mx-logo__img { height: 30px; }
.mx-mdrawer__close { width: 40px; height: 40px; border-radius: 50%; background: var(--mx-surface); }
.mx-mdrawer__close:hover { background: var(--mx-surface-2); }
.mx-mdrawer__body { padding: 0 0 calc(var(--mx-s6) + env(safe-area-inset-bottom, 0px)); }

/* Account card */
.mx-mdrawer__acct, .mx-mdrawer__me--guest { margin: var(--mx-s4) var(--mx-s4) 0; border-radius: var(--mx-r-lg); background: var(--mx-surface-2); }
.mx-mdrawer__acct { padding: 4px 4px 8px; }
.mx-mdrawer__me { display: flex; align-items: center; gap: var(--mx-s3); padding: 10px 12px; border-radius: var(--mx-r-lg); color: var(--mx-ink); text-decoration: none; }
.mx-mdrawer__me > .mx-icon { flex: none; color: var(--mx-brand-ink); }
.mx-mdrawer__avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--mx-brand-ink); }
.mx-mdrawer__me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.mx-mdrawer__me-text strong { font-size: var(--mx-fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-mdrawer__me-text small { font-size: var(--mx-fs-xs); color: var(--mx-muted); }
.mx-mdrawer__quick { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0 4px; list-style: none; }
.mx-mdrawer__quick a {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 60px; padding: 8px 2px;
	border-radius: var(--mx-r-md); background: #fff; font-size: var(--mx-fs-xs); font-weight: 500; line-height: 1.3; text-align: center; color: var(--mx-ink-2); text-decoration: none;
}
.mx-mdrawer__quick .mx-icon { color: var(--mx-brand-ink); }

/* Tabs (segmented control, sticks to the top while the list scrolls) */
.mx-mdrawer__tabs {
	position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
	margin: 0; padding: var(--mx-s4) var(--mx-s4) var(--mx-s3); background: #fff;
}
.mx-mdrawer__tabs::before { content: ""; position: absolute; inset: var(--mx-s4) var(--mx-s4) var(--mx-s3); z-index: -1; border-radius: var(--mx-r-pill); background: var(--mx-surface-2); }
.mx-mdrawer__tab {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; margin: 4px 0; padding: 0 var(--mx-s2);
	border: 0; border-radius: var(--mx-r-pill); background: transparent; font: inherit; font-size: var(--mx-fs-sm); font-weight: 700; color: var(--mx-muted); cursor: pointer;
}
.mx-mdrawer__tab:first-child { margin-inline-start: 4px; }
.mx-mdrawer__tab:last-child { margin-inline-end: 4px; }
.mx-mdrawer__tab[aria-selected="true"] { background: #fff; color: var(--mx-ink); box-shadow: 0 1px 3px rgb(20 20 24 / 12%); }
.mx-mdrawer__panel { padding: 0 var(--mx-s4); }
.mx-mdrawer__panel[hidden], .mx-mdrawer__view[hidden] { display: none; }
#mx-mpanel-links:not([role]) { padding-top: var(--mx-s4); }

/* Categories: rows with thumbnails */
.mx-mcats { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.mx-mcats__row {
	display: flex; align-items: center; gap: var(--mx-s3); width: 100%; min-height: 58px; padding: 6px;
	border: 0; border-radius: var(--mx-r-md); background: none; font: inherit; text-align: start; color: var(--mx-ink); text-decoration: none; cursor: pointer;
}
.mx-mcats__row:hover, .mx-mcats__row:focus-visible { background: var(--mx-surface); }
.mx-mcats__row > .mx-icon { flex: none; color: var(--mx-muted); opacity: .7; }
.mx-mcats__thumb { flex: none; display: grid; place-items: center; width: 46px; height: 46px; overflow: hidden; border-radius: 12px; background: var(--mx-surface); color: var(--mx-brand-ink); }
.mx-mcats__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mx-mcats__name { flex: 1; min-width: 0; font-weight: 500; line-height: 1.4; }
.mx-mcats__count { flex: none; min-width: 26px; padding: 1px 7px; border-radius: var(--mx-r-pill); background: var(--mx-surface); font-size: var(--mx-fs-xs); text-align: center; color: var(--mx-muted); }
.mx-mcats__row--offer .mx-mcats__thumb { background: var(--mx-accent-soft); color: var(--mx-accent); }
.mx-mcats__row--offer .mx-mcats__name { font-weight: 700; color: var(--mx-accent); }
.mx-mdrawer__all {
	display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; margin-top: var(--mx-s3);
	border: 1px solid var(--mx-line); border-radius: var(--mx-r-md); font-size: var(--mx-fs-sm); font-weight: 700; color: var(--mx-brand-ink); text-decoration: none;
}
.mx-mdrawer__all:hover { border-color: var(--mx-brand); background: var(--mx-brand-soft); }

/* Sub-category panel */
.mx-msub { --_in: -18px; }
[dir="ltr"] .mx-msub { --_in: 18px; }
.mx-msub:not([hidden]) { animation: mx-msub-in .2s var(--mx-ease); }
@keyframes mx-msub-in { from { opacity: 0; transform: translateX(var(--_in)); } to { opacity: 1; transform: none; } }
.mx-msub__head { display: flex; align-items: center; gap: var(--mx-s3); margin-bottom: var(--mx-s3); }
.mx-msub__back {
	flex: none; display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 10px;
	border: 1px solid var(--mx-line); border-radius: var(--mx-r-pill); background: #fff; font: inherit; font-size: var(--mx-fs-sm); color: var(--mx-ink-2); cursor: pointer;
}
.mx-msub__back:hover { background: var(--mx-surface); }
.mx-msub__title { flex: 1; min-width: 0; margin: 0; font-size: var(--mx-fs-lg); line-height: 1.35; }
.mx-msub__all {
	display: flex; align-items: center; justify-content: space-between; gap: var(--mx-s2); min-height: 50px; margin-bottom: var(--mx-s3); padding: 0 var(--mx-s4);
	border-radius: var(--mx-r-md); background: var(--mx-ink); font-weight: 700; color: #fff; text-decoration: none;
}
.mx-msub__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--mx-s2); margin: 0; padding: 0; list-style: none; }
.mx-msub__list a {
	display: flex; align-items: center; gap: 8px; height: 100%; min-height: 52px; padding: 6px 8px;
	border: 1px solid var(--mx-line-2); border-radius: var(--mx-r-md); background: var(--mx-surface); font-size: var(--mx-fs-sm); line-height: 1.4; color: var(--mx-ink); text-decoration: none;
}
.mx-msub__img { flex: none; display: grid; place-items: center; width: 36px; height: 36px; overflow: hidden; border-radius: 50%; background: #fff; color: var(--mx-brand-ink); }
.mx-msub__img img { width: 100%; height: 100%; object-fit: cover; }
.mx-msub__list a:hover { border-color: var(--mx-brand); background: var(--mx-brand-soft); }

/* Links tab: grouped cards */
.mx-mlinks + .mx-mlinks { margin-top: var(--mx-s5); }
.mx-mlinks__label { margin: 0 0 var(--mx-s2); padding-inline: 4px; font-size: var(--mx-fs-xs); font-weight: 700; color: var(--mx-muted); }
.mx-mlinks__list { margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--mx-line-2); border-radius: var(--mx-r-lg); list-style: none; }
.mx-mlinks__list li + li { border-top: 1px solid var(--mx-line-2); }
.mx-mlinks__list a { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; font-weight: 500; color: var(--mx-ink); text-decoration: none; }
.mx-mlinks__list a:hover { background: var(--mx-surface); }
.mx-mlinks__list a > span { flex: 1; min-width: 0; }
.mx-mlinks__list a > .mx-icon:first-child:not(.mx-mlinks__chev) { flex: none; color: var(--mx-brand-ink); }
.mx-mlinks__list a[aria-current="page"] { font-weight: 700; color: var(--mx-brand-ink); }
.mx-mlinks__chev { flex: none; color: var(--mx-muted); opacity: .6; }
.mx-mlinks--contact .mx-mlinks__list a > span { flex: 0 1 auto; overflow-wrap: anywhere; }
.mx-mdrawer__socials { gap: var(--mx-s3); margin-top: var(--mx-s4); padding-inline: 2px; }

/* Mini cart (woocommerce/cart/mini-cart.php): the list scrolls, the summary stays pinned */
.mx-mc-count { color: var(--mx-muted); font-weight: 500; }
.mx-drawer__body.mx-minicart { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.mx-minicart .widget_shopping_cart_content, .mx-mc { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mx-mc__list {
	flex: 1; min-height: 0; margin: 0; padding: var(--mx-s1) var(--mx-s4); list-style: none;
	overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--mx-line) transparent;
}
.mx-mc__item { position: relative; display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: var(--mx-s3); padding: var(--mx-s4) 0; border-bottom: 1px solid var(--mx-line-2); }
.mx-mc__item:last-child { border-bottom: 0; }
.mx-mc__thumb { display: block; width: 80px; height: 80px; overflow: hidden; border-radius: var(--mx-r-md); background: var(--mx-surface); }
.mx-mc__thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.mx-mc__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-inline-end: 34px; }
.mx-mc__name {
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
	font-size: var(--mx-fs-sm); font-weight: 500; line-height: 1.55; color: var(--mx-ink); text-decoration: none;
}
a.mx-mc__name:hover { color: var(--mx-brand-ink); }
.mx-mc__info .variation { margin: 0; font-size: var(--mx-fs-xs); color: var(--mx-muted); }
.mx-mc__info .variation dt, .mx-mc__info .variation dd, .mx-mc__info .variation dd p { display: inline; margin: 0; }
.mx-mc__unit { font-size: var(--mx-fs-xs); color: var(--mx-muted); }
.mx-mc__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--mx-s2); margin-top: auto; padding-top: 6px; }
.mx-mc__qty { display: inline-flex; align-items: center; height: 36px; padding: 2px; border: 1px solid var(--mx-line); border-radius: var(--mx-r-pill); background: #fff; }
.mx-mc__step {
	display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
	background: none; color: var(--mx-ink); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.mx-mc__step:hover:not(:disabled) { background: var(--mx-surface-2); }
.mx-mc__step:disabled { color: var(--mx-line); cursor: default; }
.mx-mc__n { min-width: 26px; font-size: var(--mx-fs-sm); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.mx-mc__single { font-size: var(--mx-fs-xs); color: var(--mx-muted); }
.mx-mc__price { font-size: var(--mx-fs-md); font-weight: 700; white-space: nowrap; transition: opacity .15s; }
.mx-mc__item.is-busy .mx-mc__price { opacity: .35; }
.mx-mc__remove {
	position: absolute; top: var(--mx-s3); inset-inline-end: -6px; display: grid; place-items: center;
	width: 36px; height: 36px; border-radius: 50%; color: var(--mx-muted); text-decoration: none;
}
.mx-mc__remove:hover { background: var(--mx-error-soft); color: var(--mx-error); }

.mx-mc__foot {
	flex: none; padding: var(--mx-s4); padding-bottom: calc(var(--mx-s4) + env(safe-area-inset-bottom));
	border-top: 1px solid var(--mx-line); background: #fff; box-shadow: 0 -10px 24px rgb(20 20 24 / 6%);
}
.mx-mc__sum { display: flex; align-items: baseline; justify-content: space-between; gap: var(--mx-s3); margin: 0; }
.mx-mc__sum > span { font-weight: 700; }
.mx-mc__sum small { font-size: var(--mx-fs-xs); font-weight: 500; color: var(--mx-muted); }
.mx-mc__sum strong { font-size: 1.25rem; font-weight: 700; white-space: nowrap; }
.mx-mc__note { display: flex; align-items: center; gap: 6px; margin: 2px 0 var(--mx-s3); font-size: var(--mx-fs-xs); color: var(--mx-muted); }
.mx-mc__note .mx-icon { flex: none; color: var(--mx-brand-ink); }
.mx-mc__actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--mx-s2); margin: 0; }
.mx-mc__actions .mx-btn { min-height: 50px; padding-inline: 12px; white-space: nowrap; }

.mx-mc__empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--mx-s2); padding: var(--mx-s10) var(--mx-s6); text-align: center; }
.mx-mc__empty-icon { display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: var(--mx-s2); border-radius: 50%; background: var(--mx-brand-soft); color: var(--mx-brand-ink); }
.mx-mc__empty-title { margin: 0; font-size: var(--mx-fs-lg); font-weight: 700; }
.mx-mc__empty-text { max-width: 26ch; margin: 0 0 var(--mx-s3); font-size: var(--mx-fs-sm); color: var(--mx-muted); }
.mx-minicart .blockUI.blockOverlay { background: rgb(255 255 255 / 70%) !important; } /* overrides blockUI's inline style */

/* ---------- Mobile tab bar ---------- */
.mx-tabbar {
	position: fixed; inset-inline: 0; bottom: 0; z-index: 90;
	display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: stretch;
	height: calc(var(--mx-tabbar-h) + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom);
	background: rgb(255 255 255 / 96%); border-top: 1px solid var(--mx-line-2);
	box-shadow: 0 -6px 20px rgb(20 20 24 / 6%);
	-webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
}
.mx-tabbar__item {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
	padding: 0; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 500; line-height: 1.2;
	text-decoration: none; color: var(--mx-muted); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
/* The icon sits in a pill that fills in for the current tab (and briefly on tap). */
.mx-tabbar__icon {
	position: relative; display: grid; place-items: center; width: 52px; height: 30px; border-radius: var(--mx-r-pill);
	transition: background .2s, color .2s;
}
.mx-tabbar__item:active .mx-tabbar__icon { background: var(--mx-surface-2); }
.mx-tabbar__item.is-current { color: var(--mx-ink); font-weight: 700; }
.mx-tabbar__item.is-current .mx-tabbar__icon { background: var(--mx-brand-soft); color: var(--mx-brand-ink); }
.mx-tabbar__label { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mx-tabbar__icon .mx-badge-count {
	position: absolute; top: -3px; inset-inline-start: calc(50% + 4px);
	min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px; box-shadow: 0 0 0 2px #fff;
}
.mx-tabbar__icon .mx-badge-count[data-count="0"] { display: none; }
/* Offers: a regular tab in the sale red, with a small dot on the tag. */
.mx-tabbar__item--offers, .mx-tabbar__item--offers.is-current { color: var(--mx-accent); }
.mx-tabbar__item--offers .mx-tabbar__icon::after {
	content: ""; position: absolute; top: 3px; inset-inline-start: calc(50% + 6px); width: 7px; height: 7px;
	border-radius: 50%; background: var(--mx-accent); box-shadow: 0 0 0 2px #fff;
}
.mx-tabbar__item--offers.is-current .mx-tabbar__icon, .mx-tabbar__item--offers:active .mx-tabbar__icon { background: var(--mx-accent-soft); color: var(--mx-accent); }
@media (prefers-reduced-motion: reduce) { .mx-tabbar__icon { transition: none; } }
/* Room under the footer for the tab bar and, on product pages, the sticky buy bar (product.js sets --mx-buybar-h while it shows). */
body.mx { padding-bottom: calc(var(--mx-tabbar-h) + var(--mx-buybar-h, 0px) + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
	.mx-tabbar { display: none; }
	body.mx { padding-bottom: 0; }
}

/* ---------- Page heads, breadcrumbs, pagination ---------- */
.mx-breadcrumbs { min-width: 0; font-size: var(--mx-fs-sm); color: var(--mx-muted); }
.mx-breadcrumbs__list {
	display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none;
	overflow-x: auto; white-space: nowrap; scrollbar-width: none; overscroll-behavior-x: contain;
}
.mx-breadcrumbs__list::-webkit-scrollbar { display: none; }
/* Trail wider than the screen: core.js scrolls it to the current page and fades the cut-off start. */
.mx-breadcrumbs.is-overflow .mx-breadcrumbs__list { -webkit-mask-image: linear-gradient(to left, transparent, #000 32px); mask-image: linear-gradient(to left, transparent, #000 32px); }
[dir="ltr"] .mx-breadcrumbs.is-overflow .mx-breadcrumbs__list { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px); mask-image: linear-gradient(to right, transparent, #000 32px); }
.mx-breadcrumbs__item { flex: none; display: inline-flex; align-items: center; gap: 2px; }
.mx-breadcrumbs__sep { display: inline-grid; place-items: center; color: #b3ada2; }
[dir="ltr"] .mx-breadcrumbs__sep .mx-icon { transform: scaleX(-1); }
.mx-breadcrumbs__link {
	display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: var(--mx-r-pill);
	color: var(--mx-ink-2); text-decoration: none; transition: background .15s, color .15s;
}
.mx-breadcrumbs__link:hover { background: var(--mx-surface-2); color: var(--mx-ink); }
.mx-breadcrumbs__item:first-child .mx-breadcrumbs__link { padding-inline-start: 0; }
.mx-breadcrumbs__item:first-child .mx-breadcrumbs__link:hover { padding-inline-start: 8px; }
.mx-breadcrumbs__home .mx-icon { color: var(--mx-brand-ink); }
.mx-breadcrumbs__text { display: block; padding: 4px 8px; }
.mx-breadcrumbs__item.is-current .mx-breadcrumbs__text { max-width: 42ch; overflow: hidden; text-overflow: ellipsis; color: var(--mx-ink); font-weight: 500; }
@media (max-width: 599px) {
	.mx-breadcrumbs__item.is-current .mx-breadcrumbs__text { max-width: 60vw; }
}

.mx-page-head { padding-block: var(--mx-s6) var(--mx-s4); }
.mx-page-head__title { margin: var(--mx-s2) 0 0; }
.mx-page-head__desc { margin-top: var(--mx-s2); color: var(--mx-ink-2); max-width: 70ch; }

.mx-pagination, .woocommerce-pagination { margin: var(--mx-s10) 0 var(--mx-s4); }
.mx-pagination ul, .woocommerce-pagination ul.page-numbers { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.page-numbers:not(ul) {
	display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px;
	border: 1px solid var(--mx-line); border-radius: var(--mx-r-md); text-decoration: none; font-weight: 500;
}
a.page-numbers:hover { border-color: var(--mx-ink-2); color: var(--mx-ink); }
.page-numbers.current { background: var(--mx-ink); border-color: var(--mx-ink); color: #fff; }
.page-numbers.dots { border-color: transparent; }

/* ---------- Sections (home, product page rails) ---------- */
.mx-section { padding-block: var(--mx-s8); }
.mx-section + .mx-section { padding-top: var(--mx-s4); }
@media (min-width: 900px) { .mx-section { padding-block: var(--mx-s10); } .mx-section + .mx-section { padding-top: var(--mx-s6); } }
.mx-section__head { display: flex; align-items: center; justify-content: space-between; gap: var(--mx-s4); margin-bottom: var(--mx-s5); }
.mx-section__title { margin: 0; font-size: var(--mx-fs-h2); }
.mx-section__more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--mx-fs-sm); text-decoration: none; color: var(--mx-brand-ink); white-space: nowrap; }
.mx-section__more:hover { text-decoration: underline; }

/* ---------- Product grid + card ---------- */
ul.products {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--mx-s3);
	margin: 0; padding: 0; list-style: none;
}
@media (min-width: 600px) { ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--mx-s4); } }
@media (min-width: 1200px) { ul.products.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } ul.products.columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.mx-card {
	position: relative; display: flex; flex-direction: column; min-width: 0;
	background: #fff; border: 1px solid var(--mx-line-2); border-radius: var(--mx-r-lg);
	transition: border-color .15s, box-shadow .15s;
}
.mx-card:hover { border-color: var(--mx-line); box-shadow: var(--mx-shadow-md); }
.mx-card__media { position: relative; border-radius: var(--mx-r-lg) var(--mx-r-lg) 0 0; background: #fff; }
.mx-card__image { display: block; position: relative; aspect-ratio: 1 / 1; padding: var(--mx-s3); }
.mx-card__img { width: 100%; height: 100%; object-fit: contain; }
.mx-card__img--hover {
	position: absolute; inset: var(--mx-s3); width: calc(100% - var(--mx-s6)); height: calc(100% - var(--mx-s6));
	opacity: 0; transition: opacity .25s;
}
@media (hover: hover) {
	.mx-card.has-hover-image:hover .mx-card__img--hover { opacity: 1; }
}
/* Brand row: small logo in one corner, brand name in the other. */
.mx-card__brand {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	min-height: 42px; padding: 10px var(--mx-s3) 0; text-decoration: none;
}
.mx-card__brand-logo { width: auto; max-width: 84px; height: 30px; object-fit: contain; object-position: center; }
.mx-card__brand-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--mx-fs-xs); font-weight: 700; color: var(--mx-brand); }
.mx-card__brand:hover .mx-card__brand-name { color: var(--mx-brand-ink); text-decoration: underline; }
.mx-card__brand + .mx-card__media { border-radius: 0; }
.mx-card__brand + .mx-card__media .mx-card__image { padding: 4px var(--mx-s4) var(--mx-s2); }
.mx-card__brand + .mx-card__media .mx-card__img--hover { inset: 4px var(--mx-s4) var(--mx-s2); width: calc(100% - var(--mx-s8)); height: calc(100% - 12px); }
/* Price: old price above, new price with the discount badge beside it. */
.mx-card__pricing { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 8px; margin-top: auto; padding-top: 4px; }
.mx-card__price:has(del) { display: flex; flex-direction: column; align-items: flex-start; }
.mx-card__price ins { color: var(--mx-ink); }
.mx-card__price del { font-size: 12px; line-height: 1.3; }
.mx-card__badges { display: flex; align-items: center; gap: 4px; padding-bottom: 3px; pointer-events: none; }
.mx-card__badges:not(:has(*)) { display: none; }
.mx-card__badges .mx-badge { min-height: 22px; padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.mx-card__badges .onsale { background: var(--mx-accent); color: #fff; }
/* Wishlist heart floating over the image's bottom-left corner (physical left in both directions). */
.mx-card__tools { position: absolute; left: 8px; bottom: 8px; z-index: 2; display: flex; gap: 6px; }
.mx-card__tools:not(:has(*)) { display: none; }
.mx-card__tools .mx-wish { width: 36px; height: 36px; background: #fff; box-shadow: var(--mx-shadow-sm); }
.mx-card__tools .mx-wish .mx-wish__icon { width: 18px; height: 18px; }
.mx-card__tools .mx-wish:hover, .mx-card__tools .mx-wish[aria-pressed="true"] { color: var(--mx-brand); border-color: var(--mx-brand); }
@media (min-width: 900px) { .mx-card__tools { left: 10px; bottom: 10px; } .mx-card__tools .mx-wish { width: 40px; height: 40px; } }
.mx-card__body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: var(--mx-s2) var(--mx-s3) 0; }
.mx-card__title { margin: 0; font-size: var(--mx-fs-sm); font-weight: 500; line-height: 1.55; }
.mx-card__title a {
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	min-height: calc(1.55em * 2); text-decoration: none; color: var(--mx-ink);
}
.mx-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 0; } /* whole card clickable */
.mx-card__brand, .mx-card__foot, .mx-card__rating { position: relative; z-index: 1; }
.mx-card__title a:hover { color: var(--mx-ink); text-decoration: underline; }
.mx-card__rating { display: flex; align-items: center; gap: 4px; font-size: var(--mx-fs-xs); color: var(--mx-muted); }
.mx-card__price { font-size: var(--mx-fs-price); line-height: 1.4; }
/* Footer: add-to-cart button across the full card width (ink, red on hover). */
.mx-card__foot { display: flex; align-items: center; gap: 6px; padding: var(--mx-s3); }
.mx-card__foot .mx-btn, .mx-card__foot .button {
	flex: 1; min-width: 0; min-height: 42px; padding: 8px 6px; gap: 6px; border-width: 1.5px; font-size: 13px; white-space: nowrap;
}
/* a.button selectors to outrank `.woocommerce a.button:hover`. */
.mx-card__foot a.mx-btn:hover, .mx-card__foot a.button:hover, .mx-card__foot button.button:hover { --_bg: var(--mx-brand); --_fg: #fff; --_bd: var(--mx-brand); }
.mx-card__foot .mx-btn.mx-just-added { --_bg: var(--mx-success); --_bd: var(--mx-success); --_fg: #fff; }
@media (min-width: 600px) { .mx-card__foot .mx-btn, .mx-card__foot .button { font-size: var(--mx-fs-sm); padding-inline: 10px; } }
@media (max-width: 599px) {
	.mx-card__foot { padding: 10px; }
	.mx-card__foot .mx-btn, .mx-card__foot .button { min-height: 38px; padding-inline: 4px; }
}
.mx-card__foot .added_to_cart { display: none; } /* the cart drawer / toast already links to the cart */
@media (min-width: 900px) { .mx-card__title { font-size: var(--mx-fs-md); } }

/* ---------- Rails (horizontal product lists) ---------- */
.mx-rail { position: relative; }
ul.products.mx-rail__track {
	display: grid; grid-auto-flow: column; grid-template-columns: none;
	grid-auto-columns: calc((100% - var(--mx-s3)) / 2.15);
	gap: var(--mx-s3); overflow-x: auto; overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px;
}
.mx-rail__track::-webkit-scrollbar { display: none; }
.mx-rail__track > li { scroll-snap-align: start; }
@media (min-width: 600px) { ul.products.mx-rail__track { grid-auto-columns: calc((100% - var(--mx-s4) * 2) / 3.2); gap: var(--mx-s4); } }
@media (min-width: 900px) { ul.products.mx-rail__track { grid-auto-columns: calc((100% - var(--mx-s4) * 3) / 4); } }
@media (min-width: 1200px) { ul.products.mx-rail__track { grid-auto-columns: calc((100% - var(--mx-s4) * 4) / 5); } }
.mx-rail__nav { display: none; }
@media (hover: hover) and (min-width: 900px) {
	.mx-rail__nav { position: absolute; inset-inline: -18px; top: 38%; z-index: 2; display: flex; justify-content: space-between; pointer-events: none; }
	.mx-rail__btn {
		pointer-events: auto; width: 40px; height: 40px; display: grid; place-items: center;
		border: 1px solid var(--mx-line); border-radius: 50%; background: #fff; box-shadow: var(--mx-shadow-sm);
	}
	.mx-rail__btn:hover { border-color: var(--mx-ink); }
	.mx-rail__btn[disabled] { opacity: 0; pointer-events: none; }
}

/* ---------- Trust strip ---------- */
.mx-trust { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 72%); gap: var(--mx-s2); margin: 0; padding: 0 0 4px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.mx-trust::-webkit-scrollbar { display: none; }
.mx-trust__item { scroll-snap-align: start; }
@media (min-width: 600px) { .mx-trust { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; padding: 0; } }
@media (min-width: 900px) { .mx-trust { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--mx-s4); } }
.mx-trust__link { display: flex; align-items: center; gap: var(--mx-s3); height: 100%; padding: var(--mx-s3); border-radius: var(--mx-r-lg); background: var(--mx-surface); text-decoration: none; color: var(--mx-ink); }
a.mx-trust__link:hover { background: var(--mx-surface-2); color: var(--mx-ink); }
.mx-trust__icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: #fff; color: var(--mx-brand-ink); }
.mx-trust__text { display: flex; flex-direction: column; line-height: 1.45; }
.mx-trust__text strong { font-size: var(--mx-fs-sm); }
.mx-trust__text span { font-size: var(--mx-fs-xs); color: var(--mx-ink-2); }
@media (min-width: 900px) { .mx-trust__text strong { font-size: var(--mx-fs-md); } .mx-trust__text span { font-size: var(--mx-fs-sm); } }
.mx-trust--compact { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; padding: 0; grid-template-columns: 1fr; gap: 0; margin: var(--mx-s5) 0; border: 1px solid var(--mx-line); border-radius: var(--mx-r-lg); }
.mx-trust--compact .mx-trust__item + .mx-trust__item { border-top: 1px solid var(--mx-line-2); }
.mx-trust--compact .mx-trust__link { background: transparent; border-radius: 0; padding: 10px var(--mx-s3); }
.mx-trust--compact .mx-trust__icon { width: 36px; height: 36px; background: var(--mx-brand-soft); }
.mx-trust--compact .mx-trust__text strong { font-size: var(--mx-fs-sm); }

/* ---------- Socials ---------- */
.mx-socials { display: flex; flex-wrap: wrap; gap: var(--mx-s2); margin: 0; padding: 0; list-style: none; }
.mx-socials a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--mx-line); border-radius: 50%; color: var(--mx-ink); }
.mx-socials a:hover { background: var(--mx-ink); border-color: var(--mx-ink); color: #fff; }

/* ---------- Footer ---------- */
.mx-footer { margin-top: var(--mx-s12); }
.mx-footer__trust { padding-block: var(--mx-s6); background: var(--mx-surface); border-top: 1px solid var(--mx-line); }
.mx-footer__trust .mx-trust__link { background: #fff; }
/* Light footer: white main block between the warm trust strip and bottom bar. */
.mx-footer__main { background: #fff; border-top: 1px solid var(--mx-line); color: var(--mx-ink-2); }
.mx-footer__grid { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--mx-s8); padding-block: var(--mx-s8) var(--mx-s4); }
.mx-footer__brand { padding-bottom: var(--mx-s6); }
.mx-footer__logo .mx-logo__img { height: 50px; }
.mx-footer__logo .mx-logo__text { color: var(--mx-ink); }
.mx-footer__about { max-width: 42ch; margin: var(--mx-s4) 0; line-height: 1.9; }
.mx-footer__contact { display: flex; flex-wrap: wrap; gap: var(--mx-s2); margin: 0 0 var(--mx-s4); padding: 0; list-style: none; }
.mx-footer__chip {
	display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
	border: 1px solid var(--mx-line); border-radius: var(--mx-r-pill); background: var(--mx-surface);
	font-size: var(--mx-fs-sm); color: var(--mx-ink); text-decoration: none; transition: background .15s, border-color .15s;
}
.mx-footer__chip:hover { border-color: var(--mx-brand); background: var(--mx-brand-soft); color: var(--mx-ink); }
.mx-footer__chip .mx-icon { color: var(--mx-brand-ink); }
.mx-footer__chip--whatsapp .mx-icon { color: #1da851; }

.mx-footer__col { border-top: 1px solid var(--mx-line); }
.mx-footer__summary { display: flex; align-items: center; justify-content: space-between; min-height: 54px; list-style: none; cursor: pointer; color: var(--mx-ink); }
.mx-footer__summary::-webkit-details-marker { display: none; }
.mx-footer__title { margin: 0; font-size: var(--mx-fs-md); color: var(--mx-ink); }
.mx-footer__chev { color: var(--mx-muted); transition: transform .2s; }
.mx-footer__col[open] .mx-footer__chev { transform: rotate(180deg); }
.mx-footer__links { margin: 0; padding: 0 0 var(--mx-s4); list-style: none; }
.mx-footer__links a { display: inline-flex; align-items: center; min-height: 36px; color: var(--mx-ink-2); text-decoration: none; transition: color .15s; }
.mx-footer__links a:hover { color: var(--mx-brand-ink); text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 600px) {
	.mx-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mx-footer__brand { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
	.mx-footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: var(--mx-s8); padding-block: var(--mx-s10) var(--mx-s8); }
	.mx-footer__brand { padding-bottom: 0; }
	.mx-footer__col { border-top: 0; }
	.mx-footer__summary { min-height: 0; margin-bottom: var(--mx-s3); cursor: default; pointer-events: none; }
	.mx-footer__title { position: relative; padding-bottom: var(--mx-s2); }
	.mx-footer__title::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 28px; height: 2px; border-radius: 2px; background: var(--mx-brand); }
	.mx-footer__chev { display: none; }
	.mx-footer__links { padding: 0; }
}
@media (min-width: 1200px) {
	.mx-footer__grid { grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); }
	.mx-footer__brand { grid-column: auto; padding-inline-end: var(--mx-s4); }
}

/* Bottom bar: payment methods, then © · credit — centred, so the floating
   buttons in the bottom corners (Chaty, back to top) never cover it. */
.mx-footer__bottom { background: var(--mx-surface); border-top: 1px solid var(--mx-line); font-size: var(--mx-fs-sm); color: var(--mx-muted); }
.mx-footer__bottom-inner { display: flex; flex-direction: column; align-items: center; gap: var(--mx-s4); padding-block: var(--mx-s6); text-align: center; }
@media (max-width: 899px) {
	/* Keep the payment logos and © line clear of the floating Messenger / back-to-top buttons in the corners. */
	.mx-footer__bottom-inner { padding-inline: 64px; }
}
.mx-footer__bottom p { margin: 0; }
.mx-footer__meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px var(--mx-s4); width: 100%; }
.mx-footer__credit { display: flex; align-items: center; justify-content: center; }
@media (min-width: 600px) {
	.mx-footer__credit { padding-inline-start: var(--mx-s4); border-inline-start: 1px solid var(--mx-line); }
}
.mx-footer__pay { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mx-footer__pay li { display: inline-flex; align-items: center; justify-content: center; height: 34px; min-width: 56px; padding: 0 10px; border: 1px solid var(--mx-line); border-radius: var(--mx-r-sm); background: #fff; color: var(--mx-ink); font-size: var(--mx-fs-xs); font-weight: 700; }
.mx-footer__pay img { display: block; height: 20px; width: auto; max-width: 84px; object-fit: contain; }
/* Aman's logo is drawn in white: it needs a dark tile. */
.mx-footer__pay .mx-pay-logo--aman { background: #26262c; border-color: #26262c; }
.mx-footer__credit a { color: var(--mx-ink); font-weight: 700; }

/* Back to top — physical left: the chat button sits bottom-right. */
.mx-totop {
	position: fixed; left: var(--mx-s4); bottom: calc(var(--mx-tabbar-h) + var(--mx-buybar-h, 0px) + var(--mx-s4) + env(safe-area-inset-bottom)); z-index: 80;
	display: grid; place-items: center; width: 46px; height: 46px; padding: 0;
	border: 1px solid var(--mx-line); border-radius: 50%; background: #fff; color: var(--mx-ink);
	box-shadow: var(--mx-shadow-md); cursor: pointer; transition: background .15s, color .15s, bottom .2s var(--mx-ease);
}
.mx-totop[hidden] { display: none; }
.mx-totop:hover { background: var(--mx-ink); border-color: var(--mx-ink); color: #fff; }
@media (min-width: 900px) { .mx-totop { bottom: calc(var(--mx-buybar-h, 0px) + var(--mx-s6)); } }

/* ---------- Empty states, toast ---------- */
.mx-empty { max-width: 560px; margin: var(--mx-s8) auto; padding: var(--mx-s8) var(--mx-s4); text-align: center; }
.mx-empty__icon { display: inline-grid; place-items: center; width: 84px; height: 84px; margin-bottom: var(--mx-s4); border-radius: 50%; background: var(--mx-surface); color: var(--mx-brand-ink); }
.mx-empty__title { font-size: var(--mx-fs-h3); }
.mx-empty p { color: var(--mx-ink-2); }
.mx-empty__actions { margin-top: var(--mx-s5); }
.mx-empty .mx-search { max-width: 460px; margin: var(--mx-s4) auto 0; }

.mx-toast {
	position: fixed; inset-inline: var(--mx-s4); bottom: calc(var(--mx-tabbar-h) + var(--mx-buybar-h, 0px) + var(--mx-s4) + env(safe-area-inset-bottom)); z-index: 200;
	max-width: 420px; margin-inline: auto; padding: 12px 16px; border-radius: var(--mx-r-md);
	background: var(--mx-ink); color: #fff; font-weight: 500; text-align: center; box-shadow: var(--mx-shadow-md);
}
@media (min-width: 900px) { .mx-toast { bottom: calc(var(--mx-buybar-h, 0px) + var(--mx-s6)); } }

/* The chat button (MediMix Settings → «زر المحادثة», .mx-chat) lifts itself
   above the phone tab bar using --mx-tabbar-h. */

/* ---------- Wishlist heart (buttons printed by MediMix Settings) ---------- */
.mx-wish {
	display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
	border: 1px solid var(--mx-line); border-radius: 50%; background: rgb(255 255 255 / 92%); color: var(--mx-ink-2);
	cursor: pointer; transition: color .15s, border-color .15s;
}
.mx-wish__icon { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linejoin: round; }
.mx-wish:hover { color: var(--mx-accent); border-color: var(--mx-accent); }
.mx-wish[aria-pressed="true"] { color: var(--mx-accent); border-color: var(--mx-accent-soft); }
.mx-wish[aria-pressed="true"] .mx-wish__icon { fill: currentColor; }
.mx-wish[aria-busy="true"] { opacity: .6; }
.mx-wish--single { width: auto; height: 44px; margin-top: var(--mx-s3); padding: 0 16px; gap: 8px; grid-auto-flow: column; border-radius: var(--mx-r-md); font-weight: 500; font-size: var(--mx-fs-sm); }
.mx-toast a { color: inherit; text-decoration: underline; }
.mx-wishlist-count-line { color: var(--mx-muted); margin-bottom: var(--mx-s4); }
