/* =====================================================================
   CentropyERP — Jumia-style Online Shop theme
   Loaded AFTER css/style.css on every storefront page. Scoped by the
   `.jmx` body class so it never affects the ERP admin.
   Brand accent is driven by --jm-primary (set inline from ecommerce_settings).
   ===================================================================== */

:root {
  --jm-primary: #f68b1e;
  --jm-primary-dark: #d97706;
  --jm-accent: #ee5a24;
  --jm-ink: #282828;
  --jm-ink-soft: #4a4a4a;
  --jm-muted: #75757a;
  --jm-line: #ededed;
  --jm-bg: #f5f5f5;
  --jm-card: #ffffff;
  --jm-green: #088a29;
  --jm-red: #d61c1c;
  --jm-radius: 4px;
  --jm-shadow: 0 1px 2px rgba(0,0,0,.08);
  --jm-shadow-lg: 0 4px 18px rgba(0,0,0,.12);
  --jm-max: 96vw;
  --jm-gutter: 16px;
  --jm-topbar-h: 34px;
  --jm-header-h: 84px;
  --jm-catbar-h: 44px;
  --jm-stack: calc(var(--jm-topbar-h) + var(--jm-header-h) + var(--jm-catbar-h));
}

/* ---- base shell ---------------------------------------------------- */
body.jmx {
  background: var(--jm-bg);
  color: var(--jm-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
/* Single source of truth for the storefront content width. Overrides the legacy
   ERP container (max-width:1950px) loaded from css/style.css. Every section on
   the storefront (hero, ribbons, grids, footer) resolves to this exact box so
   left and right gutters are identical across the whole page. */
body.jmx .container { width: 100%; max-width: var(--jm-max); margin: 0 auto; padding: 0 var(--jm-gutter); box-sizing: border-box; }
body.jmx a { color: inherit; text-decoration: none; }
body.jmx img { display: block; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- top utility bar ---------------------------------------------- */
body.jmx .top-bar {
  background: #f1f1f2;
  color: var(--jm-ink-soft);
  font-size: 12px;
  border-bottom: 1px solid var(--jm-line);
  padding: 0;
}
body.jmx .top-bar .container { display: flex; justify-content: space-between; align-items: center; height: var(--jm-topbar-h); }
body.jmx .top-bar-left { display: flex; gap: 18px; }
body.jmx .top-bar-left span { display: inline-flex; align-items: center; gap: 6px; }
body.jmx .top-bar-right { display: flex; gap: 12px; align-items: center; }
body.jmx .top-bar a:hover { color: var(--jm-primary); }
body.jmx .top-bar svg { width: 14px; height: 14px; }

/* ---- header -------------------------------------------------------- */
body.jmx .header {
  background: var(--jm-card);
  border-bottom: 1px solid var(--jm-line);
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--jm-shadow);
}
body.jmx .header .container {
  display: flex;
  align-items: center;
  gap: 22px;
  height: var(--jm-header-h);
}
body.jmx .logo { flex: 0 0 auto; }
body.jmx .logo img { height: 64px; width: auto; max-width: 260px; object-fit: contain; }
body.jmx .logo-text { font-size: 24px; font-weight: 800; color: var(--jm-primary); letter-spacing: -.5px; }

/* big search field */
body.jmx .header .nav-links { display: none; } /* nav lives in the category bar */
body.jmx .jm-search {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  border: 1px solid #c7c7cd;
  border-radius: var(--jm-radius);
  background: #fff;
  position: relative;
}
body.jmx .jm-search input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 11px 14px;
  font-size: 14px;
  background: transparent;
}
body.jmx .jm-search button {
  border: 0;
  background: var(--jm-primary);
  color: #fff;
  padding: 0 20px;
  align-self: stretch;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: 0 var(--jm-radius) var(--jm-radius) 0;
}
body.jmx .jm-search button:hover { background: var(--jm-primary-dark); }
body.jmx .jm-search button svg { width: 18px; height: 18px; }

/* search autocomplete dropdown */
body.jmx .jm-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-radius);
  box-shadow: var(--jm-shadow-lg);
  z-index: 1300;
  display: none;
  max-height: 420px;
  overflow-y: auto;
  padding: 6px 0;
}
body.jmx .jm-suggest.open { display: block; }
body.jmx .jm-suggest-head {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--jm-muted);
  padding: 8px 14px 4px;
}
body.jmx .jm-suggest-cat {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; font-size: 13px; color: var(--jm-ink);
}
body.jmx .jm-suggest-cat:hover { background: #f9f9f9; color: var(--jm-primary); }
body.jmx .jm-suggest-cat svg { width: 15px; height: 15px; color: var(--jm-muted); }
body.jmx .jm-suggest-prod {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
}
body.jmx .jm-suggest-prod:hover { background: #f9f9f9; }
body.jmx .jm-suggest-prod img { width: 36px; height: 36px; object-fit: cover; border: 1px solid var(--jm-line); border-radius: var(--jm-radius); flex: 0 0 auto; }
body.jmx .jm-suggest-prod .nm { flex: 1 1 auto; font-size: 13px; color: var(--jm-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.jmx .jm-suggest-prod .pr { font-size: 13px; font-weight: 700; color: var(--jm-ink); white-space: nowrap; }

body.jmx .header-actions { display: flex; align-items: center; gap: 20px; font-size: 13px; }
body.jmx .header-actions > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--jm-ink);
  position: relative;
  white-space: nowrap;
}
body.jmx .header-actions > a:hover { color: var(--jm-primary); }
body.jmx .header-actions svg { width: 20px; height: 20px; }
body.jmx .cart-badge {
  position: absolute;
  top: -8px;
  left: 12px;
  background: var(--jm-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
body.jmx .search-toggle, body.jmx #themeToggle { display: none; }
body.jmx .hamburger { display: none; }

/* ---- category bar / mega menu ------------------------------------- */
body.jmx .jm-catbar {
  background: var(--jm-card);
  border-bottom: 1px solid var(--jm-line);
  position: sticky;
  top: var(--jm-header-h);
  z-index: 850;
}
body.jmx .jm-catbar .container { display: flex; align-items: center; height: var(--jm-catbar-h); gap: 4px; position: relative; }
body.jmx .jm-allcats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--jm-ink);
  padding: 0 16px 0 0;
  border-right: 1px solid var(--jm-line);
  margin-right: 8px;
  cursor: pointer;
  white-space: nowrap;
}
body.jmx .jm-allcats:hover { color: var(--jm-primary); }
/* Categories spread evenly across the full bar width (Jumia-style). */
body.jmx .jm-catbar-links {
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  overflow: visible;
}
body.jmx .jm-catbar-links .jm-catbar-item {
  position: relative;
  flex: 1 1 0;
  display: flex;
  height: 100%;
}
body.jmx .jm-catbar-links .jm-catbar-item > a {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--jm-ink-soft);
  white-space: nowrap;
  padding: 0 10px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
body.jmx .jm-catbar-links .jm-catbar-item:hover > a,
body.jmx .jm-catbar-links .jm-catbar-item.open > a,
body.jmx .jm-catbar-links .jm-catbar-item.active > a {
  color: var(--jm-primary);
  border-bottom-color: var(--jm-primary);
}
/* Per-category flyout: shows ONLY the hovered category's own contents. */
/* Per-category flyout: a compact list of item NAMES only (no paragraphs). */
body.jmx .jm-catbar-item .jm-catfly {
  position: absolute;
  top: 100%;
  left: 0;
  width: 260px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--jm-line);
  box-shadow: var(--jm-shadow-lg);
  border-radius: 0 0 var(--jm-radius) var(--jm-radius);
  padding: 8px 0;
  display: none;
  flex-direction: column;
  text-align: left;
  z-index: 860;
}
body.jmx .jm-catbar-item.open .jm-catfly { display: flex; }
/* Keep flyouts inside the viewport: anchor the trailing items to the right edge. */
body.jmx .jm-catbar-links .jm-catbar-item:nth-last-child(-n+3) .jm-catfly { left: auto; right: 0; }
body.jmx .jm-catbar-item .jm-catfly a {
  display: block;
  padding: 7px 16px;
  font-size: 13px;
  color: var(--jm-ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.jmx .jm-catbar-item .jm-catfly a:hover { background: #f9f9f9; color: var(--jm-primary); }

/* dropdown mega menu — Jumia-style full-width panel under the category bar.
   The parent row list sits in a fixed left column; the hovered row flies its
   sub-categories out into the panel body on the right. */
body.jmx .jm-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid var(--jm-line);
  box-shadow: var(--jm-shadow-lg);
  display: none;
  z-index: 840;
}
body.jmx .jm-mega.open { display: block; }
body.jmx .jm-mega .container {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  min-height: 300px;
  max-height: 420px;
  overflow: hidden;
}
/* Categories flow into columns, 7 rows per column, so the list stays compact
   instead of running all the way down the page. Columns fill the available
   width; any overflow scrolls horizontally. */
body.jmx .jm-mega .jm-mega-list {
  flex: 1 1 auto;
  min-width: 0;
  border-right: 1px solid var(--jm-line);
  background: #fff;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, auto);
  grid-auto-columns: minmax(200px, 1fr);
  align-content: start;
  max-height: 420px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
}
body.jmx .jm-mega .jm-mega-list::-webkit-scrollbar { height: 8px; }
body.jmx .jm-mega .jm-mega-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
body.jmx .jm-mega .jm-mega-item { position: relative; }
body.jmx .jm-mega .jm-mega-item > a.jm-mega-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  color: var(--jm-ink);
  border-bottom: 1px solid var(--jm-line);
}
body.jmx .jm-mega .jm-mega-item > a.jm-mega-cat:hover,
body.jmx .jm-mega .jm-mega-item.open > a.jm-mega-cat { background: #f9f9f9; color: var(--jm-primary); }
body.jmx .jm-mega .jm-mega-cat .cnt { color: var(--jm-muted); font-size: 11px; font-weight: 400; }
body.jmx .jm-mega .jm-mega-panels {
  flex: 1 1 auto;
  align-self: stretch;
  padding: 16px 22px;
  min-width: 0;
  max-height: 420px;
  overflow-y: auto;
}
body.jmx .jm-mega .jm-mega-kids {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0 16px;
  align-content: start;
  max-height: 320px;
  overflow-y: auto;
}
body.jmx .jm-mega .jm-mega-kids.active { display: grid; }
body.jmx .jm-mega .jm-mega-kids a { display: block; padding: 6px 8px; font-size: 13px; color: var(--jm-ink-soft); border-radius: var(--jm-radius); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.jmx .jm-mega .jm-mega-kids a:hover { background: #f9f9f9; color: var(--jm-primary); }
body.jmx .jm-mega .jm-mega-kids a .cnt { color: var(--jm-muted); font-size: 11px; }

/* ---- hero ---------------------------------------------------------- */
body.jmx .jm-hero { margin-top: 14px; }
body.jmx .jm-hero .container { display: grid; grid-template-columns: 1fr 260px; gap: 12px; }
body.jmx .hero-slider { position: relative; border-radius: var(--jm-radius); overflow: hidden; min-height: 300px; background: #ddd; }
body.jmx .hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; pointer-events: none; }
body.jmx .hero-slide.active { opacity: 1; pointer-events: auto; }
body.jmx .slide-bg { position: absolute; inset: 0; background-size: contain; background-repeat: no-repeat; background-position: center; background-color: #fff; }
body.jmx .slide-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: 40px;
  color: #fff;
  max-width: 62%;
}
body.jmx .slide-content h1 { font-size: 32px; font-weight: 800; margin: 0 0 10px; line-height: 1.15; }
body.jmx .slide-content p { font-size: 15px; margin: 0 0 20px; opacity: .95; }

/* Two-product slide: content panel on the left, two image panels on the right.
   A single uniform gap is used between every panel so spacing is equal. */
body.jmx .hero-slide {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 1fr 1fr;
  gap: 16px;
  padding: 20px;
  background: #fff;
  box-sizing: border-box;
}
body.jmx .slide-content { max-width: none; grid-column: 1; height: auto; align-self: center; color: var(--jm-ink); padding: 0 44px 0 8px; }
body.jmx .slide-content h1 { color: var(--jm-ink); }
body.jmx .slide-content p { color: var(--jm-muted); }
body.jmx .slide-thumbs {
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
  min-height: 0;
}
body.jmx .slide-media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-radius);
  overflow: hidden;
  padding: 12px;
  min-height: 0;
}
body.jmx .slide-media img { width: 100%; height: 100%; object-fit: contain; }
body.jmx .slide-media-fallback { width: 100%; height: 100%; background: linear-gradient(120deg, var(--jm-primary), var(--jm-accent)); }
body.jmx .slider-arrows { position: absolute; inset: 0; transform: none; display: flex; justify-content: space-between; align-items: center; padding: 0 8px; pointer-events: none; }
body.jmx .slider-arrow {
  pointer-events: auto;
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.35); color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
body.jmx .slider-arrow:hover { background: rgba(0,0,0,.6); }
body.jmx .slider-arrow svg { width: 18px; height: 18px; }
body.jmx .slider-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 7px; z-index: 3; }
body.jmx .slider-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(0,0,0,.22); cursor: pointer; }
body.jmx .slider-dot.active { background: var(--jm-primary); }

/* hero side promo cards */
body.jmx .jm-hero-side { display: flex; flex-direction: column; gap: 12px; }
body.jmx .jm-promo-card {
  flex: 1;
  background: var(--jm-card);
  border-radius: var(--jm-radius);
  padding: 18px;
  box-shadow: var(--jm-shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border-left: 4px solid var(--jm-primary);
}
body.jmx .jm-promo-card h4 { margin: 0; font-size: 15px; font-weight: 700; }
body.jmx .jm-promo-card p { margin: 0; font-size: 12px; color: var(--jm-muted); }

/* ---- buttons ------------------------------------------------------- */
body.jmx .btn-primary, body.jmx .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--jm-radius);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 0;
  transition: background .15s, color .15s;
}
body.jmx .btn-primary { background: var(--jm-primary); color: #fff; }
body.jmx .btn-primary:hover { background: var(--jm-primary-dark); }
body.jmx .btn-outline { background: transparent; color: #fff; border: 2px solid #fff; }
body.jmx .btn-outline:hover { background: #fff; color: var(--jm-ink); }

/* ---- feature strip ------------------------------------------------- */
body.jmx .features-bar { background: transparent; padding: 10px 0 4px; }
body.jmx .features-bar .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: var(--jm-card);
  border-radius: var(--jm-radius);
  box-shadow: var(--jm-shadow);
  padding: 9px 14px;
}
body.jmx .feature-item { display: flex; align-items: center; gap: 10px; text-align: left; }
body.jmx .feature-item .icon { color: var(--jm-primary); flex: 0 0 auto; }
body.jmx .feature-item .icon svg { width: 22px; height: 22px; }
body.jmx .feature-item h4 { margin: 0; font-size: 13px; font-weight: 700; }
body.jmx .feature-item p { margin: 0; font-size: 11px; color: var(--jm-muted); }

/* ---- section headers ---------------------------------------------- */
body.jmx .jm-section { margin: 18px 0; }
body.jmx .jm-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
body.jmx .jm-section-head h2 { font-size: 18px; font-weight: 800; margin: 0; color: var(--jm-ink); }
body.jmx .jm-section-head a { color: var(--jm-primary); font-size: 13px; font-weight: 600; }
body.jmx .jm-section-head a:hover { text-decoration: underline; }
body.jmx .section-title { text-align: left; margin: 0 0 10px; }
body.jmx .section-title h2 { font-size: 18px; font-weight: 800; margin: 0; }
body.jmx .section-title p { color: var(--jm-muted); font-size: 13px; margin: 2px 0 0; }
body.jmx .section-title .title-line { display: none; }

/* ---- product grid (Jumia density) --------------------------------- */
body.jmx .product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
body.jmx .product-card, body.jmx .jm-product {
  background: var(--jm-card);
  border-radius: var(--jm-radius);
  box-shadow: var(--jm-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s, transform .15s;
  position: relative;
  cursor: pointer;
  height: 100%;
}
body.jmx .product-card:hover, body.jmx .jm-product:hover { box-shadow: var(--jm-shadow-lg); transform: translateY(-2px); }
body.jmx .product-image, body.jmx .jm-product-img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  overflow: hidden;
  border-bottom: 1px solid var(--jm-line);
}
body.jmx .product-image img, body.jmx .jm-product-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
body.jmx .jm-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--jm-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: .3px;
  z-index: 2;
}
body.jmx .jm-discount {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--jm-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 2px;
  z-index: 2;
}
body.jmx .product-info, body.jmx .jm-product-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
body.jmx .product-title, body.jmx .jm-product-title {
  font-size: 13px;
  color: var(--jm-ink);
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
  font-weight: 400;
}
body.jmx .jm-rating { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--jm-muted); }
body.jmx .jm-stars { color: var(--jm-primary); letter-spacing: -1px; font-size: 12px; }
body.jmx .jm-price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
body.jmx .product-price, body.jmx .jm-price { font-size: 17px; font-weight: 700; color: var(--jm-ink); }
body.jmx .jm-oldprice { font-size: 12px; color: var(--jm-muted); text-decoration: line-through; }
body.jmx .product-actions, body.jmx .jm-product-actions { margin-top: auto; }
body.jmx .product-actions .btn-primary, body.jmx .jm-add {
  width: 100%;
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
  background: var(--jm-primary);
  color: #fff;
  border: 0;
  border-radius: var(--jm-radius);
  cursor: pointer;
}
body.jmx .jm-add:hover { background: var(--jm-primary-dark); }
body.jmx .jm-outofstock { background: #eee; color: #999; cursor: not-allowed; }

/* ---- flash sale ---------------------------------------------------- */
body.jmx .flash-sale {
  background: transparent;
  color: #fff;
  border-radius: 0;
  padding: 0;
  margin: 18px 0;
  overflow: visible;
}
body.jmx .jm-flash-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 18px;
  flex-wrap: wrap;
  max-width: var(--jm-max);
  margin: 0 auto;
  background: linear-gradient(90deg, var(--jm-primary), var(--jm-accent));
  border-radius: var(--jm-radius);
}
body.jmx .jm-flash-left { display: flex; align-items: center; gap: 14px; }
body.jmx .jm-flash-left h2 { margin: 0; font-size: 17px; font-weight: 800; }
body.jmx .jm-flash-left p { margin: 0; font-size: 11px; opacity: .9; }
body.jmx .jm-flash-left svg { width: 20px; height: 20px; }
body.jmx .countdown { display: flex; gap: 6px; }
body.jmx .countdown-item { background: rgba(0,0,0,.22); border-radius: 4px; padding: 3px 8px; text-align: center; min-width: 42px; }
body.jmx .countdown-item .num { display: block; font-size: 15px; font-weight: 800; }
body.jmx .countdown-item .label { display: block; font-size: 8px; text-transform: uppercase; letter-spacing: .5px; opacity: .85; }
body.jmx .flash-sale .btn-outline { border: 2px solid #fff; }

/* ---- categories ---------------------------------------------------- */
body.jmx .categories-section { margin-top: 18px; margin-bottom: 18px; }
body.jmx .category-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }

/* ---- brand strip (template section) -------------------------------- */
body.jmx .brand-strip { display: flex; flex-wrap: wrap; gap: 10px; }
body.jmx .brand-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid var(--jm-border, #e5e7eb); border-radius: 999px;
  background: #fff; color: var(--jm-text, #282828); text-decoration: none; font-size: 13px; font-weight: 600;
  transition: border-color .15s, box-shadow .15s;
}
body.jmx .brand-chip:hover { border-color: var(--jm-primary); box-shadow: var(--jm-shadow); }
body.jmx .brand-chip .ct { font-size: 11px; font-weight: 600; color: var(--jm-muted, #6b7280); background: #f3f4f6; border-radius: 999px; padding: 1px 7px; }
body.jmx .category-card {
  position: relative;
  background: #fff;
  border-radius: var(--jm-radius);
  box-shadow: var(--jm-shadow);
  aspect-ratio: 1/1;
  overflow: hidden;
  cursor: pointer;
}
body.jmx .category-card:hover { box-shadow: var(--jm-shadow-lg); }
body.jmx .cat-overlay {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  color: #fff;
  padding: 20px 10px 10px;
  text-align: center;
}
body.jmx .cat-overlay h3 { margin: 0; font-size: 13px; font-weight: 700; }
body.jmx .cat-overlay span { font-size: 10px; opacity: .85; }

/* ---- shop listing (filters + results) ------------------------------ */
body.jmx .shop-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; margin: 6px 0 18px; align-items: start; }
body.jmx .shop-layout .sidebar {
  background: var(--jm-card);
  border-radius: var(--jm-radius);
  box-shadow: var(--jm-shadow);
  padding: 16px;
  position: sticky;
  top: calc(var(--jm-header-h) + var(--jm-catbar-h) + 12px);
}
body.jmx .sidebar h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--jm-ink); margin: 0 0 10px; }
body.jmx .filter-group { margin-bottom: 18px; }
body.jmx .filter-group:last-child { margin-bottom: 0; }
body.jmx .filter-group ul { list-style: none; margin: 0; padding: 0; }
body.jmx .filter-group li { padding: 6px 0; font-size: 13px; cursor: pointer; color: var(--jm-ink-soft); display: flex; justify-content: space-between; gap: 8px; }
body.jmx .filter-group li:hover, body.jmx .filter-group li.active { color: var(--jm-primary); font-weight: 600; }
body.jmx .filter-group li .cnt { color: var(--jm-muted); font-size: 11px; }
body.jmx .category-select, body.jmx .sort-select, body.jmx .price-input {
  width: 100%;
  border: 1px solid #c7c7cd;
  border-radius: var(--jm-radius);
  padding: 8px 10px;
  font-size: 13px;
  background: #fff;
  outline: 0;
}
body.jmx .price-range { display: flex; gap: 8px; align-items: center; }
body.jmx .price-range input { width: 100%; }
body.jmx .jm-apply-filter { width: 100%; margin-top: 8px; padding: 8px; font-size: 12px; background: var(--jm-primary); color: #fff; border: 0; border-radius: var(--jm-radius); cursor: pointer; font-weight: 700; }

body.jmx .shop-content { min-width: 0; }
body.jmx .shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--jm-card);
  border-radius: var(--jm-radius);
  box-shadow: var(--jm-shadow);
  padding: 12px 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
