/* ============================================================
   Storefront — mobile-first marketplace layout.

   Built phone-first on purpose: almost every visit to a storefront
   like this is on a phone, so every rule here is written for a
   ~390px viewport and only widened at breakpoints, never the other
   way round.

   Colors: --brand and --accent are injected per store by
   Core\EcommerceTheme (Settings → Frontend Website → Brand Colors).
   The values below are only the defaults for a store that has never
   picked its own. --forest/--marigold are legacy aliases of the same
   two colors, still emitted by EcommerceTheme, kept so nothing
   written against the old names silently loses its color.
   ============================================================ */
:root {
  --brand: #FB7701;
  --brand-dark: #B45601;
  --brand-tint: #FFF1E6;
  --brand-soft: #FED9B8;
  --accent: #E02E24;
  --accent-dark: #AE241C;
  --accent-tint: #FDEAE9;

  --forest: var(--brand);
  --forest-dark: var(--brand-dark);
  --forest-tint: var(--brand-tint);
  --marigold: var(--accent);
  --marigold-dark: var(--accent-dark);

  --page: #F5F5F7;
  --card: #FFFFFF;
  --ink: #1A1A1A;
  --ink-soft: #6B6B75;
  --ink-faint: #9A9AA5;
  --line: #E8E8EC;
  --line-strong: #D6D6DE;
  --ok: #16884C;

  --shadow-sm: 0 1px 2px rgba(16, 18, 25, 0.06);
  --shadow: 0 4px 16px -6px rgba(16, 18, 25, 0.16);
  --shadow-lift: 0 14px 34px -12px rgba(16, 18, 25, 0.26);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: var(--font-body);
  --font-mono: 'Inter', -apple-system, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;

  --header-h: 56px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* a runaway horizontal scroll on a phone is worse than any clipped element */
}
body.ec-no-scroll { overflow: hidden; } /* set while the category drawer is open */

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* A visible focus ring for keyboard users, suppressed for mouse/touch
   so it never flashes on tap. */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.ec-shell { max-width: 1280px; margin: 0 auto; }
.hidden, .ec-hide { display: none !important; }

/* ============================================================
   Header
   Row 1: menu · logo · search · account · cart
   Row 2: the main menu bar (level-1 items), horizontally scrollable
   ============================================================ */
.ec-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.ec-header-main {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 10px;
  max-width: 1280px; margin: 0 auto;
}

.ec-icon-btn {
  flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: var(--ink);
  position: relative; padding: 0;
  transition: background .15s;
}
.ec-icon-btn:hover { background: var(--page); }
.ec-icon-btn:active { transform: scale(0.92); }
.ec-icon-btn svg { width: 21px; height: 21px; display: block; }

.ec-logo { display: flex; align-items: center; gap: 7px; flex-shrink: 0; min-width: 0; }
.ec-logo img { height: 28px; width: auto; max-width: 118px; object-fit: contain; }
.ec-logo-name {
  font-weight: 800; font-size: 1rem; letter-spacing: -0.02em; color: var(--brand);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26vw;
}
/* With a logo image present the name is secondary -- give it even less
   room so it never squeezes the search field, which is the single most
   used control in the header. */
.ec-logo img + .ec-logo-name { max-width: 20vw; font-size: .9rem; }

