/* INVO Marketplace — mobile first, logical properties only so the same rules
   serve English (ltr) and Arabic (rtl) without a second stylesheet. */
:root {
  --brand: #f4511e;
  --brand-strong: #d93b0e; /* text-bearing fills: white on this is ~4.6:1, white on --brand is ~3.5:1 */
  --brand-tint: #fff1eb;
  --ink: #202124;
  --muted: #74777d;
  --line: #e9e9eb;
  --bg: #f7f8fa;
  --surface: #fff;
  --success: #1e8e3e;
  --success-tint: #e6f4ea;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 3px solid var(--brand-strong); outline-offset: 2px; }

.mp-skip {
  position: absolute; inset-inline-start: 8px; inset-block-start: -48px; z-index: 50;
  background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px;
}
.mp-skip:focus { inset-block-start: 8px; }
.mp-container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }

/* ---- header ---- */
.mp-header { position: sticky; inset-block-start: 0; z-index: 20; background: var(--surface); border-block-end: 1px solid var(--line); }
.mp-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.mp-logo { display: inline-flex; align-items: center; gap: 6px; }
.mp-logo__mark { width: 10px; height: 22px; background: var(--brand); border-radius: 2px; transform: skewX(-18deg); }
.mp-logo__name { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.mp-logo__sub { font-size: 11px; font-weight: 500; color: var(--muted); }
.mp-header__actions { display: flex; align-items: center; gap: 8px; }
.mp-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 13px; font-weight: 600; cursor: pointer; list-style: none;
}
.mp-pill::-webkit-details-marker { display: none; }
.mp-pill { white-space: nowrap; max-width: 100%; }
.mp-pill > span:last-child { overflow: hidden; text-overflow: ellipsis; max-width: 11em; }
.mp-header__actions { min-width: 0; }
@media (max-width: 479px) { .mp-logo__sub { display: none; } }
.mp-pill--link:hover, details[open] > .mp-pill { border-color: var(--brand-strong); }
.mp-country { position: relative; }
.mp-country__menu {
  position: absolute; inset-inline-end: 0; margin: 6px 0 0; padding: 6px; list-style: none; min-width: 200px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 28px rgb(0 0 0 / .12);
}
.mp-country__menu a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-weight: 500; }
.mp-country__menu a:hover { background: var(--bg); }
.mp-country__menu a[aria-current] { font-weight: 700; color: var(--brand-strong); }
.mp-country__count { margin-inline-start: auto; color: var(--muted); font-size: 12px; }

.mp-tabs { display: flex; gap: 8px; padding-block: 0 12px; overflow-x: auto; scrollbar-width: none; }
.mp-tabs::-webkit-scrollbar { display: none; }
.mp-tab { flex: none; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 13px; }
.mp-tab--active { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }

