/* ==========================================================================
   MEEM STORE — ميم ستور | meem.css
   Upload to Static Application Files as css/meem.css
   Reference: <link rel="stylesheet" href="#APP_FILES#css/meem#MIN#.css?v=&STATIC_VERSION.">

   Isolation rules (so it sits on any page template / theme):
   - Every class is prefixed "m-".
   - Tokens and base styles live on the wrapper .meem (put it on the element
     that wraps the page body in your page template). Nothing targets html/body.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
.meem {
  --brand: #01AECA;        /* accent — pair with ink text (5.5:1) */
  --brand-dark: #017E93;   /* hover, links, white text on color (4.8:1) */
  --brand-deep: #015F6F;   /* text on tint */
  --brand-tint: #E0F7FA;
  --paper: #FAFAF8;
  --white: #FFFFFF;
  --sand: #F2EFE8;
  --sand-2: #ECE8DF;
  --line: #E6E2D9;
  --ink: #1B2A38;
  --ink-soft: #3C4B59;
  --ink-mute: #5E6A77;
  --star: #E0A526;
  --danger: #B42318;
  --success: #067647;
  --warn-bg: #FFF6E5;
  --warn-ink: #7A4B00;
  --font-ui: "IBM Plex Sans Arabic", system-ui, Tahoma, sans-serif;
  --font-display: "Noto Naskh Arabic", "Times New Roman", serif;
  --shell: 1280px;
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-xl: 28px; --r-pill: 999px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow-pop: 0 20px 60px -20px rgba(27, 42, 56, .35);
  --header-offset: 170px;

  /* ---------- 2. Base (scoped) ---------- */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:where(.meem) *, :where(.meem) *::before, :where(.meem) *::after { box-sizing: border-box; }
:where(.meem) h1, :where(.meem) h2, :where(.meem) h3, :where(.meem) h4, :where(.meem) p, :where(.meem) figure, :where(.meem) blockquote, :where(.meem) dl, :where(.meem) dd { margin: 0; }
:where(.meem) ul, :where(.meem) ol { margin: 0; padding: 0; list-style: none; }
:where(.meem) img, :where(.meem) svg { display: block; max-width: 100%; }
:where(.meem) a { color: inherit; text-decoration: none; }
:where(.meem) button, :where(.meem) input, :where(.meem) select, :where(.meem) textarea { font: inherit; color: inherit; }
:where(.meem) button { cursor: pointer; background: none; border: 0; padding: 0; }
:where(.meem) [hidden] { display: none !important; }
:where(.meem) ::selection { background: var(--brand-tint); color: var(--brand-deep); }
:where(.meem) :focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 3px; border-radius: 6px; }
:where(.meem) [id] { scroll-margin-top: var(--header-offset); }
.m-main { flex: 1; }

.m-container { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.m-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.m-skip-link { position: fixed; top: 12px; inset-inline-start: 12px; z-index: 200; background: var(--white); padding: 10px 16px; border-radius: var(--r-sm); box-shadow: var(--shadow-pop); transform: translateY(-200%); }
.m-skip-link:focus { transform: none; }
.m-muted { color: var(--ink-mute); }
.m-display { font-family: var(--font-display); }
.m-ltr { direction: ltr; unicode-bidi: isolate; }
.m-icon { width: 20px; height: 20px; flex-shrink: 0; }
.m-icon--sm { width: 16px; height: 16px; }
.m-icon--lg { width: 24px; height: 24px; }

/* ---------- 3. Buttons & links ---------- */
.m-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding-inline: 24px;
  border-radius: var(--r-pill); border: 1px solid transparent;
  font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.m-btn:active { transform: scale(.98); }
.m-btn[disabled], .m-btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.m-btn--primary { background: var(--brand); color: var(--ink); font-weight: 700; }   /* ink on cyan: bold for legibility */
.m-btn--primary:hover { background: var(--brand-dark); color: var(--white); box-shadow: 0 8px 20px -10px rgba(1, 126, 147, .7); }
.m-btn--dark { background: var(--ink); color: var(--white); }
.m-btn--dark:hover { background: var(--brand-deep); }
.m-btn--ghost { border-color: var(--line); background: transparent; }
.m-btn--ghost:hover { border-color: var(--ink); background: var(--white); }
.m-btn--on-dark { border-color: rgba(255, 255, 255, .3); color: var(--white); }
.m-btn--on-dark:hover { border-color: var(--white); }
.m-btn--sm { height: 40px; padding-inline: 14px 16px; font-size: 14px; }
.m-btn--lg { height: 56px; padding-inline: 32px; font-size: 16px; }
.m-btn--block { width: 100%; }

.m-link { color: var(--brand-dark); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(1, 174, 202, .45); text-underline-offset: 4px; transition: color .2s; }
.m-link:hover { color: var(--brand-deep); }
.m-link-quiet { color: var(--ink-mute); text-decoration: underline; text-underline-offset: 4px; }
.m-link-quiet:hover { color: var(--ink); }

.m-icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; transition: background-color .2s; }
.m-icon-btn:hover { background: var(--sand); }
.m-round-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: border-color .2s, background-color .2s; }
.m-round-btn:hover { border-color: var(--ink); background: var(--white); }

/* ---------- 4. Badges & chips ---------- */
.m-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.m-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-pill); padding: 4px 10px; font-size: 11px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.m-badge--tint { background: var(--brand-tint); color: var(--brand-deep); }
.m-badge--dark { background: var(--ink); color: var(--white); }
.m-badge--outline { background: var(--white); border: 1px solid var(--line); color: var(--ink-soft); }
.m-badge--success { background: #E7F6EC; color: var(--success); }
.m-badge--lg { font-size: 13px; padding: 6px 14px; }

.m-chips { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.m-chips::-webkit-scrollbar { display: none; }
.m-chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding-inline: 20px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--white); font-size: 14px; font-weight: 500;
  transition: background-color .2s, color .2s, border-color .2s;
}
.m-chip:hover { border-color: var(--ink); }
.m-chip[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.m-chip__x { width: 14px; height: 14px; opacity: .7; }

/* ---------- 5. Header ---------- */
.m-topbar { background: var(--ink); color: rgba(255, 255, 255, .9); font-size: 13px; }
.m-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 36px; }
.m-topbar__aside { color: rgba(255, 255, 255, .7); }

.m-site-header { position: sticky; top: 0; z-index: 40; background: rgba(250, 250, 248, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.m-header-row { display: flex; align-items: center; gap: clamp(12px, 3vw, 32px); height: 72px; }

.m-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.m-logo__mark { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: var(--ink); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1; padding-bottom: 6px; }
.m-logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.m-logo__name { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.m-logo__latin { font-size: 10px; letter-spacing: .2em; color: var(--ink-mute); direction: ltr; text-align: end; }

.m-search { flex: 1; max-width: 640px; display: flex; align-items: center; height: 48px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-pill); padding-inline: 18px 6px; transition: border-color .2s, box-shadow .2s; }
.m-search:focus-within { border-color: var(--brand-dark); box-shadow: 0 0 0 4px var(--brand-tint); }
.m-search .m-icon { color: var(--ink-mute); }
.m-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; padding-inline: 12px; font-size: 15px; }
.m-search input::placeholder { color: var(--ink-mute); opacity: .85; }
.m-search .m-btn { height: 38px; padding-inline: 22px; font-size: 15px; font-weight: 700; }
/* Search button: dark for maximum legibility inside the light search field */
.m-search .m-btn--primary { background: var(--ink); color: var(--white); }
.m-search .m-btn--primary:hover { background: var(--brand-dark); color: var(--white); }
.m-search--mobile { display: none; max-width: none; height: 44px; margin-bottom: 12px; padding-inline: 16px; }

.m-header-actions { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.m-lang-toggle { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--white); font-size: 12px; font-weight: 600; }
.m-lang-toggle button { padding: 6px 12px; border-radius: var(--r-pill); color: var(--ink-soft); transition: background-color .2s, color .2s; }
.m-lang-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.m-cart-btn { position: relative; }   /* same quiet style as the other header icons; the count badge marks it */
.m-cart-btn:hover { background: var(--sand); }
.m-cart-count { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 22px; height: 22px; padding-inline: 4px; border-radius: var(--r-pill); background: var(--brand); color: var(--ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--paper); }
.m-bump { animation: m-bump .45s ease; }
@keyframes m-bump { 40% { transform: scale(1.35); } }

.m-main-nav { display: flex; align-items: center; gap: 24px; height: 48px; overflow-x: auto; scrollbar-width: none; font-size: 15px; }
.m-main-nav::-webkit-scrollbar { display: none; }
.m-main-nav a { position: relative; height: 100%; display: flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--ink-soft); transition: color .2s; }
.m-main-nav a:hover { color: var(--ink); }
.m-main-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.m-main-nav a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: var(--brand); }
.m-main-nav .m-nav-sub { font-size: 14px; color: var(--ink-mute); }
.m-nav-divider { width: 1px; height: 20px; background: var(--line); flex-shrink: 0; }

@media (max-width: 767px) {
  .m-header-row .m-search { display: none; }
  .m-search--mobile { display: flex; }
}
@media (max-width: 639px) {
  .m-topbar__aside, .m-lang-toggle, .m-hide-sm { display: none; }
  .m-logo__mark { width: 40px; height: 40px; font-size: 25px; }
}

/* ---------- 6. Book covers (pure CSS) ---------- */
.m-cover {
  position: relative; aspect-ratio: 2 / 3; width: 100%;
  background: var(--bg); color: var(--fg);
  border-radius: 7px 2px 2px 7px;           /* spine on the right, as Arabic books bind */
  overflow: hidden; container-type: inline-size;
  box-shadow: 0 1px 1px rgba(27, 42, 56, .10), 0 14px 28px -12px rgba(27, 42, 56, .45);
  transition: transform .35s var(--ease), box-shadow .35s ease;
}
.m-cover__art { position: absolute; inset: 0; }
.m-cover__text { position: absolute; inset: 11% 15% 9% 11%; z-index: 2; display: flex; flex-direction: column; gap: 4cqi; }
.m-cover__title { font-family: var(--font-display); font-weight: 700; font-size: 12.5cqi; line-height: 1.25; }
.m-cover__author { font-size: 5.6cqi; font-weight: 500; opacity: .85; }
.m-cover__mark { position: absolute; inset-block-end: 5%; inset-inline-end: 8%; z-index: 2; font-family: var(--font-display); font-size: 7cqi; opacity: .55; }
.m-cover__spine { position: absolute; inset-block: 0; inset-inline-start: 0; width: 6%; z-index: 3; background: linear-gradient(to left, rgba(0,0,0,.28), rgba(255,255,255,.14) 45%, rgba(0,0,0,.06) 70%, transparent); }
.m-cover::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.12), transparent 35%, transparent 70%, rgba(0,0,0,.08)); }

.m-cover[data-style="band"]    .m-cover__art { background: linear-gradient(transparent 60%, var(--ac) 60%, var(--ac) 73%, transparent 73%); }
.m-cover[data-style="circle"]  .m-cover__art { background: radial-gradient(circle at 45% 66%, var(--ac) 0 27%, transparent 27.4%); }
.m-cover[data-style="sun"]     .m-cover__art { background: radial-gradient(circle at 50% 108%, var(--ac) 0 42%, transparent 42.4%); }
.m-cover[data-style="frame"]   .m-cover__art { inset: 5.5%; border: 1.5px solid var(--ac); border-radius: 2px; }
.m-cover[data-style="arch"]    .m-cover__art { inset: 46% 20% 0 20%; background: var(--ac); border-radius: 999px 999px 0 0; }
.m-cover[data-style="dots"]    .m-cover__art { inset: 52% 0 0 0; background: radial-gradient(var(--ac) 1.6px, transparent 1.9px) 0 0 / 11px 11px; opacity: .8; }
.m-cover[data-style="stripes"] .m-cover__art { inset: 50% 0 0 0; background: repeating-linear-gradient(135deg, var(--ac) 0 3px, transparent 3px 13px); opacity: .9; }
.m-cover[data-style="stalk"]   .m-cover__art { inset: 38% 0 0 0; background: repeating-linear-gradient(90deg, var(--ac) 0 4px, transparent 4px 9px, var(--ac) 9px 11px, transparent 11px 27px); -webkit-mask: linear-gradient(transparent, #000 45%); mask: linear-gradient(transparent, #000 45%); }
.m-cover[data-style="grid"]    .m-cover__art { inset: 56% 12% 12% 12%; background: linear-gradient(var(--ac) 0 0) 0 0 / 46% 46% no-repeat, linear-gradient(var(--ac) 0 0) 100% 100% / 46% 46% no-repeat; }

/* Non-book products (stationery, gifts): simple CSS objects */
.m-object { position: relative; aspect-ratio: 2 / 3; width: 100%; background: var(--bg); border-radius: 14px; display: grid; place-items: center; overflow: hidden; container-type: inline-size; transition: transform .35s var(--ease); }
.m-object__shape { position: relative; display: block; }
.m-object[data-style="notebook"] .m-object__shape { width: 58%; aspect-ratio: 3 / 4; background: var(--ac); border-radius: 10px 4px 4px 10px; box-shadow: 0 18px 30px -14px rgba(27,42,56,.55); }
.m-object[data-style="notebook"] .m-object__shape::after { content: ""; position: absolute; inset-block: 0; inset-inline-end: 20%; width: 6%; background: var(--fg); }
.m-object[data-style="pen"] .m-object__shape { width: 9%; height: 66%; background: var(--ac); border-radius: 999px; transform: rotate(-28deg); box-shadow: -14cqi 4cqi 0 var(--fg), 0 20px 24px -12px rgba(27,42,56,.5); }
.m-object[data-style="pen"] .m-object__shape::after { content: ""; position: absolute; inset-inline: 0; top: 20%; height: 5%; background: rgba(255,255,255,.55); }
.m-object[data-style="bookmark"] .m-object__shape { width: 22%; height: 72%; background: repeating-linear-gradient(45deg, var(--ac) 0 6px, var(--fg) 6px 8px); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%); }
.m-object[data-style="tote"] .m-object__shape { width: 60%; aspect-ratio: 1 / 1.05; margin-top: 16%; background: var(--ac); border-radius: 4px 4px 10px 10px; box-shadow: 0 18px 30px -16px rgba(27,42,56,.5); }
.m-object[data-style="tote"] .m-object__shape::before { content: ""; position: absolute; bottom: 100%; inset-inline: 24%; height: 34%; border: 5px solid var(--ac); border-bottom: 0; border-radius: 999px 999px 0 0; }
.m-object[data-style="tote"] .m-object__shape::after { content: "م"; position: absolute; inset: 0; display: grid; place-items: center; padding-bottom: 8%; font-family: var(--font-display); font-weight: 700; font-size: 26cqi; color: var(--fg); }

/* ---------- 7. Stars ---------- */
.m-stars { position: relative; display: inline-flex; vertical-align: middle; }
.m-stars__base, .m-stars__fill { display: flex; }
.m-stars__base { color: #DAD5CA; }
.m-stars__fill { position: absolute; inset-block: 0; inset-inline-start: 0; overflow: hidden; color: var(--star); }
.m-stars svg { width: 14px; height: 14px; flex-shrink: 0; }
.m-stars--lg svg { width: 18px; height: 18px; }

/* ---------- 8. Product card ---------- */
.m-grid-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 20px; }
@media (min-width: 768px) { .m-grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .m-grid-products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 56px 32px; } .m-grid-products--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.m-card { display: flex; flex-direction: column; min-width: 0; }
.m-card__shelf { position: relative; background: var(--sand); border-radius: var(--r-md); padding: 14% 16% 12%; transition: background-color .3s ease; }
.m-card:hover .m-card__shelf { background: var(--sand-2); }
.m-card__badges { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 4; display: flex; gap: 6px; }
.m-card__wish { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 4; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.85); opacity: 0; transition: opacity .2s, background-color .2s; }
.m-card__wish:hover { background: var(--white); }
.m-card:hover .m-card__wish, .m-card__wish:focus-visible, .m-card__wish[aria-pressed="true"] { opacity: 1; }
@media (hover: none) { .m-card__wish { opacity: 1; } }
[data-wish][aria-pressed="true"] svg { fill: var(--brand-dark); color: var(--brand-dark); }
.m-card__media { display: block; }
.m-card:hover .m-cover { transform: translateY(-6px) rotate(-1.2deg); box-shadow: 0 1px 1px rgba(27,42,56,.1), 0 24px 34px -14px rgba(27,42,56,.5); }
.m-card:hover .m-object { transform: translateY(-4px); }
.m-card__body { margin-top: 16px; display: flex; flex-direction: column; flex: 1; }
.m-card__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.5; }
.m-card__title a { padding-bottom: 2px; background-image: linear-gradient(var(--brand-dark), var(--brand-dark)); background-size: 0 1px; background-repeat: no-repeat; background-position: 100% 100%; transition: background-size .3s ease; }
.m-card:hover .m-card__title a { background-size: 100% 1px; }
.m-card__author { margin-top: 2px; font-size: 14px; color: var(--ink-mute); }
.m-card__rating { margin-top: 8px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-mute); }
.m-card__foot { margin-top: auto; padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.m-card__price { font-size: 18px; font-weight: 700; line-height: 1.2; }
.m-card__old { display: block; font-size: 12px; font-weight: 400; color: var(--ink-mute); }
@media (min-width: 1024px) { .m-card__title { font-size: 20px; } }
@media (max-width: 420px) { .m-card__foot .m-btn { padding-inline: 12px; } .m-card__foot .m-btn .m-btn__label { display: none; } }

.m-money__cur { font-size: .7em; font-weight: 500; }

/* ---------- 9. Rail (carousel) ---------- */
.m-rail { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 16px; }
.m-rail::-webkit-scrollbar { display: none; }
.m-rail > * { flex: 0 0 calc((100% - 24px) / 2); scroll-snap-align: start; }
@media (min-width: 768px) { .m-rail > * { flex-basis: calc((100% - 48px) / 3); } }
@media (min-width: 1024px) { .m-rail > * { flex-basis: calc((100% - 96px) / 5); } }
.m-rail-controls { display: flex; gap: 8px; }

/* ---------- 10. Sections ---------- */
.m-section { padding-block: 56px; }
.m-section--white { background: var(--white); border-block: 1px solid var(--line); }
.m-section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 32px; }
.m-section-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.4; }
.m-section-sub { margin-top: 6px; color: var(--ink-mute); }
.m-section-foot { margin-top: 48px; text-align: center; }
@media (min-width: 1024px) { .m-section { padding-block: 80px; } }

.m-page-head { padding-block: 32px 24px; }
.m-page-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.35; margin-top: 12px; }
.m-page-sub { margin-top: 6px; color: var(--ink-mute); }

.m-breadcrumb { font-size: 14px; color: var(--ink-mute); }
.m-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; }
.m-breadcrumb li + li::before { content: "/"; margin-inline-end: 8px; }
.m-breadcrumb a:hover { color: var(--ink); }
.m-breadcrumb [aria-current] { color: var(--ink); }

.m-empty { text-align: center; padding: 64px 16px; }
.m-empty__icon { width: 64px; height: 64px; margin-inline: auto; border-radius: 50%; background: var(--sand); display: grid; place-items: center; color: var(--ink-soft); }
.m-empty__title { margin-top: 20px; font-family: var(--font-display); font-weight: 700; font-size: 26px; }
.m-empty__text { margin-top: 8px; color: var(--ink-mute); }
.m-empty .m-btn { margin-top: 24px; }

/* ---------- 11. Home ---------- */
.m-hero { overflow: hidden; }
.m-hero__grid { display: grid; gap: 32px; align-items: center; padding-block: 32px 64px; }
.m-hero__visual { position: relative; height: 380px; order: -1; }
.m-hero__meem { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--brand); pointer-events: none; }
.m-hero__meem svg { height: 100%; max-height: 620px; width: auto; }
.m-hero__stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-top: 14%; padding-inline-end: 6%; }
.m-hero__floor { position: absolute; bottom: 24px; inset-inline: 10%; height: 24px; border-radius: 50%; background: rgba(27,42,56,.15); filter: blur(18px); }
.m-hero__book { width: 190px; transform: rotate(-4deg); animation: m-rise .9s var(--ease) both .15s; }
.m-hero__book .m-cover { box-shadow: 0 2px 2px rgba(27,42,56,.12), 0 40px 60px -24px rgba(27,42,56,.6); }
@keyframes m-rise { from { opacity: 0; transform: translateY(28px) rotate(-4deg); } to { opacity: 1; transform: translateY(0) rotate(-4deg); } }
.m-hero__title { margin-top: 24px; font-family: var(--font-display); font-weight: 700; font-size: clamp(3.25rem, 7vw, 5.5rem); line-height: 1.15; }
.m-hero__author { margin-top: 12px; font-size: 20px; color: var(--ink-soft); }
.m-hero__lede { margin-top: 24px; max-width: 34rem; font-size: 18px; line-height: 1.9; color: var(--ink-soft); }
.m-hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.m-hero__meta { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 16px 40px; font-size: 14px; }
.m-hero__meta dt { color: var(--ink-mute); }
.m-hero__meta dd { margin-top: 4px; font-weight: 600; }
@media (min-width: 640px) { .m-hero__visual { height: 460px; } .m-hero__book { width: 230px; } }
@media (min-width: 1024px) {
  .m-hero__grid { grid-template-columns: 1fr 1fr; gap: 24px; padding-block: 64px 96px; }
  .m-hero__visual { height: 580px; order: 0; }
  .m-hero__book { width: 290px; }
}

.m-depts { display: grid; gap: 16px; }
@media (min-width: 768px) { .m-depts { grid-template-columns: 1.3fr 1fr 1fr; } }
.m-dept { position: relative; display: flex; flex-direction: column; min-height: 240px; padding: 28px; border-radius: var(--r-lg); background: var(--sand); overflow: hidden; transition: background-color .3s ease; }
.m-dept:hover { background: var(--sand-2); }
.m-dept__title { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.3; }
.m-dept__text { margin-top: 6px; max-width: 16rem; color: var(--ink-mute); font-size: 15px; }
.m-dept__cta { margin-top: auto; padding-top: 24px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; }
.m-dept__art { position: absolute; bottom: -18px; inset-inline-end: 24px; width: 110px; transform: rotate(-6deg); transition: transform .4s var(--ease); }
.m-dept:hover .m-dept__art { transform: rotate(-2deg) translateY(-6px); }
.m-dept--feature { background: var(--ink); color: var(--white); }
.m-dept--feature:hover { background: #22364A; }
.m-dept--feature .m-dept__text { color: rgba(255,255,255,.75); }
.m-dept--feature .m-dept__art { width: 130px; }
.m-dept__art-pair { display: flex; gap: 10px; }

.m-pick { position: relative; display: grid; gap: 40px; align-items: center; background: var(--ink); color: var(--white); border-radius: var(--r-xl); padding: clamp(28px, 5vw, 64px); overflow: hidden; }
.m-pick__cover { width: min(240px, 62%); margin-inline: auto; transform: rotate(3deg); }
.m-pick__label { color: var(--brand); font-weight: 600; font-size: 14px; }
.m-pick__title { margin-top: 10px; font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.3; }
.m-pick__author { margin-top: 6px; color: rgba(255,255,255,.75); }
.m-pick__quote { margin-top: 24px; padding-inline-start: 20px; border-inline-start: 3px solid var(--brand); font-family: var(--font-display); font-size: 20px; line-height: 1.9; color: rgba(255,255,255,.9); max-width: 36rem; }
.m-pick__by { margin-top: 12px; font-size: 14px; color: rgba(255,255,255,.65); }
.m-pick__actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 1024px) { .m-pick { grid-template-columns: 1fr 1.4fr; } }