.ec-search {
  flex: 1 1 90px; min-width: 0;
  display: flex; align-items: center; gap: 6px;
  background: var(--page); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 4px 4px 12px;
}
.ec-search input {
  flex: 1; min-width: 0; border: none; background: none; outline: none;
  font-size: .88rem; color: var(--ink); font-family: inherit;
}
.ec-search input::placeholder { color: var(--ink-faint); }
.ec-search button {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  border: none; background: var(--brand); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.ec-search button svg { width: 16px; height: 16px; }

.ec-avatar {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
  background: var(--brand-tint); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem; text-transform: uppercase;
}
.ec-count-badge {
  position: absolute; top: 2px; right: 0;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: .62rem; font-weight: 700; line-height: 17px; text-align: center;
  transition: transform .2s ease;
}
.ec-count-badge.pulse { animation: ecCartPulse .4s ease; }
@keyframes ecCartPulse { 0% { transform: scale(1); } 40% { transform: scale(1.55); } 100% { transform: scale(1); } }

/* ---- Account dropdown ---- */
.ec-account-wrap { position: relative; flex-shrink: 0; }
.ec-account-menu {
  position: absolute; top: calc(100% + 10px); inset-inline-end: -6px;
  width: min(300px, calc(100vw - 24px));
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); z-index: 70; overflow: hidden;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.ec-account-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.ec-account-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.ec-account-head .ec-avatar { width: 40px; height: 40px; font-size: 1rem; }
.ec-account-name { font-weight: 700; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-account-sub { font-size: .76rem; color: var(--ink-soft); }
.ec-account-quick { display: flex; gap: 8px; padding: 0 12px 12px; }
.ec-account-quick a {
  flex: 1; text-align: center; padding: 10px 4px; border-radius: var(--radius-sm);
  background: var(--page); font-size: .72rem; font-weight: 600; color: var(--ink-soft);
}
.ec-account-quick a:active { background: var(--brand-tint); }
.ec-account-quick .ec-aq-icon { display: block; font-size: 1.1rem; margin-bottom: 3px; }
.ec-account-list { border-top: 1px solid var(--line); }
.ec-account-list a {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  font-size: .88rem; border-bottom: 1px solid var(--line);
}
.ec-account-list a:last-child { border-bottom: none; }
.ec-account-list a:hover { background: var(--page); }
.ec-account-list .ec-al-icon { width: 20px; text-align: center; opacity: .8; }
.ec-account-list .danger { color: var(--accent-dark); }

/* ---- Become a seller, and change language ----
   Both live at the bottom of the account dropdown on a phone, and in
   the header itself on a wide screen. Logical properties throughout so
   the Arabic layout mirrors without a second rule. */
.ec-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.ec-account-extra .ec-sell-row { align-items: flex-start; }
.ec-account-extra .ec-sell-row small {
  display: block; font-size: .76rem; color: var(--ink-faint); font-weight: 400; margin-top: 2px;
}
.ec-account-extra .ec-sell-row span:last-child { min-width: 0; }

.ec-lang-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.ec-lang-row:last-child { border-bottom: none; }
.ec-lang-row select {
  width: 100%; padding: 8px 10px; font-size: .88rem;
  border: 1px solid var(--line); border-radius: 9px; background: var(--card);
  color: var(--ink); font-family: inherit;
}

/* The header pair, desktop only — the dropdown carries them on a phone,
   and the header has no room for them there. */
.ec-head-extras { display: none; }
.ec-sell-link {
  font-size: .85rem; font-weight: 600; color: var(--ink-soft);
  white-space: nowrap; padding: 7px 10px; border-radius: 9px;
}
.ec-sell-link:hover { color: var(--brand); background: var(--page); }
.ec-lang-inline { display: flex; align-items: center; gap: 5px; }
.ec-lang-inline select {
  padding: 6px 8px; font-size: .84rem; border: 1px solid var(--line);
  border-radius: 9px; background: var(--card); color: var(--ink-soft);
  font-family: inherit; max-width: 130px;
}
.ec-lang-globe { font-size: .95rem; line-height: 1; }

@media (min-width: 900px) {
  .ec-head-extras { display: flex; align-items: center; gap: 6px; margin-inline-start: 4px; }
  /* On a wide screen the dropdown copies are redundant. */
  .ec-account-extra .ec-lang-row { display: none; }
}

/* ---- Main menu bar (level 1) ---- */
.ec-menubar {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding: 0 12px; max-width: 1280px; margin: 0 auto;
  border-top: 1px solid var(--line);
}
.ec-menubar::-webkit-scrollbar { display: none; }
.ec-menubar a {
  flex-shrink: 0; padding: 11px 10px 9px; font-size: .9rem; font-weight: 600;
  color: var(--ink-soft); border-bottom: 3px solid transparent; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.ec-menubar a:hover { color: var(--ink); }
.ec-menubar a.active { color: var(--ink); font-weight: 800; border-bottom-color: var(--brand); }

/* ---- Promise strip ---- */
.ec-promo {
  display: flex; align-items: center; gap: 14px; overflow-x: auto; scrollbar-width: none;
  background: var(--brand-tint); color: var(--brand-dark);
  font-size: .78rem; font-weight: 600; padding: 8px 12px;
}
.ec-promo::-webkit-scrollbar { display: none; }
.ec-promo span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ec-promo span::before { content: '✓'; font-weight: 800; color: var(--ok); }

/* ============================================================
   Round sub-category strip
   ============================================================ */
.ec-catstrip {
  display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none;
  padding: 14px 12px 12px; background: var(--card); border-bottom: 1px solid var(--line);
  max-width: 1280px; margin: 0 auto;
}
.ec-catstrip::-webkit-scrollbar { display: none; }
.ec-catstrip-item {
  flex-shrink: 0; width: 66px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 600; color: var(--ink-soft); line-height: 1.2;
}
.ec-catstrip-circle {
  width: 58px; height: 58px; border-radius: 50%; overflow: hidden;
  background: var(--page); border: 2px solid transparent;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  transition: border-color .15s, transform .15s;
}
.ec-catstrip-circle img { width: 100%; height: 100%; object-fit: cover; }
.ec-catstrip-item:active .ec-catstrip-circle { transform: scale(0.93); }
.ec-catstrip-item.active { color: var(--ink); }
.ec-catstrip-item.active .ec-catstrip-circle { border-color: var(--brand); }
.ec-catstrip-label { display: block; max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   Category drawer — a left rail of level-1 sections, and a panel of
   round sub-category tiles for whichever one is selected. Opened by
   the header's ☰ button.
   ============================================================ */
.ec-drawer-overlay {
  position: fixed; inset: 0; background: rgba(16, 18, 25, 0.5);
  z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.ec-drawer-overlay.open { opacity: 1; pointer-events: auto; }

.ec-catnav {
  position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 91;
  width: min(460px, 94vw); background: var(--card);
  display: flex; flex-direction: column;
  transform: translateX(-102%); transition: transform .26s cubic-bezier(.4, 0, .2, 1);
  box-shadow: var(--shadow-lift);
}
[dir="rtl"] .ec-catnav { transform: translateX(102%); }
.ec-catnav.open, [dir="rtl"] .ec-catnav.open { transform: translateX(0); }

.ec-catnav-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.ec-catnav-title { flex: 1; font-weight: 800; font-size: 1rem; }
.ec-catnav-body { flex: 1; display: flex; min-height: 0; }

.ec-catnav-rail {
  width: 124px; flex-shrink: 0; overflow-y: auto; background: var(--page);
  border-inline-end: 1px solid var(--line); -webkit-overflow-scrolling: touch;
}
.ec-catnav-rail button {
  display: block; width: 100%; text-align: start; padding: 14px 12px;
  background: none; border: none; cursor: pointer;
  font-size: .82rem; font-weight: 600; color: var(--ink-soft); line-height: 1.25;
  border-inline-start: 3px solid transparent;
}
.ec-catnav-rail button.active {
  background: var(--card); color: var(--ink); font-weight: 800;
  border-inline-start-color: var(--brand);
}

.ec-catnav-panel { flex: 1; overflow-y: auto; padding: 16px 14px 32px; -webkit-overflow-scrolling: touch; }
.ec-catnav-pane-title { font-size: 1.02rem; font-weight: 800; margin: 0 0 14px; }
.ec-catnav-back {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: none;
  cursor: pointer; color: var(--brand-dark); font-weight: 700; font-size: .82rem;
  padding: 0 0 10px;
}
.ec-catnav-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
.ec-catnav-tile {
  display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center;
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: .74rem; font-weight: 600; color: var(--ink); line-height: 1.25;
}
/* The circle clips its own contents so a rectangular uploaded icon
   reads as round -- which also clipped the "has more inside" count
   badge to an invisible sliver. The badge now hangs off a wrapper
   that does NOT clip, so it can sit proud of the circle's edge. */
.ec-catnav-circle-wrap { position: relative; display: inline-flex; }
.ec-catnav-tile .ec-catnav-circle {
  width: 68px; height: 68px; border-radius: 50%; overflow: hidden; background: var(--page);
  display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
  transition: transform .15s;
}
.ec-catnav-tile:active .ec-catnav-circle { transform: scale(0.93); }
.ec-catnav-tile { position: relative; }
.ec-catnav-circle img { width: 100%; height: 100%; object-fit: cover; }
.ec-catnav-flag {
  position: absolute; top: -3px; inset-inline-end: -3px; z-index: 2;
  background: var(--accent); color: #fff; font-size: .55rem; font-weight: 800;
  padding: 2px 5px; border-radius: 999px; letter-spacing: .03em;
}
.ec-catnav-tile-label { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ec-catnav-empty { color: var(--ink-soft); font-size: .85rem; }

/* ============================================================
   Section headers and page shells
   ============================================================ */
.ec-section { max-width: 1280px; margin: 0 auto; padding: 16px 12px; }
.ec-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.ec-section-head h2 { font-size: 1.12rem; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
.ec-section-head a { font-size: .82rem; font-weight: 700; color: var(--brand-dark); }

.ec-page { max-width: 1100px; margin: 0 auto; padding: 18px 12px 48px; }
.ec-page h1 { font-size: 1.35rem; font-weight: 800; margin: 0 0 16px; }

.ec-breadcrumb {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  font-size: .78rem; color: var(--ink-soft); margin-bottom: 10px;
}
.ec-breadcrumb a { color: var(--ink-soft); }
.ec-breadcrumb a:hover { color: var(--brand-dark); }
.ec-breadcrumb .sep { opacity: .5; }
.ec-breadcrumb .current { color: var(--ink); font-weight: 700; }

/* ============================================================
   Buttons
   ============================================================ */
.ec-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: .92rem; padding: 12px 22px;
  border-radius: 999px; border: none; cursor: pointer;
  transition: filter .15s, transform .1s, box-shadow .15s;
}
.ec-btn:active { transform: scale(0.97); }
.ec-btn-primary { background: var(--brand); color: #fff !important; box-shadow: var(--shadow-sm); }
.ec-btn-primary:hover { filter: brightness(0.94); }
.ec-btn-outline { background: var(--card); color: var(--ink) !important; border: 1.5px solid var(--line-strong); }
.ec-btn-outline:hover { border-color: var(--brand); color: var(--brand-dark) !important; }
.ec-btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.ec-btn-block { width: 100%; }

/* ============================================================
   Product cards + grid
   ============================================================ */
.ec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.ec-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .16s;
}
.ec-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ec-card:active { transform: scale(0.985); }
.ec-card-img { aspect-ratio: 1/1; background: var(--page); overflow: hidden; }
.ec-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ec-card:hover .ec-card-img img { transform: scale(1.04); }
.ec-card-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.ec-card-body h3 {
  font-size: .82rem; font-weight: 500; margin: 0; line-height: 1.3; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ec-card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 4px; }
.ec-card-price { font-weight: 800; font-size: 1.02rem; color: var(--accent); line-height: 1.2; }
.ec-card-price .cur { font-size: .7em; font-weight: 700; margin-inline-end: 3px; }
.ec-price-original { text-decoration: line-through; color: var(--ink-faint); font-weight: 500; font-size: .72rem; margin-inline-end: 5px; }
.ec-sold { font-size: .7rem; color: var(--ink-faint); font-weight: 500; }
.ec-rating-line { color: var(--ink-soft); font-size: .72rem; font-weight: 600; display: flex; align-items: center; gap: 3px; }
.ec-rating-line .star { color: #F2A73B; }
.ec-rating-line .muted { color: var(--ink-faint); font-weight: 400; }
.ec-seller-line {
  color: var(--ink-faint); font-size: .7rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.ec-quick-add {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); background: var(--card); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
  transition: background .15s, border-color .15s, transform .12s;
}
.ec-quick-add svg { width: 16px; height: 16px; }
.ec-quick-add:hover { border-color: var(--brand); color: var(--brand-dark); }
.ec-quick-add:active { transform: scale(0.85); }
.ec-quick-add.added { background: var(--brand); border-color: var(--brand); color: #fff; }

.ec-wishlist-heart {
  position: absolute; top: 6px; inset-inline-end: 6px; z-index: 5;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); border: none; cursor: pointer;
  font-size: 1rem; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); transition: transform .15s, color .15s;
}
.ec-wishlist-heart:active { transform: scale(0.85); }
.ec-wishlist-heart.active { color: var(--accent); }

/* Ribbon badges stack from the top-left so two never overlap. */
.ec-tag-stack { position: absolute; top: 6px; inset-inline-start: 6px; z-index: 3; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
/* Three ribbons on a phone-width card cover the product photo, which
   is the one thing the card exists to show. Anything past the second
   is dropped rather than shrunk to illegibility. */
.ec-tag-stack .ec-tag:nth-child(n+3) { display: none; }
.ec-tag {
  font-size: .62rem; font-weight: 800; letter-spacing: .02em; color: #fff;
  background: var(--brand); padding: 3px 7px; border-radius: 5px;
  box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .3);
}
.ec-tag-stack .ec-tag { position: static; }
.ec-tag.trending { position: absolute; top: 6px; inset-inline-start: 6px; z-index: 3; background: var(--brand); }
.ec-tag.bestseller { background: var(--brand-dark); }
.ec-tag.lowstock, .ec-tag.flashsale { background: var(--accent); }

/* Horizontal rail (Trending) */
.ec-rail {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px;
  scroll-snap-type: x proximity; scrollbar-width: none;
}
.ec-rail::-webkit-scrollbar { display: none; }
.ec-rail .ec-card { min-width: 152px; width: 152px; scroll-snap-align: start; }

/* Category chips */
.ec-chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 12px; max-width: 1280px; margin: 0 auto; }
.ec-chip-row::-webkit-scrollbar { display: none; }
.ec-chip {
  flex-shrink: 0; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: .8rem; font-weight: 600; color: var(--ink-soft); background: var(--card); white-space: nowrap;
}
.ec-chip.active, .ec-chip:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-tint); }

/* Empty states */
.ec-empty { text-align: center; padding: 48px 20px; color: var(--ink-soft); }
.ec-empty h2 { font-size: 1.1rem; color: var(--ink); margin: 0 0 6px; }
.ec-empty p { margin: 0; font-size: .88rem; }

/* ============================================================
   Hero banner (compact — the catalog, not the copy, is the hero)
   ============================================================ */
.ec-hero {
  max-width: 1280px; margin: 12px auto 0; padding: 0 12px;
}
.ec-hero-inner {
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-radius: var(--radius); padding: 20px 18px; color: #fff;
  display: flex; align-items: center; gap: 16px;
}
.ec-hero h1 { font-size: 1.25rem; font-weight: 800; margin: 0 0 4px; line-height: 1.25; letter-spacing: -0.01em; }
.ec-hero h1 em { font-style: normal; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .55); text-underline-offset: 3px; }
.ec-hero p.lead { font-size: .84rem; margin: 0 0 12px; opacity: .92; }
.ec-hero-eyebrow {
  display: inline-block; font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(255, 255, 255, .2); padding: 4px 10px; border-radius: 999px; margin-bottom: 8px;
}
.ec-hero-ctas { display: flex; gap: 8px; flex-wrap: wrap; }
.ec-hero-ctas .ec-btn { padding: 9px 16px; font-size: .82rem; }
.ec-hero-ctas .ec-btn-primary { background: #fff; color: var(--brand-dark) !important; }
.ec-hero-ctas .ec-btn-outline { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, .5); }
.ec-hero-art { display: none; }
.ec-hero-art-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.ec-hero-art-grid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius-xs); }

