/* ===========================================================================
   Mercado — reset and element defaults.
   RTL-first: all directional values are logical properties.
   =========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

/* The page colour is set on the root as well as on body: the old Elementor
   stylesheet of the front page makes body transparent, and the wp-admin theme
   preview's grey then showed around every white product photograph. */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--paper);
}

:target { scroll-margin-block-start: calc(var(--header-h) + var(--s5)); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

/* Arabic script is cursive: negative tracking pulls the joins apart instead
   of tightening the setting, which is what it does to Latin. Headings are
   left at the font's own metrics; only the numeral-only classes below are
   tightened. */
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: var(--lh-head);
  letter-spacing: normal;
}

h1 { font-size: var(--t-h1); line-height: var(--lh-display); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); font-weight: 500; letter-spacing: 0; }

p { margin: 0 0 var(--s4); }
p:last-child { margin-block-end: 0; }

a { color: inherit; text-decoration: none; }

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

::selection { background: var(--brand); color: var(--on-brand); }

/* ---- shared text objects ------------------------------------------------ */

/* The small tracked label that opens most sections. */
.label {
  margin: 0;
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: var(--track-label);
  color: var(--ink-3);
  text-transform: uppercase;
}

.label--brand { color: var(--brand-ink); }

/* Display type. Used sparingly: a homepage has room for a few of these. */
.display {
  font-size: var(--t-display);
  font-weight: 600;
  line-height: var(--lh-display);
  letter-spacing: normal;
  margin: 0;
  text-wrap: balance;
}

.lede {
  font-size: var(--t-lede);
  color: var(--ink-2);
  max-inline-size: var(--max-text);
  margin: 0;
}

/* Numerals stay Latin-shaped and tabular so prices and specs align. */
.num, .price, .spec__value {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

/* .screen-reader-text is the WordPress/WooCommerce spelling of the same thing;
   it used to come from WooCommerce's stylesheet, which the theme no longer
   loads. */
.sr,
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  inset-block-start: var(--s3);
  inset-inline-start: var(--s3);
  z-index: 300;
  padding: var(--s3) var(--s5);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--t-sm);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform var(--d) var(--ease-out);
}

.skip:focus { transform: none; }

* { scrollbar-color: var(--line-2) transparent; scrollbar-width: thin; }

/* Inline icons inherit currentColor and must never be stretched by a flex
   parent, so they carry an explicit basis. */
.icon { inline-size: 19px; block-size: 19px; flex: 0 0 auto; }

/* ---- one family everywhere ----------------------------------------------
   Pages still built with Elementor or Slider Revolution, and plugin widgets,
   set a family on each element (Montserrat, Tajawal, Poppins…), so plain
   inheritance never reaches them. Cairo wins over those; icon fonts (Font
   Awesome, Elementor icons, dashicons) keep their own. */
body :is(h1, h2, h3, h4, h5, h6, p, a, span, div, li, dt, dd, label, button, input, select, textarea, td, th, strong, b, em, small, blockquote, figcaption, rs-layer):not(i, .fa, .fas, .far, .fab, [class*="fa-"], [class*="eicon"], .dashicons, [class*="dashicons-"], .ab-icon) {
  font-family: var(--font) !important;
}