/* ---------- 12. Forms ---------- */
.m-field { display: grid; gap: 8px; }
.m-label { font-size: 14px; font-weight: 600; }
.m-label small { font-weight: 400; color: var(--ink-mute); }
.m-input, .m-select-input, .m-textarea {
  width: 100%; height: 48px; padding-inline: 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  outline: 0; transition: border-color .2s, box-shadow .2s;
}
.m-textarea { height: auto; min-height: 88px; padding-block: 12px; resize: vertical; }
.m-input:focus, .m-select-input:focus, .m-textarea:focus { border-color: var(--brand-dark); box-shadow: 0 0 0 4px var(--brand-tint); }
.m-input::placeholder, .m-textarea::placeholder { color: var(--ink-mute); opacity: .75; }
.m-input[aria-invalid="true"], .m-select-input[aria-invalid="true"] { border-color: var(--danger); }
.m-field__error { font-size: 13px; color: var(--danger); }
.m-field__hint { font-size: 13px; color: var(--ink-mute); }
.m-select { height: 40px; padding-inline: 16px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--white); outline: 0; }
.m-select:focus { border-color: var(--brand-dark); }

.m-fields { display: grid; gap: 16px; }
@media (min-width: 640px) { .m-fields--2 { grid-template-columns: 1fr 1fr; } .m-fields .m-span-2 { grid-column: 1 / -1; } }

.m-phone { display: flex; direction: ltr; }
.m-phone__code { display: grid; place-items: center; padding-inline: 14px; border: 1px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; background: var(--sand); font-weight: 600; font-size: 15px; }
.m-phone .m-input { border-radius: 0 12px 12px 0; text-align: left; }

.m-check { display: flex; align-items: center; gap: 10px; padding-block: 6px; font-size: 15px; cursor: pointer; }
.m-check input { width: 18px; height: 18px; accent-color: var(--brand-dark); flex-shrink: 0; }
.m-check__count { margin-inline-start: auto; font-size: 13px; color: var(--ink-mute); }

.m-radio-card { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); cursor: pointer; transition: border-color .2s, background-color .2s; }
.m-radio-card:hover { border-color: var(--ink-mute); }
.m-radio-card:has(input:checked) { border-color: var(--brand-dark); background: var(--brand-tint); }
.m-radio-card input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brand-dark); flex-shrink: 0; }
.m-radio-card__body { flex: 1; min-width: 0; }
.m-radio-card__title { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.m-radio-card__text { margin-top: 2px; font-size: 14px; color: var(--ink-mute); }
.m-radio-list { display: grid; gap: 10px; }

.m-pay-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-pay-option { position: relative; }
.m-pay-option input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.m-pay-option span { display: flex; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 12px; font-weight: 600; font-size: 14px; transition: border-color .2s, background-color .2s; }
.m-pay-option input:checked + span { border-color: var(--brand-dark); background: var(--brand-tint); color: var(--brand-deep); }
.m-pay-option input:focus-visible + span { outline: 2px solid var(--brand-dark); outline-offset: 2px; }

.m-inline-form { display: flex; gap: 8px; }
.m-inline-form .m-input { flex: 1; }

/* ---------- 13. Shop ---------- */
.m-shop-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; }
.m-shop-toolbar__end { display: flex; align-items: center; gap: 12px; }
@media (max-width: 1023px) { .m-shop-toolbar__end { width: 100%; justify-content: space-between; } }
.m-result-count { font-size: 14px; color: var(--ink-mute); }
.m-active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.m-active-filters:empty { display: none; }

.m-shop-layout { display: grid; gap: 32px; padding-bottom: 80px; }
.m-filters__head, .m-filters__apply { display: none; }
.m-filter-group { padding-block: 20px; border-bottom: 1px solid var(--line); }
.m-filter-group:first-of-type { padding-top: 0; }
.m-filter-group__title { font-weight: 600; font-size: 15px; margin-bottom: 10px; }
.m-range input { width: 100%; accent-color: var(--brand-dark); }
.m-range__vals { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-mute); margin-top: 4px; }
.m-filters-toggle { display: none; }

.m-pagination { margin-top: 56px; display: flex; justify-content: center; gap: 8px; }
.m-pagination button { min-width: 44px; height: 44px; padding-inline: 12px; border-radius: var(--r-pill); border: 1px solid var(--line); font-weight: 600; transition: border-color .2s; }
.m-pagination button:hover { border-color: var(--ink); }
.m-pagination button[aria-current="page"] { background: var(--ink); color: var(--white); border-color: var(--ink); }

@media (min-width: 1024px) {
  .m-shop-layout { grid-template-columns: 250px 1fr; gap: 48px; }
  .m-filters { position: sticky; top: 170px; align-self: start; }
}
@media (max-width: 1023px) {
  .m-filters-toggle { display: inline-flex; }
  .m-filters { position: fixed; inset: 0; z-index: 90; background: var(--paper); padding: 20px; overflow-y: auto; transform: translateY(100%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s linear .35s; }
  .m-filters.is-open { transform: none; visibility: visible; transition: transform .35s var(--ease), visibility 0s; }
  .m-filters__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
  .m-filters__head h2 { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
  .m-filters__apply { display: flex; position: sticky; bottom: 0; padding-block: 16px; background: var(--paper); }
}

/* ---------- 14. Product page ---------- */
.m-pd { display: grid; gap: 40px; margin-top: 24px; }
.m-pd__media { position: relative; display: grid; place-items: center; background: var(--sand); border-radius: var(--r-xl); padding: 56px clamp(40px, 10vw, 80px) 64px; }
.m-pd__cover { width: 100%; max-width: 300px; }
.m-pd__shelfline { position: absolute; bottom: 40px; inset-inline: 40px; height: 1px; background: rgba(27,42,56,.1); }
.m-pd__wish { position: absolute; top: 16px; inset-inline-end: 16px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.85); transition: background-color .2s; }
.m-pd__wish:hover { background: var(--white); }
.m-pd__note { margin-top: 12px; text-align: center; font-size: 12px; color: var(--ink-mute); }
.m-pd__title { margin-top: 16px; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.25rem, 4vw, 3rem); line-height: 1.3; }
.m-pd__byline { margin-top: 8px; font-size: 18px; }
.m-pd__rating { margin-top: 16px; display: flex; align-items: center; gap: 12px; font-size: 14px; }
.m-pd__price-row { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.m-pd__price { font-size: 36px; font-weight: 700; line-height: 1; }
.m-pd__save { color: var(--ink-mute); }
.m-pd__save span { color: var(--brand-dark); font-weight: 600; }
.m-pd__vat { font-size: 14px; color: var(--ink-mute); }
.m-pd__buy { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.m-pd__buy .m-btn { flex: 1; min-width: 220px; }
@media (min-width: 1024px) {
  .m-pd { grid-template-columns: 5fr 7fr; gap: 64px; }
  .m-pd__sticky { position: sticky; top: 170px; }
}

.m-qty { display: inline-flex; align-items: center; height: 56px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--white); }
.m-qty button { width: 48px; height: 100%; border-radius: var(--r-pill); display: grid; place-items: center; transition: background-color .2s; }
.m-qty button:hover { background: var(--sand); }
.m-qty output, .m-qty span { width: 40px; text-align: center; font-weight: 600; font-size: 18px; }
.m-qty--sm { height: 36px; }
.m-qty--sm button { width: 36px; }
.m-qty--sm output, .m-qty--sm span { width: 28px; font-size: 14px; }

.m-info-box { margin-top: 24px; display: grid; gap: 20px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); font-size: 14px; }
@media (min-width: 640px) { .m-info-box { grid-template-columns: 1fr 1fr; } }
.m-info-item { display: flex; gap: 12px; }
.m-info-item > .m-icon { width: 24px; height: 24px; color: var(--brand-dark); }
.m-info-item strong { display: block; font-weight: 600; }
.m-info-item p { margin-top: 4px; color: var(--ink-mute); }
.m-info-item select { border: 0; background: transparent; font-weight: 600; color: var(--brand-dark); padding: 0; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

.m-block { margin-top: 40px; }
.m-block-title { font-family: var(--font-display); font-weight: 700; font-size: 24px; }
.m-pd__desc { margin-top: 12px; max-width: 40rem; font-size: 17px; line-height: 2; color: var(--ink-soft); }
.m-specs { margin-top: 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; font-size: 14px; }
.m-specs > div { background: var(--white); padding: 16px; }
.m-specs dt { color: var(--ink-mute); }
.m-specs dd { margin-top: 4px; font-weight: 600; }
@media (min-width: 640px) { .m-specs { grid-template-columns: repeat(4, 1fr); } }

.m-author-box { margin-top: 40px; display: flex; align-items: flex-start; gap: 20px; padding: 24px; border-radius: var(--r-md); background: var(--sand); }
.m-author-box__avatar { width: 64px; height: 64px; flex-shrink: 0; border-radius: 50%; background: var(--ink); color: var(--white); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 24px; }
.m-author-box p { margin-top: 8px; line-height: 1.9; color: var(--ink-soft); }
.m-author-box .m-link { display: inline-block; margin-top: 12px; font-size: 14px; }

.m-reviews { display: grid; gap: 40px; }
@media (min-width: 1024px) { .m-reviews { grid-template-columns: 1fr 2fr; gap: 64px; } }
.m-rating-summary__big { font-size: 56px; font-weight: 700; line-height: 1; }
.m-rating-summary__meta { margin-top: 12px; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-mute); }
.m-bars { margin-top: 24px; display: grid; gap: 10px; }
.m-bars li { display: grid; grid-template-columns: 42px 1fr 40px; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-mute); }
.m-bar { height: 6px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.m-bar span { display: block; height: 100%; background: var(--star); border-radius: var(--r-pill); }
.m-review { padding-block: 24px; border-bottom: 1px solid var(--line); }
.m-review:first-child { padding-top: 0; }
.m-review__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.m-review__who { display: flex; align-items: center; gap: 10px; }
.m-review__name { font-weight: 600; }
.m-review__date { font-size: 13px; color: var(--ink-mute); }
.m-review p { margin-top: 10px; line-height: 1.9; color: var(--ink-soft); }

/* ---------- 15. Cart (page + drawer) ---------- */
.m-line-item { display: flex; gap: 16px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.m-line-item:last-child { border-bottom: 0; }
.m-line-item__media { width: 72px; flex-shrink: 0; }
.m-line-item--lg .m-line-item__media { width: 96px; }
.m-line-item__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-line-item__top { display: flex; justify-content: space-between; gap: 12px; }
.m-line-item__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.5; }
.m-line-item__title a:hover { color: var(--brand-dark); }
.m-line-item__meta { font-size: 14px; color: var(--ink-mute); }
.m-line-item__unit { font-size: 13px; color: var(--ink-mute); margin-top: 2px; }
.m-line-item__bottom { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.m-line-item__price { font-weight: 700; }
.m-remove-btn { width: 36px; height: 36px; margin-top: -4px; margin-inline-end: -8px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; color: var(--ink-mute); transition: background-color .2s, color .2s; }
.m-remove-btn:hover { background: var(--sand); color: var(--ink); }

.m-free-ship { font-size: 14px; }
.m-progress { margin-top: 10px; height: 6px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.m-progress span { display: block; height: 100%; background: var(--brand); border-radius: var(--r-pill); transition: width .5s ease; }

.m-sum { display: grid; gap: 10px; font-size: 14px; }
.m-sum > div { display: flex; justify-content: space-between; gap: 12px; }
.m-sum dt { color: var(--ink-mute); }
.m-sum dd { font-weight: 600; }
.m-sum .m-is-discount dd { color: var(--success); }
.m-sum__total { padding-top: 12px; border-top: 1px solid var(--line); font-size: 16px; }
.m-sum__total dt { color: var(--ink); font-weight: 600; }
.m-sum__total dd { font-size: 20px; font-weight: 700; }
.m-sum__note { font-size: 12px; color: var(--ink-mute); }

.m-cart-layout { display: grid; gap: 32px; padding-bottom: 80px; align-items: start; }
@media (min-width: 1024px) { .m-cart-layout { grid-template-columns: 1fr 400px; gap: 48px; } .m-summary { position: sticky; top: 170px; } }
.m-cart-list { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding-inline: clamp(16px, 3vw, 28px); }
.m-cart-banner { margin-bottom: 16px; padding: 18px 24px; border-radius: var(--r-md); background: var(--white); border: 1px solid var(--line); }
.m-summary { display: grid; gap: 20px; padding: clamp(20px, 3vw, 28px); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); }
.m-summary__title { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.m-trust-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--ink-mute); text-align: center; }
.m-coupon-msg { font-size: 13px; margin-top: 6px; }
.m-coupon-msg.is-ok { color: var(--success); }
.m-coupon-msg.m-is-err { color: var(--danger); }
.m-mini-lines { display: grid; gap: 14px; max-height: 300px; overflow-y: auto; padding-top: 8px; padding-inline-end: 8px; }
.m-mini-line { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.m-mini-line__media { width: 44px; flex-shrink: 0; position: relative; }
.m-mini-line__qty { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px; border-radius: var(--r-pill); background: var(--ink); color: var(--white); font-size: 11px; font-weight: 700; display: grid; place-items: center; padding-inline: 4px; }
.m-mini-line__title { flex: 1; min-width: 0; font-weight: 600; line-height: 1.5; }
.m-mini-line__title small { display: block; font-weight: 400; color: var(--ink-mute); }

/* Drawer — slides in from inline-end (left in RTL) */
.m-overlay { position: fixed; inset: 0; z-index: 75; background: rgba(27,42,56,.4); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.m-overlay.is-open { opacity: 1; pointer-events: auto; }
.m-drawer { position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 80; width: min(440px, 100%); display: flex; flex-direction: column; background: var(--paper); box-shadow: 0 0 60px rgba(27,42,56,.25); transform: translateX(-100%); visibility: hidden; transition: transform .4s var(--ease), visibility 0s linear .4s; }
[dir="ltr"] .m-drawer { transform: translateX(100%); }
.m-drawer.is-open { transform: none; visibility: visible; transition: transform .4s var(--ease), visibility 0s; }
.m-drawer__head { display: flex; align-items: center; justify-content: space-between; height: 72px; padding-inline: 24px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.m-drawer__title { font-family: var(--font-display); font-weight: 700; font-size: 24px; }
.m-drawer__title small { font-family: var(--font-ui); font-size: 15px; font-weight: 500; color: var(--ink-mute); }
.m-drawer__ship { padding: 16px 24px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.m-drawer__body { flex: 1; overflow-y: auto; padding-inline: 24px; }
.m-drawer__foot { display: grid; gap: 14px; padding: 20px 24px 24px; border-top: 1px solid var(--line); background: var(--white); flex-shrink: 0; }
.m-drawer__actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

/* ---------- 16. Checkout ---------- */
.m-panel { padding: clamp(20px, 3vw, 32px); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); }
.m-panel + .m-panel { margin-top: 20px; }
.m-panel__title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.m-step-num { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--white); display: grid; place-items: center; font-family: var(--font-ui); font-size: 14px; font-weight: 600; flex-shrink: 0; }
.m-card-fields { margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--sand); }
.m-pay-logo { font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.m-success { max-width: 560px; margin-inline: auto; padding-block: 48px 96px; text-align: center; }
.m-success__icon { width: 76px; height: 76px; margin-inline: auto; border-radius: 50%; background: var(--brand-tint); color: var(--brand-deep); display: grid; place-items: center; }
.m-success__icon .m-icon { width: 36px; height: 36px; }
.m-success h1 { margin-top: 24px; font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.5rem); }
.m-success__order { margin-top: 20px; display: inline-flex; gap: 8px; padding: 10px 18px; border-radius: var(--r-pill); background: var(--sand); font-weight: 600; }
.m-success__actions { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.m-success .m-panel { margin-top: 32px; text-align: start; }

/* ---------- 17. Account ---------- */
.m-auth { max-width: 460px; margin-inline: auto; padding-block: 24px 96px; }
.m-tabs { display: flex; gap: 4px; padding: 4px; background: var(--sand); border-radius: var(--r-pill); }
.m-tabs button { flex: 1; height: 42px; border-radius: var(--r-pill); font-weight: 600; color: var(--ink-soft); transition: background-color .2s, color .2s; }
.m-tabs button[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(27,42,56,.12); }
.m-account-layout { display: grid; gap: 32px; padding-bottom: 96px; align-items: start; }
.m-account-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.m-account-nav button { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; border: 1px solid transparent; white-space: nowrap; color: var(--ink-soft); text-align: start; transition: background-color .2s; }
.m-account-nav button:hover { background: var(--sand); }
.m-account-nav button[aria-selected="true"] { background: var(--white); border-color: var(--line); color: var(--ink); font-weight: 600; }
@media (min-width: 1024px) { .m-account-layout { grid-template-columns: 240px 1fr; gap: 48px; } .m-account-nav { flex-direction: column; position: sticky; top: 170px; } }
.m-orders { display: grid; gap: 16px; }
.m-order { display: grid; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); }
.m-order__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.m-order__id { font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.m-order__meta { font-size: 14px; color: var(--ink-mute); }
.m-order__covers { display: flex; gap: 8px; }
.m-order__covers > div { width: 44px; }
.m-order__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }

/* ---------- 18. Footer ---------- */
.m-site-footer { margin-top: auto; background: var(--ink); color: rgba(255,255,255,.8); }
.m-trust { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; padding-block: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.m-trust li { display: flex; align-items: flex-start; gap: 12px; }
.m-trust .m-icon { width: 28px; height: 28px; color: var(--brand); }
.m-trust strong { display: block; color: var(--white); font-weight: 600; }
.m-trust p { margin-top: 4px; font-size: 14px; }
@media (min-width: 1024px) { .m-trust { grid-template-columns: repeat(4, 1fr); } }
.m-footer-main { display: grid; gap: 40px; padding-block: 56px; }
@media (min-width: 1024px) { .m-footer-main { grid-template-columns: 5fr 7fr; } }
.m-footer-about { margin-top: 20px; max-width: 28rem; line-height: 1.9; }
.m-site-footer .m-logo__name { color: var(--white); }
.m-newsletter { margin-top: 32px; max-width: 28rem; }
.m-newsletter label { color: var(--white); font-weight: 600; }
.m-newsletter p { margin-top: 4px; font-size: 14px; }
.m-newsletter__row { margin-top: 16px; display: flex; height: 48px; padding: 4px; border-radius: var(--r-pill); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); transition: border-color .2s; }
.m-newsletter__row:focus-within { border-color: var(--brand); }
.m-newsletter input { flex: 1; min-width: 0; padding-inline: 16px; background: transparent; border: 0; outline: 0; color: var(--white); }
.m-newsletter input::placeholder { color: rgba(255,255,255,.55); }
.m-newsletter .m-btn { height: 38px; }
.m-footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; font-size: 14px; }
@media (min-width: 640px) { .m-footer-links { grid-template-columns: repeat(3, 1fr); } }
.m-footer-links h3 { margin-bottom: 16px; color: var(--white); font-size: 15px; font-weight: 600; }
.m-footer-links li + li { margin-top: 12px; }
.m-footer-links a { transition: color .2s; }
.m-footer-links a:hover { color: var(--brand); }
.m-social { display: flex; flex-wrap: wrap; gap: 8px; }
.m-social li + li { margin-top: 0; }
.m-social a { height: 36px; display: inline-flex; align-items: center; padding-inline: 14px; border: 1px solid rgba(255,255,255,.2); border-radius: var(--r-pill); transition: border-color .2s, color .2s; }
.m-social a:hover { border-color: var(--brand); }
.m-footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12px; color: rgba(255,255,255,.65); }
.m-pay-marks { display: flex; flex-wrap: wrap; gap: 8px; direction: ltr; }
.m-pay-marks li { padding: 4px 10px; border-radius: 6px; background: rgba(255,255,255,.1); font-weight: 600; color: rgba(255,255,255,.85); }

/* ---------- 19. Toast ---------- */
.m-toast { position: fixed; bottom: 24px; left: 50%; z-index: 120; max-width: calc(100% - 32px); padding: 12px 20px; border-radius: var(--r-pill); background: var(--ink); color: var(--white); font-size: 14px; font-weight: 500; text-align: center; box-shadow: 0 0 0 1px rgba(255,255,255,.18), var(--shadow-pop); pointer-events: none; opacity: 0; transform: translate(-50%, 20px); transition: opacity .3s ease, transform .3s ease; }
.m-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }



/* ==========================================================================
   20. Blog
   ========================================================================== */

/* Post artwork: book covers fanned on a colored ground */
.m-post-art { position: relative; aspect-ratio: 16 / 10; background: var(--art); border-radius: var(--r-md); overflow: hidden; }
.m-post-art__fan { position: absolute; inset-inline: 18%; top: 12%; bottom: 11%; transition: transform .4s var(--ease); }
.m-post-art__item { position: absolute; bottom: 0; left: 50%; width: 42%; transform-origin: 50% 100%; }
.m-post-art__item .m-cover, .m-post-art__item .m-object { box-shadow: 0 1px 1px rgba(27,42,56,.1), 0 16px 24px -12px rgba(27,42,56,.5); }
.m-post-art__fan[data-count="1"] .m-post-art__item { width: 46%; transform: translateX(-50%); }
.m-post-art__fan[data-count="2"] [data-i="0"] { transform: translateX(-92%) rotate(-7deg); }
.m-post-art__fan[data-count="2"] [data-i="1"] { transform: translateX(-8%) rotate(7deg); }
.m-post-art__fan[data-count="3"] [data-i="0"] { transform: translateX(-128%) rotate(-11deg) translateY(3%); }
.m-post-art__fan[data-count="3"] [data-i="1"] { transform: translateX(-50%); z-index: 2; }
.m-post-art__fan[data-count="3"] [data-i="2"] { transform: translateX(28%) rotate(11deg) translateY(3%); }
.m-post-art--meem { display: grid; place-items: center; color: var(--brand); }
.m-post-art--meem svg { height: 72%; width: auto; }

.m-post-card { display: flex; flex-direction: column; min-width: 0; }
.m-post-card:hover .m-post-art__fan { transform: translateY(-4%); }
.m-post-card__body { margin-top: 18px; display: flex; flex-direction: column; flex: 1; }
.m-post-card__cat { align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--brand-dark); }
.m-post-card__cat:hover { color: var(--brand-deep); text-decoration: underline; text-underline-offset: 4px; }
.m-post-card__title { margin-top: 6px; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.5; }
.m-post-card__title a { background-image: linear-gradient(var(--brand-dark), var(--brand-dark)); background-size: 0 1px; background-repeat: no-repeat; background-position: 100% 100%; transition: background-size .3s ease; padding-bottom: 2px; }
.m-post-card:hover .m-post-card__title a { background-size: 100% 1px; }
.m-post-card__excerpt { margin-top: 8px; color: var(--ink-soft); line-height: 1.8; }
.m-post-meta { margin-top: auto; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--ink-mute); }