/* ============================================================
   Slider
   ============================================================ */
.ec-slider-section { max-width: 1280px; margin: 0 auto; padding: 12px; }
.ec-slider { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.ec-slider-track { display: flex; transition: transform .5s cubic-bezier(.65, 0, .35, 1); }
.ec-slide { min-width: 100%; position: relative; aspect-ratio: 2/1; background: var(--brand-tint); }
.ec-slide img { width: 100%; height: 100%; object-fit: cover; }
.ec-slide-caption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 18px;
  background: linear-gradient(0deg, rgba(0, 0, 0, .68) 0%, transparent 100%); color: #fff;
}
.ec-slide-caption h3 { font-size: 1.05rem; font-weight: 800; margin: 0 0 2px; }
.ec-slide-caption p { margin: 0; font-size: .8rem; opacity: .9; }
.ec-slider-dots { display: flex; gap: 6px; justify-content: center; padding: 10px 0 0; }
.ec-slider-dots button { width: 7px; height: 7px; border-radius: 999px; border: none; background: var(--line-strong); cursor: pointer; transition: background .2s, width .2s; padding: 0; }
.ec-slider-dots button.active { background: var(--brand); width: 20px; }
.ec-slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 34px; height: 34px; border-radius: 999px; border: none;
  background: rgba(255, 255, 255, .9); cursor: pointer; font-size: 1rem; color: var(--ink);
  display: none;
}
.ec-slider-arrow.prev { inset-inline-start: 12px; }
.ec-slider-arrow.next { inset-inline-end: 12px; }