body.jmx .result-count { font-size: 13px; color: var(--jm-muted); }
body.jmx .shop-header .sort-select { width: auto; min-width: 180px; }
body.jmx .product-grid.shop { grid-template-columns: repeat(4, 1fr); }
body.jmx .pagination { display: flex; justify-content: center; gap: 6px; margin: 22px 0; }
body.jmx .pagination button {
  min-width: 36px; height: 36px; border: 1px solid var(--jm-line);
  background: #fff; border-radius: var(--jm-radius); cursor: pointer;
  font-size: 13px; color: var(--jm-ink-soft);
}
body.jmx .pagination button.active { background: var(--jm-primary); border-color: var(--jm-primary); color: #fff; font-weight: 700; }
body.jmx .pagination button:disabled { opacity: .4; cursor: default; }

/* ---- product detail ------------------------------------------------ */
body.jmx .jm-pdp { display: grid; grid-template-columns: 400px 1fr; gap: 18px; background: #fff; border-radius: var(--jm-radius); box-shadow: var(--jm-shadow); padding: 18px; margin: 12px 0; }
body.jmx .jm-pdp-gallery .main-img { aspect-ratio: 1/1; border: 1px solid var(--jm-line); border-radius: var(--jm-radius); display: flex; align-items: center; justify-content: center; padding: 16px; background: #fff; }
body.jmx .jm-pdp-gallery .main-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
body.jmx .jm-pdp-thumbs { display: flex; gap: 8px; margin-top: 8px; }
body.jmx .jm-pdp-thumbs img { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--jm-line); border-radius: 4px; padding: 4px; cursor: pointer; background:#fff; }
body.jmx .jm-pdp-thumbs img.active { border-color: var(--jm-primary); }
body.jmx .jm-pdp-info h1 { font-size: 20px; font-weight: 700; margin: 0 0 6px; line-height: 1.3; }
body.jmx .jm-pdp-info .brand { font-size: 12px; color: var(--jm-primary); font-weight: 600; margin-bottom: 4px; }
body.jmx .jm-pdp-price { display: flex; align-items: baseline; gap: 10px; margin: 10px 0; }
body.jmx .jm-pdp-price .now { font-size: 26px; font-weight: 800; color: var(--jm-ink); }
body.jmx .jm-pdp-price .was { font-size: 14px; color: var(--jm-muted); text-decoration: line-through; }
body.jmx .jm-pdp-price .off { background: #fef0e6; color: var(--jm-red); font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 2px; }
body.jmx .jm-pdp-meta { font-size: 14px; color: var(--jm-muted); margin: 8px 0; }
body.jmx .jm-pdp-meta span { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; }
body.jmx .jm-pdp-desc { font-size: 14px; color: var(--jm-ink-soft); line-height: 1.6; margin: 12px 0; }
/* Imported descriptions are rich HTML — constrain media + tidy headings. */
body.jmx .jm-pdp-desc img, body.jmx .jm-pdp-rich img { max-width: 100%; height: auto; border-radius: var(--jm-radius); margin: 8px 0; }
body.jmx .jm-pdp-rich { font-size: 14px; color: var(--jm-ink-soft); line-height: 1.65; }
body.jmx .jm-pdp-rich h1, body.jmx .jm-pdp-rich h2 { font-size: 17px; color: var(--jm-ink); margin: 14px 0 6px; }
body.jmx .jm-pdp-rich h3 { font-size: 15px; color: var(--jm-ink); margin: 12px 0 6px; }
body.jmx .jm-pdp-rich h4, body.jmx .jm-pdp-rich h5, body.jmx .jm-pdp-rich h6 { font-size: 14px; color: var(--jm-ink); margin: 10px 0 4px; }
body.jmx .jm-pdp-rich p { margin: 0 0 10px; }
body.jmx .jm-pdp-rich ul, body.jmx .jm-pdp-rich ol { margin: 0 0 10px; padding-left: 22px; }
body.jmx .jm-pdp-rich li { margin-bottom: 3px; }
body.jmx .jm-pdp-rich table { width: 100%; border-collapse: collapse; margin: 10px 0; }
body.jmx .jm-pdp-rich th, body.jmx .jm-pdp-rich td { border: 1px solid var(--jm-line); padding: 8px 10px; font-size: 14px; }
body.jmx .jm-pdp-rich a { color: var(--jm-primary); }
body.jmx .jm-qty { display: inline-flex; align-items: center; border: 1px solid #c7c7cd; border-radius: var(--jm-radius); overflow: hidden; margin-right: 12px; }
body.jmx .jm-qty button { border: 0; background: #f5f5f5; width: 34px; height: 40px; cursor: pointer; font-size: 16px; }
body.jmx .jm-qty input { width: 48px; height: 40px; border: 0; text-align: center; font-size: 14px; outline: 0; }
body.jmx .jm-pdp-buy { display: flex; align-items: center; margin-top: 12px; flex-wrap: wrap; gap: 10px; }
body.jmx .jm-pdp-buy .btn-primary { padding: 11px 36px; font-size: 15px; }
body.jmx .jm-pdp-buy .btn-secondary { background: #fff; color: var(--jm-primary); border: 1px solid var(--jm-primary); padding: 11px 28px; border-radius: var(--jm-radius); font-weight: 700; cursor: pointer; }
body.jmx .jm-pdp-section { background: #fff; border-radius: var(--jm-radius); box-shadow: var(--jm-shadow); padding: 18px; margin-bottom: 12px; }
body.jmx .jm-pdp-section h3 { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
/* Two-column detail layout: long description on the left, reviews + Q&A on the right. */
body.jmx .jm-pdp-columns { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 12px; align-items: start; }
body.jmx .jm-pdp-col-main { min-width: 0; }
body.jmx .jm-pdp-col-side { min-width: 0; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 12px; }
body.jmx .jm-pdp-col-side .jm-pdp-section { margin-bottom: 0; }
body.jmx .jm-pdp-col-side #reviewsSection,
body.jmx .jm-pdp-col-side #qaSection { max-height: 420px; overflow-y: auto; }
body.jmx .jm-review { border-bottom: 1px solid var(--jm-line); padding: 10px 0; }
body.jmx .jm-review:last-child { border-bottom: 0; }
body.jmx .jm-review .who { font-weight: 600; font-size: 14px; }
body.jmx .jm-review .when { font-size: 12px; color: var(--jm-muted); }
body.jmx .jm-review .txt { font-size: 14px; color: var(--jm-ink-soft); margin-top: 4px; line-height: 1.6; }
body.jmx .jm-stars-lg { color: var(--jm-primary); font-size: 15px; letter-spacing: -1px; }
body.jmx .jm-review-form input, body.jmx .jm-review-form textarea, body.jmx .jm-review-form select {
  width: 100%; border: 1px solid #c7c7cd; border-radius: var(--jm-radius); padding: 9px 11px; font-size: 14px; margin-bottom: 8px; outline: 0;
}
body.jmx .jm-breadcrumb { font-size: 12px; color: var(--jm-muted); margin: 6px 0 2px; }
body.jmx .jm-breadcrumb a:hover { color: var(--jm-primary); }

/* ---- empty / states ------------------------------------------------ */
body.jmx .jm-empty { background: #fff; border-radius: var(--jm-radius); box-shadow: var(--jm-shadow); text-align: center; padding: 60px 20px; color: var(--jm-muted); }
body.jmx .jm-empty svg { width: 46px; height: 46px; opacity: .35; margin-bottom: 12px; }
body.jmx .sample-data-notice { display: none; }

/* ---- newsletter ---------------------------------------------------- */
body.jmx .newsletter { background: var(--jm-card); border-radius: var(--jm-radius); box-shadow: var(--jm-shadow); padding: 30px; text-align: center; margin-top: 18px; margin-bottom: 18px; }
body.jmx .newsletter h2 { margin: 0 0 6px; font-size: 20px; font-weight: 800; }
body.jmx .newsletter p { color: var(--jm-muted); margin: 0 0 16px; font-size: 13px; }
body.jmx .newsletter form { display: flex; gap: 8px; max-width: 460px; margin: 0 auto; }
body.jmx .newsletter input { flex: 1; border: 1px solid #c7c7cd; border-radius: var(--jm-radius); padding: 11px 14px; font-size: 14px; outline: 0; }
body.jmx .newsletter button { background: var(--jm-primary); color: #fff; border: 0; border-radius: var(--jm-radius); padding: 0 24px; font-weight: 700; cursor: pointer; }

/* ---- footer -------------------------------------------------------- */
body.jmx .footer { background: #282828; color: #c9c9c9; margin-top: 30px; padding: 34px 0 0; }
body.jmx .footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 26px; }
body.jmx .footer-col h3 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .4px; margin: 0 0 14px; }
body.jmx .footer-col p { font-size: 13px; line-height: 1.7; color: #b0b0b0; }
body.jmx .footer-col ul { list-style: none; margin: 0; padding: 0; }
body.jmx .footer-col ul li { margin-bottom: 9px; font-size: 13px; }
body.jmx .footer-col ul li a { color: #b0b0b0; }
body.jmx .footer-col ul li a:hover { color: var(--jm-primary); }
body.jmx .footer .social-links { display: flex; gap: 10px; margin-top: 14px; }
body.jmx .footer .social-links a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
body.jmx .footer .social-links a:hover { background: var(--jm-primary); color: #fff; }
body.jmx .footer .social-links svg { width: 16px; height: 16px; }
body.jmx .contact-info li { display: flex; gap: 8px; align-items: flex-start; }
body.jmx .contact-info svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 2px; color: var(--jm-primary); }
body.jmx .footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 26px; padding: 16px 0; text-align: center; font-size: 12px; color: #8a8a8a; }
body.jmx .footer-bottom .container { display: block; }

/* ---- account panel ------------------------------------------------- */
/* Jumia-style add-to-cart confirmation toast (non-blocking). */
body.jmx .jm-toast {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #088a29;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: var(--jm-radius);
  box-shadow: var(--jm-shadow-lg);
  transform: translateY(-14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, transform .2s;
}
body.jmx .jm-toast.show { opacity: 1; visibility: visible; transform: translateY(0); }
body.jmx .jm-toast svg { width: 16px; height: 16px; }

body.jmx .account-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); opacity: 0; visibility: hidden; transition: opacity .25s; z-index: 1200; }
body.jmx .account-overlay.active { opacity: 1; visibility: visible; }
body.jmx .account-sidebar {
  position: fixed; top: 0; right: -420px; width: 400px; max-width: 92vw; height: 100%;
  background: #fff; box-shadow: -4px 0 24px rgba(0,0,0,.15); z-index: 1300;
  display: flex; flex-direction: column; transition: right .28s ease;
}
body.jmx .account-sidebar.active { right: 0; }
body.jmx .account-sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--jm-line); }
body.jmx .account-sidebar-header h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
body.jmx .account-sidebar-header button { background: none; border: 0; font-size: 24px; line-height: 1; cursor: pointer; color: var(--jm-muted); }
body.jmx .account-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
body.jmx .account-section { padding: 14px 0; border-bottom: 1px solid var(--jm-line); }
body.jmx .account-section:last-child { border-bottom: 0; }
body.jmx .account-section h4 { margin: 0 0 4px; font-size: 14px; }
body.jmx .account-hint { margin: 0 0 10px; font-size: 11px; color: var(--jm-muted); }
body.jmx .account-field { margin-bottom: 8px; }
body.jmx .account-field label { display: block; font-size: 11px; font-weight: 600; color: var(--jm-ink-soft); margin-bottom: 3px; }
body.jmx .account-field input,
body.jmx .account-field select,
body.jmx .account-field textarea { width: 100%; box-sizing: border-box; border: 1px solid #c7c7cd; border-radius: var(--jm-radius); padding: 9px 11px; font-size: 13px; outline: 0; font-family: inherit; background: #fff; }
body.jmx .account-field input:focus,
body.jmx .account-field select:focus,
body.jmx .account-field textarea:focus { border-color: var(--jm-primary); }
body.jmx .account-btn + .account-btn { margin-top: 8px; }
body.jmx .jm-qa-list { display: flex; flex-direction: column; gap: 10px; }
body.jmx .account-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; background: var(--jm-primary); color: #fff; border: 0; border-radius: var(--jm-radius); padding: 10px; font-size: 13px; font-weight: 700; cursor: pointer; }
body.jmx .account-btn:hover { background: var(--jm-primary-dark); }
body.jmx .account-btn.secondary { background: #fff; color: var(--jm-primary); border: 1px solid var(--jm-primary); }
body.jmx .account-result { margin-top: 10px; font-size: 12px; }
body.jmx .account-result.ok { color: var(--jm-green); }
body.jmx .account-result.err { color: var(--jm-red); }
body.jmx .account-orders { display: flex; flex-direction: column; gap: 8px; }
body.jmx .account-order { border: 1px solid var(--jm-line); border-radius: var(--jm-radius); padding: 10px 12px; font-size: 12px; }
body.jmx .account-order .row { display: flex; justify-content: space-between; gap: 8px; }
body.jmx .account-order .num { font-weight: 700; }
body.jmx .account-order .meta { color: var(--jm-muted); font-size: 11px; }
body.jmx .account-order .status { font-weight: 700; color: var(--jm-primary); }
body.jmx .account-empty { font-size: 12px; color: var(--jm-muted); }

/* ---- responsive ---------------------------------------------------- */
@media (max-width: 1080px) {
  body.jmx .product-grid { grid-template-columns: repeat(4, 1fr); }
  body.jmx .product-grid.shop { grid-template-columns: repeat(3, 1fr); }
  body.jmx .jm-hero .container { grid-template-columns: 1fr; }
  body.jmx .jm-hero-side { flex-direction: row; }
  /* Two-up slide keeps both products visible: stack text above the image pair. */
  body.jmx .hero-slide { grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; }
  body.jmx .slide-content { grid-column: 1 / 3; align-self: start; padding: 4px 8px; }
  body.jmx .slide-thumbs { grid-column: 1 / 3; }
  body.jmx .category-grid { grid-template-columns: repeat(4, 1fr); }
  body.jmx .jm-pdp { grid-template-columns: 1fr; }
  body.jmx .jm-pdp-columns { grid-template-columns: 1fr; }
  body.jmx .jm-pdp-col-side { position: static; }
  /* Below desktop width equal flex-basis would crush the labels, so let the
     strip keep its natural spacing and scroll horizontally instead. */
  body.jmx .jm-catbar-links { justify-content: flex-start; gap: 18px; overflow-x: auto; scrollbar-width: none; }
  body.jmx .jm-catbar-links::-webkit-scrollbar { display: none; }
  body.jmx .jm-catbar-links .jm-catbar-item { flex: 0 0 auto; }
  /* Scrolling clips absolutely-positioned flyouts; pin them to the bar instead. */
  body.jmx .jm-catbar-item .jm-catfly { left: auto; right: 0; }
  body.jmx .jm-catbar-item:first-child .jm-catfly { left: 0; right: auto; }
}
@media (max-width: 780px) {
  body.jmx .product-grid, body.jmx .product-grid.shop { grid-template-columns: repeat(2, 1fr); }
  body.jmx .jm-catbar { display: none; }
  body.jmx .top-bar .container { height: auto; flex-wrap: wrap; row-gap: 2px; padding-top: 5px; padding-bottom: 5px; }
  body.jmx .top-bar-left { flex-wrap: wrap; gap: 4px 14px; }
  body.jmx .top-bar-promo { flex-basis: 100%; }
  body.jmx .header .container { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; gap: 12px; }
  body.jmx .jm-search { order: 3; flex-basis: 100%; }
  body.jmx .shop-layout { grid-template-columns: 1fr; }
  body.jmx .shop-layout .sidebar { position: static; }
  body.jmx .footer .container { grid-template-columns: 1fr 1fr; }
  body.jmx .category-grid { grid-template-columns: repeat(3, 1fr); }
  body.jmx .features-bar .container { grid-template-columns: 1fr 1fr; }
  body.jmx .slide-content { max-width: 100%; padding: 4px 8px; }
  body.jmx .slide-content h1 { font-size: 24px; }
  body.jmx .hero-slide { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  body.jmx .slide-content { grid-column: 1; }
  body.jmx .slide-thumbs { grid-column: 1; gap: 12px; }
}
@media (max-width: 480px) {
  body.jmx .category-grid { grid-template-columns: repeat(2, 1fr); }
  body.jmx .footer .container { grid-template-columns: 1fr; }
  body.jmx .features-bar .container { grid-template-columns: 1fr; }
}

/* ---- wishlist ------------------------------------------------------ */
body.jmx .wishlist-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transition: opacity .25s; z-index: 1200;
}
body.jmx .wishlist-overlay.active { opacity: 1; visibility: visible; }
body.jmx .wishlist-sidebar {
  position: fixed; top: 0; right: 0; height: 100%; width: 380px; max-width: 92vw;
  background: #fff; z-index: 1210; box-shadow: -4px 0 24px rgba(0,0,0,.15);
  transform: translateX(100%); transition: transform .28s; display: flex; flex-direction: column;
}
body.jmx .wishlist-sidebar.active { transform: translateX(0); }
body.jmx .wishlist-body { flex: 1 1 auto; overflow-y: auto; padding: 16px; }
body.jmx .wishlist-item {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--jm-line); position: relative;
}
body.jmx .wishlist-item .thumb { width: 64px; height: 64px; flex: 0 0 auto; border: 1px solid var(--jm-line); border-radius: var(--jm-radius); overflow: hidden; }
body.jmx .wishlist-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
body.jmx .wishlist-item .info { flex: 1 1 auto; min-width: 0; }
body.jmx .wishlist-item .info h4 { font-size: 13px; font-weight: 500; margin: 0 0 4px; color: var(--jm-ink); }
body.jmx .wishlist-item .info .price { font-size: 14px; font-weight: 700; color: var(--jm-ink); display: block; margin-bottom: 6px; }
body.jmx .wishlist-item .wishlist-add {
  font-size: 12px; font-weight: 700; padding: 6px 12px; border: 0; border-radius: var(--jm-radius);
  background: var(--jm-primary); color: #fff; cursor: pointer;
}
body.jmx .wishlist-item .wishlist-add:hover { background: var(--jm-primary-dark); }
body.jmx .wishlist-item .wishlist-remove {
  position: absolute; top: 10px; right: 0; border: 0; background: none; color: var(--jm-muted);
  cursor: pointer; padding: 2px;
}
body.jmx .wishlist-item .wishlist-remove:hover { color: var(--jm-red); }
body.jmx .wishlist-item .wishlist-remove svg { width: 16px; height: 16px; }

/* product-card heart */
body.jmx .jm-product { position: relative; }
body.jmx .jm-wish {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: #b0b0b0; box-shadow: var(--jm-shadow);
  display: flex; align-items: center; justify-content: center;
}
body.jmx .jm-wish:hover { color: var(--jm-red); }
body.jmx .jm-wish.active { color: #fff; background: var(--jm-red); }
body.jmx .jm-wish svg { width: 17px; height: 17px; }
body.jmx .jm-wish.active svg { fill: currentColor; }
body.jmx .jm-wish-lg {
  display: inline-flex; align-items: center; gap: 7px; padding: 12px 20px;
  border: 1px solid var(--jm-line); background: #fff; color: var(--jm-ink);
  border-radius: var(--jm-radius); font-size: 14px; font-weight: 700; cursor: pointer;
}
body.jmx .jm-wish-lg:hover { border-color: var(--jm-red); color: var(--jm-red); }
body.jmx .jm-wish-lg svg { width: 16px; height: 16px; }

/* ---- static content pages (about / contact / policies) ------------- */
body.jmx .jm-static {
  background: #fff;
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-radius);
  box-shadow: var(--jm-shadow);
  padding: 28px 32px;
  max-width: 900px;
  margin: 0 auto;
}
body.jmx .jm-static h1 { font-size: 26px; font-weight: 800; color: var(--jm-ink); margin: 0 0 8px; }
body.jmx .jm-static h2 { font-size: 18px; font-weight: 700; color: var(--jm-ink); margin: 26px 0 8px; }
body.jmx .jm-static h3 { font-size: 15px; font-weight: 700; color: var(--jm-ink); margin: 20px 0 6px; }
body.jmx .jm-static p { font-size: 14px; line-height: 1.75; color: var(--jm-ink-soft); margin: 0 0 12px; }
body.jmx .jm-static .lead { font-size: 16px; color: var(--jm-muted); margin-bottom: 20px; }
body.jmx .jm-static ul { margin: 0 0 14px; padding-left: 22px; }
body.jmx .jm-static li { font-size: 14px; line-height: 2; color: var(--jm-ink-soft); }
body.jmx .jm-static a:not(.btn-primary):not(.btn-outline) { color: var(--jm-primary); }
body.jmx .jm-static a:not(.btn-primary):not(.btn-outline):hover { text-decoration: underline; }
body.jmx .jm-static .btn-primary { margin-top: 10px; color: #fff; }
body.jmx .jm-static p svg { width: 16px; height: 16px; vertical-align: -3px; color: var(--jm-primary); margin-right: 4px; }
body.jmx .jm-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 14px 0 20px; }
body.jmx .jm-table th { background: #f8f8f8; color: var(--jm-ink); text-align: left; padding: 10px 14px; border: 1px solid var(--jm-line); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
body.jmx .jm-table td { padding: 10px 14px; border: 1px solid var(--jm-line); color: var(--jm-ink-soft); }
body.jmx .jm-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
body.jmx .jm-static .form-group { margin-bottom: 14px; }
body.jmx .jm-static .form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--jm-muted); margin-bottom: 6px; }
body.jmx .jm-static .form-group input,
body.jmx .jm-static .form-group select,
body.jmx .jm-static .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c7c7cd;
  border-radius: var(--jm-radius);
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--jm-ink);
  outline: 0;
}
body.jmx .jm-static .form-group input:focus,
body.jmx .jm-static .form-group select:focus,
body.jmx .jm-static .form-group textarea:focus { border-color: var(--jm-primary); }
@media (max-width: 780px) {
  body.jmx .jm-static { padding: 20px; }
  body.jmx .jm-contact-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* =====================================================================
   Jumia-style CHECKOUT — a dedicated full-page, two-column layout.
   Left: Contact / Delivery / Payment sections stacked in one scroll.
   Right: sticky Order Summary with the Place Order button.
   Scoped to .jmx so the ERP admin checkout modal is untouched.
   ===================================================================== */
body.jmx.checkout-open { overflow: hidden; }

body.jmx .checkout-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--jm-bg);
  z-index: 1300;
  overflow-y: auto;
  align-items: flex-start;
  justify-content: center;
}
body.jmx .checkout-overlay.active { display: block; }

body.jmx .checkout-modal.multi-step {
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0 0 40px;
  margin: 0;
}
body.jmx .checkout-modal.multi-step .close-btn {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 1400;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--jm-shadow-lg);
  color: var(--jm-ink);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Jumia checkout top bar */
body.jmx .jm-checkout-topbar {
  background: #fff;
  border-bottom: 1px solid var(--jm-line);
  padding: 14px 0;
  margin-bottom: 18px;
  position: sticky;
  top: 0;
  z-index: 1350;
}
body.jmx .jm-checkout-topbar .container {
  display: flex;
  align-items: center;
  gap: 14px;
}
body.jmx .jm-checkout-topbar .logo img { height: 36px; width: auto; }
body.jmx .jm-checkout-topbar h1 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--jm-ink);
}
body.jmx .jm-checkout-topbar .secure {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--jm-muted);
}
body.jmx .jm-checkout-topbar .secure svg { width: 15px; height: 15px; color: var(--jm-green); }

/* Two-column grid holding the stacked sections + summary. */
body.jmx .jm-checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
body.jmx .jm-checkout-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
body.jmx .jm-checkout-side { position: sticky; top: 78px; }

/* Hide the wizard progress bar — Jumia uses labelled sections, not steps. */
body.jmx .checkout-modal.multi-step > .checkout-progress { display: none; }

/* Every section is a white card, always visible (no one-at-a-time wizard),
   EXCEPT the receipt screen which only appears after the order is placed. */
body.jmx .checkout-modal.multi-step .checkout-step {
  display: block !important;
  background: #fff;
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-radius);
  box-shadow: var(--jm-shadow);
  padding: 20px 22px;
  animation: none;
}
body.jmx .checkout-modal.multi-step .checkout-step#step5 { display: none !important; }
body.jmx .checkout-step h2 {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--jm-ink);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Numbered section badges, matching Jumia's checkout sections. */
body.jmx .checkout-step[data-jm-section]:not(#step5) h2::before {
  content: attr(data-jm-section);
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--jm-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.jmx .checkout-step > p { font-size: 12px; color: var(--jm-muted); margin-bottom: 16px; }
body.jmx .checkout-step .form-group { margin-bottom: 14px; }
body.jmx .checkout-step .form-group label { font-size: 12px; color: var(--jm-muted); }
body.jmx .checkout-step .form-group input,
body.jmx .checkout-step .form-group select {
  padding: 10px 12px;
  border: 1px solid #c7c7cd;
  border-radius: var(--jm-radius);
  font-family: inherit;
  font-size: 14px;
  background: #fff;
}
body.jmx .checkout-step .form-group input:focus,
body.jmx .checkout-step .form-group select:focus { border-color: var(--jm-primary); box-shadow: 0 0 0 2px rgba(0,0,0,.04); }

/* Jumia uses a single "Place Order" CTA — hide the per-section wizard
   Back/Next buttons (the receipt keeps its own actions). */
body.jmx .checkout-step:not(#step5) .step-actions { display: none; }
body.jmx .step-actions .btn-outline {
  background: #fff;
  color: var(--jm-ink);
  border: 1px solid #c7c7cd;
}
body.jmx .step-actions .btn-outline:hover { background: #f5f5f5; color: var(--jm-ink); }

body.jmx .shipping-options,
body.jmx .payment-methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.jmx .shipping-card,
body.jmx .payment-card {
  border-radius: var(--jm-radius);
  padding: 16px 14px;
}
body.jmx .shipping-card.selected,
body.jmx .payment-card.selected {
  border-color: var(--jm-primary);
  background: #fff8f1;
}
body.jmx .shipping-card .shipping-icon,
body.jmx .payment-card .payment-icon { color: var(--jm-primary); }
body.jmx .payment-form,
body.jmx .delivery-routes,
body.jmx .mpesa-reference { background: #f8f8f8; border-radius: var(--jm-radius); }
/* The in-section order summary is redundant with the sticky right column. */
body.jmx .checkout-step #checkoutStepSummary { display: none; }

body.jmx .summary-row.total { color: var(--jm-ink); }
body.jmx .summary-row.total span:last-child,
body.jmx .jm-checkout-side .total-amount { color: var(--jm-primary); }

/* Right column: the Order Summary card with the Place Order button. */
body.jmx .jm-order-summary {
  background: #fff;
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-radius);
  box-shadow: var(--jm-shadow);
  padding: 18px;
}
body.jmx .jm-order-summary h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--jm-line);
  color: var(--jm-ink);
}
body.jmx .jm-sum-items { max-height: 260px; overflow-y: auto; margin-bottom: 12px; }
body.jmx .jm-sum-item { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--jm-line); }
body.jmx .jm-sum-item:last-child { border-bottom: 0; }
body.jmx .jm-sum-item .thumb { width: 44px; height: 44px; flex: 0 0 auto; border: 1px solid var(--jm-line); border-radius: var(--jm-radius); overflow: hidden; }
body.jmx .jm-sum-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
body.jmx .jm-sum-item .info { flex: 1 1 auto; min-width: 0; }
body.jmx .jm-sum-item .info h4 { font-size: 12px; font-weight: 500; margin: 0 0 3px; color: var(--jm-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.jmx .jm-sum-item .info .qty { font-size: 11px; color: var(--jm-muted); }
body.jmx .jm-sum-item .line { font-size: 12px; font-weight: 700; color: var(--jm-ink); white-space: nowrap; }
body.jmx .jm-sum-totals .row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; color: var(--jm-ink-soft); }
body.jmx .jm-sum-totals .row.vat { font-size: 12px; color: var(--jm-muted); }
body.jmx .jm-sum-totals .divider { border-top: 1px dashed var(--jm-line); margin: 8px 0; }
body.jmx .jm-sum-totals .row.total { font-size: 17px; font-weight: 800; color: var(--jm-ink); }
body.jmx .jm-sum-totals .row.total span:last-child { color: var(--jm-primary); }
body.jmx .jm-place-order {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  border: 0;
  border-radius: var(--jm-radius);
  background: var(--jm-primary);
  color: #fff;
  cursor: pointer;
}
body.jmx .jm-place-order:hover { background: var(--jm-primary-dark); }
body.jmx .jm-sum-note { font-size: 11px; color: var(--jm-muted); text-align: center; margin-top: 10px; }

/* Once the order is placed, Jumia shows only the confirmation screen. */
body.jmx.checkout-done .jm-checkout-side,
body.jmx.checkout-done .checkout-step:not(#step5) { display: none !important; }
body.jmx.checkout-done .checkout-modal.multi-step .checkout-step#step5 { display: block !important; }
body.jmx.checkout-done .jm-checkout-grid { grid-template-columns: 1fr; max-width: 720px; margin: 0 auto; }

@media (max-width: 900px) {
  body.jmx .jm-checkout-grid { grid-template-columns: 1fr; }
  body.jmx .jm-checkout-side { position: static; order: -1; }
}