.m-grid-posts { display: grid; gap: 48px 32px; }
@media (min-width: 768px) { .m-grid-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .m-grid-posts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Featured post on the blog index */
.m-post-featured { display: grid; gap: 28px; align-items: center; margin-bottom: 56px; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
.m-post-featured .m-post-art { aspect-ratio: 16 / 11; border-radius: var(--r-xl); }
.m-post-featured .m-post-card__title { font-size: clamp(1.9rem, 3.4vw, 2.75rem); line-height: 1.35; }
.m-post-featured .m-post-card__excerpt { font-size: 18px; max-width: 34rem; }
.m-post-featured .m-post-meta { margin-top: 20px; padding-top: 0; font-size: 14px; }
.m-post-featured .m-btn { margin-top: 28px; align-self: flex-start; }
@media (min-width: 1024px) { .m-post-featured { grid-template-columns: 1.25fr 1fr; gap: 56px; } }

/* Article page */
.m-read-progress { position: fixed; top: 0; inset-inline: 0; z-index: 60; height: 3px; pointer-events: none; }
.m-read-progress span { display: block; height: 100%; width: 0; background: var(--brand); margin-inline-start: 0; }

.m-article-head { max-width: 46rem; padding-block: 28px 32px; }
.m-article-head .m-post-card__cat { font-size: 14px; }
.m-article__title { margin-top: 10px; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.3; }
.m-article__lede { margin-top: 16px; font-size: 20px; line-height: 1.9; color: var(--ink-soft); }
.m-byline { margin-top: 24px; display: flex; align-items: center; gap: 12px; }
.m-byline__avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--white); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 18px; flex-shrink: 0; }
.m-byline__name { font-weight: 600; }
.m-byline .m-post-meta { margin: 0; padding: 0; }
.m-article__art .m-post-art { aspect-ratio: 21 / 9; border-radius: var(--r-xl); }
.m-article__art .m-post-art__fan { inset-inline: 32%; }
@media (max-width: 767px) { .m-article__art .m-post-art { aspect-ratio: 4 / 3; } .m-article__art .m-post-art__fan { inset-inline: 16%; } }

.m-article-layout { display: grid; gap: 48px; padding-block: 48px 80px; align-items: start; }
@media (min-width: 1024px) { .m-article-layout { grid-template-columns: minmax(0, 46rem) 300px; justify-content: space-between; } .m-article-aside { position: sticky; top: 170px; } }

/* Long-form reading: Naskh body, generous leading */
.m-prose { font-family: var(--font-display); font-size: 20px; line-height: 2.1; color: #26384A; }
.m-prose > * + * { margin-top: 1.1em; }
.m-prose h2 { margin-top: 2em; font-size: 28px; line-height: 1.5; font-weight: 700; color: var(--ink); }
.m-prose blockquote { margin-block: 1.8em; padding-inline-start: 24px; border-inline-start: 3px solid var(--brand); font-size: 24px; line-height: 1.9; color: var(--ink); }
.m-prose blockquote cite { display: block; margin-top: 10px; font-family: var(--font-ui); font-style: normal; font-size: 14px; color: var(--ink-mute); }
.m-prose ul { list-style: disc; padding-inline-start: 1.3em; }
.m-prose li + li { margin-top: .4em; }
.m-prose li::marker { color: var(--brand-dark); }
.m-tip { display: flex; gap: 14px; padding: 20px 22px; border-radius: var(--r-md); background: var(--brand-tint); color: var(--brand-deep); font-family: var(--font-ui); font-size: 16px; line-height: 1.8; }
.m-tip .m-icon { margin-top: 3px; }

/* Shoppable book inside an article */
.m-inline-book { display: flex; align-items: center; gap: 20px; margin-block: 1.8em; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); font-family: var(--font-ui); line-height: 1.6; }
.m-inline-book__media { width: 76px; flex-shrink: 0; }
.m-inline-book__body { flex: 1; min-width: 0; }
.m-inline-book__title { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.5; color: var(--ink); }
.m-inline-book__title a:hover { color: var(--brand-dark); }
.m-inline-book__author { font-size: 14px; color: var(--ink-mute); }
.m-inline-book__note { margin-top: 4px; font-size: 14px; color: var(--ink-soft); }
.m-inline-book__foot { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.m-inline-book__price { font-weight: 700; font-size: 17px; color: var(--ink); }

.m-aside-block + .m-aside-block { margin-top: 20px; }
.m-aside-block { padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); }
.m-aside-block__title { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin-bottom: 14px; }
.m-aside-book { display: flex; align-items: center; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.m-aside-book:last-child { border-bottom: 0; padding-bottom: 0; }
.m-aside-book:first-child { padding-top: 0; }
.m-aside-book__media { width: 48px; flex-shrink: 0; }
.m-aside-book__main { flex: 1; min-width: 0; font-size: 14px; }
.m-aside-book__main a { font-weight: 600; line-height: 1.5; display: block; }
.m-aside-book__main a:hover { color: var(--brand-dark); }
.m-aside-book .m-icon-btn { width: 38px; height: 38px; background: var(--brand); color: var(--ink); flex-shrink: 0; }
.m-aside-book .m-icon-btn:hover { background: var(--brand-dark); color: var(--white); }
.m-share { display: flex; flex-wrap: wrap; gap: 8px; }
.m-share .m-btn { height: 40px; padding-inline: 16px; font-size: 14px; }
@media (max-width: 639px) { .m-prose { font-size: 18px; } .m-prose h2 { font-size: 24px; } .m-prose blockquote { font-size: 20px; } .m-inline-book { gap: 14px; padding: 14px; } .m-inline-book__media { width: 60px; } }

/* ==========================================================================
   21. Real cover images (from ecp_products.cover_url)
   ========================================================================== */
.m-cover-img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 7px 2px 2px 7px; background: var(--sand-2);
  box-shadow: 0 1px 1px rgba(27,42,56,.10), 0 14px 28px -12px rgba(27,42,56,.45); transition: transform .35s var(--ease), box-shadow .35s ease; }
.m-card:hover .m-cover-img { transform: translateY(-6px) rotate(-1.2deg); box-shadow: 0 1px 1px rgba(27,42,56,.1), 0 24px 34px -14px rgba(27,42,56,.5); }
.m-card--out .m-cover, .m-card--out .m-cover-img, .m-card--out .m-object { filter: grayscale(.55); opacity: .75; }

/* ==========================================================================
   22. Buy control: add button ⇄ stepper ⇄ notify (note 12 + 25)
   data-state on .m-buy: add | qty | out
   ========================================================================== */
.m-buy { display: inline-flex; align-items: center; }
.m-buy__add, .m-stepper, .m-buy__notify { display: none; }
.m-buy[data-state="add"] .m-buy__add { display: inline-flex; }
.m-buy[data-state="qty"] .m-stepper { display: inline-flex; }
.m-buy[data-state="out"] .m-buy__notify { display: inline-flex; }
.m-buy.is-busy { opacity: .6; pointer-events: none; }
.m-stepper { align-items: center; height: 40px; border-radius: var(--r-pill); background: var(--brand); color: var(--ink); animation: m-pop .25s var(--ease); }
.m-stepper button { width: 38px; height: 100%; border-radius: var(--r-pill); display: grid; place-items: center; font-size: 20px; font-weight: 600; line-height: 1; transition: background-color .2s, color .2s; }
.m-stepper button:hover { background: var(--brand-dark); color: var(--white); }
.m-stepper button[disabled] { opacity: .35; pointer-events: none; }
.m-stepper__qty { min-width: 26px; text-align: center; font-weight: 700; font-size: 15px; }
.m-buy--lg .m-buy__add, .m-buy--lg .m-buy__notify { height: 56px; padding-inline: 32px; font-size: 16px; }
.m-buy--lg .m-stepper { height: 56px; }
.m-buy--lg .m-stepper button { width: 52px; font-size: 24px; }
.m-buy--lg .m-stepper__qty { min-width: 40px; font-size: 18px; }
.m-buy--block, .m-buy--block .m-buy__add, .m-buy--block .m-buy__notify, .m-buy--block .m-stepper { width: 100%; justify-content: space-between; }
.m-buy--block .m-buy__add, .m-buy--block .m-buy__notify { justify-content: center; }
.m-in-cart { margin-top: 10px; font-size: 14px; color: var(--brand-deep); display: flex; align-items: center; gap: 6px; }
.m-in-cart a { text-decoration: underline; text-underline-offset: 3px; }
@keyframes m-pop { from { transform: scale(.92); opacity: .4; } to { transform: none; opacity: 1; } }
@media (max-width: 420px) { .m-card__foot .m-buy__add { padding-inline: 12px; } .m-card__foot .m-btn__label { display: none; } .m-stepper button { width: 32px; } }

/* ==========================================================================
   23. Header additions: nav blog link, mobile menu (note 3 + 13), suggestions (22)
   ========================================================================== */
.m-nav-blog { margin-inline-start: auto; color: var(--ink-soft); gap: 6px; }
.m-nav-blog .m-icon { width: 18px; height: 18px; color: var(--brand-dark); }
.m-menu-btn { display: none; }
@media (max-width: 767px) {
  .m-menu-btn { display: grid; }
  .m-main-nav { display: none; }
}

.m-menu { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 85; width: min(360px, 88%); background: var(--paper); display: flex; flex-direction: column;
  box-shadow: 0 0 60px rgba(27,42,56,.25); transform: translateX(100%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s linear .35s; }
[dir="ltr"] .m-menu { transform: translateX(-100%); }
.m-menu.is-open { transform: none; visibility: visible; transition: transform .35s var(--ease), visibility 0s; }
.m-menu__head { display: flex; align-items: center; justify-content: space-between; height: 64px; padding-inline: 20px; border-bottom: 1px solid var(--line); }
.m-menu__body { flex: 1; overflow-y: auto; padding: 12px 20px 24px; }
.m-menu__group + .m-menu__group { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.m-menu__title { font-size: 13px; font-weight: 600; color: var(--ink-mute); margin-bottom: 6px; }
.m-menu__link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 11px; font-size: 16px; }
.m-menu__link[aria-current="page"] { color: var(--brand-deep); font-weight: 600; }
.m-menu__link--main { font-family: var(--font-display); font-weight: 700; font-size: 20px; }

.m-search { position: relative; }
.m-suggest { position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 60; padding: 8px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-pop); max-height: min(70vh, 520px); overflow-y: auto; }
.m-suggest__group + .m-suggest__group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.m-suggest__title { padding: 6px 10px; font-size: 12px; font-weight: 600; color: var(--ink-mute); }
.m-suggest__item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.m-suggest__item[aria-selected="true"], .m-suggest__item:hover { background: var(--sand); }
.m-suggest__thumb { width: 32px; aspect-ratio: 2 / 3; border-radius: 3px; flex-shrink: 0; background: var(--thumb, var(--sand-2)); object-fit: cover; }
.m-suggest__text { flex: 1; min-width: 0; line-height: 1.4; }
.m-suggest__text strong { display: block; font-weight: 600; font-size: 15px; }
.m-suggest__text small { color: var(--ink-mute); font-size: 13px; }
.m-suggest__price { font-weight: 700; font-size: 14px; white-space: nowrap; }
.m-suggest__all { display: block; margin-top: 6px; padding: 10px; text-align: center; font-weight: 600; color: var(--brand-dark); border-radius: 10px; }
.m-suggest__all[aria-selected="true"], .m-suggest__all:hover { background: var(--brand-tint); }
.m-suggest__empty { padding: 16px 10px; color: var(--ink-mute); font-size: 14px; text-align: center; }
mark.m-hl { background: none; color: var(--brand-deep); font-weight: 700; }

/* ==========================================================================
   24. Back to top (note 1)
   ========================================================================== */
.m-totop { position: fixed; bottom: 24px; inset-inline-start: 24px; z-index: 70; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand); color: var(--ink);                       /* brand cyan carries ink (5.5:1) */
  border: 2px solid var(--white);
  box-shadow: 0 10px 24px -8px rgba(1, 95, 111, .55);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s, transform .25s, visibility 0s linear .25s, background-color .2s, color .2s, box-shadow .2s; }
.m-totop .m-icon { width: 22px; height: 22px; stroke-width: 2.2; }
.m-totop.is-visible { opacity: 1; visibility: visible; transform: none;
  transition: opacity .25s, transform .25s, visibility 0s, background-color .2s, color .2s, box-shadow .2s; }
.m-totop:hover { background: var(--brand-dark); color: var(--white); box-shadow: 0 12px 28px -8px rgba(1, 95, 111, .7); }
.m-totop:active { transform: scale(.94); }
.m-totop:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 3px; }
@media (max-width: 639px) { .m-totop { bottom: 16px; inset-inline-start: 16px; width: 44px; height: 44px; } }

/* ==========================================================================
   25. Sign-in (notes 4 + 5)
   ========================================================================== */
.m-auth-card { margin-top: 20px; }
.m-auth-step[hidden] { display: none; }
.m-social { display: grid; gap: 10px; }
.m-social-btn { display: flex; align-items: center; justify-content: center; gap: 12px; height: 52px; padding-inline: 20px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--white); font-weight: 600; transition: border-color .2s, background-color .2s; }
.m-social-btn:hover { border-color: var(--ink); }
.m-social-btn__logo { width: 22px; height: 22px; flex-shrink: 0; display: grid; place-items: center; }
.m-social-btn__logo img { width: 22px; height: 22px; }
.m-social-btn--wa { background: var(--ink); border-color: var(--ink); color: var(--white); height: 56px; }
.m-social-btn--wa:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.m-or { display: flex; align-items: center; gap: 14px; margin-block: 22px; color: var(--ink-mute); font-size: 14px; }
.m-or::before, .m-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.m-otp { direction: ltr; text-align: center; letter-spacing: .6em; font-size: 26px; font-weight: 700; height: 60px; padding-inline-start: .6em; }
.m-otp-meta { margin-top: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--ink-mute); }
.m-otp-meta button { color: var(--brand-dark); font-weight: 600; }
.m-otp-meta button[disabled] { color: var(--ink-mute); font-weight: 400; cursor: default; }
.m-auth-legal { margin-top: 16px; font-size: 13px; color: var(--ink-mute); text-align: center; line-height: 1.8; }
.m-auth-legal a { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   26. Addresses (note 10)
   ========================================================================== */
.m-addresses { display: grid; gap: 12px; }
@media (min-width: 768px) { .m-addresses--grid { grid-template-columns: repeat(2, 1fr); } }
.m-address { position: relative; display: flex; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); transition: border-color .2s, background-color .2s; }
label.m-address { cursor: pointer; }
label.m-address:hover { border-color: var(--ink-mute); }
.m-address:has(input:checked) { border-color: var(--brand-dark); background: var(--brand-tint); }
.m-address input[type="radio"] { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brand-dark); flex-shrink: 0; }
.m-address__body { flex: 1; min-width: 0; }
.m-address__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.m-address__label { font-weight: 700; }
.m-address__lines { margin-top: 6px; font-size: 14px; line-height: 1.8; color: var(--ink-soft); }
.m-address__actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.m-address__actions button, .m-address__actions a { color: var(--brand-dark); font-weight: 600; }
.m-address__actions .is-danger { color: var(--danger); }
.m-address--new { align-items: center; justify-content: center; min-height: 72px; border-style: dashed; color: var(--brand-dark); font-weight: 600; }

.m-segment { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--sand); border-radius: var(--r-pill); }
.m-segment label { position: relative; }
.m-segment input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.m-segment span { display: flex; align-items: center; justify-content: center; height: 40px; padding-inline: 18px; border-radius: var(--r-pill); font-weight: 600; font-size: 14px; color: var(--ink-soft); transition: background-color .2s, color .2s; }
.m-segment input:checked + span { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(27,42,56,.12); }
.m-segment input:focus-visible + span { outline: 2px solid var(--brand-dark); outline-offset: 2px; }

.m-geo { display: grid; gap: 10px; padding: 16px; border-radius: 14px; background: var(--sand); }
.m-geo__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.m-geo__status { font-size: 14px; color: var(--ink-soft); }
.m-geo__status.is-ok { color: var(--success); font-weight: 600; }
.m-geo__hint { font-size: 13px; color: var(--ink-mute); }

/* ==========================================================================
   27. Order timeline (note 19), bank details (note 24), notices
   ========================================================================== */
.m-timeline { position: relative; display: grid; gap: 0; }
.m-timeline li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding-bottom: 22px; }
.m-timeline li:last-child { padding-bottom: 0; }
.m-timeline li::before { content: ""; position: absolute; inset-inline-start: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.m-timeline li:last-child::before { display: none; }
.m-timeline li[data-state="done"]::before { background: var(--brand); }
.m-timeline__dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--white); display: grid; place-items: center; }
.m-timeline li[data-state="done"] .m-timeline__dot { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.m-timeline li[data-state="current"] .m-timeline__dot { border-color: var(--brand-dark); box-shadow: 0 0 0 5px var(--brand-tint); }
.m-timeline li[data-state="current"] .m-timeline__dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-dark); }
.m-timeline__label { font-weight: 600; padding-top: 2px; }
.m-timeline li[data-state="pending"] .m-timeline__label { color: var(--ink-mute); font-weight: 500; }
.m-timeline__date { font-size: 13px; color: var(--ink-mute); }
@media (min-width: 900px) {
  .m-timeline--row { grid-auto-flow: column; grid-auto-columns: 1fr; }
  .m-timeline--row li { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-bottom: 0; }
  .m-timeline--row li::before { top: 13px; bottom: auto; inset-inline-start: 50%; inset-inline-end: -50%; width: auto; height: 2px; }
}

.m-bank { padding: 20px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--white); }
.m-bank__rows { display: grid; gap: 2px; margin-top: 14px; }
.m-bank__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--sand); }
.m-bank__row dt { font-size: 13px; color: var(--ink-mute); }
.m-bank__row dd { font-weight: 700; word-break: break-all; }
.m-copy { flex-shrink: 0; height: 34px; padding-inline: 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--white); font-size: 13px; font-weight: 600; transition: border-color .2s, background-color .2s; }
.m-copy:hover { border-color: var(--ink); }
.m-copy.is-done { background: var(--brand-tint); border-color: var(--brand-dark); color: var(--brand-deep); }

.m-notice { display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--r-md); font-size: 15px; line-height: 1.8; }
.m-notice .m-icon { margin-top: 4px; }
.m-notice--info { background: var(--brand-tint); color: var(--brand-deep); }
.m-notice--warn { background: var(--warn-bg); color: var(--warn-ink); }
.m-notice--danger { background: #FDECEA; color: var(--danger); }
.m-draft { padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); font-family: var(--font-ui); font-size: 14px; }

.m-upload { display: grid; gap: 10px; padding: 18px; border: 1.5px dashed var(--line); border-radius: var(--r-md); background: var(--white); text-align: center; }

/* ==========================================================================
   28. Gift options (note 20) + VAT line (note 16)
   ========================================================================== */
.m-gift-fields { display: grid; gap: 14px; margin-top: 14px; padding: 16px; border-radius: 14px; background: var(--sand); }
.m-sum .is-vat dt, .m-sum .is-vat dd { font-size: 12px; color: var(--ink-mute); font-weight: 400; }
.m-invoice-btn[hidden] { display: none; }

/* ==========================================================================
   29. Reviews form (note 30)
   ========================================================================== */
.m-rate { display: inline-flex; gap: 4px; }
.m-rate button { width: 36px; height: 36px; display: grid; place-items: center; color: #DAD5CA; transition: color .15s, transform .15s; }
.m-rate button svg { width: 28px; height: 28px; }
.m-rate button.is-on { color: var(--star); }
.m-rate button:hover { transform: scale(1.1); }
.m-review-form { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); }
.m-review-form[hidden] { display: none; }

/* ==========================================================================
   30. Cookie consent (note 29)
   ========================================================================== */
.m-consent { position: fixed; inset-inline: 16px; bottom: 16px; z-index: 110; max-width: 620px; margin-inline: auto; padding: 20px; border-radius: var(--r-lg);
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-pop); font-size: 15px; }
.m-consent[hidden] { display: none; }
.m-consent__title { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.m-consent__text { margin-top: 6px; color: var(--ink-soft); line-height: 1.8; }
.m-consent__text a { text-decoration: underline; text-underline-offset: 3px; }
.m-consent__actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.m-consent__actions .m-btn { height: 42px; padding-inline: 18px; font-size: 14px; }
.m-consent__prefs { margin-top: 14px; display: grid; gap: 10px; }
.m-consent__prefs[hidden] { display: none; }
.m-toggle { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 14px; border-radius: 12px; background: var(--sand); cursor: pointer; }
.m-toggle strong { display: block; font-weight: 600; }
.m-toggle small { color: var(--ink-mute); font-size: 13px; }
.m-switch { position: relative; flex-shrink: 0; width: 44px; height: 26px; }
.m-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.m-switch span { position: absolute; inset: 0; border-radius: var(--r-pill); background: #C9C4B8; transition: background-color .2s; }
.m-switch span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); transition: transform .2s; }
.m-switch input:checked + span { background: var(--brand-dark); }
.m-switch input:checked + span::after { transform: translateX(-18px); }
[dir="ltr"] .m-switch input:checked + span::after { transform: translateX(18px); }
.m-switch input:disabled + span { opacity: .6; }
.m-switch input:focus-visible + span { outline: 2px solid var(--brand-dark); outline-offset: 2px; }

/* ==========================================================================
   31. Loading skeletons (note 23): add .m-is-loading to a refreshing region
   ========================================================================== */
@keyframes m-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.m-skel, .m-is-loading .m-card__shelf, .m-is-loading .m-card__title, .m-is-loading .m-card__author, .m-is-loading .m-card__price,
.m-is-loading .m-post-art, .m-is-loading .m-post-card__title, .m-is-loading .m-post-card__excerpt, .m-is-loading .m-line-item, .m-is-loading .m-sum {
  background: linear-gradient(90deg, var(--sand) 25%, var(--sand-2) 50%, var(--sand) 75%) !important;
  background-size: 200% 100% !important; animation: m-shimmer 1.2s linear infinite; color: transparent !important; border-radius: 10px;
}
.m-is-loading .m-card__shelf > *, .m-is-loading .m-post-art > *, .m-is-loading .m-card__title *, .m-is-loading .m-card__foot .m-buy,
.m-is-loading .m-card__rating, .m-is-loading .m-card__badges, .m-is-loading .m-line-item > *, .m-is-loading .m-sum > * { visibility: hidden; }
.m-is-loading { pointer-events: none; }
.m-skel-card { display: grid; gap: 12px; }
.m-skel-card .m-skel:first-child { aspect-ratio: 4 / 5; }
.m-skel-card .m-skel:nth-child(2) { height: 22px; width: 80%; }
.m-skel-card .m-skel:nth-child(3) { height: 16px; width: 50%; }

/* ==========================================================================
   32. Author page, policy page, 404
   ========================================================================== */
.m-author-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding-block: 32px; }
.m-author-hero__avatar { width: 96px; height: 96px; border-radius: 50%; background: var(--ink); color: var(--white); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 38px; flex-shrink: 0; overflow: hidden; }
.m-author-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.m-author-hero__bio { margin-top: 10px; max-width: 42rem; line-height: 1.9; color: var(--ink-soft); }
.m-cat-intro { max-width: 46rem; margin-top: 10px; color: var(--ink-soft); line-height: 1.9; }
.m-prose--ui { font-family: var(--font-ui); font-size: 17px; line-height: 2; }
.m-prose--ui h2 { font-family: var(--font-display); }
.m-prose ol { list-style: decimal; padding-inline-start: 1.3em; }
.m-policy { max-width: 46rem; padding-bottom: 80px; }
.m-policy-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.m-404 { padding-block: 96px; text-align: center; }
.m-404 .m-empty__icon { width: 88px; height: 88px; }