/* ============================================================
   Product detail
   ============================================================ */
.ec-product { max-width: 1100px; margin: 0 auto; padding: 12px 12px 40px; display: grid; grid-template-columns: 1fr; gap: 18px; }
.ec-product-img { aspect-ratio: 1/1; border-radius: var(--radius); overflow: hidden; background: var(--card); }
.ec-product-img img { width: 100%; height: 100%; object-fit: cover; }
.ec-product-info .ec-category-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--brand-dark); font-weight: 700; }
.ec-product-info h1 { font-size: 1.2rem; font-weight: 700; margin: 8px 0 12px; line-height: 1.3; }
.ec-product-price { font-size: 1.6rem; font-weight: 800; color: var(--accent); margin-bottom: 16px; }

.ec-variant-picker { margin: 16px 0; }
.ec-variant-group { margin-bottom: 16px; }
.ec-variant-group label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 8px; }
.ec-variant-warning { color: var(--accent); font-weight: 600; font-size: .8rem; margin-inline-start: 4px; }
.ec-swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; max-width: 420px; }
.ec-swatch {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px;
  border-radius: var(--radius-xs); border: 2px solid var(--line); background: var(--card);
  cursor: pointer; transition: border-color .15s, transform .1s;
}
.ec-swatch img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 6px; }
.ec-swatch span { font-size: .74rem; font-weight: 600; color: var(--ink-soft); }
.ec-swatch:active { transform: scale(0.96); }
.ec-swatch.active { border-color: var(--brand); background: var(--brand-tint); }
.ec-swatch.active span { color: var(--brand-dark); }
.ec-pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ec-pill {
  min-width: 48px; padding: 9px 15px; border-radius: 999px; border: 2px solid var(--line);
  background: var(--card); cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--ink);
  transition: border-color .15s, background .15s, transform .1s;
}
.ec-pill:active { transform: scale(0.94); }
.ec-pill.active { border-color: var(--brand); background: var(--brand); color: #fff; }

.ec-pdp-sticky-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: fixed; inset-inline: 0; bottom: 64px; z-index: 54;
  background: var(--card); border-top: 1px solid var(--line); padding: 9px 12px;
  box-shadow: 0 -4px 16px rgba(16, 18, 25, .08);
}
.ec-pdp-sticky-price { font-weight: 800; font-size: 1.12rem; color: var(--accent); white-space: nowrap; }
.ec-pdp-sticky-bar .ec-btn { flex: 1; max-width: 220px; }
body:has(.ec-pdp-sticky-bar) { padding-bottom: 128px; }

