/* UNOX Components
   Engine and stylesheet from TECH ZONE. White page, black type and black
   buttons, red (#C2001A, the logo's) for money, for "new" and the logo,
   nothing else. Arabic only; every directional value is a logical property. */

:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --ink: #111111;
  --ink-2: #2b2b2b;
  --muted: #5c5c5c;          /* 6.7:1 on white */
  --rule: #e6e6e6;
  --rule-strong: #8f8f8f;    /* 3.2:1, a control's edge */
  --wash: #f6f6f6;

  /* Actions are black. Kept as one token so the old rules that coloured
     buttons, links and focus rings all follow. */
  --accent: #111111;
  --accent-press: #000000;
  --accent-tint: #f4f4f4;
  --accent-edge: #d4d4d4;

  /* Red: the price, "new", the cart count, the logo. #C2001A is the red of
     the logo the client uses (LOGO.jpeg, 27 Nov 2026), and text in it
     passes on white by itself (6.3:1), so the site has one red. */
  --red: #c2001a;
  --red-logo: #c2001a;

  --ok: #15803d;
  --warn: #b45309;
  --gone: #5c5c5c;

  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --lift: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .07);

  --sans: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --arabic: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1280px;
  --gutter: 16px;
}

:root[dir="rtl"] { --sans: "Cairo", "Segoe UI", Tahoma, sans-serif; }

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  font-synthesis-weight: none;
}

/* On a short page the footer used to stop halfway and leave a band of page
   background under it. main takes the slack instead. */
main { flex: 1 0 auto; }
.foot { flex: none; }

:lang(ar) { font-family: var(--arabic); }

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}
:root[dir="rtl"] h1, :root[dir="rtl"] h2,
:root[dir="rtl"] h3, :root[dir="rtl"] h4 { letter-spacing: 0; }

h1 { font-size: 34px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }

p { margin: 0 0 1em; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* height:auto keeps a width/height attribute from fixing the rendered height
   and stretching a photo whose real ratio differs. The media boxes below
   reserve their space with aspect-ratio, so nothing shifts as images load. */
img { max-width: 100%; height: auto; display: block; }

/* Numbers and codes always read unambiguously. Words never get the code
   font: the currency and the stock label are words. */
.code, .num, input[inputmode="numeric"], .mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}

/* Prices are read, not matched against a part in your hand, so they get the
   body face. Tabular figures keep a column of them lined up. */
.price {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  direction: ltr;
  unicode-bidi: isolate;
  letter-spacing: -0.01em;
}
:root[dir="rtl"] .price { font-family: var(--arabic); }
.cur {
  font-family: var(--sans);
  font-weight: 500;
  font-size: .8em;
  color: var(--muted);
  margin-inline-start: 5px;
}
:root[dir="rtl"] .cur { font-family: var(--arabic); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 1px;
}

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { inset-inline-start: 0; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Catalogue text can be either language. `plaintext` resolves each paragraph's
   direction from its own first strong character, so an English product name in
   an Arabic page keeps its full stop at the end instead of throwing it to the
   far side. It leaves `direction` alone, so text-align still follows the page
   and the column stays visually flush. Use it on anything the shop typed. */
.bidi { unicode-bidi: plaintext; }
/* plaintext resolves text-align against the paragraph's own direction,
   which would leave an English title flush left inside an otherwise
   right-aligned Arabic column. Pin the alignment back to the page so
   the column stays on one edge. */
:root[dir="rtl"] .bidi { text-align: right; }
:root[dir="ltr"] .bidi { text-align: left; }

/* ---------------------------------------------------------------- header */

.topbar {
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color .2s ease;
}
/* Scrolled state: you should just about see the page moving behind it. */
.topbar.is-stuck {
  background: rgba(22, 20, 28, .78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08), 0 10px 30px rgba(22, 20, 28, .18);
}
/* Without backdrop-filter, translucency would wreck the contrast. Stay solid. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar.is-stuck { background: rgba(22, 20, 28, .97); }
}

.topbar__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 12px;
}

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand:hover { text-decoration: none; }
.brand img { height: 46px; width: auto; border-radius: 2px; }
.brand__name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}
.brand__name span { color: #b38cf7; }

/* search is the widest thing on the page, because it is the product */
.search { position: relative; flex: 1 1 auto; min-width: 0; }
/* One control, one edge. It used to read as a box inside a box: the field
   drew a border and the button sat against it leaving a seam. */
.search__field {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
}
.search__field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.search__field svg { flex: none; margin-inline: 12px 0; color: var(--muted); }
.search__field input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: none;
  padding: 12px 14px;
  min-height: 0;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}
.search__field input[type="search"]::placeholder { color: var(--muted); }
.search__field input[type="search"]:focus,
.search__field input[type="search"]:focus-visible {
  outline: none;
  border: 0;
  box-shadow: none;
}
.search__go {
  flex: none;
  border: 0;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  cursor: pointer;
  align-self: stretch;
}
.search__go:hover { background: var(--accent-press); }

.suggest {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  box-shadow: var(--lift);
  z-index: 40;
  overflow: hidden;
}
.suggest[hidden] { display: none; }
.suggest a {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  border-block-end: 1px solid var(--rule);
  color: var(--ink);
}
.suggest__ph {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px dashed var(--rule-strong);
}
.suggest a:last-child { border-block-end: 0; }
.suggest a:hover, .suggest a.is-active {
  background: var(--accent-tint);
  text-decoration: none;
}
.suggest img { width: 40px; height: 40px; object-fit: contain; }
.suggest__name { font-size: 14px; min-width: 0; }
.suggest__sku { font-size: 11px; color: var(--muted); }
.suggest__price { font-size: 14px; font-weight: 500; }
.suggest__empty { padding: 14px 12px; color: var(--muted); font-size: 14px; }

.topbar__actions { display: flex; align-items: center; gap: 8px; flex: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--radius);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.chip:hover { background: rgba(255, 255, 255, .1); text-decoration: none; }
.chip--cart { border-color: rgba(255, 255, 255, .4); }
.chip__count {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--accent);
  padding: 1px 6px;
  border-radius: 2px;
}