/* Reduced motion (scoped) */
@media (prefers-reduced-motion: reduce) {
  :where(.meem) *, :where(.meem) *::before, :where(.meem) *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.m-line-item.is-removing { opacity: 0; transform: translateX(-12px); transition: opacity .25s, transform .25s; }
.m-toast__action { margin-inline-start: 12px; font-weight: 700; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.m-read-progress { position: fixed; top: 0; inset-inline: 0; z-index: 60; height: 3px; background: var(--brand); transform-origin: right; transform: scaleX(0); }
[dir="ltr"] .m-read-progress { transform-origin: left; }

/* ==========================================================================
   33. APEX page layouts (product, checkout, confirmation, misc)
   ========================================================================== */
.m-money { font-weight: 700; white-space: nowrap; }
.m-money--lg { font-size: 30px; }
.m-lines { display: grid; }
.m-stock { font-size: 14px; color: var(--success); font-weight: 600; }
.m-card--out ~ .m-stock, .m-product .m-buy[data-state="out"] ~ .m-stock { color: var(--danger); }
.m-product { display: grid; gap: 32px; padding-block: 24px 56px; }
@media (min-width: 900px) { .m-product { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: start; } }
.m-product__gallery { position: sticky; top: var(--header-offset); }
.m-product__stage { display: grid; place-items: center; padding: 40px 18%; border-radius: var(--r-xl); background: var(--sand); }
.m-product__info { display: grid; gap: 16px; align-content: start; }
.m-product__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 4vw, 40px); line-height: 1.3; }
.m-product__by { color: var(--ink-soft); font-size: 17px; }
.m-product__by a { color: var(--brand-dark); font-weight: 600; }
.m-product__rating { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.m-product__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px; }
.m-product__price s { color: var(--ink-mute); }
.m-product__price small { flex-basis: 100%; }
.m-product__perks { display: grid; gap: 10px; padding: 18px; border-radius: var(--r-md); background: var(--white); border: 1px solid var(--line); font-size: 15px; }
.m-product__perks li { display: flex; align-items: flex-start; gap: 10px; }
.m-product__perks .m-icon { color: var(--brand-dark); margin-top: 3px; }
.m-rating-summary { display: grid; gap: 8px; justify-items: start; }
.m-rating-bars { display: grid; gap: 6px; width: 100%; max-width: 320px; margin-top: 8px; font-size: 13px; }
.m-rating-bars li { display: grid; grid-template-columns: 14px 1fr 38px; align-items: center; gap: 10px; }
.m-rating-bars .m-progress { margin: 0; }
.m-panel { padding: clamp(18px, 3vw, 28px); border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); }
.m-panel > h2 { font-family: var(--font-display); font-size: 22px; margin-bottom: 18px; }
.m-checkout { display: grid; gap: 20px; padding-block: 24px 64px; }
.m-success { display: grid; gap: 20px; justify-items: center; text-align: center; padding-block: 48px; max-width: 720px; }
.m-success .m-bank, .m-success .m-notice, .m-success .m-upload { width: 100%; text-align: start; }
.m-post-card__meta { margin-top: 10px; font-size: 13px; color: var(--ink-mute); }
.m-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 20px; }
.m-share { display: flex; gap: 8px; margin-inline-start: auto; }
.m-link { color: var(--brand-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.m-footer-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; }
.m-footer-legal a:hover { color: var(--white); }

/* ==========================================================================
   34. State from data attributes (no template directives inside tags)
   ========================================================================== */
.m-cart-count[data-count="0"], .m-cart-count[data-count=""] { display: none; }
[data-in-cart][data-qty="0"], [data-in-cart][data-qty=""] { display: none; }
.m-nav-blog[data-current="Y"] { color: var(--ink); font-weight: 600; }

/* Rail arrows (section head) */
.m-rail-controls .m-icon-btn { border: 1px solid var(--line); background: var(--white); }
.m-rail-controls .m-icon-btn:hover:not([disabled]) { border-color: var(--ink); }
.m-rail-controls .m-icon-btn[disabled] { opacity: .35; cursor: default; }
.m-section-head__end { display: flex; align-items: center; gap: 16px; }

/* APEX items inside the filter panel (checkbox / radio groups, selects) */
.m-filters .apex-item-group, .m-filters .checkbox_group, .m-filters .radio_group { display: grid; gap: 4px; border: 0; margin: 0; padding: 0; }
.m-filters .apex-item-option { display: flex; align-items: center; gap: 10px; padding-block: 6px; font-size: 15px; }
.m-filters .apex-item-option input { width: 18px; height: 18px; accent-color: var(--brand-dark); margin: 0; }
.m-filters .t-Form-fieldContainer, .m-filters .apex-item-wrapper { margin-bottom: 24px; }
.m-filters label.t-Form-label, .m-filters .t-Form-label { display: block; font-weight: 700; margin-bottom: 10px; }
.m-shop-toolbar select { height: 40px; padding-inline: 12px 32px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--white); }

/* ==========================================================================
   35. APEX Cards region as a product grid (.m-cards on the region)
   APEX keeps its own wrappers; they are flattened so only .m-card shows.
   ========================================================================== */
.m-cards .a-CardView-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 20px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .m-cards .a-CardView-items { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .m-cards .a-CardView-items { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 56px 32px; } }
@media (min-width: 1024px) { .m-shop-layout .m-cards .a-CardView-items { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.m-cards .a-CardView-item { display: block; margin: 0; padding: 0; min-width: 0; }
.m-cards .a-CardView { display: block; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.m-cards .a-CardView:hover, .m-cards .a-CardView:focus-within { box-shadow: none; background: none; }
.m-cards .a-CardView-body, .m-cards .a-CardView-mainContent, .m-cards .a-CardView-bodyWrap { display: block; margin: 0; padding: 0; }
.m-cards .a-CardView-header, .m-cards .a-CardView-media, .m-cards .a-CardView-actions, .m-cards .a-CardView-fullLink { display: none; }
.m-cards .a-GV-pagination, .m-cards .a-CardView-pagination, .m-cards .t-Report-pagination { margin-top: 48px; display: flex; justify-content: center; gap: 8px; }

/* Current chip (policy nav, blog categories) */
.m-chip[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* ==========================================================================
   36. Account page: hero, stats, side tabs, panels
   ========================================================================== */
.m-account-hero { display: grid; gap: 24px; padding-block: 40px 32px; }
@media (min-width: 900px) { .m-account-hero { grid-template-columns: 1fr auto; align-items: center; } }
.m-account-hero__who { display: flex; align-items: center; gap: 18px; }
.m-account-hero__avatar { width: 72px; height: 72px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand-deep); font-family: var(--font-display); font-weight: 700; font-size: 30px; }
.m-account-hero__hello { color: var(--ink-mute); font-size: 15px; }
.m-account-hero__name { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 4vw, 34px); line-height: 1.3; }
.m-account-hero__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; color: var(--ink-soft); font-size: 14px; }
.m-account-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.m-account-stats a { display: grid; justify-items: center; gap: 2px; min-width: 104px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--white); text-align: center; transition: border-color .2s, transform .2s; }
.m-account-stats a:hover { border-color: var(--brand-dark); transform: translateY(-2px); }
.m-account-stats strong { font-family: var(--font-display); font-size: 26px; line-height: 1.2; }
.m-account-stats span { font-size: 13px; color: var(--ink-mute); }

.m-account-layout { padding-bottom: 96px; }
.m-account-nav a { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; border: 1px solid transparent;
  white-space: nowrap; color: var(--ink-soft); transition: background-color .2s, color .2s; }
.m-account-nav a .m-icon { color: var(--ink-mute); }
.m-account-nav a:hover { background: var(--sand); }
.m-account-nav a[aria-current="page"] { background: var(--white); border-color: var(--line); color: var(--ink); font-weight: 600; }
.m-account-nav a[aria-current="page"] .m-icon { color: var(--brand-dark); }
.m-account-nav__logout { color: var(--ink-mute); }
@media (min-width: 1024px) {
  .m-account-layout > :not(.m-account-nav):not(nav) { grid-column: 2; }
  .m-account-nav { grid-column: 1; grid-row: 1 / span 20; align-self: start; }
  .m-account-nav__logout { margin-top: 12px; border-top: 1px solid var(--line) !important; border-radius: 0 !important; padding-top: 16px !important; }
}
.m-account-panel { padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); }
.m-account-panel .m-section-head { margin-bottom: 20px; }
.m-account-panel .m-grid-products { gap: 40px 20px; }
@media (min-width: 1024px) { .m-account-panel .m-grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.m-account-panel .m-empty { padding-block: 32px; }

/* Section title with a leading icon (account panels) */
.m-section-title--icon { display: flex; align-items: center; gap: 12px; }
.m-section-title__icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-deep); }
.m-section-title__icon .m-icon { width: 20px; height: 20px; }

/* ==========================================================================
   37. Confirm dialog (native <dialog>, created by meem.js)
   ========================================================================== */
.m-dialog { width: min(420px, calc(100% - 32px)); margin: auto; padding: 28px 24px 24px; border: 0; border-radius: var(--r-lg);
  background: var(--white); color: var(--ink); box-shadow: var(--shadow-pop); text-align: center; font-family: var(--font-ui); }
.m-dialog::backdrop { background: rgba(27, 42, 56, .45); backdrop-filter: blur(2px); }
.m-dialog[open] { animation: m-dialog-in .22s var(--ease); }
@keyframes m-dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.m-dialog__icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: #FDECEA; color: var(--danger); }
.m-dialog__icon[hidden] { display: none; }
.m-dialog__icon .m-icon { width: 26px; height: 26px; }
.m-dialog__title { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.4; }
.m-dialog__text { margin-top: 8px; color: var(--ink-soft); font-size: 15px; line-height: 1.8; }
.m-dialog__actions { display: grid; gap: 10px; margin-top: 22px; }
@media (min-width: 480px) { .m-dialog__actions { grid-template-columns: 1fr 1fr; } }
/* Danger button: text stays white in every state (beats theme/link hover colours) */
.meem .m-btn.m-btn--danger,
.meem .m-btn.m-btn--danger:hover,
.meem .m-btn.m-btn--danger:focus,
.meem .m-btn.m-btn--danger:focus-visible,
.meem .m-btn.m-btn--danger:active { color: var(--white); }
.meem .m-btn.m-btn--danger { background: var(--danger); border-color: var(--danger); }
.meem .m-btn.m-btn--danger:hover { background: #8F1B12; border-color: #8F1B12; box-shadow: 0 8px 20px -10px rgba(180, 35, 24, .6); }
.meem .m-btn.m-btn--danger:focus-visible { outline: 2px solid var(--danger); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .m-dialog[open] { animation: none; } }

/* Explicit hidden states (do not rely only on the reset) */
.m-suggest[hidden], .m-consent[hidden], .m-consent__prefs[hidden], .m-cart-count[hidden] { display: none; }

/* Header icon buttons: one consistent look */
.m-header-actions .m-icon-btn { color: var(--ink); }
.m-header-actions .m-icon-btn:focus-visible { outline-offset: 2px; }
.m-cart-count { font-weight: 700; }

/* ==========================================================================
   38. Action colour: deep teal + white for actions, bright cyan only for accents
   (white on #017E93 = 4.8:1, white on #015F6F = 7:1). Cyan stays on badges,
   progress bars, the active-nav line, the logo mark and completed steps.
   ========================================================================== */
.m-btn--primary { background: var(--brand-dark); color: var(--white); font-weight: 600; }
.m-btn--primary:hover { background: var(--brand-deep); color: var(--white); box-shadow: 0 8px 20px -10px rgba(1, 95, 111, .7); }
.m-btn--primary:focus-visible { outline-color: var(--brand-deep); }

.m-stepper { background: var(--brand-dark); color: var(--white); }
.m-stepper button:hover { background: var(--brand-deep); color: var(--white); }

.m-aside-book .m-icon-btn { background: var(--brand-dark); color: var(--white); }
.m-aside-book .m-icon-btn:hover { background: var(--brand-deep); color: var(--white); }

.m-totop { background: var(--brand-dark); color: var(--white); }
.m-totop:hover { background: var(--brand-deep); color: var(--white); }

/* Account layout: panels share one grid cell (no empty rows between hidden panels) */
@media (min-width: 1024px) {
  .m-account-layout { grid-auto-rows: min-content; row-gap: 0; }
  .m-account-layout > :not(.m-account-nav):not(nav) { grid-row: 1; }
}
.m-account-layout > [hidden] { display: none !important; }

/* Account tabs before meem.js runs: no panel is shown until meem.js picks the right one (no flash) */
.m-account-layout:not(.is-ready) [data-account-panel] { display: none; }

/* Account > profile (Form Region): footer line "عضو منذ …" */
.m-profile__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); }

/* ==========================================================================
   39. APEX form items inside account panels (Form Region) in the store style
   ========================================================================== */
.m-account-panel .t-Form-fieldContainer { display: grid; gap: 8px; margin: 0 0 18px; padding: 0; border: 0; background: none; }
.m-account-panel .t-Form-labelContainer { padding: 0; min-height: 0; width: auto; }
.m-account-panel .t-Form-label { position: static; transform: none; margin: 0; padding: 0; font-size: 14px; font-weight: 600; color: var(--ink); opacity: 1; }
.m-account-panel .t-Form-inputContainer, .m-account-panel .t-Form-itemWrapper { padding: 0; width: 100%; }
.m-account-panel .apex-item-text, .m-account-panel .apex-item-textarea, .m-account-panel select {
  width: 100%; height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  font: inherit; font-size: 16px; color: var(--ink); box-shadow: none; transition: border-color .2s, box-shadow .2s; }
.m-account-panel .apex-item-text:focus, .m-account-panel select:focus { outline: none; border-color: var(--brand-dark); box-shadow: 0 0 0 4px var(--brand-tint); }
.m-account-panel .apex-page-item-error .apex-item-text, .m-account-panel .apex-item-text[aria-invalid="true"] { border-color: var(--danger); }
.m-account-panel .a-Form-error, .m-account-panel .t-Form-error { font-size: 13px; color: var(--danger); }

/* Yes/No switch item -> same look as the .m-toggle card */
.m-account-panel .apex-item-wrapper--yes-no {
  grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; column-gap: 16px; row-gap: 2px; align-items: center;
  padding: 16px 18px; border-radius: 12px; background: var(--sand); }
.m-account-panel .apex-item-wrapper--yes-no .t-Form-inputContainer,
.m-account-panel .apex-item-wrapper--yes-no .t-Form-itemWrapper { display: contents; }
.m-account-panel .apex-item-wrapper--yes-no .t-Form-labelContainer { grid-column: 1; grid-row: 1; }
.m-account-panel .apex-item-wrapper--yes-no .t-Form-label { font-size: 15px; cursor: pointer; }
.m-account-panel .apex-item-wrapper--yes-no .t-Form-itemText--post { grid-column: 1; grid-row: 2; padding: 0; margin: 0; font-size: 13px; color: var(--ink-mute); line-height: 1.7; }
.m-account-panel .apex-item-wrapper--yes-no .a-Switch { grid-column: 2; grid-row: 1 / span 2; }
.m-account-panel .apex-item-wrapper--yes-no .a-Form-error { grid-column: 1 / -1; grid-row: 3; }