/* ============================================================
   Cart / checkout / account / auth
   ============================================================ */
.ec-cart-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ec-cart-row img { width: 64px; height: 64px; border-radius: var(--radius-xs); object-fit: cover; background: var(--page); flex-shrink: 0; }
.ec-cart-row-info { flex: 1; min-width: 0; }
.ec-cart-row-info .name { font-weight: 600; font-size: .9rem; }
.ec-cart-row-info .price { color: var(--accent); font-weight: 700; font-size: .9rem; margin-top: 3px; }
.ec-qty-stepper { display: flex; align-items: center; gap: 8px; }
.ec-qty-stepper button { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: #fff; cursor: pointer; font-weight: 700; transition: transform .12s; }
.ec-qty-stepper button:active { transform: scale(0.88); }
.ec-cart-remove { background: none; border: none; color: var(--ink-faint); cursor: pointer; font-size: 1.15rem; padding: 4px 6px; transition: transform .12s; }
.ec-cart-remove:hover { color: var(--accent); }
.ec-cart-remove:active { transform: scale(0.88); }

.ec-summary { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.ec-summary-row { display: flex; justify-content: space-between; margin: 7px 0; color: var(--ink-soft); font-size: .9rem; }
.ec-summary-row.total { color: var(--ink); font-weight: 800; font-size: 1.1rem; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }

.ec-layout-2col { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; }

.ec-form-group { margin-bottom: 14px; }
.ec-form-group label { display: block; font-weight: 600; font-size: .82rem; margin-bottom: 5px; color: var(--ink); }
.ec-form-group input, .ec-form-group textarea, .ec-form-group select {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-xs);
  font-family: inherit; font-size: .92rem; background: #fff; color: var(--ink);
}
.ec-form-group input:focus, .ec-form-group textarea:focus, .ec-form-group select:focus { outline: none; border-color: var(--brand); }
.ec-form-row { display: grid; grid-template-columns: 1fr; gap: 12px; }

.ec-auth-card { max-width: 420px; margin: 24px 12px; background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.ec-auth-card h1 { text-align: center; }
.ec-auth-switch { text-align: center; margin-top: 16px; font-size: .88rem; color: var(--ink-soft); }
.ec-auth-error { background: var(--accent-tint); color: var(--accent-dark); padding: 11px 14px; border-radius: var(--radius-xs); font-size: .86rem; margin-bottom: 16px; }
.ec-google-btn { display: flex; align-items: center; justify-content: center; font-weight: 600; }
.ec-auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--ink-faint); font-size: .8rem; }
.ec-auth-divider::before, .ec-auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.ec-auth-tabs { display: flex; gap: 4px; background: var(--page); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.ec-auth-tab { flex: 1; padding: 9px; border: none; background: none; border-radius: 999px; font-weight: 600; font-size: .86rem; color: var(--ink-soft); cursor: pointer; transition: background .15s, color .15s; }
.ec-auth-tab.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.ec-phone-input-row { display: flex; gap: 8px; }
.ec-country-code-select { flex: 0 0 auto; width: 122px; padding: 11px 8px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--card); font-size: .86rem; }
.ec-phone-input-row input[type="tel"] { flex: 1; min-width: 0; }