/* On a phone the three header pieces cannot share one row, so the search
   drops to a line of its own rather than pushing the page sideways. */
@media (max-width: 767px) {
  .topbar__row { flex-wrap: wrap; row-gap: 10px; padding-block: 10px; }
  .search { order: 3; flex: 1 0 100%; }
  .topbar__actions { margin-inline-start: auto; }
  .brand img { height: 38px; width: auto; }
  .brand__name { font-size: 15px; }
  .chip { padding: 8px 10px; font-size: 12px; }
  .search__go { padding: 11px 14px; }
  /* the phone nav sizes are at the end of the file: here they lost to the
     general .nav rules further down, so About never fitted */

  /* The header no longer rearranges itself on scroll. It used to collapse
     three rows into one, and swapping the layout mid-scroll read as a jump.
     It just scrolls away now, and .minibar slides down in its place. */
  .topbar { position: static; }
}

/* Phone only. One element, one transform, so the entrance is a slide rather
   than a relayout. */
.minibar { display: none; }
@media (max-width: 767px) {
  .minibar {
    display: flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 60;
    padding: 9px var(--gutter);
    background: rgba(22, 20, 28, .82);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 6px 24px rgba(22, 20, 28, .26);
    transform: translateY(-104%);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
  }
  .minibar.is-on { transform: translateY(0); }
  /* the filter sheet covers the page; the bar would sit over the results */
  body.has-sheet .minibar.is-on { transform: translateY(-104%); }
  .minibar .search { flex: 1 1 auto; min-width: 0; }
  .minibar .chip--cart { flex: none; padding: 10px 11px; }
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .minibar { background: rgba(22, 20, 28, .97); }
  }
  @media (prefers-reduced-motion: reduce) {
    .minibar { transition: none; }
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, .78);
  white-space: nowrap;
  border-block-end: 2px solid transparent;
}
.nav a:hover { color: #fff; text-decoration: none; }
.nav a.is-on { color: #fff; border-block-end-color: var(--accent); }

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
}
.btn:hover { border-color: var(--ink); text-decoration: none; }
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-press); border-color: var(--accent-press); }
.btn--wide { width: 100%; }
.btn--sm { min-height: 36px; font-size: 13px; padding: 0 14px; }
/* The multiplication sign sits above the centre of its own line box in most
   faces, so the button looked off no matter how the box was aligned. The
   cross is drawn instead, which puts it dead centre whatever the font does. */
.btn--icon {
  position: relative;
  width: 40px;
  min-width: 40px;
  padding: 0;
  font-size: 0;
  color: var(--muted);
}
.btn--icon::before,
.btn--icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
}
.btn--icon::before { transform: translate(-50%, -50%) rotate(45deg); }
.btn--icon::after { transform: translate(-50%, -50%) rotate(-45deg); }
.btn--icon:hover { color: #b3261e; border-color: #b3261e; }
.btn.is-added { border-color: var(--ok); color: var(--ok); }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}
/* Was WhatsApp green. He asked why a foreign brand colour was on his site,
   which was a fair question, so these use the shop's accent now. */
.btn--wa { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--wa:hover { background: var(--accent-press); border-color: var(--accent-press); }

/* ------------------------------------------------------------- sections */

.section { padding-block: 40px; }
.section__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-block-end: 20px;
}
/* a plain title. The rule that used to run out from it went on 2026-10-07:
   Medo read it as decoration. "View all" keeps its place at the far end. */
.section__head .more { flex: none; font-size: 14px; color: var(--accent); margin-inline-start: auto; }

/* --------------------------------------------------------- product grid */

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--rule);
  border-inline-end: 0;
  border-block-end: 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, 1fr); } }

/* A row of two related parts should not leave the lattice hanging open, so a
   short grid narrows to the number of items it actually has. */
.grid--n1 { grid-template-columns: 1fr; max-width: 330px; }
@media (min-width: 640px) {
  .grid--n2 { grid-template-columns: repeat(2, 1fr); max-width: 660px; }
}
@media (min-width: 1040px) {
  .grid--n2 { max-width: 660px; }
  .grid--n3 { grid-template-columns: repeat(3, 1fr); max-width: 990px; }
}

.cell {
  border-inline-end: 1px solid var(--rule);
  border-block-end: 1px solid var(--rule);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  background: var(--surface);
}
.cell:hover { background: var(--accent-tint); }
/* aspect-ratio alone is only a preference: a tall photo (a sensor with long
   legs, trimmed tight) grew the box to its own height and stretched the whole
   card. overflow and the zero-minimum track hold it square, as on .pcard. */
.cell__media {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  background: var(--surface);
  padding: 6px;
}
.cell__media img {
  /* fill the box whatever the file's own size: a photo dropped into the
     admin can be a 180 px thumbnail, and at its natural size it sat small
     in the middle of a frame the built photos fill */
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}
.cell__media--empty {
  border: 1px dashed var(--rule-strong);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}
.cell__sku { font-size: 11px; color: var(--muted); }
.cell__name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cell__name a::after { content: ""; position: absolute; inset: 0; }
.cell__foot { margin-block-start: auto; display: grid; gap: 8px; }
.cell__prices { display: flex; align-items: baseline; gap: 12px; }
.cell__prices .price { font-size: 16px; font-weight: 700; }
/* The old price used to sit at almost the same size as the live one, so a
   pair like "250 230" read as one number. It is now clearly the quieter of
   the two. */
.price--old {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  letter-spacing: 0;
  opacity: .75;
}
.price--old .cur { display: none; }
.cell .btn { position: relative; z-index: 1; }

/* the one place a pill is right, because it reads as a status */
.stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.stock--in { color: var(--ok); }
.stock--low { color: var(--warn); }
/* Out of stock is a stop, not a shrug. Grey read as ordinary small print
   next to the price and people missed it. */