/* the switch itself */
.m-account-panel .a-Switch { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; margin: 0; }
.m-account-panel .a-Switch input[type="checkbox"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.m-account-panel .a-Switch .a-Switch-toggle { position: absolute; inset: 0; display: block; width: auto; height: auto; margin: 0; padding: 0;
  border: 0; border-radius: var(--r-pill); background: #C9C4B8; box-shadow: none; transition: background-color .2s; }
.m-account-panel .a-Switch .a-Switch-toggle::before { content: none; }
.m-account-panel .a-Switch .a-Switch-toggle::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(27, 42, 56, .25); transition: transform .2s; }
.m-account-panel .a-Switch input:checked + .a-Switch-toggle { background: var(--brand-dark); }
.m-account-panel .a-Switch input:checked + .a-Switch-toggle::after { transform: translateX(-18px); }
[dir="ltr"] .m-account-panel .a-Switch input:checked + .a-Switch-toggle::after { transform: translateX(18px); }
.m-account-panel .a-Switch input:focus-visible + .a-Switch-toggle { outline: 2px solid var(--brand-dark); outline-offset: 2px; }

/* Sub-section inside an account panel (e.g. password under profile) */
.m-account-panel .m-subsection { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.m-account-panel .m-subsection .m-section-head { margin-bottom: 16px; }
.m-account-panel .m-subsection .m-section-title { font-size: 20px; }
.m-subsection__hint { margin: -8px 0 16px; font-size: 14px; color: var(--ink-mute); line-height: 1.8; }

/* Password item with APEX "show password" button: one rounded field */
.m-account-panel .t-Form-itemWrapper:has(.t-Button--passwordVisibility) { display: flex; align-items: stretch; }
.m-account-panel .t-Form-itemWrapper:has(.t-Button--passwordVisibility) .apex-item-text {
  flex: 1; min-width: 0; border-start-end-radius: 0; border-end-end-radius: 0; }
.m-account-panel .t-Button--passwordVisibility {
  height: 48px; min-width: 48px; padding: 0 12px; margin: 0; margin-inline-start: -1px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink-mute); box-shadow: none;
  border-radius: 0; border-start-end-radius: 12px; border-end-end-radius: 12px;
  display: grid; place-items: center; transition: color .2s, border-color .2s, box-shadow .2s; }
.m-account-panel .t-Button--passwordVisibility:hover { color: var(--ink); background: var(--white); }
.m-account-panel .t-Button--passwordVisibility .t-Icon, .m-account-panel .t-Button--passwordVisibility .a-Icon { font-size: 18px; }
/* focus: input and button light up together */
.m-account-panel .t-Form-itemWrapper:has(.t-Button--passwordVisibility):focus-within .apex-item-text,
.m-account-panel .t-Form-itemWrapper:has(.t-Button--passwordVisibility):focus-within .t-Button--passwordVisibility { border-color: var(--brand-dark); }
.m-account-panel .t-Form-itemWrapper:has(.t-Button--passwordVisibility):focus-within { border-radius: 12px; box-shadow: 0 0 0 4px var(--brand-tint); }
.m-account-panel .t-Form-itemWrapper:has(.t-Button--passwordVisibility) .apex-item-text:focus { box-shadow: none; }



/* Version marker: getComputedStyle(document.querySelector('.meem')).getPropertyValue('--meem-css') */
.meem { --meem-css: "2026-09-25.86"; }

/* A button placed in the APEX grid next to an item: sit on the input's baseline, not the label */
/* Align with the INPUT, not the bottom of the column: an error message under the input
   makes that column taller, and flex-end would then line the button up with the error text.
   Label height is fixed (line-height 22px + 8px gap = 30px), so the offset is exact. */
.m-account-panel .t-Form-label { line-height: 22px; }
.m-account-panel .row > .col:has(> .t-Button, > button) { align-self: flex-start; margin-top: 30px; margin-bottom: 18px; display: flex; }
.m-account-panel .row > .col > .t-Button.m-btn { height: 48px; }

/* Change phone / email dialog (APEX Inline Dialog, CSS Classes: m-contact-dialog) */
.m-contact-dialog .t-Form-fieldContainer { display: grid; gap: 8px; margin: 0 0 18px; padding: 0; border: 0; background: none; }
.m-contact-dialog .t-Form-labelContainer { padding: 0; min-height: 0; width: auto; }
.m-contact-dialog .t-Form-label { position: static; transform: none; margin: 0; padding: 0; font-size: 14px; font-weight: 600; line-height: 22px; color: var(--ink); opacity: 1; }
.m-contact-dialog .t-Form-inputContainer, .m-contact-dialog .t-Form-itemWrapper { padding: 0; width: 100%; }
.m-contact-dialog .apex-item-text {
  width: 100%; height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  font: inherit; font-size: 16px; color: var(--ink); box-shadow: none; }
.m-contact-dialog .apex-item-text:focus { outline: none; border-color: var(--brand-dark); box-shadow: 0 0 0 4px var(--brand-tint); }
.m-contact-dialog .a-Form-error { font-size: 13px; color: var(--danger); }
.m-contact-dialog .row > .col:has(> .t-Button, > button) { align-self: flex-start; margin-top: 30px; margin-bottom: 18px; display: flex; }
.m-contact-dialog .row > .col > .t-Button.m-btn { height: 48px; }
.m-contact-dialog [data-contact-hint] { margin: 0 0 16px; font-size: 14px; color: var(--ink-mute); line-height: 1.8; }

/* Order card: "+N" after the first four covers, total line */
.m-order__covers { align-items: flex-end; }
.m-order__more { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 10px;
  background: var(--sand); color: var(--ink-soft); font-size: 14px; font-weight: 700; direction: ltr; }
.m-order__total { display: flex; align-items: baseline; gap: 8px; }
.m-order__total .m-muted { font-size: 13px; }

/* Cart lines: large variant on the cart page (region CSS Classes: m-lines--lg) + stock warning */
.m-lines--lg .m-line-item__media { width: 96px; }
.m-line-item__warn { margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; background: #FDECEA; color: var(--danger); font-size: 13px; line-height: 1.6; }
.m-line-item__warn[hidden] { display: none; }

/* Cart page (page 4) */
.m-cart-layout.is-empty { grid-template-columns: 1fr; }
.m-cart-layout.is-empty .m-summary { display: none; }
.m-summary .t-Form-fieldContainer { margin: 0; }
.m-summary .t-Form-label { font-size: 14px; font-weight: 600; line-height: 22px; }
.m-summary .apex-item-text, .m-summary select { width: 100%; height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font: inherit; }
.m-summary .row > .col:has(> .t-Button, > button) { align-self: flex-start; margin-top: 30px; display: flex; }
.m-summary__actions { display: grid; gap: 10px; }
.m-summary__secure { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 0; font-size: 13px; color: var(--ink-mute); }
.m-link-btn { margin-inline-start: 6px; font-size: 12px; color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; }
.m-link-btn:hover { color: var(--brand-deep); }

/* ==========================================================================
   40. Cart page with the APEX grid (lines = Column Span 8, aside = Column Span 4)
   ========================================================================== */
.m-cart-layout { display: block; padding-bottom: 80px; }
.m-cart-layout > .container > .row { row-gap: 24px; }
.m-cart-layout .m-summary { position: static; }
@media (min-width: 1024px) {
  .m-cart-layout .col:has(> .m-summary) { align-self: flex-start; position: sticky; top: 120px; }
}
/* lines in one white card, compact rows so long carts stay short */
#ecp_cart_lines .m-lines { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding-inline: clamp(16px, 3vw, 24px); }
#ecp_cart_lines .m-line-item { padding-block: 16px; }
#ecp_cart_lines .m-line-item + .m-line-item { border-top: 1px solid var(--line); }
@media (max-width: 639px) { #ecp_cart_lines .m-line-item__media { width: 64px; } }
/* empty cart: summary column goes, lines take the full width */
.m-cart-layout.is-empty .col:has(> .m-summary) { display: none; }
.m-cart-layout.is-empty .col:has(> #ecp_cart_lines) { flex: 0 0 100%; max-width: 100%; }
/* hide "Required" helper text from the theme inside the summary */
.m-summary .t-Form-itemRequired { display: none; }
.m-summary .row { row-gap: 0; }

/* Mobile: total + checkout always visible at the bottom (no scrolling down to the summary) */
.m-cart-bar { display: none; }
@media (max-width: 1023px) {
  .m-cart-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--white); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -12px rgba(27, 42, 56, .25); }
  .m-cart-bar__total { display: grid; font-size: 12px; color: var(--ink-mute); }
  .m-cart-bar__total strong { font-size: 18px; color: var(--ink); }
  .m-cart-bar .m-btn { flex: 1; max-width: 240px; }
  body:has(.m-cart-bar) .m-totop { bottom: 96px; }
  .m-cart-layout { padding-bottom: 120px; }
  .m-cart-layout.is-empty ~ * .m-cart-bar, .m-cart-bar[hidden] { display: none; }
}

/* Classic Report wrapper (id="report_<static id>") must never take a layout class by accident */
[id^="report_"].m-drawer__actions { display: block; }
.m-drawer-summary { display: grid; gap: 16px; }
#ecp_drawer_summary.margin-bottom-sm { margin-bottom: 0; }

/* ==========================================================================
   41. Scrollbars
   Chrome 121+ ignores ::-webkit-scrollbar when scrollbar-color / scrollbar-width are set,
   so the standard properties are only used where ::-webkit-scrollbar is not supported (Firefox).
   ========================================================================== */
html { scrollbar-gutter: stable; }
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-width: thin; scrollbar-color: var(--brand-dark) var(--sand); }
  .m-drawer__body, .m-menu__body, .m-suggest { scrollbar-width: thin; scrollbar-color: #C9D1D7 transparent; }
}
/* Page: a slim sand track with a rounded teal pill that sits inside it */
html::-webkit-scrollbar { width: 14px; }
html::-webkit-scrollbar-track { background: var(--sand, #F2EEE4); border-inline-start: 1px solid var(--line, #E6E1D6); }
html::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand, #01AECA), var(--brand-dark, #017E93));
  border-radius: 999px; border: 4px solid var(--sand, #F2EEE4); min-height: 56px; }
html::-webkit-scrollbar-thumb:hover { background: var(--brand-deep, #015F6F); border-width: 3px; }
html::-webkit-scrollbar-thumb:active { background: var(--ink, #1B2A38); }
html::-webkit-scrollbar-corner { background: var(--sand, #F2EEE4); }
/* Drawer, mobile menu, search suggestions: thinner and quieter */
.m-drawer__body::-webkit-scrollbar, .m-menu__body::-webkit-scrollbar, .m-suggest::-webkit-scrollbar { width: 8px; }
.m-drawer__body::-webkit-scrollbar-track, .m-menu__body::-webkit-scrollbar-track, .m-suggest::-webkit-scrollbar-track { background: transparent; }
.m-drawer__body::-webkit-scrollbar-thumb, .m-menu__body::-webkit-scrollbar-thumb, .m-suggest::-webkit-scrollbar-thumb {
  background: #C9D1D7; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
.m-drawer__body::-webkit-scrollbar-thumb:hover, .m-menu__body::-webkit-scrollbar-thumb:hover { background-color: var(--brand-dark); }
@media (hover: none) { html { scrollbar-gutter: auto; } }

/* ==========================================================================
   42. Cart page safety net: aside rendered without an APEX column wrapper,
       lines region still called ecp_drawer_lines on page 4
   ========================================================================== */
@media (min-width: 1024px) {
  .m-cart-layout .row:has(> .m-summary) { flex-wrap: nowrap; gap: 40px; align-items: flex-start; }
  .m-cart-layout .row:has(> .m-summary) > .col { flex: 1 1 auto; max-width: none; width: auto; min-width: 0; }
  .m-cart-layout .row > .m-summary { flex: 0 0 380px; position: sticky; top: 120px; }
}
@media (max-width: 1023px) {
  .m-cart-layout .row:has(> .m-summary) { flex-direction: column; gap: 24px; }
  .m-cart-layout .row:has(> .m-summary) > * { width: 100%; max-width: 100%; }
}
.m-cart-layout [id^="ecp_"][id$="_lines"] .m-lines { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding-inline: clamp(16px, 3vw, 24px); }
.m-cart-layout [id^="ecp_"][id$="_lines"] .m-line-item { padding-block: 16px; }
.m-cart-layout [id^="ecp_"][id$="_lines"] .m-line-item + .m-line-item { border-top: 1px solid var(--line); }

/* Cart summary items (P4_REGION select, P4_COUPON) */
.m-summary .m-select-input, .m-summary .m-input { width: 100%; height: 48px; }
.m-summary .t-Form-fieldContainer + .t-Form-fieldContainer { margin-top: 4px; }

/* Long cart: "show N more" under the first lines */
.m-lines-more { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; padding: 14px;
  border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--white); color: var(--brand-dark); font-weight: 600; }
.m-lines-more:hover { border-color: var(--brand-dark); background: var(--brand-tint); }
.m-lines-more::after { content: ""; width: 8px; height: 8px; border-inline-end: 2px solid currentColor; border-block-end: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }

/* Cart lines: tidy rhythm while scrolling */
.m-cart-layout [id$="_lines"] .m-line-item { align-items: start; }
.m-cart-layout [id$="_lines"] .m-line-item__title { font-size: 16px; line-height: 1.5; }
.m-cart-layout [id$="_lines"] .m-line-item__bottom { margin-top: 10px; }
@media (min-width: 1024px) { .m-cart-layout .m-lines--lg .m-line-item__media, .m-cart-layout [id$="_lines"] .m-line-item__media { width: 80px; } }

/* Bare APEX items (no item template) get a label + row from meem.js: see enhanceBareItems() */
.m-bare-field { display: grid; gap: 8px; }
.m-bare-field > label { font-size: 14px; font-weight: 600; line-height: 22px; color: var(--ink); }
.m-coupon-row { display: flex; gap: 10px; align-items: stretch; }
.m-coupon-row > input { flex: 1 1 auto; min-width: 0; }
.m-coupon-row > .t-Button, .m-coupon-row > button { flex: 0 0 auto; height: 48px; padding-inline: 20px; }

/* ==========================================================================
   43. Rails inside the APEX grid: a flex column must be allowed to shrink,
       otherwise the wide rail pushes the page sideways on small screens
   ========================================================================== */
.meem .row > .col, .meem [id^="report_"], .meem .m-section, .meem .js-apex-region { min-width: 0; }
.m-rail { max-width: 100%; overscroll-behavior-x: contain; }
.m-section-head { flex-wrap: wrap; row-gap: 12px; }
@media (max-width: 639px) {
  .m-rail { gap: 14px; }
  .m-rail > * { flex-basis: 62%; }
  .m-rail-controls { display: none; }            /* swipe on phones */
}
/* Nothing may widen the page sideways (clip keeps position: sticky working, unlike hidden) */
html, body { overflow-x: clip; }
.m-rail { width: 100%; }
.m-rail > * { min-width: 0; }
.m-rail .m-card__title, .m-rail .m-card__author { overflow-wrap: anywhere; }
.m-rail .m-card__foot { flex-wrap: wrap; row-gap: 8px; }
.meem .container, .meem .row { max-width: 100%; }
@media (min-width: 640px) and (max-width: 767px) { .m-rail > * { flex-basis: calc((100% - 24px) / 2.3); } }


/* The store root must never be wider than the viewport (APEX form / theme wrappers can be flex) */
/* APEX renders <form id="wwvFlowForm"> as a CSS grid: give it one column that can shrink */
#wwvFlowForm { grid-template-columns: minmax(0, 1fr); }
#wwvFlowForm > .meem { grid-column: 1 / -1; }
#wwvFlowForm, .meem, .m-main { min-width: 0; max-width: 100%; }
.meem { width: 100%; }
/* .meem is a flex column: its children must not grow to their content's min-content width */
.meem > *, .m-main > *, .m-site-header > * { min-width: 0; max-width: 100%; }
.m-main-nav { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.m-main-nav::-webkit-scrollbar { display: none; }

/* A region that is already an .m-container brings its own side padding: drop the APEX column padding
   so the left and right edges match (was 36px / 20px on phones) */
.meem .row > .col:has(> .m-container) { padding-inline: 0; }

/* Coupon row inside an APEX grid column: take the full width of the summary */
.m-summary .col:has(.m-coupon-row) { flex: 0 0 100%; max-width: 100%; }
.m-coupon-row .t-Button-label { white-space: nowrap; }

/* APEX inserts the item error placeholder right after the input, i.e. inside our coupon row:
   send it to its own line under the field and style it like the other field errors */
.m-coupon-row { flex-wrap: wrap; }
.m-coupon-row > [id$="_error_placeholder"] { flex: 0 0 100%; order: 3; margin: 0; }
.m-bare-field .t-Form-error, .m-summary .t-Form-error { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--danger); }
.m-coupon-row > input[aria-invalid="true"], .m-bare-field .apex-page-item-error { border-color: var(--danger); }

/* Coupon row: the input must be allowed to shrink (width:100% + wrap was pushing the button down) */
.m-coupon-row > input, .m-summary .m-coupon-row > .m-input { flex: 1 1 0; width: auto; min-width: 0; }
.m-coupon-row > [id$="_error_placeholder"]:empty,
.m-coupon-row > [id$="_error_placeholder"]:not(.u-visible) { display: none; }

/* Sticky summary only when the screen is tall enough to show all of it (no inner scrollbars).
   On shorter screens it scrolls with the page; the checkout button sits right under the total. */
@media (min-width: 1024px) {
  .m-cart-layout .col:has(> .m-summary) { position: static; max-height: none; overflow: visible; }
}
@media (min-width: 1024px) and (min-height: 900px) {
  .m-cart-layout .col:has(> .m-summary) { position: sticky; top: 120px; align-self: flex-start; }
}
/* Summary rhythm: one consistent gap, no extra theme margins */
.m-summary { gap: 18px; align-content: start; }
.m-summary > * { margin: 0; }
#ecp_cart_actions.margin-top-md { margin-top: 0; }
.m-summary .m-is-discount dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.m-summary .m-is-discount dd { color: var(--success); font-weight: 600; }

/* Summary panel: grid columns must be allowed to shrink to the panel width
   (an input with size="30" or a long select option otherwise widens the column past the panel) */
.m-summary { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.m-summary > *, .m-summary .m-bare-field > * { min-width: 0; max-width: 100%; }
.m-bare-field { grid-template-columns: minmax(0, 1fr); }
.m-summary select, .m-summary input, .m-summary .m-btn { max-width: 100%; }
.m-coupon-row > input { width: 0; }            /* size="30" must not set the width; flex decides */
.m-summary__actions .m-btn { width: 100%; }

/* ==========================================================================
   44. Page messages (page template subtemplates) + checkout page
   Success Message subtemplate:  <div class="m-flash m-flash--success" role="status">#SUCCESS_MESSAGE#</div>
   Notification subtemplate:     <div class="m-flash m-flash--error" role="alert">#MESSAGE#</div>
   ========================================================================== */
.m-flash-area:empty { display: none; }
.m-flash-area { padding-top: 16px; }
.m-flash { display: flex; gap: 10px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; font-size: 15px; line-height: 1.7; }
.m-flash--success { background: #E7F6EE; color: var(--success); border: 1px solid #BFE6CF; }
.m-flash--error { background: #FDECEA; color: var(--danger); border: 1px solid #F6C9C4; }
.m-flash ul { margin: 0; padding-inline-start: 18px; list-style: disc; }
.m-flash .htmldbUlErr, .m-flash .htmldbStdErr { margin: 0; }

.m-checkout-head .m-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 14px; }
.m-step-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand-deep); font-family: var(--font-ui); font-size: 14px; font-weight: 700; }
.m-options { display: grid; gap: 10px; }
@media (min-width: 640px) { .m-options { grid-template-columns: 1fr 1fr; } }
.m-radio-card { cursor: pointer; }
.m-radio-card__title > span { font-weight: 500; color: var(--ink-mute); font-size: 14px; }
.m-pay-brands { direction: ltr; }
.m-gift-toggle { margin-top: 14px; }
.m-trust-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--ink-mute); }
.m-address--new { display: flex; align-items: center; gap: 10px; padding: 16px; border: 1px dashed var(--line); border-radius: var(--r-md); cursor: pointer; font-weight: 600; }
.m-address--new:has(input:checked) { border-style: solid; border-color: var(--brand-dark); background: var(--brand-tint); }
#m-new-address[hidden] { display: none; }
/* checkout panels are regions with CSS class m-panel inside the APEX grid */
.m-checkout-layout .m-panel + .m-panel, .m-checkout-layout .col > .m-panel { margin-top: 0; }
.m-checkout-layout .row { row-gap: 20px; }
.m-checkout-layout .m-panel .t-Form-fieldContainer { margin-bottom: 16px; }
@media (min-width: 1024px) and (min-height: 900px) {
  .m-checkout-layout .col:has(> .m-summary) { position: sticky; top: 120px; align-self: flex-start; }
}
.m-place-order { width: 100%; height: 56px; font-size: 17px; margin-top: 16px; }

/* Page messages: icon, text, close button (templates/page-messages.html) */
.m-flash-wrap { padding-top: 16px; }
.m-flash { position: relative; align-items: flex-start; gap: 12px; padding: 14px 16px; box-shadow: 0 8px 24px -16px rgba(27,42,56,.35); animation: m-flash-in .25s var(--ease); }
.m-flash__icon { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; }
.m-flash__body { flex: 1; min-width: 0; }
.m-flash__text { color: var(--ink); }
.m-flash__text ul { margin: 4px 0 0; padding-inline-start: 18px; list-style: disc; }
.m-flash__text li + li { margin-top: 2px; }
.m-flash__text a { color: inherit; text-decoration: underline; }
.m-flash__close { flex-shrink: 0; display: grid; place-items: center; width: 32px; height: 32px; margin: -4px; border-radius: 50%; color: var(--ink-mute); }
.m-flash__close:hover { background: rgba(27,42,56,.06); color: var(--ink); }
@keyframes m-flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .m-flash { animation: none; } }
.m-flash-area:not(:has(.m-flash)) { display: none; }

/* ==========================================================================
   45. Login page (page 9999): APEX items and buttons inside the auth card
   ========================================================================== */
:is(.m-auth-card, #auth_card) .t-Form-fieldContainer { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; border: 0; background: none; }
:is(.m-auth-card, #auth_card) .t-Form-labelContainer { padding: 0; min-height: 0; width: auto; }
:is(.m-auth-card, #auth_card) .t-Form-label { position: static; transform: none; margin: 0; padding: 0; font-size: 14px; font-weight: 600; line-height: 22px; color: var(--ink); opacity: 1; }
:is(.m-auth-card, #auth_card) .t-Form-inputContainer, :is(.m-auth-card, #auth_card) .t-Form-itemWrapper { padding: 0; width: 100%; }
:is(.m-auth-card, #auth_card) .apex-item-text, :is(.m-auth-card, #auth_card) input[type="password"], :is(.m-auth-card, #auth_card) input[type="email"], :is(.m-auth-card, #auth_card) input[type="tel"] {
  width: 100%; height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white);
  font: inherit; font-size: 16px; color: var(--ink); box-shadow: none; }
:is(.m-auth-card, #auth_card) .apex-item-text:focus, :is(.m-auth-card, #auth_card) input:focus { outline: none; border-color: var(--brand-dark); box-shadow: 0 0 0 4px var(--brand-tint); }
:is(.m-auth-card, #auth_card) .t-Form-itemRequired { display: none; }
:is(.m-auth-card, #auth_card) .a-Form-error, :is(.m-auth-card, #auth_card) .t-Form-error { font-size: 13px; color: var(--danger); }
:is(.m-auth-card, #auth_card) #P9999_CODE { direction: ltr; text-align: center; letter-spacing: .6em; font-size: 26px; font-weight: 700; height: 60px; }
:is(.m-auth-card, #auth_card) #P9999_NAME_CONTAINER[hidden] { display: none; }
/* every APEX button in the card: full width, store look */
:is(.m-auth-card, #auth_card) .t-Button { width: 100%; height: 52px; margin: 6px 0 0; border-radius: var(--r-pill); font-weight: 700; font-size: 16px;
  box-shadow: none; background: var(--white); color: var(--ink); border: 1px solid var(--line); }
:is(.m-auth-card, #auth_card) .t-Button:hover { border-color: var(--ink); }
:is(.m-auth-card, #auth_card) .t-Button--hot { background: var(--brand-dark); color: var(--white); border-color: var(--brand-dark); }
:is(.m-auth-card, #auth_card) .t-Button--hot:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: var(--white); }
:is(.m-auth-card, #auth_card) .m-email-buttons { display: grid; gap: 8px; }
:is(.m-auth-card, #auth_card) .col { min-width: 0; }

/* Login layout: APEX renders sub-regions AFTER a region's header/footer, so the card is drawn
   on the region (#auth_card) itself: title on top, sub-regions container = the white card */
#auth_card { max-width: 460px; margin-inline: auto; padding: 24px 20px 96px; }
#auth_card .m-auth-head { margin-bottom: 20px; }
#auth_card .m-auth-head .m-muted { margin-top: 6px; }
#auth_card > .container {
  padding: clamp(20px, 4vw, 28px); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 18px 48px -32px rgba(27, 42, 56, .35); }
#auth_card .container .container, #auth_card .row, #auth_card .col { margin: 0; padding: 0; width: 100%; max-width: 100%; flex: 0 0 100%; }
#auth_card > .container { margin: 0; width: 100%; max-width: 100%; }
#auth_card .row + .row { margin-top: 0; }
#auth_card .m-auth-step + * { margin-top: 0; }
#auth_card .m-social-btn--wa { margin-top: 4px; }
#auth_card .m-otp-meta { margin-top: 14px; }
#auth_card #auth_legal .m-auth-legal { margin-top: 20px; }
#auth_card .t-Button--passwordVisibility { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; margin: 0; border: 0; background: none; border-radius: 50%; color: var(--ink-mute); }
#auth_card .apex-item-group--password { position: relative; display: block; }
#auth_card .apex-item-group--password input { padding-inline-end: 52px; }

/* ==========================================================================
   46. Login page: sign in / new account tabs
   ========================================================================== */
#auth_card .m-auth-head { text-align: center; }
.m-auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 20px 0 16px; padding: 4px;
  background: var(--sand); border: 1px solid var(--line); border-radius: var(--r-pill); }
.m-auth-tabs button { height: 44px; border-radius: var(--r-pill); font-weight: 600; font-size: 15px; color: var(--ink-mute); }
.m-auth-tabs button[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 2px 8px -4px rgba(27,42,56,.35); }
.m-auth-tabs button:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }
.m-auth-intro { margin-bottom: 16px; font-size: 14px; line-height: 1.8; color: var(--ink-soft); }
.m-auth-switch { margin-top: 14px; text-align: center; font-size: 14px; color: var(--ink-mute); }
.m-auth-switch button { color: var(--brand-dark); font-weight: 700; }
/* which regions belong to which mode */
#auth_card:not([data-mode="register"]) :is(#reg_phone, #reg_code, [data-mode-only="register"]) { display: none; }
#auth_card[data-mode="register"] :is(#otp_phone, #otp_code, #email, [data-mode-only="login"]) { display: none; }
/* before JS runs: login only */
#auth_card:not([data-mode]) :is(#reg_phone, #reg_code) { display: none; }
#auth_card :is(#reg_phone, #reg_code) .m-auth-step[hidden] { display: none; }

/* ==========================================================================
   47. Product page (page 3)
   ========================================================================== */
.m-product { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .m-product { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: start; } }
.m-product__gallery, .m-product__info { min-width: 0; }
@media (max-width: 899px) { .m-product__gallery { position: static; } .m-product__stage { padding: 28px 22%; } }
.m-product .m-buy--block { max-width: 420px; }
.m-product__info > .m-btn--ghost[data-wish] { justify-self: start; }
.m-product__info > .m-btn--ghost[data-wish][aria-pressed="true"] { color: #C0392B; border-color: #E8B4AE; }
#ecp_product_specs, #ecp_reviews_section, #ecp_related { padding-block: 32px; }
#ecp_product_specs .m-specs { margin-top: 16px; }
.m-review-list { display: grid; }
.m-review-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; margin-bottom: 20px; border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--white); }
.m-review-cta[hidden] { display: none; }
.m-review-form { margin-bottom: 24px; }
.m-review-form__title { font-weight: 700; }
.m-review-form label { font-weight: 600; font-size: 14px; }
.m-review-form textarea { width: 100%; min-height: 110px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; font: inherit; resize: vertical; }
.m-review-form textarea:focus { outline: none; border-color: var(--brand-dark); box-shadow: 0 0 0 4px var(--brand-tint); }
.m-rating-summary--empty { text-align: start; }

/* Product page: breathing room under the header for the breadcrumb */
#ecp_product .m-breadcrumb { padding-top: clamp(20px, 3vw, 32px); }
#ecp_product .m-product { padding-top: 16px; }

/* Author page (page 9) */
#ecp_author_head .m-breadcrumb { padding-top: clamp(20px, 3vw, 32px); }
#ecp_author_head .m-author-hero { padding-block: 24px 8px; align-items: flex-start; }
.m-author-hero__text { flex: 1; min-width: 0; }
.m-author-hero__text .m-eyebrow { font-size: 13px; font-weight: 600; color: var(--brand-dark); letter-spacing: .02em; }
.m-author-hero__bio:empty { display: none; }
@media (max-width: 639px) { .m-author-hero { flex-direction: column; align-items: center; text-align: center; } }
#ecp_author_books { padding-block: 24px 56px; }

/* Order confirmation (page 6) */
#ecp_order .m-success { max-width: 720px; padding-block: clamp(28px, 5vw, 48px) 8px; }
.m-success__head { display: grid; justify-items: center; gap: 10px; }
.m-success__head h1 { margin-top: 8px; }
.m-confirm-block { max-width: 720px; margin-inline: auto; margin-top: 16px; }
#ecp_retry { text-align: center; }
#ecp_receipt { padding: 18px; border: 1.5px dashed var(--line); border-radius: var(--r-md); background: var(--white); display: grid; gap: 12px; }
#ecp_receipt .m-upload__head p { margin-top: 4px; font-size: 14px; }
#ecp_receipt .t-Form-fieldContainer { margin: 0; }
#ecp_order_timeline { margin-top: 32px; }
#ecp_order_timeline .m-section-title { margin-bottom: 18px; font-size: 20px; }
.m-confirm-summary { max-width: 720px; margin: 32px auto 0; display: grid; gap: 16px; }
@media (min-width: 900px) { .m-confirm-summary { max-width: 1000px; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }
.m-confirm-summary .m-panel + .m-panel { margin-top: 0; }
.m-order-lines { display: grid; gap: 10px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.m-order-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: baseline; }
.m-order-line__title { font-weight: 600; overflow-wrap: anywhere; }
.m-order-line__qty { color: var(--ink-mute); font-size: 14px; }
.m-order-line__price { font-weight: 600; white-space: nowrap; }
.m-address-lines { line-height: 1.9; }
.m-confirm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding-block: 28px 64px; }

/* Account: profile/security now use Blank with Attributes — keep form fields full width */
#ecp_account_profile .t-Form-fieldContainer, #ecp_account_password .t-Form-fieldContainer { width: 100%; }
#ecp_account_profile .t-Form-inputContainer .apex-item-text,
#ecp_account_password .t-Form-inputContainer .apex-item-text { width: 100%; max-width: 100%; }

/* ==========================================================================
   48. Order page (8), blog (10), article (11)
   ========================================================================== */
#ecp_order_head .m-breadcrumb, #ecp_blog_head .m-breadcrumb { padding-top: clamp(20px, 3vw, 32px); }
.m-order-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 16px 8px; }
.m-order-head .m-page-title { margin-bottom: 6px; }
.m-order-line__review { margin-inline-start: 8px; font-size: 13px; white-space: nowrap; }
.m-order-line__title a { color: inherit; }
.m-blog-chips { margin-top: 20px; }
.m-blog-chips .m-chip { text-decoration: none; }
#ecp_blog_grid { padding-block: 8px 72px; }
.m-article-body { max-width: 46rem; padding-block: 8px 48px; }
#ecp_article_products, #ecp_article_related { padding-block: 32px; }

/* ==========================================================================
   49. APEX modal dialogs (frame, title bar, overlay) in the store look.
   The dialog content is styled by meem-dialog.css inside the iframe.
   ========================================================================== */
.ui-dialog.ui-dialog--apex {
  border: 0; border-radius: 22px; overflow: hidden; padding: 0;
  box-shadow: 0 30px 80px -24px rgba(27, 42, 56, .45);
  font-family: "IBM Plex Sans Arabic", system-ui, Tahoma, sans-serif;
}
.ui-dialog.ui-dialog--apex .ui-dialog-titlebar {
  background: #FFFFFF; border: 0; border-bottom: 1px solid #E6E2D9; border-radius: 0;
  padding: 16px 22px; color: #1B2A38;
}
.ui-dialog.ui-dialog--apex .ui-dialog-title {
  font-family: "IBM Plex Sans Arabic", system-ui, Tahoma, sans-serif; font-size: 18px; font-weight: 700;
}
.ui-dialog.ui-dialog--apex .ui-dialog-titlebar-close {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid #E6E2D9; background: #FFFFFF;
}
.ui-dialog.ui-dialog--apex .ui-dialog-titlebar-close:hover { border-color: #1B2A38; background: #FAFAF8; }
.ui-dialog.ui-dialog--apex .ui-dialog-content { padding: 0; background: #FFFFFF; }
.ui-widget-overlay.ui-front { background: rgba(27, 42, 56, .5); opacity: 1; backdrop-filter: blur(2px); }
@media (max-width: 640px) {
  .ui-dialog.ui-dialog--apex { border-radius: 18px 18px 0 0; }
}

/* ---------- APEX alert / confirm (apex.message.confirm, apex.message.alert) ---------- */
.ui-dialog.ui-dialog--notification {
  width: min(380px, calc(100vw - 32px)) !important; padding: 0; border: 0; border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 80px -24px rgba(27, 42, 56, .45); background: #FFFFFF;
  font-family: "IBM Plex Sans Arabic", system-ui, Tahoma, sans-serif; color: #1B2A38;
}
.ui-dialog.ui-dialog--notification .ui-dialog-titlebar { display: none; }
.ui-dialog.ui-dialog--notification .ui-dialog-content { height: auto !important; padding: 26px 24px 8px; overflow: visible; }
.ui-dialog--notification .a-AlertMessage { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 0; background: none; border: 0; }
.ui-dialog--notification .a-AlertMessage-icon {
  width: 52px; height: 52px; border-radius: 999px; display: grid; place-items: center; margin: 0;
  background: #E0F7FA; color: #017E93;
}
.ui-dialog--notification.ui-dialog--danger .a-AlertMessage-icon { background: #FDECEA; color: #B42318; }
.ui-dialog--notification .a-AlertMessage-icon .a-Icon { width: 22px; height: 22px; font-size: 22px; color: inherit; }
.ui-dialog--notification .a-AlertMessage-body { padding: 0; }
.ui-dialog--notification .a-AlertMessage-details { font-size: 16px; font-weight: 600; line-height: 1.7; color: #1B2A38; }
.ui-dialog.ui-dialog--notification .ui-dialog-buttonpane { margin: 0; padding: 14px 24px 22px; border: 0; background: #FFFFFF; }
.ui-dialog--notification .ui-dialog-buttonset { display: flex; gap: 10px; float: none; width: 100%; }
.ui-dialog--notification .ui-dialog-buttonset .ui-button {
  flex: 1; min-height: 46px; margin: 0; padding: 0 18px; border-radius: 999px;
  border: 1px solid #E6E2D9; background: #FFFFFF; color: #1B2A38;
  font-family: inherit; font-size: 15px; font-weight: 600; box-shadow: none; text-shadow: none;
}
.ui-dialog--notification .ui-dialog-buttonset .ui-button:hover { border-color: #1B2A38; background: #FAFAF8; }
.ui-dialog--notification .ui-dialog-buttonset .ui-button.js-confirmBtn,
.ui-dialog--notification .ui-dialog-buttonset .ui-button--hot { background: #017E93; border-color: #017E93; color: #FFFFFF; }
.ui-dialog--notification .ui-dialog-buttonset .ui-button--danger { background: #B42318; border-color: #B42318; color: #FFFFFF; }
.ui-dialog--notification .ui-dialog-buttonset .ui-button--danger:hover { background: #912018; border-color: #912018; }
.ui-dialog--notification .ui-dialog-buttonset .ui-button:focus-visible { outline: 2px solid #017E93; outline-offset: 2px; }

/* ==========================================================================
   50. Inline Dialog regions (template "ECP Inline Dialog") in the store look.
   jQuery UI moves the dialog to <body>, outside .meem, so tokens are set here.
   ========================================================================== */
.ui-dialog.ui-dialog--inline {
  --brand: #01AECA; --brand-dark: #017E93; --brand-deep: #015F6F; --brand-tint: #E0F7FA;
  --paper: #FAFAF8; --white: #FFFFFF; --line: #E6E2D9; --ink: #1B2A38; --ink-soft: #3C4B59; --ink-mute: #5E6A77;
  --danger: #B42318; --font-ui: "IBM Plex Sans Arabic", system-ui, Tahoma, sans-serif; --r-field: 12px; --r-pill: 999px;
  padding: 0; border: 0; border-radius: 22px; overflow: hidden; background: var(--white);
  box-shadow: 0 30px 80px -24px rgba(27, 42, 56, .45); font-family: var(--font-ui); color: var(--ink);
  max-width: calc(100vw - 24px);
}
.ui-dialog--inline .ui-dialog-titlebar {
  padding: 16px 22px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--white); color: var(--ink);
}
.ui-dialog--inline .ui-dialog-title { font-family: var(--font-ui); font-size: 18px; font-weight: 700; }
.ui-dialog--inline .ui-dialog-titlebar-close {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--white);
}
.ui-dialog--inline .ui-dialog-titlebar-close:hover { border-color: var(--ink); background: var(--paper); }
.ui-dialog--inline .ui-dialog-content { padding: 0; background: var(--white); }
.ui-dialog--inline .t-DialogRegion-body { padding: 18px 22px 8px; }
.ui-dialog--inline .ecp-inline-dialog__lead { margin: 0 0 14px; color: var(--ink-mute); font-size: 14px; line-height: 1.8; }
.ui-dialog--inline .t-DialogRegion-buttons {
  padding: 14px 22px; border-top: 1px solid var(--line); background: var(--white);
}
.ui-dialog--inline .t-DialogRegion-buttons:not(:has(.t-Button)) { display: none; }
.ui-dialog--inline .t-ButtonRegion { margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
.ui-dialog--inline .t-ButtonRegion-buttons { display: flex; gap: 8px; }
.ui-dialog--inline .t-DialogRegion-footer:empty { display: none; }
.ui-dialog--inline .t-DialogRegion-footer { padding: 0 22px 16px; color: var(--ink-mute); font-size: 13px; }
.ui-dialog--inline input, .ui-dialog--inline select, .ui-dialog--inline textarea, .ui-dialog--inline .t-Button { font-family: var(--font-ui); }
.ui-dialog--inline .t-Form-labelContainer { padding: 0 0 6px; }
.ui-dialog--inline .m-btn { font-family: var(--font-ui); }
@media (max-width: 640px) {
  .ui-dialog.ui-dialog--inline { border-radius: 18px 18px 0 0; }
  .ui-dialog--inline .t-DialogRegion-body { padding: 16px 16px 6px; }
  .ui-dialog--inline .t-DialogRegion-buttons { padding: 12px 16px; }
}
/* ---------- fields (label above) ---------- */
.ui-dialog--inline .t-Form-fieldContainer { padding: 6px 0; }
.ui-dialog--inline .t-Form-labelContainer { padding: 0 0 6px; }
.ui-dialog--inline .t-Form-label { font-size: 14px; font-weight: 600; color: var(--ink-soft); padding: 0 8px; }
.ui-dialog--inline .t-Form-fieldContainer.is-required .t-Form-label::after { content: " *"; color: var(--danger); font-weight: 700; }
.ui-dialog--inline .t-Form-itemRequired, .ui-dialog--inline .t-Form-itemRequired-marker { display: none; }

.ui-dialog--inline .apex-item-text,
.ui-dialog--inline .apex-item-select,
.ui-dialog--inline .apex-item-textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--r-field);
  background: var(--white); color: var(--ink); font-size: 15px; box-shadow: none;
  transition: border-color .15s, box-shadow .15s;
}
.ui-dialog--inline .apex-item-select { padding-inline-end: 36px; }
.ui-dialog--inline .apex-item-text::placeholder { color: #9AA3AD; }
.ui-dialog--inline .apex-item-text:hover, .ui-dialog--inline .apex-item-select:hover { border-color: #CFC9BC; }
.ui-dialog--inline .apex-item-text:focus, .ui-dialog--inline .apex-item-select:focus,
.ui-dialog--inline .apex-item-textarea:focus {
  outline: none; border-color: var(--brand-dark); box-shadow: 0 0 0 4px var(--brand-tint);
}
.ui-dialog--inline .t-Form-fieldContainer.apex-item-wrapper--has-error .apex-item-text,
.ui-dialog--inline .t-Form-fieldContainer.apex-item-wrapper--has-error .apex-item-select,
.ui-dialog--inline .apex-item-text[aria-invalid="true"], .ui-dialog--inline .apex-item-select[aria-invalid="true"] {
  border-color: var(--danger); box-shadow: 0 0 0 4px #FDECEA;
}
.ui-dialog--inline .a-Form-error { color: var(--danger); font-size: 13px; margin-top: 6px; }
.ui-dialog--inline .t-Form-inlineHelp { color: var(--ink-mute); font-size: 13px; margin-top: 6px; }
.ui-dialog--inline [dir="ltr"].apex-item-text { text-align: left; }

/* ---------- place type: segmented pills ---------- */
.ui-dialog--inline .t-Form-fieldContainer--radioButtonGroup .apex-item-grid-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ui-dialog--inline .t-Form-fieldContainer--radioButtonGroup .apex-item-option { flex: 1 1 0; min-width: 90px; position: relative; }
.ui-dialog--inline .t-Form-fieldContainer--radioButtonGroup .apex-item-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ui-dialog--inline .t-Form-fieldContainer--radioButtonGroup .apex-item-option label {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; margin: 0;
  border: 1px solid var(--line); border-radius: var(--r-field); background: var(--white);
  font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: all .15s;
}
.ui-dialog--inline .t-Form-fieldContainer--radioButtonGroup .apex-item-option label::before,
.ui-dialog--inline .t-Form-fieldContainer--radioButtonGroup .apex-item-option label::after { display: none; }
.ui-dialog--inline .t-Form-fieldContainer--radioButtonGroup .apex-item-option input:checked + label {
  border-color: var(--brand-dark); background: var(--brand-tint); color: var(--brand-deep);
  box-shadow: inset 0 0 0 1px var(--brand-dark);
}
.ui-dialog--inline .t-Form-fieldContainer--radioButtonGroup .apex-item-option input:focus-visible + label {
  outline: 2px solid var(--brand-dark); outline-offset: 2px;
}

/* ---------- switch ---------- */
.ui-dialog--inline .a-Switch input:checked + .a-Switch-toggle { background-color: var(--brand-dark); }
.ui-dialog--inline .a-Switch input:focus-visible + .a-Switch-toggle { box-shadow: 0 0 0 4px var(--brand-tint); }

/* ---------- buttons ---------- */
.ui-dialog--inline .t-Button {
  min-height: 46px; padding: 0 22px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  font-size: 15px; font-weight: 600; box-shadow: none; text-shadow: none;
}
.ui-dialog--inline .t-Button:hover { border-color: var(--ink); background: var(--white); }
.ui-dialog--inline .t-Button:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }
.ui-dialog--inline .t-Button--hot { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--white); }
.ui-dialog--inline .t-Button--hot:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: var(--white); }
.ui-dialog--inline .t-Button.ecp-btn-ghost { border-color: transparent; color: var(--ink-mute); }
.ui-dialog--inline .t-Button.ecp-btn-ghost:hover { color: var(--ink); background: var(--paper); }
.ui-dialog--inline .t-Button.ecp-btn-danger { border-color: transparent; color: var(--danger); }
.ui-dialog--inline .t-Button.ecp-btn-danger:hover { background: #FDECEA; }
.ui-dialog--inline .t-Button.ecp-locate {
  min-height: 40px; padding: 0 16px; border-style: dashed; border-color: var(--brand-dark); color: var(--brand-dark);
  font-size: 14px; display: inline-flex; align-items: center; gap: 6px;
}
.ui-dialog--inline .t-Button.ecp-locate:hover { background: var(--brand-tint); }
.ui-dialog--inline .t-Button.ecp-locate[disabled] { opacity: .6; cursor: progress; }


/* ==========================================================================
   51. Store contacts from settings: hide links whose setting is still empty
   ========================================================================== */
.meem a[href=""], .meem a[href="https://wa.me/"] { display: none !important; }
.meem .m-social li:has(> a[href=""]), .meem .m-social li:has(> a[href="https://wa.me/"]),
.meem .m-footer-links li:has(> a[href="https://wa.me/"]) { display: none; }
.meem .m-topbar__aside:has(.m-ltr:empty) { display: none; }

/* ==========================================================================
   52. Footer "تابعنا": its own row between the link columns and the legal bar
   ========================================================================== */
.m-footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.m-follow-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px;
  padding-block: 22px; border-top: 1px solid rgba(255, 255, 255, .1);
}
.m-follow-row__title { margin: 0; color: var(--white); font-size: 15px; font-weight: 600; }
.m-follow { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.m-follow li { margin: 0; }
.m-follow li:has(> a[href=""]) { display: none; }
.m-follow__link {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22); color: rgba(255, 255, 255, .86);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.m-follow__link .m-icon { width: 20px; height: 20px; }
.m-follow__link:hover, .m-follow__link:focus-visible {
  background: var(--brand); border-color: var(--brand); color: var(--ink); transform: translateY(-2px);
}
.m-follow-wa {
  display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto;
  min-height: 44px; padding-inline: 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22);
  color: #FFFFFF; font-weight: 600; font-size: 14px;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.m-follow-wa .m-icon { width: 20px; height: 20px; }
.m-follow-wa:hover, .m-follow-wa:focus-visible { background: var(--brand-dark); border-color: var(--brand-dark); }
@media (max-width: 639px) {
  .m-follow-row { flex-direction: column; align-items: stretch; text-align: center; }
  .m-follow { justify-content: center; gap: 8px; }
  .m-follow-wa { margin-inline-start: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .m-follow__link:hover { transform: none; } }

/* ==========================================================================
   53. Shop page (2): head, filters aside, toolbar, grid, pagination
   ========================================================================== */
#ecp_shop_head .m-breadcrumb { padding-top: clamp(20px, 3vw, 32px); }
.m-shop-head { padding-block: 12px 8px; }
.m-shop-chips { display: flex; gap: 8px; overflow-x: auto; margin-top: 18px; padding-bottom: 4px; scrollbar-width: none; }
.m-shop-chips::-webkit-scrollbar { display: none; }
.m-shop-chips .m-chip { flex-shrink: 0; text-decoration: none; }
.m-shop-body { padding-block: 16px 80px; }
@media (max-width: 1023px) {
  #ecp_shop_body .col-3, #ecp_shop_body .col-9 { flex: 0 0 100%; max-width: 100%; }
}

/* filters: an always-open panel on desktop, a collapsible card on small screens */
.m-filters { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); }
.m-filters__toggle {
  display: flex; align-items: center; gap: 8px; padding: 14px 18px; font-weight: 700; cursor: pointer; list-style: none;
}
.m-filters__toggle::-webkit-details-marker { display: none; }
.m-filters__toggle::after { content: ""; margin-inline-start: auto; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.m-filters[open] > .m-filters__toggle::after { transform: rotate(-135deg); }
.m-filters__body { padding: 4px 18px 18px; }
@media (min-width: 1024px) {
  .m-filters { position: sticky; top: 96px; }
  .m-filters__toggle { pointer-events: none; padding-bottom: 6px; }
  .m-filters__toggle::after { display: none; }
}
.m-filter { padding-block: 14px; border-bottom: 1px solid var(--line); }
.m-filter:last-of-type { border-bottom: 0; }
.m-filter__title { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--ink); }
.m-filter ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.m-filter-opt {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 8px; border-radius: 10px;
  color: var(--ink-soft); text-decoration: none; transition: background-color .15s;
}
.m-filter-opt:hover { background: var(--paper); color: var(--ink); }
.m-filter-opt__mark {
  width: 18px; height: 18px; flex-shrink: 0; border: 1.5px solid #B9B3A6; background: var(--white); display: grid; place-items: center;
}
.m-filter-opt--radio .m-filter-opt__mark { border-radius: 999px; }
.m-filter-opt--check .m-filter-opt__mark { border-radius: 5px; }
.m-filter-opt[aria-current="true"] { color: var(--ink); font-weight: 600; }
.m-filter-opt[aria-current="true"] .m-filter-opt__mark { border-color: var(--brand-dark); background: var(--brand-dark); }
.m-filter-opt--radio[aria-current="true"] .m-filter-opt__mark { box-shadow: inset 0 0 0 3px var(--white); }
.m-filter-opt--check[aria-current="true"] .m-filter-opt__mark::after {
  content: ""; width: 5px; height: 9px; border: solid var(--white); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg);
}
.m-filter-opt__label { flex: 1; }
.m-filter-opt__count { font-size: 12px; color: var(--ink-mute); background: var(--paper); border-radius: 999px; padding: 1px 8px; }
.m-filters__reset { margin-top: 14px; }

/* toolbar */
.m-shop-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 14px; }
.m-shop-count { margin: 0; font-weight: 600; color: var(--ink-soft); }
.m-sort { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-mute); }
.m-sort select {
  height: 42px; padding-inline: 14px 34px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--white); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
.m-sort select:focus-visible { outline: none; border-color: var(--brand-dark); box-shadow: 0 0 0 4px var(--brand-tint); }
.m-active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.m-pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding-inline: 12px 10px;
  border-radius: 999px; background: var(--brand-tint); color: var(--brand-deep); font-size: 13px; font-weight: 600; text-decoration: none;
}
.m-pill span { font-size: 16px; line-height: 1; }
.m-pill:hover { background: var(--brand-dark); color: var(--white); }

/* grid: 2 → 3 columns inside the 9-col results area */
#ecp_shop_grid .m-grid-products { gap: 40px 18px; }
@media (min-width: 768px) { #ecp_shop_grid .m-grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.m-shop-empty { border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--white); }
.m-shop-empty .m-empty__title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }

/* pagination as links */
.m-pagination { flex-wrap: wrap; align-items: center; }
.m-pagination a, .m-pagination__gap {
  min-width: 44px; height: 44px; display: inline-grid; place-items: center; padding-inline: 12px;
  border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--white); color: var(--ink); text-decoration: none; font-weight: 600;
}
.m-pagination__gap { border: 0; background: none; }
.m-pagination a:hover { border-color: var(--ink); }
.m-pagination a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* footer follow row: higher specificity so no reset (section/ul display:block) can win */
.meem .m-site-footer .m-follow-row { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; }
.meem .m-site-footer .m-follow { display: flex; flex-direction: row; flex-wrap: wrap; }
@media (max-width: 639px) {
  .meem .m-site-footer .m-follow-row { flex-direction: column; align-items: stretch; }
  .meem .m-site-footer .m-follow { justify-content: center; }
}

/* Login: buttons full width and centred inside the card */
#auth_card .m-social-btn { width: 100%; justify-content: center; text-align: center; font-weight: 700; font-size: 16px; }
#auth_card .m-social-btn .m-icon { width: 22px; height: 22px; flex-shrink: 0; }
#auth_card .m-social { display: grid; gap: 10px; }
#auth_card .m-or { margin: 20px 0 14px; }

/* ==========================================================================
   54. Focus ring: keyboard only. A mouse click or a tap shows nothing,
   Tab still shows the brand ring (from :focus-visible above).
   ========================================================================== */
.meem a, .meem button, .meem [role="button"], .meem summary, .meem label { -webkit-tap-highlight-color: transparent; }
.meem a:focus:not(:focus-visible),
.meem button:focus:not(:focus-visible),
.meem summary:focus:not(:focus-visible),
.meem [tabindex]:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.meem .m-main:focus, .meem [tabindex="-1"]:focus { outline: none; }

/* ==========================================================================
   55. Home page v2: hero banner, trust strip, departments, promo, people, brands, join
   ========================================================================== */
/* hero */
.m-hero2 {
  --banner-bg: #F3EFE6;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center;
  margin-top: clamp(16px, 3vw, 28px); padding: clamp(28px, 5vw, 56px);
  border-radius: 28px; background: var(--banner-bg); overflow: hidden;
}
@media (min-width: 900px) { .m-hero2 { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 40px; min-height: 440px; } }
.m-hero2 .m-eyebrow { color: var(--brand-dark); font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.m-hero2__title { margin: 0; font-family: var(--font-display); font-size: clamp(30px, 4.6vw, 52px); line-height: 1.25; color: var(--ink); }
.m-hero2__lede { margin-top: 16px; max-width: 34rem; font-size: clamp(16px, 1.6vw, 18px); line-height: 1.9; color: var(--ink-soft); }
.m-hero2__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.m-hero2__art { position: relative; min-height: 260px; display: grid; place-items: center; }
.m-hero2__art img { width: 100%; height: auto; border-radius: 20px; object-fit: cover; }
.m-hero2__fan { position: relative; width: min(100%, 420px); height: 320px; }
.m-hero2__item { position: absolute; bottom: 0; width: 46%; filter: drop-shadow(0 22px 30px rgba(27, 42, 56, .25)); transition: transform .35s var(--ease); }
.m-hero2__item[data-i="1"] { inset-inline-start: 30%; z-index: 3; transform: translateY(-14px); }
.m-hero2__item[data-i="2"] { inset-inline-start: 2%;  z-index: 2; transform: rotate(-7deg); }
.m-hero2__item[data-i="3"] { inset-inline-start: 56%; z-index: 1; transform: rotate(7deg) scale(.92); }
.m-hero2:hover .m-hero2__item[data-i="1"] { transform: translateY(-22px); }
@media (max-width: 639px) { .m-hero2 { border-radius: 22px; } .m-hero2__fan { height: 240px; } .m-hero2__actions .m-btn { flex: 1; } }

/* trust strip */
.m-home-trust {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0 0; padding: 0; list-style: none;
}
@media (min-width: 900px) { .m-home-trust { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.m-home-trust li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); font-size: 14px; color: var(--ink-mute); }
.m-home-trust .m-icon { width: 24px; height: 24px; color: var(--brand-dark); flex-shrink: 0; }
.m-home-trust strong { display: block; color: var(--ink); font-size: 15px; }

/* departments */
.m-dept-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 768px) { .m-dept-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.m-dept-tile {
  --tile: var(--brand-tint); --tile-ink: var(--brand-deep);
  display: flex; align-items: center; gap: 16px; padding: 22px; border-radius: 22px;
  background: var(--tile); color: var(--ink); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.m-dept-tile[data-dept="books"]      { --tile: #F3EFE6; --tile-ink: #7A2E2E; }
.m-dept-tile[data-dept="stationery"] { --tile: #E0F7FA; --tile-ink: #015F6F; }
.m-dept-tile[data-dept="gifts"]      { --tile: #F6E3E1; --tile-ink: #8A2F43; }
.m-dept-tile:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -26px rgba(27, 42, 56, .45); }
.m-dept-tile__icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .75); color: var(--tile-ink); flex-shrink: 0; }
.m-dept-tile__icon .m-icon { width: 28px; height: 28px; }
.m-dept-tile__text { display: grid; gap: 2px; flex: 1; }
.m-dept-tile__text strong { font-size: 20px; font-family: var(--font-display); }
.m-dept-tile__text span { font-size: 14px; color: var(--ink-mute); }
.m-dept-tile__go { font-size: 22px; color: var(--tile-ink); transition: transform .2s var(--ease); }
.m-dept-tile:hover .m-dept-tile__go { transform: translateX(-4px); }

/* secondary banner */
.m-promo {
  --banner-bg: var(--brand-tint);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: center;
  margin-block: 40px; padding: clamp(24px, 4vw, 40px); border-radius: 26px; background: var(--banner-bg); overflow: hidden;
}
@media (min-width: 900px) { .m-promo { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } }
.m-promo__title { margin: 0; font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); line-height: 1.35; }
.m-promo__lede { margin-top: 10px; color: var(--ink-soft); line-height: 1.9; max-width: 32rem; }
.m-promo__art { display: flex; justify-content: center; gap: 14px; }
.m-promo__item { width: min(42%, 170px); filter: drop-shadow(0 16px 24px rgba(27, 42, 56, .2)); }
.m-promo__item:nth-child(2) { transform: translateY(18px) rotate(4deg); }
.m-promo__art img { width: 100%; height: auto; border-radius: 18px; }

/* authors */
.m-people { display: flex; gap: 18px; overflow-x: auto; margin: 0; padding: 4px 2px 10px; list-style: none; scroll-snap-type: x mandatory; scrollbar-width: none; }
.m-people::-webkit-scrollbar { display: none; }
.m-people li { flex: 0 0 auto; scroll-snap-align: start; }
.m-person { width: 112px; display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--ink); text-decoration: none; }
.m-person__avatar {
  width: 88px; height: 88px; border-radius: 999px; display: grid; place-items: center; overflow: hidden;
  background: var(--ink); color: var(--white); font-family: var(--font-display); font-size: 32px; font-weight: 700;
  box-shadow: 0 0 0 3px var(--white), 0 0 0 4px var(--line); transition: box-shadow .2s var(--ease);
}
.m-person:hover .m-person__avatar { box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--brand); }
.m-person__avatar img { width: 100%; height: 100%; object-fit: cover; }
.m-person__name { font-weight: 600; font-size: 14px; line-height: 1.5; }
.m-person__meta { font-size: 12px; color: var(--ink-mute); }

/* publishers and brands */
.m-brand-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.m-brand-chip {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--white); color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s var(--ease);
}
.m-brand-chip:hover { border-color: var(--ink); transform: translateY(-2px); }
.m-brand-chip__logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: var(--sand); color: var(--ink); font-weight: 700; font-size: 18px; flex-shrink: 0; }
.m-brand-chip__logo img { width: 100%; height: 100%; object-fit: contain; }
.m-brand-chip strong { display: block; font-size: 15px; }
.m-brand-chip small { color: var(--ink-mute); font-size: 12px; }

/* join */
.m-join {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  margin-block: 24px 64px; padding: clamp(24px, 4vw, 36px); border-radius: 26px; background: var(--ink); color: rgba(255, 255, 255, .85);
}
.m-join__title { margin: 0 0 6px; color: var(--white); font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 28px); }
.m-join p { max-width: 36rem; line-height: 1.9; }
.m-join .m-btn--primary { background: var(--brand); border-color: var(--brand); color: var(--ink); }

/* brand page (21) */
#ecp_brand_head .m-breadcrumb { padding-top: clamp(20px, 3vw, 32px); }
.m-brand-hero__logo { background: var(--sand); color: var(--ink); border-radius: 24px; }
.m-brand-hero__logo img { object-fit: contain; padding: 8px; }
#ecp_brand_products { padding-block: 24px 64px; }
@media (prefers-reduced-motion: reduce) {
  .m-hero2__item, .m-dept-tile, .m-brand-chip { transition: none; }
}

/* ==========================================================================
   56. Home: departments v2 (cover fan, count, top categories) + shop by budget
   ========================================================================== */
.m-depts2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 900px) { .m-depts2 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) {
  .m-depts2 { grid-auto-flow: column; grid-auto-columns: minmax(78%, 1fr); grid-template-columns: none;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
  .m-depts2::-webkit-scrollbar { display: none; }
  .m-dept2 { scroll-snap-align: start; }
}
.m-dept2 {
  --tile: #F3EFE6; --tile-ink: #7A2E2E;
  display: flex; flex-direction: column; border-radius: 24px; background: var(--tile); overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.m-dept2[data-dept="stationery"] { --tile: #E0F7FA; --tile-ink: #015F6F; }
.m-dept2[data-dept="gifts"]      { --tile: #F6E3E1; --tile-ink: #8A2F43; }
.m-dept2:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -34px rgba(27, 42, 56, .45); }
.m-dept2__main { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 0; color: var(--ink); text-decoration: none; flex: 1; }
.m-dept2__head { display: flex; align-items: center; gap: 12px; }
.m-dept2__icon {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0;
  background: rgba(255, 255, 255, .75); color: var(--tile-ink);
}
.m-dept2__icon .m-icon { width: 26px; height: 26px; }
.m-dept2__names { display: grid; gap: 2px; }
.m-dept2__name { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.3; color: var(--tile-ink); }
.m-dept2__count { font-size: 13px; color: var(--ink-mute); }
.m-dept2__lede { font-size: 14px; line-height: 1.8; color: var(--ink-soft); }
.m-dept2__fan { position: relative; height: 170px; margin-top: 6px; }
.m-dept2__cover {
  position: absolute; bottom: -26px; width: 36%; filter: drop-shadow(0 16px 20px rgba(27, 42, 56, .22));
  transition: transform .3s var(--ease);
}
.m-dept2__cover[data-i="1"] { inset-inline-start: 32%; z-index: 3; }
.m-dept2__cover[data-i="2"] { inset-inline-start: 6%;  z-index: 2; transform: rotate(-8deg) translateY(10px); }
.m-dept2__cover[data-i="3"] { inset-inline-start: 58%; z-index: 1; transform: rotate(8deg) translateY(12px) scale(.94); }
.m-dept2:hover .m-dept2__cover[data-i="1"] { transform: translateY(-10px); }
.m-dept2__cta {
  position: relative; z-index: 4; align-self: flex-start; margin: 0 0 16px; padding: 10px 16px; border-radius: 999px;
  background: var(--white); color: var(--ink); font-weight: 700; font-size: 14px; box-shadow: 0 10px 24px -16px rgba(27, 42, 56, .5);
}
.m-dept2__main:hover .m-dept2__cta { background: var(--ink); color: var(--white); }
.m-dept2__cats {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 14px 22px 20px; list-style: none;
  background: rgba(255, 255, 255, .55); border-top: 1px solid rgba(27, 42, 56, .06);
}
.m-dept2__cats .m-chip { background: var(--white); border-color: transparent; font-size: 13px; padding-block: 6px; text-decoration: none; }
.m-dept2__cats .m-chip:hover { border-color: var(--tile-ink); color: var(--tile-ink); }

.m-budget { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 18px; }
.m-budget__title { margin: 0; font-weight: 700; color: var(--ink); }
.m-budget ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.m-budget__link {
  display: inline-flex; align-items: center; min-height: 40px; padding-inline: 16px; border-radius: 999px;
  border: 1px dashed var(--brand-dark); color: var(--brand-deep); font-weight: 600; font-size: 14px; text-decoration: none;
  transition: background-color .15s var(--ease);
}
.m-budget__link:hover { background: var(--brand-tint); }
@media (prefers-reduced-motion: reduce) { .m-dept2, .m-dept2__cover { transition: none; } .m-dept2:hover { transform: none; } }

/* ==========================================================================
   57. Shop v2: filter panel / mobile bottom sheet, sticky bar, price range,
       search hits, "did you mean", loading state
   ========================================================================== */
.m-noscroll, .m-noscroll body { overflow: hidden; }
.m-filters__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 6px; }
.m-filters__title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; font-weight: 700; }
.m-filters__title .m-icon { width: 20px; height: 20px; }
.m-filters__foot { display: none; }
.m-filters-backdrop { display: none; }
@media (min-width: 1024px) {
  .m-filters__close { display: none; }
  .m-filters .m-filters__reset { display: block; margin: 0 18px 18px; text-align: center; }
  .m-filters__foot { display: block; }
  .m-filters__foot .m-filters__apply { display: none; }
}
@media (max-width: 1023px) {
  #ecp_shop_filters { position: static; }
  .m-filters {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 1001; max-height: 86vh;
    display: flex; flex-direction: column; border: 0; border-radius: 22px 22px 0 0;
    box-shadow: 0 -20px 60px -20px rgba(27, 42, 56, .45);
    transform: translateY(105%); visibility: hidden; transition: transform .28s var(--ease), visibility 0s .28s;
  }
  .m-filters.is-open { transform: none; visibility: visible; transition: transform .28s var(--ease); }
  .m-filters::before { content: ""; align-self: center; width: 42px; height: 4px; margin-top: 10px; border-radius: 4px; background: var(--line); }
  .m-filters__body { flex: 1; overflow: auto; overscroll-behavior: contain; padding-bottom: 8px; }
  .m-filters__foot {
    display: flex; align-items: center; gap: 12px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line); background: var(--white);
  }
  .m-filters__foot .m-filters__apply { flex: 1; min-height: 48px; }
  .m-filters-backdrop:not([hidden]) {
    display: block; position: fixed; inset: 0; z-index: 1000; background: rgba(27, 42, 56, .45);
  }
  /* sticky bar: Filters | Sort */
  .m-shop-bar {
    position: fixed; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 900;
    display: grid; grid-template-columns: 1fr 1fr; overflow: hidden;
    border-radius: 999px; background: var(--ink); box-shadow: 0 16px 40px -14px rgba(27, 42, 56, .6);
  }
  .m-shop-bar__btn {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px;
    color: var(--white); font-weight: 700; font-size: 15px; background: none; border: 0; cursor: pointer;
  }
  .m-shop-bar__btn + .m-shop-bar__btn { border-inline-start: 1px solid rgba(255, 255, 255, .18); }
  .m-shop-bar__btn .m-icon { width: 20px; height: 20px; }
  .m-shop-bar__btn select { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
  .m-shop-bar__badge {
    min-width: 22px; height: 22px; padding-inline: 6px; border-radius: 999px; display: inline-grid; place-items: center;
    background: var(--brand); color: var(--ink); font-size: 12px;
  }
  .m-shop-toolbar .m-sort { display: none; }
  .m-shop-body { padding-bottom: 110px; }
  .m-totop { bottom: 84px; }
}
@media (min-width: 1024px) { .m-shop-bar { display: none; } }

/* price range */
.m-price-range { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 10px; }
.m-price-range__field { display: grid; gap: 4px; flex: 1; min-width: 0; font-size: 12px; color: var(--ink-mute); }
.m-price-range__field input {
  width: 100%; height: 42px; padding-inline: 10px; border: 1px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 15px; color: var(--ink); background: var(--white); -moz-appearance: textfield;
}
.m-price-range__field input::-webkit-outer-spin-button, .m-price-range__field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.m-price-range__field input:focus { outline: none; border-color: var(--brand-dark); box-shadow: 0 0 0 4px var(--brand-tint); }
.m-price-range__dash { padding-bottom: 10px; color: var(--ink-mute); }
.m-price-range .m-btn { height: 42px; flex-shrink: 0; }

/* search: author / brand matches */
.m-search-hits { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.m-search-hit {
  display: flex; align-items: center; gap: 12px; min-width: 220px; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 16px; background: var(--white); color: var(--ink); text-decoration: none; transition: border-color .15s;
}
.m-search-hit:hover { border-color: var(--brand-dark); }
.m-search-hit__avatar {
  width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--ink); color: var(--white); font-family: var(--font-display); font-weight: 700; font-size: 18px;
}
.m-search-hit span:nth-child(2) { display: grid; gap: 1px; }
.m-search-hit small { font-size: 12px; color: var(--ink-mute); }
.m-search-hit strong { font-size: 15px; }
.m-search-hit__go { margin-inline-start: auto; color: var(--brand-dark); }
.m-did-you-mean { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 16px; }
.m-did-you-mean > span { font-weight: 600; color: var(--ink-soft); }
.m-did-you-mean .m-chip { text-decoration: none; }
.m-shop-fallback { margin-top: 28px; }

/* loading: results fade while the next page arrives */
#ecp_shop_body[aria-busy="true"] #ecp_shop_results { opacity: .45; pointer-events: none; transition: opacity .15s; }
.m-shop-loading #ecp_shop_body { cursor: progress; }
@media (prefers-reduced-motion: reduce) { .m-filters, .m-filters.is-open { transition: none; } }

/* ==========================================================================
   58. Mobile header: always pinned (hamburger · logo · account · cart),
       search + department links fold away while scrolling down, return on scroll up
   ========================================================================== */
.meem .m-site-header { position: -webkit-sticky; position: sticky; top: 0; z-index: 60; }
@media (max-width: 1023px) {
  .m-site-header .m-search--mobile, .m-site-header .m-main-nav {
    max-height: 120px; overflow: hidden; transition: max-height .22s var(--ease), opacity .18s var(--ease), margin .22s var(--ease);
  }
  .m-site-header.is-compact .m-search--mobile, .m-site-header.is-compact .m-main-nav {
    max-height: 0; opacity: 0; margin-block: 0; pointer-events: none;
  }
  .m-site-header.is-compact { box-shadow: 0 8px 24px -18px rgba(27, 42, 56, .45); }
  .m-site-header .m-header-row { height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .m-site-header .m-search--mobile, .m-site-header .m-main-nav { transition: none; }
}

/* ==========================================================================
   59. Mobile filters: the bottom sheet is used only when meem.js (≥ .36) is
   running and the page has the sticky bar (html.m-shop-sheet). Otherwise the
   filters stay visible as a normal card above the results, so they can never
   be hidden off-screen.
   ========================================================================== */
@media (max-width: 1023px) {
  html:not(.m-shop-sheet) .m-filters {
    position: static; transform: none; visibility: visible; max-height: none;
    border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: none; margin-bottom: 16px;
  }
  html:not(.m-shop-sheet) .m-filters::before,
  html:not(.m-shop-sheet) .m-filters__close,
  html:not(.m-shop-sheet) .m-filters__foot .m-filters__apply,
  html:not(.m-shop-sheet) .m-shop-bar,
  html:not(.m-shop-sheet) .m-filters-backdrop { display: none; }
  html:not(.m-shop-sheet) .m-filters__foot { display: block; border: 0; padding: 0 18px 16px; }
  html:not(.m-shop-sheet) .m-shop-toolbar .m-sort { display: inline-flex; }
  html:not(.m-shop-sheet) .m-shop-body { padding-bottom: 80px; }
}

/* ==========================================================================
   60. Fixes: price range fits the narrow filter column; department cards
       keep the covers inside the card (no overlap with the button)
   ========================================================================== */
.m-price-range {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 8px; margin-bottom: 12px;
}
.m-price-range__field { display: grid; gap: 4px; min-width: 0; margin: 0; font-size: 12px; font-weight: 600; color: var(--ink-mute); }
.m-price-range__field input {
  width: 100%; min-width: 0; height: 44px; padding: 0 10px; text-align: center;
  font-size: 16px;                                   /* 16px: iOS does not zoom the page on focus */
}
.m-price-range__dash { padding-bottom: 12px; }
.m-price-range .m-btn { grid-column: 1 / -1; width: 100%; height: 42px; justify-content: center; }

.m-dept2__fan { position: relative; height: 150px; margin-top: 10px; overflow: hidden; }
.m-dept2__cover { bottom: 0; width: 34%; }
.m-dept2__cover .m-cover, .m-dept2__cover .m-object { width: 100%; }
.m-dept2__cover[data-i="2"] { transform: rotate(-8deg) translateY(14px); }
.m-dept2__cover[data-i="3"] { transform: rotate(8deg) translateY(16px) scale(.94); }
.m-dept2__cta { margin: 14px 0 18px; }
@media (max-width: 899px) { .m-dept2__fan { height: 130px; } }

/* ==========================================================================
   61. Filters v3 (marketplace style): collapsible groups with chevron and
       "مسح", category tree, searchable brand list with "عرض الكل", stars
   ========================================================================== */
.m-filters .m-filter { padding: 0; border-bottom: 1px solid var(--line); }
.m-filters .m-filter:last-of-type { border-bottom: 0; }
.m-filter__bar { display: flex; align-items: center; gap: 8px; }
.m-filter__h { flex: 1; margin: 0; font-size: inherit; }
.m-filter__head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 0; background: none; border: 0; color: var(--ink); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; text-align: start;
}
.m-filter__chev {
  width: 9px; height: 9px; flex-shrink: 0; border: solid var(--ink-mute); border-width: 0 2px 2px 0;
  transform: rotate(-135deg) translate(-2px, -2px); transition: transform .2s var(--ease);
}
.m-filter.is-collapsed .m-filter__chev { transform: rotate(45deg); }
.m-filter__clear { font-size: 13px; font-weight: 600; color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.m-filter__content { padding-bottom: 14px; }
.m-shop-js .m-filter.is-collapsed .m-filter__content { display: none; }
.m-filter__title { margin: 0; }

/* category tree */
.m-filter__tree, .m-filter__sub { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.m-filter__sub { margin: 2px 0 6px; padding-inline-start: 16px; border-inline-start: 2px solid var(--line); margin-inline-start: 16px; }

/* searchable long lists */
.m-filter__search {
  display: flex; align-items: center; gap: 8px; height: 40px; margin-bottom: 8px; padding-inline: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink-mute);
}
.m-filter__search .m-icon { width: 18px; height: 18px; flex-shrink: 0; }
.m-filter__search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.m-filter__search:focus-within { border-color: var(--brand-dark); box-shadow: 0 0 0 4px var(--brand-tint); background: var(--white); }
[data-filter-list].is-clipped:not(.is-searching) > li:nth-child(n+7) { display: none; }
[data-filter-list] > li[hidden] { display: none; }
.m-filter__more {
  margin-top: 6px; padding: 6px 8px; border: 0; background: none; color: var(--brand-dark);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.m-filter__more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* rating rows with stars */
.m-stars--sm { font-size: 14px; letter-spacing: 1px; vertical-align: -1px; }
.m-filter-opt__label .m-stars { margin-inline-end: 4px; }

/* price: [min] إلى [max] then the button */
.m-price-range { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.m-price-range__dash { padding-bottom: 0; align-self: center; font-size: 13px; color: var(--ink-mute); }

/* ==========================================================================
   62. Filters like a marketplace: square checkboxes everywhere, category tree
       with +/− toggles, rating slider
   ========================================================================== */
.m-filters .m-filter-opt__mark { border-radius: 5px; }
.m-filters .m-filter-opt[aria-current="true"] .m-filter-opt__mark { border-color: var(--ink); background: var(--ink); box-shadow: none; }
.m-filters .m-filter-opt[aria-current="true"] .m-filter-opt__mark::after {
  content: ""; width: 5px; height: 9px; border: solid var(--white); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg);
}
.m-filters .m-filter-opt { min-height: 38px; padding-block: 5px; }

.m-tree { position: relative; }
.m-tree > .m-filter-opt { padding-inline-start: 36px; }
.m-tree__toggle {
  position: absolute; inset-inline-start: 4px; top: 7px; width: 24px; height: 24px; border-radius: 6px;
  display: grid; place-items: center; border: 1px solid var(--line); background: var(--white); cursor: pointer; z-index: 1;
}
.m-tree__toggle span, .m-tree__toggle span::after {
  content: ""; display: block; width: 10px; height: 2px; border-radius: 2px; background: var(--ink);
}
.m-tree__toggle span::after { transform: rotate(90deg); transition: transform .15s var(--ease); }
.m-tree.is-open > .m-tree__toggle span::after { transform: rotate(0deg); }
.m-shop-js .m-tree:not(.is-open) > .m-filter__sub { display: none; }
.m-tree > .m-filter__sub { margin-inline-start: 18px; }

.m-rating-range { padding: 2px 4px 4px; }
.m-rating-range__value { margin: 0 0 10px; font-weight: 700; color: var(--ink); }
.m-rating-range input[type="range"] { width: 100%; accent-color: var(--ink); height: 24px; cursor: pointer; }
.m-rating-range__ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-mute); }

/* ==========================================================================
   63. Shop loading feedback: a thin progress line over the results
   ========================================================================== */
#ecp_shop_results { position: relative; }
#ecp_shop_body[aria-busy="true"] #ecp_shop_results::before {
  content: ""; position: absolute; inset-inline: 0; top: -8px; height: 3px; border-radius: 3px; z-index: 5;
  background: linear-gradient(90deg, transparent, var(--brand-dark), transparent); background-size: 40% 100%;
  background-repeat: no-repeat; animation: m-shop-progress 1s linear infinite;
}
@keyframes m-shop-progress { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@media (prefers-reduced-motion: reduce) { #ecp_shop_body[aria-busy="true"] #ecp_shop_results::before { animation: none; background: var(--brand-dark); } }

/* desktop filters: full height, no inner scrollbar, scroll with the page */
@media (min-width: 1024px) {
  .m-filters { position: static; max-height: none; overflow: visible; }
}

/* ==========================================================================
   64. Configurable sections (home / department landings): headings, tabs,
       category tiles, budget row
   ========================================================================== */
.m-section-head__text { display: grid; gap: 4px; min-width: 0; }
.m-section-sub { margin: 0; font-size: 14px; color: var(--ink-mute); }
.m-section--tight { padding-block: 8px; }
.m-sec + .m-sec { border-top: 1px solid transparent; }

.m-section-tabs .m-tabs--section {
  display: inline-flex; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; margin-bottom: 18px; scrollbar-width: none;
}
.m-section-tabs .m-tabs--section::-webkit-scrollbar { display: none; }
.m-section-tabs .m-tabs--section button { flex: 0 0 auto; padding-inline: 18px; white-space: nowrap; }
.m-tabpanel[hidden] { display: none; }

.m-cat-tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none;
}
@media (max-width: 639px) {
  .m-cat-tiles { grid-auto-flow: column; grid-auto-columns: 42%; grid-template-columns: none; overflow-x: auto;
    scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
  .m-cat-tiles::-webkit-scrollbar { display: none; }
  .m-cat-tiles > li { scroll-snap-align: start; }
}
.m-cat-tile {
  display: grid; gap: 4px; padding: 14px 14px 16px; border-radius: 20px; background: var(--sand); color: var(--ink);
  text-decoration: none; text-align: center; transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.m-cat-tile:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -28px rgba(27, 42, 56, .5); }
.m-cat-tile__art { position: relative; height: 120px; margin-bottom: 8px; }
.m-cat-tile__cover {
  position: absolute; bottom: 0; width: 52%; filter: drop-shadow(0 12px 14px rgba(27, 42, 56, .22));
}
.m-cat-tile__cover[data-i="1"] { inset-inline-start: 28%; z-index: 2; }
.m-cat-tile__cover[data-i="2"] { inset-inline-start: 6%; z-index: 1; transform: rotate(-8deg) translateY(6px) scale(.9); }
.m-cat-tile__cover:only-child { inset-inline-start: 24%; }
.m-cat-tile__name { font-weight: 700; font-size: 15px; }
.m-cat-tile__count { font-size: 12px; color: var(--ink-mute); }
.m-cat-tiles > li:nth-child(4n+2) .m-cat-tile { background: #E0F7FA; }
.m-cat-tiles > li:nth-child(4n+3) .m-cat-tile { background: #F6E3E1; }
.m-cat-tiles > li:nth-child(4n+4) .m-cat-tile { background: #E8EFE6; }

.m-budget--section { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .m-cat-tile { transition: none; } .m-cat-tile:hover { transform: none; } }

/* authors row: scrolls with the arrows on desktop (mouse), swipe on touch */
.m-people { scroll-behavior: smooth; }
@media (min-width: 900px) { .m-people { gap: 22px; } .m-person { width: 120px; } }

/* ==========================================================================
   65. Real product images: books keep the 2:3 cover shape, items are square
   on white; a soft placeholder shows while the image loads
   ========================================================================== */
.m-cover-img { background: linear-gradient(135deg, var(--sand), var(--sand-2, #ECE7DC)); color: transparent; }
.m-cover-img--item {
  aspect-ratio: 1 / 1; object-fit: contain; border-radius: 16px; padding: 6%; background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line);
}
.m-card:hover .m-cover-img--item { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line), 0 20px 30px -18px rgba(27,42,56,.35); }
.m-hero2__item .m-cover-img, .m-dept2__cover .m-cover-img, .m-cat-tile__cover .m-cover-img, .m-promo__item .m-cover-img { box-shadow: none; }

/* ==========================================================================
   66. Product page: sticky buy bar (appears once the main buy block is scrolled past)
   ========================================================================== */
.m-buybar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 880;
  background: rgba(255, 255, 255, .97); backdrop-filter: saturate(1.4) blur(8px);
  border-top: 1px solid var(--line); box-shadow: 0 -14px 30px -22px rgba(27, 42, 56, .5);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  animation: m-buybar-in .22s var(--ease);
}
.m-buybar[hidden] { display: none; }
@keyframes m-buybar-in { from { transform: translateY(100%); } to { transform: none; } }
.m-buybar__inner { display: flex; align-items: center; gap: 12px; min-height: 68px; padding-block: 8px; }
.m-buybar__thumb { width: 40px; height: 60px; object-fit: cover; border-radius: 4px 2px 2px 4px; flex-shrink: 0; }
.m-buybar__info { flex: 1; min-width: 0; }
.m-buybar__title { margin: 0; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-buybar__price { margin: 2px 0 0; }
.m-buybar__price .m-money { font-size: 16px; }
.m-buybar__act { flex-shrink: 0; }
.m-buy--bar .m-buy__add { min-height: 46px; padding-inline: 22px; font-size: 15px; }
.m-buy--bar .m-stepper { min-height: 46px; }
.m-buy--bar .m-buy__notify { min-height: 46px; }
@media (max-width: 639px) {
  .m-buybar__thumb { display: none; }
  .m-buybar__title { font-size: 14px; }
  .m-buy--bar .m-buy__add { padding-inline: 16px; }
}
.m-has-buybar .m-totop { bottom: 92px; }
.m-has-buybar .m-site-footer { padding-bottom: 76px; }
@media (prefers-reduced-motion: reduce) { .m-buybar { animation: none; } }

/* ==========================================================================
   67. Search suggestions with covers + recent searches; recently viewed row
   ========================================================================== */
.m-suggest__thumb--art { width: 34px; height: auto; aspect-ratio: auto; background: none; overflow: visible; }
.m-suggest__thumb--art .m-cover, .m-suggest__thumb--art .m-object, .m-suggest__thumb--art .m-cover-img {
  width: 34px; border-radius: 3px; box-shadow: 0 2px 6px -2px rgba(27, 42, 56, .35); transform: none;
}
.m-suggest__thumb--art .m-cover { font-size: 3px; }
.m-suggest__thumb--art .m-cover__text, .m-suggest__thumb--art .m-cover__mark { display: none; }
.m-suggest__thumb--art .m-cover-img--item, .m-suggest__thumb--art .m-object { aspect-ratio: 1 / 1; padding: 2px; }
.m-suggest__price { display: grid; justify-items: end; line-height: 1.3; }
.m-suggest__price s { font-size: 12px; font-weight: 500; color: var(--ink-mute); }
.m-suggest__out { color: #B42318; font-weight: 600; }
.m-suggest__title--row { display: flex; align-items: center; justify-content: space-between; }
.m-suggest__forget { border: 0; background: none; color: var(--brand-dark); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 2px 6px; }
.m-suggest__item--recent .m-icon { color: var(--ink-mute); flex-shrink: 0; }
.m-suggest__item--recent .m-suggest__text strong { font-weight: 500; }
.m-recent-clear { border: 0; background: none; font: inherit; font-size: 14px; cursor: pointer; }
.m-sec--recent[hidden] { display: none; }

/* ==========================================================================
   68. Product page: bought together (bundle with checkboxes and a total)
   ========================================================================== */
.m-together__body {
  display: grid; gap: 20px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--white);
}
@media (min-width: 900px) { .m-together__body { grid-template-columns: 1fr 260px; padding: 24px 28px; } }
.m-together__items { display: flex; align-items: flex-start; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.m-together__items::-webkit-scrollbar { display: none; }
.m-together__item { flex: 0 0 150px; display: grid; gap: 10px; }
.m-together__media { display: block; width: 110px; margin-inline: auto; }
.m-together__plus { align-self: center; margin-top: -40px; font-size: 24px; font-weight: 700; color: var(--ink-mute); flex-shrink: 0; }
.m-together__pick { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 14px; line-height: 1.5; }
.m-together__pick input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex-shrink: 0; }
.m-together__pick input:disabled { opacity: .6; }
.m-together__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.m-together__price { display: block; color: var(--ink-soft); font-weight: 700; margin-top: 2px; }
.m-together__sum { display: grid; gap: 12px; }
.m-together__sum p { margin: 0; color: var(--ink-mute); font-size: 14px; }
.m-together__total { display: block; margin-top: 4px; font-size: 24px; color: var(--ink); }
.m-together__sum .m-btn { width: 100%; justify-content: center; }

/* ==========================================================================
   69. Message preferences page (/prefs)
   ========================================================================== */
.m-prefs { max-width: 720px; padding-block: clamp(28px, 5vw, 56px) 80px; }
.m-prefs__list { display: grid; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.m-prefs__row {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "text btn" "state btn"; align-items: center; gap: 4px 16px;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--white);
}
.m-prefs__row > div { grid-area: text; }
.m-prefs__row > .m-btn { grid-area: btn; }
.m-prefs__title { margin: 0; font-weight: 700; font-size: 16px; }
.m-prefs__text { margin: 4px 0 0; font-size: 14px; color: var(--ink-mute); line-height: 1.7; }
.m-prefs__state { grid-area: state; font-size: 13px; font-weight: 700; color: var(--ink-mute); }
.m-prefs__state[data-on="Y"] { color: #1E7B4F; }

/* ==========================================================================
   70. Gift card page (/gift-card)
   ========================================================================== */
.m-gc { padding-block: clamp(28px, 5vw, 56px) 80px; }
.m-gc__head { max-width: 640px; margin-bottom: 28px; }
.m-gc__grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 960px) { .m-gc__grid { grid-template-columns: 1fr 1.1fr; gap: 48px; } .m-gc__preview { position: sticky; top: 110px; } }
.m-gc-card {
  position: relative; aspect-ratio: 1.6 / 1; border-radius: 22px; padding: 26px 28px; overflow: hidden; color: #fff;
  background: radial-gradient(120% 120% at 0% 0%, #01AECA 0%, #017E93 45%, #1B2A38 100%);
  box-shadow: 0 30px 60px -30px rgba(27, 42, 56, .6); display: grid; grid-template-rows: auto 1fr auto auto;
}
.m-gc-card__brand { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.m-gc-card__amount { align-self: center; font-size: 15px; }
.m-gc-card__amount b { font-size: clamp(40px, 6vw, 56px); font-weight: 700; line-height: 1; }
.m-gc-card__to { font-size: 15px; opacity: .92; }
.m-gc-card__msg { font-size: 13px; opacity: .85; min-height: 1.4em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.m-gc-card__mark {
  position: absolute; inset-inline-end: -10px; bottom: -40px; font-family: var(--font-display); font-size: 200px; line-height: 1;
  opacity: .12; pointer-events: none;
}
.m-gc__group { border: 0; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.m-gc__group legend { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.m-gc-amounts { display: flex; flex-wrap: wrap; gap: 8px; }
.m-gc-amount { position: relative; cursor: pointer; }
.m-gc-amount input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.m-gc-amount span {
  display: inline-flex; align-items: baseline; gap: 4px; min-height: 46px; padding: 10px 18px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--white); font-weight: 700; font-size: 17px;
}
.m-gc-amount small { font-size: 12px; font-weight: 600; color: var(--ink-mute); }
.m-gc-amount input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--paper); }
.m-gc-amount input:focus-visible + span { outline: 2px solid var(--brand-dark); outline-offset: 2px; }
.m-gc .m-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.m-gc .m-input {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit; font-size: 16px; background: var(--white);
}
.m-gc .m-input:focus { outline: none; border-color: var(--brand-dark); box-shadow: 0 0 0 4px var(--brand-tint); }
.m-gc textarea.m-input { min-height: 90px; resize: vertical; }
.m-gc .m-field-error { margin: -4px 0 0; color: #B42318; font-size: 13px; font-weight: 600; min-height: 0; }
.m-gc .m-field-error:empty { display: none; }
.m-gc__note { font-size: 13px; margin-top: 10px; }
.m-gc-balance { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); max-width: 560px; }
.m-gc-balance__row { display: flex; gap: 8px; margin-top: 12px; }
.m-gc-balance__out { margin-top: 10px; font-weight: 600; }
.m-gc-balance__out[data-ok="N"] { color: #B42318; }

/* ==========================================================================
   71. Pre-order badge
   ========================================================================== */
.m-badge--pre { background: #FFF4D6; color: #7A5200; border: 1px solid #F0D58C; }

/* ==========================================================================
   72. Reviews: photos, "مفيدة", verified badge
   ========================================================================== */
.m-review__photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.m-review__photo { display: block; width: 88px; height: 88px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.m-review__photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s var(--ease); }
.m-review__photo:hover img { transform: scale(1.05); }
.m-review__foot { margin-top: 10px; }
.m-review__helpful {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink-soft); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.m-review__helpful:hover { border-color: var(--ink); color: var(--ink); }
.m-review__helpful[aria-pressed="true"] { border-color: var(--brand-dark); background: var(--brand-tint); color: var(--brand-deep); cursor: default; }
.m-review-photos { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.m-review-photos__add {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1px dashed var(--brand-dark); color: var(--brand-deep); font-weight: 600; font-size: 14px; cursor: pointer;
}
.m-review-photos__add[hidden] { display: none; }
.m-review-photos__add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.m-review-photos__list { display: flex; gap: 8px; }
.m-review-photos__item { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.m-review-photos__item img { width: 100%; height: 100%; object-fit: cover; }
.m-review-photos__item button {
  position: absolute; top: 2px; inset-inline-end: 2px; width: 22px; height: 22px; border-radius: 999px; border: 0;
  background: rgba(27, 42, 56, .75); color: #fff; font-size: 14px; line-height: 1; cursor: pointer;
}

/* ==========================================================================
   73. Fixes: department breadcrumb spacing, checkout field spacing,
       back-to-top on the left in RTL (the side the reader's thumb does not cover)
   ========================================================================== */
#ecp_dept_crumb .m-breadcrumb { padding-top: clamp(20px, 3vw, 32px); padding-bottom: 4px; }
html.page-5 .m-main .t-Form-fieldContainer { margin: 0 0 16px; }
html.page-5 .m-main .row { row-gap: 16px; }
html.page-5 .m-main .container .row > .col { padding-inline: 8px; }
html.page-5 .m-main .t-Form-labelContainer { padding-bottom: 6px; }
html.page-5 .m-main fieldset, html.page-5 .m-main .m-panel { margin-bottom: 20px; }
.m-totop { inset-inline-start: auto; inset-inline-end: 24px; }
@media (max-width: 639px) { .m-totop { inset-inline-start: auto; inset-inline-end: 16px; } }

/* ==========================================================================
   74. Category tiles: smaller covers; mobile: no accidental zoom
   ========================================================================== */
.m-cat-tile__art { height: 92px; margin-bottom: 6px; }
.m-cat-tile__cover { width: 40%; }
.m-cat-tile__cover[data-i="1"] { inset-inline-start: 32%; }
.m-cat-tile__cover[data-i="2"] { inset-inline-start: 12%; }
.m-cat-tile__cover:only-child { inset-inline-start: 30%; }
.m-cat-tile__cover img, .m-cat-tile__cover .m-cover, .m-cat-tile__cover .m-object { width: 100%; height: auto; }
.m-cat-tile { padding: 12px 12px 14px; }
@media (min-width: 900px) { .m-cat-tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
@media (max-width: 639px) {
  .m-cat-tiles { grid-auto-columns: 36%; }
  .m-cat-tile__art { height: 78px; }
  .m-cat-tile__name { font-size: 14px; }
}

/* mobile zoom: iPhone zooms the page into any field under 16px, and a double tap zooms in;
   both are removed here. Pinch-zoom stays available for readers who need it. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
@media (max-width: 1023px) {
  .meem input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  .meem select, .meem textarea, .t-Dialog-page input, .t-Dialog-page select, .t-Dialog-page textarea { font-size: 16px; }
}

/* ==========================================================================
   75. Search: suggestions on mobile + clear thumbnails
   ========================================================================== */
/* the header folds the mobile search with max-height + overflow:hidden; while it is open the
   suggestion list must be able to hang below it */
@media (max-width: 1023px) {
  .m-site-header:not(.is-compact) .m-search--mobile { overflow: visible; max-height: none; }
  .m-search--mobile .m-suggest { inset-inline: 0; width: auto; max-height: min(70vh, 520px); overflow-y: auto; z-index: 80; }
}
/* thumbnails: a fixed 40 x 60 frame, the cover (photo or drawn) fills it */
.m-suggest__thumb, .m-suggest__thumb--art {
  width: 40px; height: 60px; flex-shrink: 0; border-radius: 4px; overflow: hidden; display: block;
  background: var(--sand); box-shadow: 0 2px 6px -2px rgba(27, 42, 56, .35);
}
.m-suggest__thumb--art > * {
  width: 100% !important; height: 100% !important; max-width: none; margin: 0;
  border-radius: 0; box-shadow: none !important; transform: none !important;
}
.m-suggest__thumb--art .m-cover-img, img.m-suggest__thumb { object-fit: cover; padding: 0; }
.m-suggest__thumb--art .m-cover-img--item { object-fit: contain; padding: 3px; background: var(--white); }
.m-suggest__thumb--art .m-cover { font-size: 3px; aspect-ratio: auto; }
.m-suggest__thumb--art .m-object { aspect-ratio: auto; padding: 4px; }

/* ==========================================================================
   76. Account: message preferences link; confirmation: gift card + pre-order note
   ========================================================================== */
.m-prefs-link {
  display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: 16px; background: var(--white); color: var(--ink); text-decoration: none;
}
.m-prefs-link:hover { border-color: var(--brand-dark); }
.m-prefs-link .m-icon { width: 22px; height: 22px; color: var(--brand-dark); flex-shrink: 0; }
.m-prefs-link span:nth-child(2) { display: grid; gap: 2px; flex: 1; }
.m-prefs-link small { font-size: 13px; color: var(--ink-mute); }
.m-gift-sent strong { font-size: 20px; }
.m-order-line--note { display: block; padding: 10px 12px; border-radius: 12px; background: #FFF4D6; color: #7A5200; font-weight: 600; font-size: 14px; }

/* ==========================================================================
   77. Help centre, reading lists, gift finder, read a sample, ask on WhatsApp
   ========================================================================== */
.m-help { max-width: 860px; padding-block: clamp(28px, 5vw, 56px) 80px; }
.m-help__head { margin-bottom: 24px; }
.m-help__search {
  display: flex; align-items: center; gap: 10px; margin: 16px 0; min-height: 52px; padding-inline: 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--white);
}
.m-help__search .m-icon { color: var(--ink-mute); }
.m-help__search input { flex: 1; border: 0; background: none; font: inherit; font-size: 16px; outline: none; }
.m-help__search:focus-within { border-color: var(--brand-dark); box-shadow: 0 0 0 4px var(--brand-tint); }
.m-help__topics { display: flex; flex-wrap: wrap; gap: 8px; }
.m-help__topics .m-chip { text-decoration: none; }
.m-help__topic { padding-top: 22px; scroll-margin-top: 110px; }
.m-help__list { display: grid; gap: 8px; }
.m-faq { border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.m-faq[hidden] { display: none; }
.m-faq summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; }
.m-faq summary::-webkit-details-marker { display: none; }
.m-faq summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--ink-mute); }
.m-faq[open] summary::after { content: "−"; }
.m-faq__a { padding: 0 18px 16px; color: var(--ink-soft); line-height: 1.9; }
.m-faq__a p { margin: 0 0 8px; }
.m-help__empty { margin-top: 16px; color: var(--ink-mute); }
.m-help__ask {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 36px; padding: 22px 24px;
  border-radius: 20px; background: var(--brand-tint);
}
.m-help__ask h2 { margin: 0 0 4px; font-size: 18px; }
.m-help__ask p { margin: 0; color: var(--ink-soft); }

.m-ask-wa {
  display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 14px;
  background: #EAF7EE; color: #1E5B3A; font-size: 14px; text-decoration: none;
}
.m-ask-wa .m-icon { width: 22px; height: 22px; color: #1E7B4F; flex-shrink: 0; }
.m-ask-wa:hover { background: #DDF2E4; }
.m-sample-open { margin-top: 12px; }
.m-sample { width: min(760px, 96vw); max-height: 92vh; padding: 0; border: 0; border-radius: 20px; overflow: hidden; }
.m-sample::backdrop { background: rgba(27, 42, 56, .6); }
.m-sample__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.m-sample__pages { max-height: calc(92vh - 60px); overflow-y: auto; padding: 16px; display: grid; gap: 14px; background: var(--paper); }
.m-sample__pages img { width: 100%; height: auto; display: block; border-radius: 6px; box-shadow: 0 6px 18px -10px rgba(27,42,56,.4); user-select: none; -webkit-user-drag: none; }

.m-list-head { margin: 8px auto 8px; padding: 26px 24px; border-radius: 24px; background: var(--list-bg, var(--sand)); }
.m-list-head__kicker { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--brand-deep); }
.m-list-head__intro { margin: 8px 0 0; color: var(--ink-soft); max-width: 640px; line-height: 1.9; }
.m-list-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 0; padding: 0; list-style: none; }
.m-list-card {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; background: var(--list-bg, var(--sand));
  color: var(--ink); text-decoration: none; min-height: 140px; transition: transform .2s var(--ease);
}
.m-list-card:hover { transform: translateY(-3px); }
.m-list-card__art { position: relative; width: 96px; height: 110px; flex-shrink: 0; }
.m-list-card__cover { position: absolute; bottom: 0; width: 58%; filter: drop-shadow(0 8px 12px rgba(27,42,56,.25)); }
.m-list-card__cover img, .m-list-card__cover .m-cover, .m-list-card__cover .m-object { width: 100%; height: auto; }
.m-list-card__cover[data-i="1"] { inset-inline-start: 22%; z-index: 3; }
.m-list-card__cover[data-i="2"] { inset-inline-start: 0; z-index: 2; transform: rotate(-8deg) translateY(4px) scale(.9); }
.m-list-card__cover[data-i="3"] { inset-inline-start: 44%; z-index: 1; transform: rotate(8deg) translateY(6px) scale(.86); }
.m-list-card__text { display: grid; gap: 4px; }
.m-list-card__text small { font-size: 12px; font-weight: 700; color: var(--brand-deep); }
.m-list-card__text strong { font-size: 17px; }
.m-list-card__text span { font-size: 13px; color: var(--ink-soft); line-height: 1.7; }

.m-finder { max-width: 960px; padding-block: clamp(28px, 5vw, 56px) 80px; }
.m-finder__head { margin-bottom: 20px; }
.m-finder__q { border: 0; padding: 0; margin: 0 0 22px; }
.m-finder__q legend { font-weight: 700; font-size: 17px; margin-bottom: 10px; }
.m-finder__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.m-finder__opts label { position: relative; cursor: pointer; }
.m-finder__opts input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.m-finder__opts span {
  display: inline-flex; align-items: center; min-height: 46px; padding: 10px 16px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--white); font-weight: 600;
}
.m-finder__opts input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--paper); }
.m-finder__opts input:focus-visible + span { outline: 2px solid var(--brand-dark); outline-offset: 2px; }
.m-finder__out { margin-top: 32px; }
.m-finder__alt { margin-top: 18px; color: var(--ink-soft); }

/* ==========================================================================
   78. Loyalty: points box (cart / checkout), rewards on the account page, my gift cards
   ========================================================================== */
.m-points {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 14px;
  padding: 12px 14px; border-radius: 14px; background: #FFF4D6; color: #5C3D00; font-size: 14px;
}
.m-points[hidden] { display: none; }
.m-points .m-link { border: 0; background: none; font: inherit; font-weight: 700; color: #5C3D00; text-decoration: underline; cursor: pointer; }
.m-rewards { margin-bottom: 28px; }
.m-rewards__grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.m-rewards__card { display: grid; gap: 6px; padding: 20px; border-radius: 20px; background: var(--white); border: 1px solid var(--line); }
.m-rewards__card small { font-size: 13px; font-weight: 700; color: var(--ink-mute); }
.m-rewards__card b { font-size: 32px; line-height: 1.1; }
.m-rewards__card span { color: var(--ink-soft); font-size: 14px; }
.m-rewards__card .m-muted { font-size: 13px; margin: 4px 0 0; }
.m-rewards__card--points { background: linear-gradient(135deg, #FFF4D6, #FFE7A8); border-color: transparent; }
.m-rewards__card--invite { background: var(--brand-tint); border-color: transparent; }
.m-rewards__card--invite b { letter-spacing: 2px; }
.m-rewards__share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.m-rewards__h { margin: 24px 0 10px; font-size: 16px; }
.m-rewards__log, .m-mycards { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.m-rewards__log li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); }
.m-rewards__log li span { display: grid; }
.m-rewards__log small { font-size: 12px; color: var(--ink-mute); }
.m-rewards__log .is-plus { color: #1E7B4F; }
.m-rewards__log .is-minus { color: #B42318; }
.m-mycard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); }
.m-mycard__chip {
  width: 52px; height: 34px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; color: #fff;
  background: radial-gradient(120% 120% at 0% 0%, #01AECA, #017E93 50%, #1B2A38); font-family: var(--font-display); font-weight: 700;
}
.m-mycard span:nth-child(2) { display: grid; flex: 1; }
.m-mycard small { font-size: 12px; color: var(--ink-mute); }
.m-mycard__bal { font-weight: 700; color: var(--brand-deep); font-size: 14px; }

/* ==========================================================================
   79. Order tracking + PWA install banner
   ========================================================================== */
.m-track { margin-top: 16px; }
.m-track__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.m-track__events { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; border-inline-start: 2px solid var(--line); padding-inline-start: 14px; }
.m-track__events li { display: grid; gap: 2px; position: relative; }
.m-track__events li::before { content: ""; position: absolute; inset-inline-start: -20px; top: 6px; width: 10px; height: 10px; border-radius: 999px; background: var(--line); }
.m-track__events li:first-child::before { background: var(--brand-dark); }
.m-track__events time { font-size: 12px; color: var(--ink-mute); }
.m-pwa {
  position: fixed; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 950;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--white);
  box-shadow: 0 20px 50px -20px rgba(27, 42, 56, .55); border: 1px solid var(--line); animation: m-buybar-in .25s var(--ease);
}
.m-pwa img { border-radius: 10px; flex-shrink: 0; }
.m-pwa__text { flex: 1; display: grid; gap: 2px; font-size: 13px; color: var(--ink-soft); }
.m-pwa__text strong { font-size: 15px; color: var(--ink); }
.m-has-buybar .m-pwa, .m-shop-sheet .m-pwa { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