.ec-order-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ec-order-status { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: .74rem; font-weight: 700; text-transform: capitalize; }
.ec-order-status.pending_payment { background: var(--brand-tint); color: var(--brand-dark); }
.ec-order-status.processing, .ec-order-status.shipped { background: #E8F0FE; color: #1A56C4; }
.ec-order-status.delivered { background: #E4F5EA; color: var(--ok); }
.ec-order-status.cancelled, .ec-order-status.refunded { background: var(--accent-tint); color: var(--accent-dark); }

/* Legacy alias — the old nav's cart badge wrapper. */
.ec-cart-badge { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.ec-cart-badge .count {
  position: absolute; top: -8px; inset-inline-end: -10px; background: var(--accent); color: #fff;
  font-size: .66rem; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.ec-cart-badge .count.pulse { animation: ecCartPulse .4s ease; }

/* ============================================================
   Bottom tab bar (mobile)
   ============================================================ */
.ec-bottom-nav {
  display: flex; position: fixed; bottom: 0; inset-inline: 0; z-index: 55;
  background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(16, 18, 25, .06);
  padding: 5px 4px calc(5px + env(safe-area-inset-bottom, 0px));
}
.ec-bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 2px; border-radius: 10px; color: var(--ink-soft); font-size: .66rem; font-weight: 600;
  transition: color .15s;
}
.ec-bottom-nav a.active { color: var(--brand); }
.ec-bottom-icon { font-size: 1.22rem; line-height: 1; position: relative; }
.ec-bottom-nav-center { margin-top: -20px; }
.ec-bottom-nav-center .ec-bottom-icon {
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
  box-shadow: 0 6px 16px -4px rgba(0, 0, 0, .32); border: 3px solid var(--card);
}
.ec-bottom-nav-center.active .ec-bottom-icon, .ec-bottom-nav-center:active .ec-bottom-icon { background: var(--brand-dark); }
.ec-bottom-cart-icon .count {
  position: absolute; top: -5px; inset-inline-end: -9px; background: var(--accent); color: #fff;
  font-size: .6rem; font-weight: 700; border-radius: 999px; min-width: 15px; height: 15px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
body { padding-bottom: 64px; } /* clears the fixed bar; overridden above when the PDP bar is also present */

/* ============================================================
   Footer
   ============================================================ */
.ec-footer { background: #1B1B20; color: rgba(255, 255, 255, .72); margin-top: 24px; }
.ec-footer-inner { max-width: 1280px; margin: 0 auto; padding: 28px 16px; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.ec-footer-name { font-size: 1.1rem; font-weight: 800; color: #fff; display: block; margin-bottom: 8px; }
.ec-footer-inner p { margin: 2px 0; font-size: .82rem; }
.ec-footer-tag { color: var(--brand); font-weight: 600; font-size: .88rem; }
.ec-footer-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; }
.ec-footer-links a:hover { color: #fff; }

/* Scroll reveal — starts visible and is only hidden once JS confirms
   it can reveal it again, so a JS error or a blocked script can never
   leave the whole page invisible. */
.ec-reveal.ec-reveal-armed { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.ec-reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Wider screens
   ============================================================ */
@media (min-width: 600px) {
  .ec-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .ec-rail .ec-card { min-width: 180px; width: 180px; }
  .ec-section, .ec-page, .ec-product { padding-inline: 16px; }
  .ec-form-row { grid-template-columns: 1fr 1fr; }
  .ec-slider-arrow { display: block; }
  .ec-card-body h3 { font-size: .86rem; }
}

@media (min-width: 860px) {
  body { padding-bottom: 0; } /* the bottom tab bar is hidden from here up */
  body:has(.ec-pdp-sticky-bar) { padding-bottom: 0; }
  .ec-bottom-nav { display: none; }
  .ec-pdp-sticky-bar { display: none; }

  .ec-header-main { padding: 10px 20px; gap: 14px; }
  .ec-icon-btn { width: 40px; height: 40px; }
  .ec-icon-btn svg { width: 23px; height: 23px; }
  .ec-logo img + .ec-logo-name { max-width: none; font-size: 1.25rem; }
  .ec-logo img { height: 34px; max-width: 180px; }
  .ec-logo-name { font-size: 1.25rem; max-width: none; }
  .ec-search { max-width: 460px; padding: 5px 5px 5px 16px; }
  .ec-search input { font-size: .92rem; }
  .ec-menubar { padding-inline: 20px; gap: 10px; }
  .ec-menubar a { font-size: .94rem; padding: 12px 6px 10px; }
  .ec-promo { justify-content: center; padding: 9px 20px; font-size: .82rem; }
  .ec-catstrip { padding: 18px 20px 14px; gap: 22px; }
  .ec-catstrip-item { width: 76px; font-size: .76rem; }
  .ec-catstrip-circle { width: 66px; height: 66px; font-size: 1.7rem; }
  .ec-catstrip-label { max-width: 76px; }

  .ec-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .ec-rail .ec-card { min-width: 210px; width: 210px; }
  .ec-section { padding: 22px 20px; }
  .ec-page { padding: 24px 20px 56px; }
  .ec-section-head h2 { font-size: 1.4rem; }
  .ec-page h1 { font-size: 1.6rem; }

  .ec-hero { margin-top: 16px; padding-inline: 20px; }
  .ec-hero-inner { padding: 34px 32px; }
  .ec-hero h1 { font-size: 2rem; }
  .ec-hero p.lead { font-size: .98rem; }
  .ec-hero-art { display: block; flex: 0 0 258px; }
  .ec-hero-art-grid img { height: 126px; aspect-ratio: auto; }
  .ec-slide { aspect-ratio: 21/8; }
  .ec-slide-caption h3 { font-size: 1.4rem; }

  .ec-product { grid-template-columns: 1fr 1fr; gap: 40px; padding: 26px 20px 60px; }
  .ec-product-info h1 { font-size: 1.7rem; }
  .ec-layout-2col { grid-template-columns: 1.6fr 1fr; gap: 30px; }
  .ec-auth-card { margin: 40px auto; padding: 32px; }
  .ec-catnav { width: 520px; }
  .ec-catnav-rail { width: 168px; }
  .ec-catnav-grid { grid-template-columns: repeat(3, 1fr); gap: 18px 12px; }
}

@media (min-width: 1180px) {
  .ec-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ============================================================
   Customiser (/shop/customise)
   Phone-first like the rest of the storefront: the stage is a square
   the artwork is placed on, and the controls stack beneath it. From
   980px up the two sit side by side with the stage sticky, so the
   price stays in view while you scroll the options.
   ============================================================ */
.cz-svg { width: 100%; height: 100%; display: block; }

/* ---- hero ---- */
.cz-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; padding: 26px 16px 30px; margin-bottom: 4px;
}
.cz-hero-inner { position: relative; z-index: 2; max-width: 1280px; margin: 0 auto; }
.cz-badge {
  display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(255, 255, 255, .2); padding: 5px 11px; border-radius: 999px; margin-bottom: 10px;
}
.cz-hero h1 { font-size: 1.55rem; font-weight: 800; margin: 0 0 8px; line-height: 1.18; letter-spacing: -0.02em; }
.cz-hero h1 em { font-style: normal; opacity: .82; }
.cz-hero p { margin: 0; font-size: .9rem; opacity: .92; max-width: 46ch; }
.cz-hero-art { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .17; }
.cz-hero-blank { position: absolute; width: 130px; height: 130px; }
.cz-float-1 { top: -18px; right: 4%; transform: rotate(-12deg); }
.cz-float-2 { bottom: -34px; right: 30%; width: 96px; height: 96px; transform: rotate(9deg); }
.cz-float-3 { top: 34%; right: 52%; width: 84px; height: 84px; transform: rotate(-6deg); }

/* ---- step headings ---- */
.cz-step { display: flex; align-items: center; gap: 9px; font-size: 1.02rem; font-weight: 800; margin-bottom: 14px; }
.cz-step-n {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 800;
}
.cz-step-n.sm { width: 21px; height: 21px; font-size: .72rem; }

/* ---- category picker ---- */
.cz-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.cz-cat {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 14px 8px 12px; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.cz-cat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cz-cat.active { border-color: var(--brand); background: var(--brand-tint); }
.cz-cat-art {
  width: 62px; height: 62px; display: flex; align-items: center; justify-content: center;
  background: var(--page); border-radius: 14px; overflow: hidden;
}
.cz-cat.active .cz-cat-art { background: #fff; }
.cz-cat-art img { width: 100%; height: 100%; object-fit: cover; }
.cz-cat-emoji { font-size: 1.9rem; }
.cz-cat-name { font-size: .82rem; font-weight: 700; line-height: 1.2; }
.cz-cat-count { font-size: .68rem; color: var(--ink-faint); }

/* ---- search + model grid ---- */
.cz-search-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cz-search-wrap input {
  flex: 1; min-width: 0; padding: 12px 15px; border: 1.5px solid var(--line-strong);
  border-radius: 999px; font-family: inherit; font-size: .92rem; background: var(--card); color: var(--ink);
}
.cz-search-wrap input:focus { outline: none; border-color: var(--brand); }
.cz-search-wrap span { font-size: .78rem; color: var(--ink-faint); white-space: nowrap; }

.cz-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cz-model {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.cz-model:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-soft); }
.cz-model-art {
  aspect-ratio: 1/1; background: var(--page); display: flex; align-items: center; justify-content: center; padding: 10px;
}
.cz-model-art img { width: 100%; height: 100%; object-fit: contain; }
.cz-model-body { padding: 9px 11px 12px; display: flex; flex-direction: column; gap: 2px; }
.cz-model-brand { font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-faint); }
.cz-model-name { font-size: .86rem; font-weight: 600; line-height: 1.25; }
.cz-model-price { font-size: .82rem; font-weight: 800; color: var(--accent); margin-top: 2px; }
.cz-model-meta { font-size: .7rem; color: var(--ink-faint); }
.cz-no-results { text-align: center; color: var(--ink-soft); font-size: .88rem; padding: 22px 10px; }

/* ============================================================
   Designer
   ============================================================ */
.cz-design { max-width: 1280px; margin: 0 auto; padding: 14px 0 40px; }
.cz-design-grid { display: grid; grid-template-columns: 1fr; gap: 18px; padding: 0 12px; }

.cz-stage {
  position: relative; aspect-ratio: 1/1; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  /* No browser text-selection or scroll-panning while dragging artwork. */
  touch-action: none; user-select: none;
}
.cz-view { position: absolute; inset: 0; display: none; }
.cz-view.active { display: block; }
.cz-blank { position: absolute; inset: 6%; }
.cz-blank > svg, .cz-mockup { width: 100%; height: 100%; object-fit: contain; display: block; }

/* the printable rectangle */
.cz-area {
  position: absolute; overflow: hidden;
  outline: 1.5px dashed var(--brand); outline-offset: -1px;
  background: rgba(251, 119, 1, .05);
  cursor: crosshair;
}
.cz-area-hint {
  position: absolute; top: 3px; left: 4px; font-size: .58rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; color: var(--brand-dark); opacity: .65; pointer-events: none;
}
.cz-art { position: absolute; cursor: grab; }
.cz-art img { width: 100%; height: 100%; object-fit: fill; display: block; pointer-events: none; }
.cz-art:active { cursor: grabbing; }
.cz-handle {
  position: absolute; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: .7rem;
  /* Bigger than it looks: a 26px target is the minimum that's
     reliably grabbable with a thumb. */
  touch-action: none;
}
.cz-handle-resize { right: -13px; bottom: -13px; cursor: nwse-resize; }
.cz-handle-resize::after { content: '⤡'; }
.cz-handle-rotate { right: -13px; top: -13px; cursor: grab; }
.cz-handle-rotate::after { content: '⟳'; }

/* side switcher */
.cz-sides { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 12px 0 4px; }
.cz-sides::-webkit-scrollbar { display: none; }
.cz-side {
  flex: 1 0 auto; min-width: 78px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: var(--card); cursor: pointer; font-size: .76rem; font-weight: 700; color: var(--ink-soft);
  position: relative; transition: border-color .15s, color .15s, background .15s;
}
.cz-side.active { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-tint); }
.cz-side-icon { font-size: 1.1rem; line-height: 1; }
.cz-side-dot { position: absolute; top: 4px; right: 6px; font-size: .5rem; color: var(--accent); }
.cz-stage-tip { font-size: .78rem; color: var(--ink-faint); text-align: center; margin: 6px 0 0; }

/* controls */
.cz-panel { display: flex; flex-direction: column; gap: 14px; }
.cz-title { font-size: 1.25rem; font-weight: 800; margin: 0; line-height: 1.25; }
.cz-sub { margin: 0; font-size: .8rem; color: var(--ink-faint); }
.cz-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.cz-block-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .92rem; margin-bottom: 10px; }

.cz-drop { display: block; cursor: pointer; }
.cz-drop-inner {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  border: 2px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 18px 14px;
  transition: border-color .15s, background .15s;
}
.cz-drop:hover .cz-drop-inner { border-color: var(--brand); background: var(--brand-tint); }
.cz-drop-inner strong { font-size: .9rem; }
.cz-drop-inner small { font-size: .74rem; color: var(--ink-faint); }
.cz-drop-icon { font-size: 1.8rem; }
.cz-drop-preview { width: 62px; height: 62px; object-fit: contain; border-radius: 8px; background: var(--page); }
.cz-error { color: var(--accent-dark); background: var(--accent-tint); border-radius: var(--radius-xs); padding: 9px 12px; font-size: .82rem; margin: 10px 0 0; }

.cz-slider-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cz-slider-row label { flex: 0 0 52px; font-size: .82rem; font-weight: 600; }
.cz-slider-row input[type="range"] { flex: 1; min-width: 0; accent-color: var(--brand); }
.cz-slider-row output { flex: 0 0 86px; text-align: end; font-size: .78rem; font-weight: 700; color: var(--ink-soft); }
.cz-btn-row { display: flex; gap: 7px; flex-wrap: wrap; }
.cz-mini {
  padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--card);
  font-size: .78rem; font-weight: 700; cursor: pointer; color: var(--ink);
}
.cz-mini:hover { border-color: var(--brand); color: var(--brand-dark); }
.cz-mini.danger { color: var(--accent-dark); }
.cz-mini.danger:hover { border-color: var(--accent); }
.cz-hint { font-size: .76rem; color: var(--ink-faint); margin: 10px 0 0; }
.cz-pills { display: flex; gap: 8px; flex-wrap: wrap; }

/* price */
/* Sits in normal flow, NOT sticky. A sticky card here floated over
   the size and placement controls it belongs beneath, which read as
   a broken layout — and the bottom of the screen is already taken by
   the tab bar. The always-visible figure lives in .cz-bar instead. */
.cz-price-card {
  background: var(--card); border: 2px solid var(--brand); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow);
}

/* The compact always-visible total + CTA, pinned above the bottom tab
   bar exactly like the product page's own sticky Add-to-cart bar --
   so the price the customer is watching never scrolls out of reach
   while they adjust the artwork. */
.cz-bar {
  position: fixed; inset-inline: 0; bottom: 64px; z-index: 54;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--card); border-top: 1px solid var(--line); padding: 9px 12px;
  box-shadow: 0 -4px 16px rgba(16, 18, 25, .1);
}
.cz-bar-price { display: flex; flex-direction: column; line-height: 1.15; }
.cz-bar-price small { font-size: .68rem; color: var(--ink-faint); }
.cz-bar-price strong { font-size: 1.15rem; font-weight: 800; color: var(--accent); white-space: nowrap; }
.cz-bar .ec-btn { flex: 1; max-width: 210px; }
body:has(.cz-bar) { padding-bottom: 132px; }
.cz-price-rows { margin-bottom: 6px; }
.cz-price-row { display: flex; justify-content: space-between; gap: 12px; font-size: .82rem; color: var(--ink-soft); padding: 4px 0; }
.cz-price-row span:first-child { min-width: 0; }
.cz-price-row small { display: block; font-size: .7rem; color: var(--ink-faint); }
.cz-price-row span:last-child { white-space: nowrap; font-weight: 600; }
.cz-price-total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--line); padding-top: 10px; margin-bottom: 12px;
}
.cz-price-total strong { font-size: 1.3rem; font-weight: 800; color: var(--accent); }

@media (min-width: 600px) {
  .cz-hero { padding: 34px 20px 38px; }
  .cz-hero h1 { font-size: 2.1rem; }
  .cz-cats { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
  .cz-models { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
}
@media (min-width: 980px) {
  .cz-design-grid { grid-template-columns: 1.15fr 0.85fr; gap: 30px; padding: 0 20px; align-items: start; }
  .cz-stage-col { position: sticky; top: 108px; }
  /* Wide enough for the panel to be a sidebar: the whole price card is
     always on screen, so the pinned bar is redundant. */
  .cz-bar { display: none; }
  body:has(.cz-bar) { padding-bottom: 0; }
  .cz-hero h1 { font-size: 2.5rem; }
  .cz-hero-blank { width: 190px; height: 190px; }
}
/* The customiser's own tab in the menu bar — flagged so it reads as a
   different kind of destination from a product category. */
.ec-menubar a.cz-nav-link { color: var(--brand-dark); font-weight: 800; }
.ec-menubar a.cz-nav-link.active { border-bottom-color: var(--brand); }

/* The [hidden] attribute is only `display:none` in the browser's own
   stylesheet, which ANY explicit display rule outranks — so .cz-model
   (display:flex) stayed visible when the search filter hid it. Every
   element the customiser toggles with `hidden` gets an explicit rule
   here rather than relying on the UA default. */
.cz-model[hidden], .cz-cat[hidden], .cz-side[hidden], .cz-art[hidden],
.cz-block[hidden], .cz-handle[hidden], .cz-side-dot[hidden] { display: none !important; }