/* ---- hero ---- */
.mp-hero-wrap { padding-block-start: 16px; }
.mp-hero {
  border-radius: 20px; padding: 24px 20px; color: #fff;
  background: linear-gradient(135deg, var(--brand-strong), #b3300a);
}
.mp-hero__title { font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.5px; max-width: 18ch; }
.mp-hero__sub { margin-block-start: 10px; max-width: 42ch; opacity: .95; }
.mp-hero__stats { margin-block-start: 8px; font-size: 13px; font-weight: 600; opacity: .9; }
.mp-btn {
  display: inline-flex; align-items: center; justify-content: center; margin-block-start: 16px;
  padding: 10px 18px; border-radius: 10px; font-weight: 700; font-size: 14px; border: 1px solid transparent;
}
.mp-btn--light { background: #fff; color: var(--brand-strong); }
.mp-btn--outline { margin: 0; background: var(--surface); border-color: var(--line); color: var(--ink); }

/* ---- sections ---- */
.mp-section { padding-block-start: 28px; }
.mp-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-block-end: 12px; }
.mp-section__title { font-size: 18px; font-weight: 800; }
.mp-section__count { color: var(--muted); font-size: 13px; }
.mp-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* ---- shop card ---- */
.mp-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mp-card:hover { border-color: #f7b7a5; box-shadow: 0 6px 22px rgb(0 0 0 / .06); }
.mp-card--closed { opacity: .72; }
.mp-card__cover { aspect-ratio: 5 / 2; background: hsl(var(--hue, 20) 70% 90%); overflow: hidden; }
.mp-card__cover img { width: 100%; height: 100%; object-fit: cover; }
/* No photo: the logo, whole, centred on the tinted cover (never cropped). */
.mp-card__cover { display: flex; align-items: center; justify-content: center; }
.mp-card__cover img.mp-card__cover-logo { width: auto; height: 62%; max-width: 62%; object-fit: contain; border-radius: 12px; }
.mp-card__cover-initials { font-size: 34px; font-weight: 800; color: hsl(var(--hue, 20) 60% 30%); }
.mp-card__body { display: flex; align-items: center; gap: 12px; padding: 12px; }
.mp-card__logo { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: contain; padding: 2px; box-sizing: border-box; border: 1px solid var(--line); background: #fff; }
.mp-card__logo--initials { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: hsl(var(--hue, 20) 60% 30%); background: hsl(var(--hue, 20) 70% 90%); }
.mp-card__info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mp-card__name { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-card__meta { font-size: 12px; color: var(--muted); }
.mp-status { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.mp-status--open { background: var(--success-tint); color: var(--success); }
.mp-status--closed { background: var(--line); color: var(--muted); }
.mp-card__foot { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 10px 12px; background: var(--bg); color: var(--muted); font-size: 12px; }

.mp-empty { padding: 40px 16px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mp-empty h2 { font-size: 18px; }
.mp-empty p { margin-block-start: 6px; color: var(--muted); }

/* ---- badges, verified tick, section links ---- */
.mp-card__cover { position: relative; }
.mp-badge {
  position: absolute; inset-block-start: 8px; inset-inline-start: 8px; padding: 3px 10px; border-radius: 999px;
  background: var(--brand-strong); color: #fff; font-size: 11px; font-weight: 700;
}
.mp-verified {
  display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-inline-start: 6px;
  border-radius: 50%; background: var(--brand-strong); color: #fff; font-size: 10px; line-height: 1; vertical-align: middle;
}
.mp-section__link { color: var(--brand-strong); font-weight: 700; font-size: 13px; }

/* ---- tiles (categories, brands) ---- */
.mp-tiles { display: flex; gap: 12px; overflow-x: auto; padding-block-end: 4px; scrollbar-width: none; }
.mp-tiles::-webkit-scrollbar { display: none; }
.mp-tile { flex: none; width: 84px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.mp-tile__img { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; background: var(--brand-tint); }
.mp-tile__img--round { border-radius: 50%; border: 1px solid var(--line); background: hsl(var(--hue, 20) 70% 92%); }
.mp-tile__img--text { display: inline-flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: var(--brand-strong); }
.mp-tile__name { font-size: 12px; font-weight: 600; line-height: 1.25; }

/* ---- directory ---- */
.mp-search { display: flex; gap: 8px; margin-block-end: 12px; }
.mp-search__input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font: inherit; }
.mp-search__btn { padding: 0 18px; border: 0; border-radius: 12px; background: var(--brand-strong); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.mp-search--header { margin-block: 0 12px; }
.mp-collection__head { margin-block-start: 14px; }
.mp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 12px; }
.mp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 600; }
.mp-chip:hover { border-color: var(--brand-strong); }
.mp-chip--soft { background: var(--bg); }
.mp-chip--on { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.mp-chip--clear { color: var(--brand-strong); }
.mp-chip__n { opacity: .65; font-weight: 500; }
.mp-note { margin: 6px 0 12px; color: var(--muted); font-size: 12px; }
.mp-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-block-start: 20px; }
.mp-pager__at { color: var(--muted); font-size: 13px; }

/* ---- shop page ---- */
.mp-shop { padding-block: 16px 8px; }
.mp-back { display: inline-block; margin-block-end: 12px; color: var(--brand-strong); font-weight: 700; font-size: 13px; }
/* width:100% is load-bearing: with min-height the aspect ratio would otherwise
   derive the WIDTH from it (120px x 15/4 = 450px) and overflow a phone screen. */
.mp-shop__cover { width: 100%; aspect-ratio: 15 / 4; min-height: 120px; border-radius: var(--radius); overflow: hidden; background: hsl(var(--hue, 20) 70% 90%); }
.mp-shop__cover img { width: 100%; height: 100%; object-fit: cover; }
.mp-shop__head { display: flex; align-items: center; gap: 14px; margin-block: 14px; }
.mp-shop__logo { width: 64px; height: 64px; }
.mp-shop__id { flex: 1; min-width: 0; }
.mp-shop__name { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.mp-terms { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.mp-terms li { padding: 6px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.mp-btn--brand { margin: 0; background: var(--brand-strong); color: #fff; }
.mp-btn--brand:hover { background: #b3300a; }
/* ---- the shop's menu ---- */
.mp-search--menu { margin-block: 20px 8px; }
.mp-menutabs {
  /* Sticks just under the page header when that is sticky (wide screens), else at the top. */
  position: sticky; top: var(--mp-header-h, 0px); inset-block-start: var(--mp-header-h, 0px); z-index: 10; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding-block: 10px; margin-block: 8px 4px; background: var(--bg);
}
.mp-menutabs::-webkit-scrollbar { display: none; }
.mp-menutabs .mp-tab { flex: none; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; }
.mp-menutabs .mp-tab:hover { border-color: var(--brand-strong); }
.mp-menutabs .mp-tab--active { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.mp-menugroup { padding-block-start: 14px; scroll-margin-block-start: calc(var(--mp-header-h, 0px) + var(--mp-tabs-h, 0px) + 8px); }
/* A section that has not loaded yet: shimmering rows the height of real ones, so the page does not jump when they arrive. */
.mp-skeleton span {
  display: block; height: 96px; margin-block-end: 10px; border-radius: 14px;
  background: linear-gradient(90deg, #eceef1 25%, #f6f7f9 50%, #eceef1 75%); background-size: 200% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .mp-skeleton span { animation: mp-shimmer 1.2s linear infinite; }
  html { scroll-behavior: smooth; }
}
@keyframes mp-shimmer { to { background-position: -200% 0; } }
.mp-more {
  display: flex; align-items: center; justify-content: center; margin-block-start: 12px; padding: 11px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--brand-strong); font-weight: 700;
}
.mp-more:hover { border-color: var(--brand-strong); }
.mp-more[aria-busy="true"] { opacity: .55; pointer-events: none; }
/* The page header scrolls away, so the menu tabs stick at the very top (top: 0)
   and the screen is left to the menu.

   To make the header stick again, stick its SECTION WRAPPER, not .mp-header:
   the theme draws it inside <div class="shopify-section shopify-section-group-header-group">,
   which is exactly as tall as the header, so a sticky child has no room to move
   and scrolls away anyway (and the tabs, which offset by the header's height,
   would then leave an empty gap of that size). The script already reads that
   wrapper, so only this rule would be needed:
     @media (min-width: 960px) { .shopify-section-group-header-group { position: sticky; top: 0; z-index: 20; } } */
.mp-header { position: static; }
.mp-menugroup__title { margin-block-end: 8px; }
.mp-items { display: grid; grid-template-columns: 1fr; gap: 10px; }
.mp-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.mp-item:hover { border-color: #f7b7a5; }
.mp-item__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.mp-item__title { font-weight: 700; font-size: 14px; }
.mp-item__desc { color: var(--muted); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mp-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-start: 4px; }
.mp-item__price { font-weight: 800; font-size: 14px; }
.mp-pillnote { padding: 2px 8px; border-radius: 8px; background: var(--brand-tint); color: var(--brand-strong); font-size: 11px; font-weight: 700; }
.mp-item__img { flex: none; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: hsl(var(--hue, 20) 70% 92%); }
.mp-item__img img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 760px) { .mp-items { grid-template-columns: repeat(2, 1fr); } .mp-shop__name { font-size: 28px; } }

/* ---- footer ---- */
.mp-footer { margin-block-start: 40px; background: var(--ink); color: #fff; padding-block: 24px; }
.mp-footer__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mp-footer__brand { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; }
.mp-footer__sub { color: #c4c4c4; font-size: 12px; }
.mp-footer__legal { margin-block-start: 16px; color: #c4c4c4; font-size: 12px; }

@media (min-width: 640px) {
  .mp-container { padding-inline: 24px; }
  .mp-hero { padding: 40px 40px; }
  .mp-hero__title { font-size: 38px; }
  .mp-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (min-width: 960px) {
  .mp-grid { grid-template-columns: repeat(3, 1fr); }
  .mp-hero__title { font-size: 46px; }
}
@media (min-width: 1200px) {
  .mp-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .mp-card { transition: border-color .15s, box-shadow .15s; }
}

/* ===== The desktop shell from the supplied design =====
   Top bar: logo | deliver to | search | language. Under it a navigation row.
   Below 960px the same markup collapses to logo + country + language on one
   line, search on its own line, and the navigation row as scrolling pills. */
.mp-header__bar { flex-wrap: wrap; gap: 10px 16px; }
.mp-logo { gap: 8px; }
.mp-logo__text { display: inline-flex; flex-direction: column; line-height: 1; }
.mp-logo__sub { margin-block-start: 3px; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.mp-deliver { display: flex; flex-direction: column; min-width: 0; }
.mp-deliver__btn { display: flex; flex-direction: column; cursor: pointer; list-style: none; }
.mp-deliver__btn::-webkit-details-marker { display: none; }
.mp-deliver__label { font-size: 11px; color: var(--muted); }
.mp-deliver__value { font-size: 14px; font-weight: 700; white-space: nowrap; }
.mp-deliver__caret { font-size: 10px; color: var(--muted); }
.mp-search--header { order: 3; flex: 1 1 100%; margin: 0; }
.mp-search--header .mp-search__input { border-width: 1.5px; border-start-end-radius: 0; border-end-end-radius: 0; }
.mp-search--header .mp-search__btn {
  display: inline-flex; align-items: center; justify-content: center; width: 50px; padding: 0;
  border-start-start-radius: 0; border-end-start-radius: 0;
}
.mp-nav { border-block-start: 1px solid var(--line); }
.mp-nav .mp-tabs { padding-block: 10px 12px; }

/* hero with a photo behind it */
.mp-hero { position: relative; background-size: cover; background-position: center; }
.mp-hero--photo { background-color: #5c190c; }

/* category tiles: a white card with the picture on top, as in the design */
.mp-tiles { display: flex; gap: 10px; overflow-x: auto; padding-block-end: 4px; }
.mp-tile { flex: none; width: 104px; padding: 8px 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.mp-tile:hover { border-color: #f7b7a5; box-shadow: 0 6px 22px rgb(0 0 0 / .06); }
.mp-tile__img { width: 100%; height: auto; aspect-ratio: 1.35; border-radius: 12px; }
/* popular brands keep the round logo row */
.mp-tiles--round, .mp-tiles.mp-tiles--round { display: flex; gap: 12px; overflow-x: auto; }
.mp-tiles--round .mp-tile { flex: none; width: 84px; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.mp-tiles--round .mp-tile__img--round { width: 72px; height: 72px; aspect-ratio: auto; border-radius: 50%; }

@media (min-width: 640px) {
  .mp-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; overflow: visible; }
  .mp-tile { width: auto; }
}
@media (min-width: 960px) {
  .mp-header__bar { flex-wrap: nowrap; justify-content: flex-start; gap: 20px; padding-block: 14px; }
  .mp-search--header { order: 0; flex: 1 1 auto; }
  .mp-header__actions { margin-inline-start: auto; }
  .mp-deliver { padding-inline-start: 18px; border-inline-start: 1px solid var(--line); }
  .mp-nav .mp-tabs { gap: 28px; padding-block: 12px; }
  .mp-tab { padding: 4px 0; border: 0; border-radius: 0; background: transparent; font-size: 14px; }
  .mp-tab:hover { color: var(--brand-strong); }
  .mp-hero { display: flex; align-items: center; min-height: 270px; padding-inline: 56px; }
  .mp-hero__title { max-width: 16ch; font-size: 52px; }
  .mp-tiles { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .mp-tile__name { font-size: 14px; }
}