.stock--out { color: #b3261e; font-weight: 600; }

/* --------------------------------------------------------------- shop */

.shop { display: grid; gap: 24px; padding-block: 24px; }
@media (min-width: 900px) { .shop { grid-template-columns: 240px 1fr; } }

.rail { align-self: start; }
@media (min-width: 900px) { .rail { position: sticky; top: 16px; } }

/* On a phone the filter rail was a slab you had to scroll past, and putting
   it under the grid meant you could only filter after browsing. It is a sheet
   now, opened from a button that sits above the products. */
.toolbar__filters { display: none; }
.rail__head { display: none; }
.rail__scrim { display: none; }

@media (max-width: 899px) {
  .shop__main { order: 1; }
  .toolbar__filters { display: inline-flex; gap: 7px; }

  .rail {
    order: 2;
    position: fixed;
    inset-inline: 0;
    /* The lower half of the screen, so the results above it change while
       you pick. Measured from the top in dvh: the screen minus the
       browser's own bars. Plain vh (and bottom: 0) counts the space under
       a bottom address bar, as in Brave, where the last buttons sat behind
       it and could not be scrolled to (29 Nov). */
    inset-block: 45vh auto;
    inset-block: 45dvh auto;
    height: 55vh;
    height: 55dvh;
    z-index: 80;
    background: var(--surface);
    border-start-start-radius: 16px;
    border-start-end-radius: 16px;
    box-shadow: 0 -8px 28px rgba(22, 20, 28, .18);
    padding: 0 var(--gutter) calc(20px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(100%);
    visibility: hidden;
    transition: transform .3s cubic-bezier(.4, 0, .2, 1), visibility .3s;
  }
  .rail.is-open { transform: translateY(0); visibility: visible; }

  .rail__head {
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 1;
    padding-block: 16px 12px;
    background: var(--surface);
    border-block-end: 1px solid var(--rule);
  }
  .rail__head h2 { font-size: 18px; flex: 1; }
  /* the grip: pull the sheet down to close it (app.js) */
  .rail__head { touch-action: none; }
  .rail__head::before {
    content: "";
    position: absolute;
    top: 6px;
    inset-inline-start: 50%;
    width: 40px;
    height: 4px;
    margin-inline-start: -20px;
    border-radius: 2px;
    background: var(--rule-strong);
  }
  /* categories first: it is what most people open the sheet for */
  #shop-filters { display: flex; flex-direction: column; }
  .rail__group--cats { order: -1; padding-block-start: 4px; }
  .rail__done { order: 9; }

  /* one scroll on a phone: the sheet's. The list's own 320px box (set
     further down for the side rail) made a scroll inside a scroll. */
  .rail .rail__cats { max-height: none; overflow: visible; }
  .rail .rail__cats a { min-height: 44px; align-items: center; }
  /* the button that shows the results stays in view at the bottom */
  .rail__done {
    position: sticky;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 1;
    margin-block-start: 18px;
    /* a band of the sheet's own colour around it, down to the bottom
       edge, so the list scrolling under it doesn't show through */
    box-shadow: 0 0 0 12px var(--surface), 0 28px 0 12px var(--surface);
  }

  .rail__scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 79;
    /* light, so the results behind it can be read as they change */
    background: rgba(22, 20, 28, .22);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
  }
  .rail__scrim.is-open { opacity: 1; visibility: visible; }

  @media (prefers-reduced-motion: reduce) {
    .rail, .rail__scrim { transition: none; }
  }
}
@media (min-width: 900px) {
  .rail__done { display: none; }
}
.rail__group { border-block-end: 1px solid var(--rule); padding-block: 14px; }
.rail__group:first-child { padding-block-start: 0; }
.rail h3 { font-size: 14px; margin-block-end: 10px; }
.rail label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding-block: 4px;
  cursor: pointer;
}
.rail__cats { max-height: 320px; overflow-y: auto; display: grid; gap: 2px; }
.rail__cats a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 2px;
  color: var(--muted);
}
.rail__cname { flex: 1; min-width: 0; }
.rail__n { flex: none; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
.rail__cats a.is-on .rail__n { color: inherit; }
.rail__cats a.is-none { opacity: .55; }
.rail__cats a:hover { background: var(--accent-tint); color: var(--ink); text-decoration: none; }
.rail__cats a.is-on { background: var(--accent-tint); color: var(--accent); font-weight: 500; }
.rail__cats .sub { padding-inline-start: 20px; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-block-end: 14px;
  border-block-end: 1px solid var(--rule);
  margin-block-end: 0;
}
.toolbar__count { font-size: 14px; color: var(--muted); }
.toolbar__count b { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.toolbar .spacer { flex: 1; }

.field {
  display: grid;
  gap: 6px;
  align-content: start;
}
.field > label { font-size: 13px; font-weight: 500; }
.field .hint { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12px; color: #b3261e; }
input[type="text"], input[type="tel"], input[type="email"],
input[type="number"], input[type="search"], input[type="password"],
select, textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  padding: 10px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  min-height: 44px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-inline-end: 38px; cursor: pointer; }

/* The browser's number spinners are two tiny grey arrows nobody can hit.
   The cart and the quantity boxes draw their own controls instead. */
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.select {
  position: relative;
  display: inline-block;
}
.select::after {
  content: "";
  position: absolute;
  inset-inline-end: 14px;
  top: 50%;
  width: 9px;
  height: 9px;
  /* physical, not logical. A chevron pointing down means the same thing in
     both directions, but border-inline-end flips to the left in Arabic and
     swings the arrow round to point sideways. */
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
  transition: transform .15s ease;
}
.select:hover::after { transform: translateY(-45%) rotate(45deg); }
.has-error input, .has-error select, .has-error textarea,
.has-error .sel__btn { border-color: #b3261e; }
/* a tick box has no border to colour, so the label says it */
.has-error .consent { color: #b3261e; }
.has-error .consent input { outline: 2px solid #b3261e; outline-offset: 2px; }

.pager { display: flex; gap: 6px; justify-content: center; padding-block: 28px; }
.pager a, .pager span {
  min-width: 40px;
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 13px;
  background: var(--surface);
}
.pager .is-on { background: var(--accent); border-color: var(--accent); color: #fff; }

.empty {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 48px 24px;
  text-align: center;
  border-radius: var(--radius-lg);
}
.empty h2 { margin-block-end: 8px; }
.empty p { color: var(--muted); max-width: 46ch; margin-inline: auto; }

/* ------------------------------------------------------------- product */

.product { display: grid; gap: 28px; padding-block: 28px; }
@media (min-width: 900px) { .product { grid-template-columns: 1.1fr 1fr; gap: 48px; } }

.gallery__main {
  border: 1px solid var(--rule);
  background: var(--surface);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  padding: 24px;
}
.gallery__main img {
  /* fill the box whatever the file's own size: a photo dropped into the
     admin can be a 180 px thumbnail, and at its natural size it sat small
     in the middle of a frame the built photos fill */
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}
.gallery__strip { display: flex; gap: 8px; margin-block-start: 8px; flex-wrap: wrap; }
.gallery__strip button {
  width: 64px; height: 64px;
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 4px;
  cursor: pointer;
  border-radius: var(--radius);
}
.gallery__strip button[aria-current="true"] { border-color: var(--accent); }
.gallery__strip img { width: 100%; height: 100%; object-fit: contain; }

.crumbs { font-size: 13px; color: var(--muted); padding-block: 14px; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { margin-inline: 6px; }

.product__title { font-size: 26px; margin-block-end: 10px; }
.product__meta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.product__price { font-size: 27px; font-weight: 700; }
.product__buy {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 16px;
  display: grid;
  gap: 12px;
  margin-block: 20px;
}
.qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.qty button {
  width: 42px;
  border: 0;
  background: var(--surface);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  transition: background-color .12s ease, color .12s ease;
}
.qty button:hover { background: var(--accent); color: #fff; }
/* It used to scale down on press, which exposed the white behind it and
   looked like the button was coming apart. Darken instead. */
.qty button:active { background: var(--accent-press); color: #fff; }
.qty input {
  width: 54px;
  border: 0;
  border-inline: 1px solid var(--rule-strong);
  text-align: center;
  min-height: 42px;
  border-radius: 0;
  font-weight: 600;
}
.qty input:focus-visible { box-shadow: none; border-color: var(--rule-strong); }

/* the cart's copy, a size down */
.qty--sm button { width: 34px; font-size: 17px; }
.qty--sm input { width: 44px; min-height: 34px; font-size: 14px; }

/* Adding something no longer throws you into the cart. This says it worked
   and offers the cart if you want it, otherwise it gets out of the way. */
.toastbar {
  position: fixed;
  inset-block-end: 22px;
  inset-inline: 0;
  margin-inline: auto;
  width: max-content;
  max-width: calc(100% - 32px);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px 12px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(22, 20, 28, .32);
  font-size: 14px;
  animation: toast-in .22s ease-out;
}
:root[dir="rtl"] .toastbar { padding: 12px 18px 12px 14px; }
.toastbar__msg { font-weight: 500; }
.toastbar__go {
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-weight: 600;
  white-space: nowrap;
}
.toastbar__go:hover { background: var(--accent-press); text-decoration: none; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .toastbar { animation: none; } }

/* His name sits at the same weight as the words around it, not brighter. */
.buy-row { display: flex; gap: 10px; align-items: stretch; }
.buy-row .btn { flex: 1; }

.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs th, .specs td {
  text-align: start;
  padding: 9px 12px;
  border-block-end: 1px solid var(--rule);
  vertical-align: top;
}
.specs th { font-weight: 500; color: var(--muted); width: 42%; }
.specs td { font-family: var(--mono); font-size: 13px; }

.prose { font-size: 15px; }
.prose h2 { font-size: 19px; margin-block: 24px 10px; }
.prose h3 { font-size: 16px; margin-block: 20px 8px; }
.prose ul, .prose ol { padding-inline-start: 22px; margin-block: 0 1em; }
.prose li { margin-block-end: 6px; }
.prose a { color: var(--accent); text-decoration: underline; }

.panel {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 22px;
  border-radius: var(--radius-lg);
}
.panel--tint { background: var(--accent-tint); border-color: var(--accent-edge); }

/* ----------------------------------------------------- cart and checkout */

.lines { width: 100%; border-collapse: collapse; }
.lines th {
  text-align: start;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  padding: 10px 12px;
  border-block-end: 1px solid var(--rule-strong);
}
.lines td {
  padding: 14px 12px;
  border-block-end: 1px solid var(--rule);
  vertical-align: middle;
}
/* The total and the remove button used to sit on different lines. */
/* Fixed widths, otherwise going from 9 to 18 EGP widens the total column
   and the whole quantity stepper slides sideways as you click it. */
/* .price forces direction:ltr, which makes text-align:start resolve to left
   even on an Arabic page. That left the unit price hanging under the wrong
   edge of the product name. This line follows the page instead, with the
   number itself still resolved left to right. */
.lines__unit {
  direction: inherit;
  unicode-bidi: plaintext;
  text-align: start;
}

.lines__qty { width: 128px; }
.lines__total {
  width: 110px;
  text-align: end;
  white-space: nowrap;
  font-size: 14px;
}
.lines__rm { width: 58px; text-align: end; }
.lines .thumb { width: 64px; height: 64px; object-fit: contain; }
.lines__name { font-weight: 500; font-size: 14px; }
.lines__sku { font-size: 11px; color: var(--muted); }
/* The summary lines carried the part code as well as the count. The count is
   the part anyone actually needs to check, so the code goes. */
.lines__count {
  font-size: 12px;
  color: var(--muted);
  direction: inherit;
  unicode-bidi: plaintext;
  text-align: start;
}
.lines__thumb { width: 80px; }

/* Five columns do not fit on a phone, and the photo is the one that earns
   its place least in a list you already chose from. */
@media (max-width: 639px) {
  .lines__thumb { display: none; }
  .lines th, .lines td { padding: 10px 6px; }
}

.totals { display: grid; gap: 10px; }
.totals__row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.totals__row--grand {
  border-block-start: 1px solid var(--rule-strong);
  padding-block-start: 10px;
  font-size: 18px;
  font-weight: 600;
}
.free { color: var(--ok); font-weight: 500; }

.checkout { display: grid; gap: 24px; padding-block: 24px; }
@media (min-width: 900px) { .checkout { grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; } }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 560px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.consent input { margin-block-start: 3px; flex: none; width: 18px; height: 18px; }

.notice {
  border: 1px solid var(--rule-strong);
  border-inline-start: 3px solid var(--accent);
  background: var(--surface);
  padding: 14px 16px;
  font-size: 14px;
  border-radius: var(--radius);
}
.notice--bad { border-inline-start-color: #b3261e; }
.notice--good { border-inline-start-color: var(--ok); }

/* A tracking rail, the way a delivery app shows it: numbered stops joined by
   a line that fills in behind you. */
.steps {
  display: flex;
  counter-reset: s;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  flex: 1;
  position: relative;
  padding-block-start: 38px;
  text-align: center;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}
.steps li::before {
  counter-increment: s;
  content: counter(s);
  position: absolute;
  top: 0;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  background: var(--surface);
  border: 2px solid var(--rule-strong);
  border-radius: 50%;
  color: var(--muted);
  z-index: 1;
}
:root[dir="rtl"] .steps li::before { transform: translateX(50%); }
/* the road to the next stop */
.steps li::after {
  content: "";
  position: absolute;
  top: 13px;
  inset-inline-start: 50%;
  width: 100%;
  height: 2px;
  background: var(--rule-strong);
}
.steps li:last-child::after { display: none; }

.steps li.is-done { color: var(--ink); }
.steps li.is-done::before {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.steps li.is-done::after { background: var(--ok); }
.steps li.is-now { color: var(--ink); font-weight: 600; }
.steps li.is-now::before {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px var(--accent-tint);
}

/* Five stops will not fit across a phone, so it stands up instead. */
@media (max-width: 559px) {
  .steps { display: grid; gap: 0; }
  .steps li {
    text-align: start;
    padding-block: 0 18px;
    padding-inline-start: 42px;
    min-height: 34px;
  }
  .steps li::before { inset-inline-start: 0; transform: none; }
  :root[dir="rtl"] .steps li::before { transform: none; }
  .steps li::after {
    top: 28px;
    inset-inline-start: 13px;
    width: 2px;
    height: 100%;
  }
}

/* ---------------------------------------------------------- categories */

.dir { columns: 1; column-gap: 24px; padding-block: 24px; }
@media (min-width: 700px) { .dir { columns: 2; } }
@media (min-width: 1040px) { .dir { columns: 3; } }
.dir__block { break-inside: avoid; margin-block-end: 24px; }
.dir__block h2 {
  font-size: 15px;
  margin-block-end: 8px;
}
.dir__block h2 .n { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 400; }
.dir__block ul { list-style: none; margin: 0; padding: 0; }
.dir__block li a {
  display: block;
  padding: 5px 0;
  font-size: 14px;
  color: var(--muted);
}
.dir__block li a:hover { color: var(--accent); text-decoration: none; }

/* Borders on the cells, not a gap showing a coloured backdrop. An incomplete
   last row then just ends, instead of leaving a grey block. */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
/* One line, one weight, vertically centred. The old version stacked a big
   name over a tiny number and nothing lined up. */
.tile {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}
.tile:hover {
  background: var(--accent-tint);
  border-color: var(--accent-edge);
  text-decoration: none;
}
.tile__name { flex: 1; min-width: 0; }
.tile__go {
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--rule-strong);
  border-top: 2px solid var(--rule-strong);
  transform: rotate(45deg);
  transition: border-color .15s ease, transform .15s ease;
}
:root[dir="rtl"] .tile__go { transform: rotate(-135deg); }
.tile:hover .tile__go { transform: rotate(45deg) translate(2px, -2px); }
:root[dir="rtl"] .tile:hover .tile__go { transform: rotate(-135deg) translate(2px, -2px); }
.tile:hover .tile__go { border-color: var(--accent); }

/* ------------------------------------------------------------ services */

.svc { display: grid; gap: 12px; }
@media (min-width: 760px) {
  .svc { grid-template-columns: repeat(2, 1fr); }
  /* an odd last card takes the whole row instead of sitting alone */
  .svc__item:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.svc__item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.svc__item:hover { border-color: var(--accent-edge); }
.svc__item h3 { font-size: 17px; }
.svc__item p { color: var(--muted); font-size: 14px; margin: 0; }
.svc__price { font-size: 13px; color: var(--muted); }

/* -------------------------------------------------------------- footer */

.foot { background: var(--ink); color: rgba(255, 255, 255, .72); margin-block-start: 56px; }
.foot__cols { display: grid; gap: 28px; padding-block: 40px; }
@media (min-width: 700px) { .foot__cols { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.foot h3 { color: #fff; font-size: 14px; margin-block-end: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { font-size: 14px; }
.foot a:hover { color: #fff; }
.foot__legal {
  border-block-start: 1px solid rgba(255, 255, 255, .12);
  padding-block: 18px;
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
  text-align: center;
}
.foot__by { color: rgba(255, 255, 255, .45); margin-inline-start: 10px; }
.foot__biz { font-family: var(--mono); font-size: 11px; line-height: 1.7; }
.foot__note {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, .45);
  margin-block-start: 2px;
}

/* --------------------------------------------------------------- home */

.hero {
  border-block-end: 1px solid var(--rule);
  background: var(--surface);
  padding-block: 44px 36px;
}
/* The heading names what is sold, for anyone arriving from a search that
   might have landed them anywhere. It is not the loudest thing on the page
   any more; the search box is. */
.hero h1 { font-size: 28px; max-width: 20ch; }
@media (min-width: 760px) { .hero h1 { font-size: 36px; } }
.hero p { color: var(--muted); max-width: 56ch; margin-block: 10px 0; }

.hero__search { margin-block-start: 20px; max-width: 680px; flex: none; }
.hero__search .search__field {
  border-color: var(--rule-strong);
  border-radius: var(--radius-lg);
}
.hero__search input[type="search"] { padding: 16px 14px; font-size: 16px; }
.hero__search .search__field svg { margin-inline-start: 16px; }
.hero__search .search__go { padding-inline: 22px; align-self: stretch; }
/* the panel has to clear a taller field than the header's */
.hero__search .suggest { inset-block-start: calc(100% + 6px); }
/* Real part numbers people type, so they are links worth the size of a
   target. They used to be 12px grey text that read as a caption. */
.hero__quick { display: flex; gap: 10px; flex-wrap: wrap; margin-block-start: 22px; }
.hero__quick a {
  font-family: var(--mono);
  font-size: 14px;
  padding: 9px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-2);
}
.hero__quick a:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent);
  text-decoration: none;
}

/* ------------------------------------------------------------- utility */

.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .cell, .tile, .btn, .chip { transition: background-color .12s ease, border-color .12s ease; }
}

@media print {
  .topbar, .foot, .rail, .btn { display: none; }
  body { background: #fff; }
}

/* ------------------------------------------------------- the dropdown

   A native <select> is styled only until you click it. The list that opens
   belongs to the operating system, so it arrives with its own font, its own
   blue highlight and square corners, and it makes the page look like two
   different sites. select.js draws the open state instead, and these are the
   styles for it. The closed button reuses the input shape so a dropdown and
   a text field still sit level next to each other. */

.sel { position: relative; display: inline-block; width: 100%; }
/* the arrow on .select is drawn over the native control; here the button
   owns it, so the wrapper's own chevron steps aside */
.sel.select::after { display: none; }

.sel__btn {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  padding-inline-end: 38px;
  font: inherit;
  font-size: 14px;
  text-align: start;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.sel__btn::after {
  content: "";
  position: absolute;
  inset-inline-end: 14px;
  top: 50%;
  width: 9px;
  height: 9px;
  /* physical: down is down in both directions, see .select::after */
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .15s ease;
  pointer-events: none;
}
.sel__btn:hover { border-color: var(--ink-2); }
.sel__btn:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.sel.is-open .sel__btn {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.sel.is-open .sel__btn::after { transform: translateY(-25%) rotate(225deg); }

.sel__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sel__value.is-placeholder { color: var(--muted); }

.sel__list {
  position: absolute;
  z-index: 60;
  /* The list is its own white panel wherever it opens. Inheriting colour
     meant that inside the dark bulk bar every option came out white text on
     a white panel, which is to say invisible. */
  color: var(--ink);
  inset-inline: 0;
  top: calc(100% + 6px);
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--lift);
}
/* near the bottom of a short sheet, open upwards instead */
.sel--up .sel__list { top: auto; bottom: calc(100% + 6px); }

.sel__opt {
  color: var(--ink);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sel__opt:hover { background: var(--accent-tint); }
.sel__opt.is-on { background: var(--accent-tint); font-weight: 600; }
/* the tick, so the chosen row reads without relying on colour alone */
.sel__opt.is-on::after {
  content: "";
  margin-inline-start: auto;
  width: 5px;
  height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  flex: none;
}
.sel__opt[aria-disabled="true"] {
  color: var(--muted);
  cursor: default;
  background: none;
}

/* ------------------------------------------------- admin order controls */

/* Names the stop it moves the order to, with a chevron after it, instead of
   a bare arrow you have to hover to understand. */
.btn--step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.btn--step svg { flex: none; opacity: .7; transition: transform .15s ease; }
.btn--step:hover svg { transform: translateX(2px); opacity: 1; }
:root[dir="rtl"] .btn--step svg { transform: scaleX(-1); }
:root[dir="rtl"] .btn--step:hover svg { transform: scaleX(-1) translateX(2px); }


/* -------------------------------------------- fixes from the 2026-10 tests */
/* G4: a long search term in the shop title wraps instead of widening the page */
#shop-title { overflow-wrap: anywhere; }
#shop-title .code { white-space: normal; overflow-wrap: anywhere; }
/* the pager's gap markers are not buttons */
.pager .pager__gap { border: 0; background: none; min-width: 18px; }
/* a sold-out line in the cart stays visible but reads as set aside */
.lines tr.is-oos td { opacity: .65; }
.lines tr.is-oos .lines__rm { opacity: 1; }
/* G10: "الكود TZ-ARD-01": the word in the page's font, only the code in mono */
.pcode__label { font-family: inherit; }
/* D6: all six nav links fit on a phone (these come after the general .nav
   rules on purpose; earlier in the file they were overridden) */
@media (max-width: 767px) {
  .nav { gap: 0; justify-content: space-between; }
  .nav a { padding: 11px 7px; font-size: 13.5px; }
}
@media (max-width: 360px) { .nav a { padding: 11px 5px; font-size: 13px; } }

/* 3.7: on a phone the order summary (and its total) comes before the form,
   so the customer sees what they pay before pressing Send, not after */
@media (max-width: 899px) { .checkout--pay > aside { order: -1; } }



/* =============================================================
   UNOX layer. What changes from TECH ZONE's look: white header and
   footer, heavier type, red prices with EGP in black, the heart, the
   "new" word, category tiles.
   ============================================================= */

body { font-size: 16px; font-weight: 500; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: 0; }
.page-title { font-size: 26px; margin-block: 4px 18px; }

/* header: white, the red logo on it, a hairline under it */
.topbar { background: var(--surface); color: var(--ink); border-block-end: 1px solid var(--rule); }
.topbar.is-stuck {
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 1px 0 var(--rule), 0 8px 24px rgba(0, 0, 0, .06);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar.is-stuck { background: #fff; }
}
/* flame + UNOX only since 28 Nov (the client dropped COMPONENTS / ELECTRONICS),
   so it can stand as tall as the search box */
.brand img { height: 44px; width: auto; border-radius: 0; }
@media (max-width: 767px) { .topbar .brand img { height: 38px; } }
.search__field { background: var(--wash); border: 1px solid var(--rule); }
.search__field input[type="search"] { font-size: 15px; font-weight: 600; }
.search__field:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-tint); background: #fff; }
.search__go { font-weight: 700; }

.iconlink {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  padding-inline: 8px;
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
}
.iconlink:hover { background: var(--wash); text-decoration: none; }
.iconlink__label { white-space: nowrap; }
.count {
  min-width: 20px;
  height: 20px;
  padding-inline: 5px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 767px) {
  .iconlink__label { display: none; }
  .iconlink .count { position: absolute; inset-block-start: 2px; inset-inline-end: 0; }
}

.nav a { color: var(--ink-2); font-weight: 700; font-size: 15px; }
.nav a:hover { color: var(--ink); }
.nav a.is-on { color: var(--ink); border-block-end-color: var(--red); }

@media (max-width: 767px) {
  .minibar { background: rgba(255, 255, 255, .94); box-shadow: 0 1px 0 var(--rule), 0 6px 20px rgba(0, 0, 0, .08); }
}

/* Phone bottom bar (29 Nov, the client asked for the sections at the
   bottom). It replaces the header's row of links and its cart icon; the
   heart stays up top. Fixed, never hides, so the cart count is always one
   thumb away. */
.tabbar { display: none; }
@media (max-width: 767px) {
  .topbar .nav, .topbar .iconlink--cart { display: none; }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 55;
    background: var(--surface);
    border-block-start: 1px solid var(--rule);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, .05);
    padding-block-end: env(safe-area-inset-bottom);
  }
  .tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 58px;
    padding: 7px 2px 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar a:hover { color: var(--ink); text-decoration: none; }
  .tabbar a.is-on { color: var(--red); }
  .tabbar a:active .tabbar__icon { transform: scale(.92); }
  .tabbar__icon { position: relative; display: block; line-height: 0; transition: transform .12s ease-out; }
  .tabbar__label { white-space: nowrap; }
  .tabbar .count {
    position: absolute;
    inset-block-start: -7px;
    inset-inline-end: -13px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 11px;
    padding-inline: 4px;
  }
  /* room under the footer for the bar, and toasts sit above it */
  body { padding-block-end: calc(59px + env(safe-area-inset-bottom)); }
  .toastbar { inset-block-end: calc(70px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .tabbar__icon { transition: none; } }

/* buttons: black, flat, sentence case */
.btn { font-weight: 700; }
.btn--primary, .btn:not(.btn--ghost):not(.btn--icon) { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--primary:hover, .btn:not(.btn--ghost):not(.btn--icon):hover { background: #000; border-color: #000; }
.btn--ghost { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--wash); }

/* prices: the figure red, EGP black, the old price small and crossed out */
.price { color: var(--red); font-weight: 800; }
.price .cur { color: var(--ink); font-weight: 700; font-size: .72em; margin-inline-start: 4px; }
.price--old {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  opacity: 1;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

/* product card */
.grid { border-radius: var(--radius-lg); }
.cell:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink); }
.cell__media { position: relative; z-index: 1; }

.cell__name { font-size: 15px; font-weight: 700; color: var(--ink); }
.cell__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: -4px 0 0; font-size: 13px; }
.cell__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cell__prices { flex-wrap: wrap; gap: 2px 10px; }
.cell__prices .price:not(.price--old) { font-size: 19px; }
/* 29 Nov, like TECH ZONE's cards: the old price beside the new one, nearly
   its size, bold grey and struck (#767676 is 4.5:1 on white) */
.cell__prices .price--old {
  font-size: 16px;
  font-weight: 700;
  color: #767676;
  text-decoration-thickness: 1.5px;
}
.cell__prices { align-items: baseline; }
.stock { font-size: 13px; font-weight: 700; }
.stock--in { color: var(--ok); }
.stock--low { color: var(--warn); }
.stock--out { color: var(--red); }
.tag-new { color: var(--red); font-weight: 800; font-size: 13px; }

.fav {
  position: relative;
  z-index: 1;
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-inline-end: -10px;
  border: 0;
  background: none;
  border-radius: var(--radius);
  color: var(--ink-2);
  cursor: pointer;
}
.fav svg path { fill: none; }
.fav:hover { background: var(--wash); }
.fav.is-on, .favline.is-on { color: var(--red); }
.fav.is-on svg path, .favline.is-on svg path { fill: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .fav svg, .favline svg { transition: transform .18s ease-out; }
  .fav:active svg, .favline:active svg { transform: scale(.86); }
}

/* home */
.hero { background: var(--surface); padding-block: 36px 30px; }
.hero h1 { font-size: 30px; max-width: 22ch; }
@media (min-width: 760px) { .hero h1 { font-size: 40px; } }
.hero p { color: var(--ink-2); font-size: 17px; max-width: 56ch; margin-block: 10px 20px; }
.section { padding-block: 28px; }
.section__title { font-size: 24px; margin-block-end: 16px; }
.section__more { margin-block: 18px 0; }

.cattiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .cattiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .cattiles { grid-template-columns: repeat(5, 1fr); } }
.cattile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 700;
}
.cattile:hover { border-color: var(--ink); text-decoration: none; }
.cattile__count { color: var(--muted); font-size: 13px; font-weight: 600; }

.dir__block h2 { display: flex; align-items: baseline; gap: 10px; }
.dir__count { color: var(--muted); font-size: 13px; font-weight: 600; }

/* product page */
.product.is-loading .product__title { background: var(--wash); border-radius: 4px; color: transparent; max-width: 60%; }
.product__title { font-size: 26px; }
.product__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; color: var(--muted); font-size: 14px; }
.product__meta a { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.product__prices { display: flex; align-items: baseline; gap: 12px; margin-block: 14px; }
.product__price { font-size: 32px; }
.favline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-block-start: 8px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.favline svg path { fill: none; }
.favline:hover { border-color: var(--ink); }

/* text pages */
.prose { max-width: 65ch; font-size: 17px; line-height: 1.8; }

/* footer: light, so the red logo sits on white like everywhere else */
.foot { background: var(--wash); color: var(--ink-2); border-block-start: 1px solid var(--rule); }
.foot h3 { color: var(--ink); font-size: 15px; }
.foot a { color: var(--ink-2); font-size: 15px; font-weight: 600; }
.foot a:hover { color: var(--ink); }
.foot .brand img { height: 36px; }
.foot__legal { color: var(--muted); border-color: var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
/* the credit (29 Nov): plain text, no link, a shade lighter than the copyright */
.foot .foot__by { color: #767676; margin-inline-start: 0; font-size: 13px; font-weight: 500; }
.foot .foot__by span { font-weight: 700; color: #767676; }

/* category tiles: the picture on top, the name under it */
.cattiles { grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 640px) { .cattiles { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
@media (min-width: 900px) { .cattiles { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1180px) { .cattiles { grid-template-columns: repeat(6, 1fr); } }
.cattile {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  justify-items: center;
  gap: 4px;
  min-height: 0;
  padding: 10px 8px 12px;
  text-align: center;
}
.cattile__media {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-block-end: 4px;
}
.cattile__media img { width: 100%; height: 100%; object-fit: contain; }
.cattile__name { font-size: 15px; font-weight: 800; line-height: 1.35; }
.cattile__count { color: var(--muted); font-size: 13px; font-weight: 600; }
@media (max-width: 639px) { .cattile__name { font-size: 13.5px; } }

/* The name always holds two lines of room, so whatever comes under it
   ("new", the stock note) sits at the same height on every card in a row,
   whether the name took one line or two. */
.cell__name { min-height: calc(2em * 1.35); }

/* Shipping deposit on the order page: what to pay now, what on delivery,
   where to send it, then one button for the screenshot. */
.deposit { margin-block: 18px; border-color: var(--ink); }
.deposit__title { font-size: 19px; font-weight: 800; margin: 0 0 6px; }
.deposit__intro { margin: 0 0 14px; color: var(--ink); }
.deposit .totals { margin-block-end: 16px; }
.deposit__ways { display: grid; gap: 10px; margin-block-end: 16px; }
.deposit__way {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name name" "value copy";
  align-items: center;
  gap: 4px 12px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--wash);
}
.deposit__way[hidden] { display: none; }
.deposit__name { grid-area: name; font-size: 13px; font-weight: 700; color: var(--muted); }
.deposit__value {
  grid-area: value;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  text-align: start;
  unicode-bidi: plaintext;
}
.btn--copy { grid-area: copy; min-height: 44px; min-width: 72px; padding: 0 14px; }
.deposit-note { margin: 12px 0 0; padding-block-start: 12px; border-top: 1px solid var(--rule); color: var(--ink); }

/* ---------------------------------------------------------- home banner
   29 Nov: the owner's pictures at the top of the home page, managed in the
   admin (صور الواجهة). The box holds one ratio so a new picture never moves
   the page: 19:10 on phones (his first banner is 1424x752), 12:5 on wide
   screens, where a full 19:10 would fill the whole first screen; there the
   picture loses a strip top and bottom (object-fit: cover keeps the middle). */
.banner { padding-block: 14px 2px; }
.banner[hidden] { display: none; }
.banner__box {
  position: relative;
  aspect-ratio: 19 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--wash);
}
@media (min-width: 900px) {
  .banner { padding-block-start: 22px; }
  .banner__box { aspect-ratio: 12 / 5; }
}
.banner__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  transition: opacity .2s ease-out;
}
.banner__track::-webkit-scrollbar { display: none; }
/* Until pages.js knows which pictures the owner saved, the box keeps its
   space and shows nothing, so an old picture never flashes up first. Without
   JavaScript it shows the built-in one after 3 s anyway. */
.banner.is-pending .banner__track { opacity: 0; animation: banner-show 0s 3s forwards; }
@keyframes banner-show { to { opacity: 1; } }
.banner__slide {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.banner__slide img { display: block; width: 100%; height: 100%; object-fit: cover; }

.banner__dots { display: flex; justify-content: center; margin-block-start: 4px; }
.banner__dots[hidden] { display: none; }
.banner__dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.banner__dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rule-strong);
  transition: background-color .15s ease-out;
}
.banner__dot[aria-current="true"]::before { background: var(--red); }

/* arrows only where there is a mouse; phones swipe */
.banner__arrow { display: none; }
@media (hover: hover) and (min-width: 768px) {
  .banner.is-multi .banner__arrow {
    display: grid;
    place-items: center;
    position: absolute;
    inset-block-start: 50%;
    width: 44px;
    height: 44px;
    margin-block-start: -22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--ink);
    box-shadow: var(--lift);
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s ease-out;
  }
  .banner__box:hover .banner__arrow, .banner__arrow:focus-visible { opacity: 1; }
  .banner__arrow--prev { inset-inline-start: 12px; }
  .banner__arrow--next { inset-inline-end: 12px; }
  :root[dir="rtl"] .banner__arrow svg { transform: scaleX(-1); }
}
@media (prefers-reduced-motion: reduce) {
  .banner__track, .banner__arrow { transition: none; }
}
/* the heading under a banner: kept for search engines, its button not
   reachable by Tab while nobody can see it */
.hero.sr .btn { display: none; }

/* "Added to cart" (29 Nov): the part's photo and name, and شوف السلة as a
   solid red box. It used to be a black button on the black bar, so the
   action read as plain text. */
.toastbar { gap: 12px; padding: 10px 14px; }
:root[dir="rtl"] .toastbar { padding: 10px 14px; }
.toastbar--item { width: min(440px, calc(100% - 32px)); padding-inline-start: 10px; }
:root[dir="rtl"] .toastbar--item { padding: 10px 10px 10px 10px; }
.toastbar__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.toastbar__msg { font-weight: 700; }
.toastbar__name {
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toastbar__pic {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}
.toastbar__pic img { display: block; width: 100%; height: 100%; object-fit: contain; }
.toastbar__go {
  flex: none;
  background: var(--red);
  color: #fff;
  padding: 11px 16px;
  font-weight: 700;
}
.toastbar__go:hover { background: #a10016; }

/* Light only (29 Nov, the client's call: no black even in dark mode). Phone
   browsers with "dark mode for websites" repaint light pages dark; this
   asks them not to. The photos are no longer multiplied into their cards:
   every card is white, so it changed nothing here, and a browser that
   darkens the page anyway turned each multiplied photo black. */
:root { color-scheme: only light; }

/* Product page line under the name (29 Nov): one size and one font, so the
   pieces sit on one line. The code was in the phone's monospace, which has
   another baseline on Android, and the underline at 3px ran through the
   low letters of أردوينو. */
.product__meta { align-items: baseline; font-size: 14px; line-height: 1.6; }
.product__meta .tag-new, .product__meta .stock { font-size: 14px; }
.product__meta .code { font-family: inherit; font-weight: 700; font-variant-numeric: tabular-nums; }
.product__meta a { text-underline-offset: 8px; text-decoration-thickness: 1px; }
