/* ==========================================================================
   Trusty storefront — design layer (loaded last on StoreFront.aspx)
   Scope: body.tsx. Older layers (store-shell, public-mobile, storefront-refresh)
   still load first; everything here is written to win over them without
   changing any IDs, handlers or data attributes the page scripts rely on.
   Composition at 390px: header 60 · search 56 · banner ≤ 190 · categories 112
   · section title 44 → first product photos start ≈ 470px from the top.
   ========================================================================== */

body.tsx {
  --tsx-ink: #141a22;
  --tsx-ink-2: #3a4452;
  --tsx-muted: #6a7482;
  --tsx-line: #e9ecef;
  --tsx-surface: #f4f5f6;
  --tsx-sale: #c62f3a;
  --tsx-sale-bg: #fdeceb;
  --tsx-radius: 16px;
  --tsx-gutter: 16px;
  /* Call-to-action colour: the merchant colour, or dark ink when that colour is too pale to read. */
  --tsx-cta: var(--brand);
  --tsx-cta-ink: var(--brand-contrast, #fff);
  --tsx-accent: var(--brand-readable, var(--brand));
  background: #fff !important;
  color: var(--tsx-ink);
  font-family: Cairo, system-ui, sans-serif;
  overflow-x: clip;
}
html:has(body.tsx) { overflow-x: clip; }
body.tsx.tsx-brand-pale { --tsx-cta: #141a22; --tsx-cta-ink: #fff; --tsx-accent: #141a22; }
body.tsx.tsx-brand-light { --tsx-accent: var(--brand-readable, #1f2937); }
body.tsx img { max-width: 100%; }

/* ---------- 1. Header bar ------------------------------------------------ */
body.tsx .topbar {
  height: 60px !important;
  min-height: 60px !important;
  padding-block: 0 !important;
}
body.tsx.tsx-brand-pale .store-page.topbar-below .topbar { box-shadow: 0 1px 0 var(--tsx-line) !important; }
body.tsx .topbar .container { height: 100%; max-width: 1240px; }
body.tsx .topbar-logo-wrap { max-width: 46vw !important; opacity: 1 !important; }
body.tsx .topbar .topbar-logo,
body.tsx .topbar.logo-ratio-off .topbar-logo {
  width: auto !important;
  height: auto !important;
  max-width: 46vw !important;
  max-height: 44px !important;
  object-fit: contain !important;
  border-radius: 8px !important;
}
body.tsx .topbar.logo-ratio-off .topbar-logo-wrap { width: auto !important; }
body.tsx .topbar :is(.social-burger, .info-btn, .search-btn, .cart-btn, .topbar-home-back) {
  min-width: 44px;
  height: 44px;
  border-radius: 12px;
}
/* Search is on demand: the field only appears after the header search icon is tapped. */
body.tsx:not(.tsx-search-open):not(.store-search-active) #shopSearchPanel { display: none !important; }
body.tsx.tsx-search-open .topbar .search-btn { background: rgb(255 255 255 / 18%); }
body.tsx.tsx-brand-pale.tsx-search-open .topbar .search-btn,
body.tsx.tsx-brand-light.tsx-search-open .topbar .search-btn { background: rgb(0 0 0 / 8%); }

/* ---------- 2. Search row (continues the header colour) ----------------- */
body.tsx .store-header-region #shopSearchPanel.shop-search {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 var(--tsx-gutter) 12px !important;
  background: var(--brand) !important;
}
body.tsx.tsx-brand-pale .store-header-region #shopSearchPanel.shop-search { background: var(--brand) !important; }
body.tsx #shopSearchPanel .shop-search-controls {
  max-width: 1240px;
  margin-inline: auto;
  min-height: 44px !important;
  padding-inline: 14px !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgb(20 26 34 / 8%) !important;
}
body.tsx.tsx-brand-pale #shopSearchPanel .shop-search-controls { border-color: var(--tsx-line) !important; }
body.tsx #shopSearchPanel .shop-search-controls input {
  height: 42px !important;
  font: 400 16px/1.5 Cairo, sans-serif !important;
  color: var(--tsx-ink);
}
body.tsx #shopSearchPanel .shop-search-controls input::placeholder { color: var(--tsx-muted); }
body.tsx #shopBrowse #shopSearchPanel.shop-search { background: #fff !important; padding: 8px 0 !important; }
body.tsx #shopBrowse #shopSearchPanel .shop-search-controls { background: var(--tsx-surface) !important; box-shadow: none !important; }

/* ---------- 3. Banner: full artwork, never cropped, never dominant ------ */
body.tsx .hero-shell {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 var(--tsx-gutter) !important;
  border-radius: 0 !important;
  overflow: visible !important;
  /* Merchant colour carries behind the top of the banner so header, search and
     banner read as one block. */
  background: linear-gradient(var(--brand) 0 48px, #fff 48px) !important;
}
body.tsx .hero.hero-has-image {
  position: relative;
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-width: 1240px;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}
body.tsx .hero.hero-has-image::before,
body.tsx .hero.hero-has-image::after { display: none !important; }
body.tsx .tsx-hero-frame {
  /* Wide artwork is shown at its own proportions: the frame narrows (centred)
     rather than cropping or padding the image once it reaches --hero-max-h. */
  --hero-max-h: 220px;
  position: relative;
  width: min(100%, calc(var(--hero-max-h) * var(--hero-r, 3)));
  margin-inline: auto;
  aspect-ratio: var(--hero-ratio, 3 / 1);
  overflow: hidden;
  border-radius: var(--tsx-radius);
  background: var(--tsx-surface);
  box-shadow: 0 6px 20px rgb(20 26 34 / 10%);
  isolation: isolate;
}
/* When the height cap applies, the full artwork is letterboxed on a soft
   blurred copy of itself instead of being cropped. */
body.tsx .tsx-hero-backdrop {
  position: absolute;
  inset: -24px;
  z-index: -1;
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.15);
  opacity: .85;
  transform: scale(1.05);
}
body.tsx .tsx-hero-frame img.hero-image {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 0 !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}
/* Phones: portrait/square artwork keeps full width and is shown whole on a
   blurred copy of itself, capped so products stay on the first screen. */
@media (max-width: 767.98px) {
  body.tsx .tsx-hero-portrait .tsx-hero-frame,
  body.tsx .tsx-hero-square .tsx-hero-frame { width: 100%; max-height: min(230px, 30vh); }
}

/* Caption below the artwork (never on top of text baked into a banner). */
body.tsx .tsx-hero-caption {
  position: static !important;
  display: grid;
  gap: 2px;
  padding: 12px 2px 0 !important;
  color: var(--tsx-ink) !important;
  text-align: start;
  text-shadow: none !important;
  background: none !important;
}
body.tsx .tsx-hero-caption h1 {
  margin: 0 !important;
  font: 800 18px/1.45 Cairo, sans-serif !important;
  color: var(--tsx-ink) !important;
}
body.tsx .tsx-hero-caption p {
  margin: 0 !important;
  font: 400 13px/1.6 Cairo, sans-serif !important;
  color: var(--tsx-muted) !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.tsx .tsx-hero-cta { display: none; }

/* Header overlaid on the artwork (merchant option): keep it edge-to-edge. */
body.tsx .store-page.topbar-overlay .hero-shell { padding: 0 !important; background: none !important; }
body.tsx .store-page.topbar-overlay .tsx-hero-frame { border-radius: 0; box-shadow: none; max-height: min(300px, 40vh); }
body.tsx .store-page.topbar-overlay .tsx-hero-caption { padding-inline: var(--tsx-gutter) !important; }

/* ---------- 4. Page container + section titles -------------------------- */
body.tsx #shopBrowse {
  max-width: 1240px !important;
  padding: 16px var(--tsx-gutter) 40px !important;
}
body.tsx #shopBrowse h5,
body.tsx #shopBrowse .home-block > h5 {
  margin: 8px 0 12px !important;
  font: 800 18px/1.5 Cairo, sans-serif !important;
  color: var(--tsx-ink) !important;
}
body.tsx #shopBrowse h5::before { width: 4px; height: .8em; background: var(--tsx-accent); }
body.tsx #shopBrowse .d-flex.justify-content-between.align-items-center.mb-2 { margin-bottom: 4px !important; }
body.tsx #shopBrowse [data-latest-nav] {
  width: 36px; height: 36px; padding: 0; border-radius: 50%;
  border-color: var(--tsx-line); color: var(--tsx-ink-2);
}

/* ---------- 5. Category rail -------------------------------------------- */
body.tsx #shopBrowse .cat-flex.cat-flex.tsx-cat-rail {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  margin: 0 calc(var(--tsx-gutter) * -1) 12px !important;
  padding: 2px var(--tsx-gutter) 6px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--tsx-gutter);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
body.tsx #shopBrowse .cat-flex.tsx-cat-rail::-webkit-scrollbar { display: none; }
body.tsx #shopBrowse .cat-flex.cat-flex.tsx-cat-rail .cat-box {
  flex: 0 0 76px !important;
  width: 76px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: transparent !important;
  background-size: 0 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  scroll-snap-align: start;
  text-decoration: none;
}
body.tsx #shopBrowse .cat-flex.cat-flex.tsx-cat-rail .cat-box::before {
  content: "";
  display: block;
  width: 64px !important;
  height: 64px !important;
  max-height: none !important;
  aspect-ratio: 1 !important;
  flex: none;
  border-radius: 20px;
  background-color: var(--tsx-surface);
  background-image: inherit;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgb(20 26 34 / 6%);
  transition: transform .15s ease;
}
body.tsx #shopBrowse .cat-flex.tsx-cat-rail.shape-circle .cat-box::before { border-radius: 50%; }
body.tsx #shopBrowse .cat-flex.cat-flex.tsx-cat-rail .cat-box:active::before { transform: scale(.96); }
body.tsx #shopBrowse .cat-flex.cat-flex.tsx-cat-rail .cat-box-overlay { display: none !important; }
body.tsx #shopBrowse .cat-flex.cat-flex.tsx-cat-rail .cat-box-name {
  position: static !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  color: var(--tsx-ink-2) !important;
  font: 600 12px/1.4 Cairo, sans-serif !important;
  text-align: center;
  text-shadow: none !important;
  overflow-wrap: anywhere !important;
}
body.tsx #shopBrowse .tsx-cat-rail + .category-scroll-track { display: none !important; }

/* Category page sub-category chips */
body.tsx .cat-carousel .cat-chip {
  min-height: 40px; border-radius: 999px !important; border: 1px solid var(--tsx-line) !important;
  background: #fff !important; color: var(--tsx-ink-2) !important; font: 600 13px/1.4 Cairo, sans-serif;
}
body.tsx .cat-carousel .cat-chip.active { background: var(--tsx-ink) !important; color: #fff !important; border-color: var(--tsx-ink) !important; }

/* ---------- 6. Product cards ------------------------------------------- */
body.tsx #shopBrowse .row.g-3 { --bs-gutter-x: 12px; --bs-gutter-y: 20px; }
body.tsx .store-product .card {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}
body.tsx .store-product .card > .position-relative {
  border-radius: var(--tsx-radius);
  overflow: hidden;
  background: var(--tsx-surface);
}
body.tsx .store-product .card .carousel,
body.tsx .store-product .card .carousel-inner { border-radius: var(--tsx-radius); }
body.tsx .store-product img.tsx-card-img,
body.tsx .store-product .card .tsx-no-photo {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 5;
  object-fit: cover !important;
  border-radius: 0 !important;
  cursor: pointer;
  background: var(--tsx-surface);
}
body.tsx .store-product .card .tsx-no-photo {
  display: grid; place-items: center; color: #b7bdc6; font-size: 34px;
}
body.tsx .store-product .carousel-indicators { margin-bottom: 8px; gap: 4px; }
body.tsx .store-product .carousel-indicators [data-bs-target] {
  width: 6px; height: 6px; margin: 0; border: 0; border-radius: 50%;
  background: #fff; opacity: .55; box-shadow: 0 0 0 1px rgb(0 0 0 / 8%);
}
body.tsx .store-product .carousel-indicators .active { opacity: 1; width: 14px; border-radius: 3px; }
body.tsx .store-product .cat-badge { display: none !important; }
body.tsx .store-product .like-btn {
  top: 8px !important; right: 8px !important; left: auto !important;
  width: 36px !important; height: 36px !important;
  display: grid; place-items: center; padding: 0;
  border: 0 !important; border-radius: 50% !important;
  background: rgb(255 255 255 / 92%) !important;
  box-shadow: 0 2px 8px rgb(20 26 34 / 12%) !important;
}
body.tsx .store-product .like-btn i { font-size: 17px !important; color: var(--tsx-ink-2); }
body.tsx .store-product .like-btn i.bi-heart-fill { color: #e0314b; }
/* Tap target is 44px; the visible disc stays 40px. */
body.tsx .store-product .cart-fab {
  bottom: 8px !important; left: 8px !important; right: auto !important;
  width: 40px !important; height: 40px !important;
  display: grid; place-items: center; padding: 0;
  border: 0 !important; border-radius: 50% !important;
  background: var(--tsx-cta) !important;
  color: var(--tsx-cta-ink) !important;
  box-shadow: 0 4px 12px rgb(20 26 34 / 18%) !important;
}
body.tsx .store-product .cart-fab::after { content: ""; position: absolute; inset: -2px; }
body.tsx .store-product .cart-fab i { font-size: 18px; color: inherit !important; }
body.tsx .store-product .card-body {
  padding: 10px 2px 0 !important;
  background: transparent !important;
  text-align: start;
}
body.tsx .store-product .prod-name {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.5em * 2);
  margin: 0 0 4px !important;
  font: 700 14px/1.5 Cairo, sans-serif !important;
  color: var(--tsx-ink) !important;
  overflow-wrap: anywhere;
}
body.tsx .store-product .product-description {
  display: -webkit-box !important;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0 !important;
  margin: 0 0 4px !important;
  font-size: 12px !important;
  color: var(--tsx-muted) !important;
}
body.tsx .store-product .product-description:empty { display: none !important; }
body.tsx .store-product .product-price { font-variant-numeric: tabular-nums; }
body.tsx .store-product .product-price .price-row {
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 2px 8px !important;
}
body.tsx .store-product .product-price .price-row > span:first-child { gap: 6px !important; }
body.tsx .store-product .price-new,
body.tsx #productModal .price-new {
  font: 800 16px/1.4 Cairo, sans-serif !important;
  color: var(--tsx-ink) !important;
  direction: ltr;
  unicode-bidi: isolate;
}
body.tsx .store-product .old-price,
body.tsx #productModal .old-price {
  font-size: 12px !important;
  color: var(--tsx-muted) !important;
  direction: ltr;
  unicode-bidi: isolate;
}
body.tsx .store-product .disc-badge,
body.tsx #productModal .disc-badge {
  display: inline-block;
  padding: 1px 7px !important;
  border-radius: 6px !important;
  background: var(--tsx-sale-bg) !important;
  color: var(--tsx-sale) !important;
  font: 700 11px/1.6 Cairo, sans-serif !important;
  direction: ltr;
  unicode-bidi: isolate;
}
body.tsx .store-product .product-price .price-row:has(.disc-badge) .price-new { color: var(--tsx-sale) !important; }

/* Horizontal rails (أحدث المنتجات, home product rails) */
body.tsx #latestScroller { gap: 12px !important; padding-bottom: 4px; scrollbar-width: none; }
body.tsx #latestScroller .scroll-item { flex: 0 0 calc((100% - 12px) / 2.25) !important; max-width: none !important; }
body.tsx .home-products-rail { gap: 12px !important; scrollbar-width: none; }

/* Category groups + merchant image blocks: full artwork, capped height */
body.tsx #shopBrowse .card.mb-4.shadow-sm { border: 0 !important; box-shadow: none !important; background: transparent !important; }
body.tsx #shopBrowse .card.mb-4.shadow-sm > .card-body { padding: 0 !important; }
body.tsx #shopBrowse .card.mb-4.shadow-sm > .card-body > img.img-fluid {
  max-height: 180px !important; object-fit: contain !important; background: var(--tsx-surface);
  border-radius: var(--tsx-radius) !important;
}
body.tsx .home-banner { margin: 8px 0 24px; text-align: center; }
body.tsx .home-banner img.home-banner-image {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: min(70vh, 420px) !important;
  object-fit: contain !important;
  margin-inline: auto;
  border-radius: var(--tsx-radius) !important;
  background: var(--tsx-surface);
}
body.tsx .home-ticker { min-height: 32px !important; }

/* ---------- 7. Product preview (bottom sheet on phones) ---------------- */
body.tsx #productModal .modal-dialog.product-preview-dialog .modal-content { background: #fff; }
/* Title bar becomes a floating close button over the photo. */
body.tsx #productModal .modal-content > .modal-header {
  position: absolute !important;
  z-index: 6;
  top: 10px; left: 10px; right: auto;
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}
body.tsx #productModal .modal-content > .modal-header .modal-title {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
body.tsx #productModal .modal-content > .modal-header [data-bs-dismiss="modal"] {
  width: 44px !important; height: 44px !important;
  border-radius: 50% !important;
  background: rgb(255 255 255 / 94%) !important;
  color: var(--tsx-ink) !important;
  box-shadow: 0 2px 10px rgb(20 26 34 / 16%);
  font-size: 18px !important;
}
body.tsx #productModal .modal-content > .modal-body { padding: 0 !important; }
body.tsx #productModal #pmContent > .row { --bs-gutter-x: 0; --bs-gutter-y: 0 !important; margin: 0 !important; }
body.tsx #productModal #pmContent .col-md-7,
body.tsx #productModal #pmContent .col-md-5 { padding: 0 !important; }

/* Gallery: the photo leads. */
body.tsx #productModal .pm-image-wrap {
  border-radius: 0 !important;
  background: var(--tsx-surface) !important;
  min-height: 0 !important;
}
body.tsx #productModal #pmCarousel { position: relative; }
body.tsx #productModal #pmCarousel.pm-loading { aspect-ratio: 1; background: var(--tsx-surface); }
body.tsx #productModal .pm-image-stage {
  display: grid; place-items: center;
  aspect-ratio: 1;
  max-height: 54dvh;
  width: 100%;
  min-height: 0 !important;
  border-radius: 0 !important;
  background: var(--tsx-surface) !important;
}
body.tsx #productModal .pm-image-stage .pm-image {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 54dvh !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  clip-path: none !important;
}
body.tsx #productModal .carousel-indicators { margin-bottom: 10px; }
body.tsx #productModal .carousel-indicators [data-pm-slide-to] {
  width: 6px; height: 6px; border: 0; border-radius: 50%; background: var(--tsx-ink); opacity: .25; margin: 0 3px;
}
body.tsx #productModal .carousel-indicators .active { opacity: .9; width: 16px; border-radius: 3px; }
body.tsx #productModal .carousel-control-prev,
body.tsx #productModal .carousel-control-next { display: none; }
body.tsx #productModal #pmCarousel .pm-thumbs {
  display: flex; gap: 8px; justify-content: flex-start !important;
  overflow-x: auto; padding: 10px var(--tsx-gutter) 2px !important;
  background: #fff; scrollbar-width: none;
}
body.tsx #productModal #pmCarousel .pm-thumb {
  width: 56px !important; height: 56px !important; flex: none; padding: 0;
  border: 0; border-radius: 12px !important; overflow: hidden;
  background: var(--tsx-surface); opacity: .65;
}
body.tsx #productModal #pmCarousel .pm-thumb img { width: 100%; height: 100%; object-fit: cover; }
body.tsx #productModal #pmCarousel .pm-thumb.active { opacity: 1; outline: 2px solid var(--tsx-ink) !important; outline-offset: -2px; }

/* Details */
body.tsx #productModal #pmContent .col-md-5 { padding: 14px var(--tsx-gutter) 8px !important; }
body.tsx #productModal #pmProductName {
  margin: 0 0 6px !important;
  font: 800 19px/1.55 Cairo, sans-serif !important;
  color: var(--tsx-ink);
  overflow-wrap: anywhere;
}
body.tsx #productModal .pm-meta-row { margin-bottom: 6px !important; }
body.tsx #productModal #pmPrice .price-new { font-size: 22px !important; }
body.tsx #productModal #pmPrice .price-row { justify-content: flex-start !important; gap: 4px 10px !important; }
body.tsx #productModal #pmPrice:has(.disc-badge) .price-new { color: var(--tsx-sale) !important; }
body.tsx #productModal .pm-meta-row #pmCat .cat-badge { border-radius: 999px; }
body.tsx #productModal .pm-trust { margin: 0 0 12px !important; font-size: 12px !important; color: var(--tsx-muted) !important; }
body.tsx #productModal #pmDesc { font-size: 14px !important; color: var(--tsx-ink-2) !important; margin: 4px 0 12px !important; }

/* Sizes and colours: every option visible, 44px targets. */
body.tsx #productModal .pm-variant-row {
  padding: 0 !important; margin: 0 0 14px !important;
  border: 0 !important; background: transparent !important;
}
body.tsx #productModal .pm-variant-title {
  margin-bottom: 8px !important;
  font: 700 13px/1.5 Cairo, sans-serif !important;
  color: var(--tsx-ink);
}
body.tsx #productModal .pm-variant-title i { display: none; }
body.tsx #productModal #pmVariants .pm-variant-group { gap: 8px !important; }
body.tsx #productModal #pmVariants .pm-variant-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 48px; min-height: 44px !important;
  padding: 6px 14px !important;
  border: 1px solid #d9dde2 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--tsx-ink) !important;
  font: 600 14px/1.3 Cairo, sans-serif !important;
  box-shadow: none !important;
}
body.tsx #productModal #pmVariants .pm-variant-chip.active {
  border-color: var(--tsx-ink) !important;
  background: var(--tsx-ink) !important;
  color: #fff !important;
}
body.tsx #productModal #pmVariants .pm-color-dot {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 18%);
}
body.tsx #productModal #pmVariants .pm-variant-chip.active .pm-color-dot { box-shadow: 0 0 0 2px #fff; }
body.tsx #productModal .tsx-skel {
  height: 44px; margin-bottom: 10px; border-radius: 12px;
  background: linear-gradient(90deg, #f1f2f4 25%, #e7e9ec 50%, #f1f2f4 75%) 0 0 / 200% 100%;
  animation: tsxShimmer 1.2s linear infinite;
}
body.tsx #productModal .tsx-skel-short { width: 60%; }
@keyframes tsxShimmer { to { background-position: -200% 0; } }

/* Thumb-zone buy bar: quantity, live total, add to cart. */
body.tsx #productModal .pm-close-footer {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 10px !important;
  padding: 10px var(--tsx-gutter) max(12px, env(safe-area-inset-bottom)) !important;
  background: #fff !important;
  border-top: 1px solid var(--tsx-line) !important;
  box-shadow: 0 -8px 24px rgb(20 26 34 / 6%) !important;
  direction: rtl;
}
body.tsx #productModal .pm-close-footer .pm-actions-footer {
  grid-column: 1 / -1;
  margin: 0 !important; padding: 0 !important; border: 0 !important;
}
body.tsx #productModal .pm-add-hint {
  margin: 0 0 6px !important;
  font-size: 12px !important; color: var(--tsx-muted) !important; text-align: start;
}
body.tsx #productModal .pm-footer-tools {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  margin: 0 !important;
}
body.tsx #productModal .pm-line-total {
  display: flex !important; align-items: baseline; gap: 8px;
  color: var(--tsx-muted) !important; font: 600 13px/1.4 Cairo, sans-serif !important;
  white-space: nowrap;
}
body.tsx #productModal #pmFooterPrice {
  color: var(--tsx-ink) !important;
  font: 800 20px/1.3 Cairo, sans-serif !important;
  font-variant-numeric: tabular-nums;
}
body.tsx #productModal .pm-qty-label {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
body.tsx #productModal .pm-qty-input {
  flex-wrap: nowrap !important;
  width: auto !important;
  border: 1px solid #d9dde2;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
body.tsx #productModal .pm-qty-input .btn {
  width: 44px; height: 44px; padding: 0;
  border: 0 !important; border-radius: 0 !important;
  background: #fff !important; color: var(--tsx-ink) !important;
  font-size: 20px; line-height: 1;
}
body.tsx #productModal .pm-qty-input input {
  width: 46px !important; height: 44px; padding: 0 !important;
  border: 0 !important; box-shadow: none !important;
  font: 700 16px/1 Cairo, sans-serif;
  -moz-appearance: textfield;
}
body.tsx #productModal .pm-qty-input input::-webkit-outer-spin-button,
body.tsx #productModal .pm-qty-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
body.tsx #productModal .pm-close-footer #pmAdd {
  grid-column: 1;
  min-height: 52px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--tsx-cta) !important;
  color: var(--tsx-cta-ink) !important;
  font: 800 16px/1.3 Cairo, sans-serif !important;
  box-shadow: none !important;
}
body.tsx #productModal .pm-close-footer #pmAdd:disabled { opacity: .45 !important; }
body.tsx #productModal .pm-close-footer .pm-bottom-close {
  grid-column: 2;
  width: 52px; min-width: 52px !important; min-height: 52px !important;
  padding: 0 !important; margin: 0 !important;
  border-radius: 14px !important;
}
body.tsx #productModal .pm-close-footer .pm-bottom-close span {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
body.tsx #productModal .pm-close-footer:has(#pmAdd[hidden]) { grid-template-columns: 1fr; }
body.tsx #productModal .pm-close-footer:has(#pmAdd[hidden]) .pm-bottom-close { grid-column: 1; width: 100%; }

@media (max-width: 767.98px) {
  /* Full-height sheet that rises from the bottom (replaces the top drawer). */
  body.tsx #productModal.modal .modal-dialog.product-preview-dialog {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    width: 100% !important; max-width: none !important;
    height: 100dvh !important; max-height: 100dvh !important;
    margin: 0 !important;
  }
  body.tsx #productModal.modal.fade .modal-dialog.product-preview-dialog { transform: translate3d(0, 100%, 0) !important; }
  body.tsx #productModal.modal.show .modal-dialog.product-preview-dialog { transform: translate3d(0, 0, 0) !important; }
  body.tsx #productModal .modal-dialog.product-preview-dialog .modal-content {
    height: 100% !important; max-height: 100% !important;
    display: flex; flex-direction: column;
    border-radius: 0 !important;
  }
  body.tsx #productModal .modal-content > .modal-body { flex: 1 1 auto !important; min-height: 0 !important; overflow-y: auto !important; }
}

/* ---------- 8. Cart + checkout touches -------------------------------- */
body.tsx #cartPanel .btn-brand,
body.tsx #checkoutModal .btn-brand {
  background: var(--tsx-cta) !important; color: var(--tsx-cta-ink) !important; border-color: var(--tsx-cta) !important;
  min-height: 48px; border-radius: 12px; font-weight: 800;
}
body.tsx #checkoutModal .modal-header,
body.tsx #productModal .modal-header[style] { color: inherit; }
body.tsx #checkoutModal .form-control { min-height: 46px; border-radius: 12px; font-size: 16px; }
body.tsx #checkoutModal #coTotal { direction: ltr; unicode-bidi: isolate; font-size: 18px; }

/* ---------- 9. Tablet + desktop ---------------------------------------- */
@media (min-width: 768px) {
  body.tsx { --tsx-gutter: 24px; }
  body.tsx .topbar { height: 72px !important; min-height: 72px !important; }
  body.tsx .topbar .topbar-logo,
  body.tsx .topbar.logo-ratio-off .topbar-logo { max-height: 52px !important; max-width: 280px !important; }
  body.tsx .store-header-region #shopSearchPanel.shop-search { padding-bottom: 16px !important; }
  body.tsx #shopSearchPanel .shop-search-controls { max-width: 640px; min-height: 48px !important; }
  /* Desktop: the banner sits centred on a stage in the store colour. */
  body.tsx .hero-shell { background: var(--brand) !important; padding-bottom: 32px !important; }
  body.tsx.tsx-brand-pale .hero-shell { box-shadow: inset 0 -1px 0 var(--tsx-line); }
  body.tsx .tsx-hero-frame { --hero-max-h: 420px; border-radius: 20px; box-shadow: 0 18px 40px rgb(0 0 0 / 22%); }
  body.tsx #shopBrowse { padding-top: 24px !important; }
  body.tsx #shopBrowse h5, body.tsx #shopBrowse .home-block > h5 { font-size: 22px !important; }
  body.tsx #shopBrowse .row.g-3 { --bs-gutter-x: 20px; --bs-gutter-y: 28px; }
  body.tsx #shopBrowse .cat-flex.cat-flex.tsx-cat-rail { gap: 20px !important; margin-inline: 0 !important; padding-inline: 0 !important; }
  body.tsx #shopBrowse .cat-flex.cat-flex.tsx-cat-rail .cat-box { flex-basis: 104px !important; width: 104px !important; }
  body.tsx #shopBrowse .cat-flex.cat-flex.tsx-cat-rail .cat-box::before { width: 96px !important; height: 96px !important; border-radius: 26px; }
  body.tsx #shopBrowse .cat-flex.cat-flex.tsx-cat-rail .cat-box-name { font-size: 14px !important; }
  body.tsx .store-product .prod-name { font-size: 15px !important; }
  body.tsx #latestScroller .scroll-item { flex-basis: calc((100% - 36px) / 4) !important; }
  body.tsx .store-product .cart-fab { opacity: .0; transform: translateY(6px); transition: opacity .16s ease, transform .16s ease; }
  body.tsx .store-product .card:hover .cart-fab,
  body.tsx .store-product .card:focus-within .cart-fab { opacity: 1; transform: none; }
}
@media (hover: none) {
  body.tsx .store-product .cart-fab { opacity: 1 !important; transform: none !important; }
}

@media (min-width: 992px) {
  /* Portrait artwork (e.g. a furniture photo): image beside the store intro
     instead of a tall strip, so nothing is cropped and products stay close. */
  body.tsx .hero.tsx-hero-portrait.hero-has-image,
  body.tsx .hero.tsx-hero-square.hero-has-image.tsx-hero-has-text {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 40px;
    padding: 28px 40px !important;
    border-radius: 24px;
    background: color-mix(in srgb, var(--brand) 10%, #fff) !important;
  }
  body.tsx .hero.tsx-hero-portrait .tsx-hero-frame,
  body.tsx .hero.tsx-hero-square.tsx-hero-has-text .tsx-hero-frame {
    grid-column: 2; grid-row: 1;
    width: auto;
    height: 380px;
    max-height: none;
    aspect-ratio: var(--hero-ratio);
    box-shadow: 0 12px 32px rgb(20 26 34 / 14%);
  }
  body.tsx .hero.tsx-hero-portrait .tsx-hero-caption,
  body.tsx .hero.tsx-hero-square.tsx-hero-has-text .tsx-hero-caption {
    grid-column: 1; grid-row: 1;
    gap: 10px; padding: 0 !important;
  }
  body.tsx .hero.tsx-hero-portrait .tsx-hero-caption h1,
  body.tsx .hero.tsx-hero-square.tsx-hero-has-text .tsx-hero-caption h1 { font-size: clamp(28px, 2.6vw, 40px) !important; line-height: 1.3 !important; }
  body.tsx .hero.tsx-hero-portrait .tsx-hero-caption p,
  body.tsx .hero.tsx-hero-square.tsx-hero-has-text .tsx-hero-caption p { font-size: 16px !important; -webkit-line-clamp: 4; max-width: 46ch; }
  body.tsx .hero.tsx-hero-portrait .tsx-hero-cta,
  body.tsx .hero.tsx-hero-square.tsx-hero-has-text .tsx-hero-cta {
    display: inline-flex; align-items: center; gap: 8px; justify-self: start;
    margin-top: 8px; padding: 12px 22px; border-radius: 12px;
    background: var(--tsx-cta); color: var(--tsx-cta-ink); font-weight: 800; text-decoration: none;
  }
  body.tsx .hero-shell:has(.tsx-hero-portrait),
  body.tsx .hero-shell:has(.tsx-hero-square.tsx-hero-has-text) { padding-top: 0 !important; }

  /* Product preview: centred two-column dialog. */
  body.tsx #productModal.modal .modal-dialog.product-preview-dialog {
    position: relative !important;
    inset: auto !important;
    max-width: 1080px !important;
    height: auto !important; max-height: calc(100dvh - 48px) !important;
    margin: 24px auto !important;
    transform: none !important;
  }
  body.tsx #productModal.modal.fade .modal-dialog.product-preview-dialog { transform: translate3d(0, 16px, 0) !important; }
  body.tsx #productModal.modal.show .modal-dialog.product-preview-dialog { transform: none !important; }
  body.tsx #productModal .modal-dialog.product-preview-dialog .modal-content {
    display: grid !important;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-rows: minmax(0, 1fr) auto;
    max-height: calc(100dvh - 48px) !important;
    border-radius: 24px !important;
    overflow: hidden !important;
  }
  body.tsx #productModal .modal-content > .modal-body { grid-column: 1 / -1; grid-row: 1; overflow-y: auto !important; }
  body.tsx #productModal #pmContent .col-md-7 { flex: 0 0 58.33% !important; max-width: 58.33% !important; width: 58.33% !important; }
  body.tsx #productModal #pmContent .col-md-5 { flex: 0 0 41.67% !important; max-width: 41.67% !important; padding: 32px 32px 16px !important; }
  body.tsx #productModal .pm-image-stage,
  body.tsx #productModal .pm-image-stage .pm-image { max-height: min(62dvh, 600px) !important; }
  body.tsx #productModal #pmCarousel .pm-thumbs { padding: 12px 20px !important; background: var(--tsx-surface); }
  body.tsx #productModal #pmProductName { font-size: 24px !important; }
  body.tsx #productModal .pm-close-footer {
    grid-column: 2; grid-row: 2;
    padding: 16px 32px 24px !important;
    box-shadow: none !important;
  }
  body.tsx #productModal .modal-content > .modal-header { left: auto; right: 16px; top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  body.tsx #productModal .tsx-skel { animation: none; }
}

/* Older layers target the banner image with long selectors (and !important);
   these repeat the frame rules with enough weight to always apply. */
html body.tsx .hero.hero-has-image.hero .tsx-hero-frame img.hero-image.hero-image {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: contain !important;
}
html body.tsx .hero.hero-has-image.tsx-hero-wide.hero,
html body.tsx .hero.hero-has-image.tsx-hero-square.hero:not(.tsx-hero-has-text) {
  display: block !important;
  background: transparent !important;
  grid-template-columns: none !important;
}

/* Product preview: no stray lines around the floating close button.
   - the old swipe grabber (a 42×4 bar on the header) is removed;
   - the sheet scrolls without a visible scrollbar track. */
body.tsx #productModal .modal-content > .modal-header::before,
body.tsx #productModal .modal-content > .modal-header::after { display: none !important; content: none !important; }
body.tsx #productModal .modal-content > .modal-body { scrollbar-width: none; -ms-overflow-style: none; }
body.tsx #productModal .modal-content > .modal-body::-webkit-scrollbar { display: none; width: 0; height: 0; }
body.tsx #productModal .modal-content > .modal-header [data-bs-dismiss="modal"] { border: 0 !important; outline: 0; }
body.tsx #productModal .modal-content > .modal-header [data-bs-dismiss="modal"]:focus-visible { outline: 3px solid var(--tsx-ink) !important; outline-offset: 2px; }

/* "More options below" cue above the buy bar (shown only while content is hidden). */
body.tsx #productModal .pm-close-footer { position: relative; }
body.tsx #productModal .tsx-more-fade,
body.tsx #productModal .tsx-more-hint {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s;
}
body.tsx #productModal .tsx-more-fade {
  left: 0; right: 0; bottom: 100%;
  height: 56px;
  background: linear-gradient(rgb(255 255 255 / 0), #fff 85%);
  pointer-events: none;
}
body.tsx #productModal .tsx-more-hint {
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--tsx-ink);
  color: #fff;
  font: 700 12px/1.2 Cairo, sans-serif;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgb(20 26 34 / 22%);
  z-index: 2;
}
body.tsx #productModal .tsx-more-hint i { font-size: 13px; animation: tsxNudge 1.4s ease-in-out infinite; }
body.tsx #productModal.tsx-has-more .tsx-more-fade,
body.tsx #productModal.tsx-has-more .tsx-more-hint { opacity: 1; visibility: visible; }
@keyframes tsxNudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { body.tsx #productModal .tsx-more-hint i { animation: none; } }

/* Lighter "more options" cue, aligned to the left edge of the sheet. */
body.tsx #productModal .tsx-more-hint {
  left: var(--tsx-gutter);
  right: auto;
  transform: none;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--tsx-line);
  background: rgb(255 255 255 / 96%);
  color: var(--tsx-ink-2);
  font-weight: 600;
  box-shadow: 0 2px 8px rgb(20 26 34 / 8%);
}
body.tsx #productModal .tsx-more-hint i { color: var(--tsx-muted); }

/* "More" link lives inside the buy bar, on the hint line: hint on the right,
   «المزيد ⌄» on the left. It never covers the product options. */
body.tsx #productModal .pm-close-footer .pm-actions-footer {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
}
body.tsx #productModal .pm-actions-footer > #pmVarHint { grid-column: 1; grid-row: 1; margin: 0 0 8px !important; }
body.tsx #productModal .pm-actions-footer > .tsx-more-hint { grid-column: 2; grid-row: 1; }
body.tsx #productModal .pm-actions-footer > #pmVarErr { grid-column: 1 / -1; grid-row: 2; }
body.tsx #productModal .pm-actions-footer > .pm-footer-main { grid-column: 1 / -1; grid-row: 3; }
body.tsx #productModal .pm-actions-footer > .tsx-more-hint {
  position: static;
  display: none;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  margin: 0 0 8px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--tsx-muted);
  font: 600 12px/1.4 Cairo, sans-serif;
  transform: none;
  opacity: 1;
  visibility: visible;
}
body.tsx #productModal .pm-actions-footer > .tsx-more-hint:hover { color: var(--tsx-ink); }
body.tsx #productModal .pm-actions-footer > .tsx-more-hint i { color: inherit; font-size: 12px; }
body.tsx #productModal.tsx-has-more .pm-actions-footer > .tsx-more-hint { display: inline-flex; }
body.tsx #productModal .pm-close-footer:has(#pmAdd[hidden]) .pm-actions-footer { display: none !important; }

/* «المزيد» in the store's accent colour so it reads as a tappable link. */
body.tsx #productModal .pm-actions-footer > .tsx-more-hint {
  color: var(--tsx-accent);
  font-weight: 700;
  font-size: 13px;
}
body.tsx #productModal .pm-actions-footer > .tsx-more-hint:hover { color: var(--tsx-accent); text-decoration: underline; text-underline-offset: 3px; }
body.tsx #productModal .pm-actions-footer > .tsx-more-hint i { font-size: 13px; -webkit-text-stroke: .6px currentColor; }

/* «المزيد»: a tinted chip in the store colour (darkened for light themes,
   blue for white/pale themes) so it stands out from the grey hint text. */
body.tsx { --tsx-link: var(--brand); }
body.tsx.tsx-brand-light { --tsx-link: color-mix(in srgb, var(--brand) 55%, #000); }
body.tsx.tsx-brand-pale { --tsx-link: #0b63c5; }
body.tsx #productModal .pm-actions-footer > .tsx-more-hint {
  min-height: 30px;
  padding: 2px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tsx-link) 12%, #fff);
  color: var(--tsx-link);
  font: 700 13px/1.4 Cairo, sans-serif;
}
body.tsx #productModal .pm-actions-footer > .tsx-more-hint:hover {
  color: var(--tsx-link);
  background: color-mix(in srgb, var(--tsx-link) 20%, #fff);
  text-decoration: none;
}

/* Hint and «المزيد» share one style: tinted pill, store colour, bold. */
body.tsx #productModal .pm-actions-footer > #pmVarHint,
body.tsx #productModal .pm-actions-footer > .tsx-more-hint {
  justify-self: start;
  min-height: 30px;
  margin: 0 0 8px !important;
  padding: 3px 12px !important;
  border: 1px solid color-mix(in srgb, var(--tsx-link) 28%, #fff);
  border-radius: 999px;
  background: color-mix(in srgb, var(--tsx-link) 14%, #fff) !important;
  color: color-mix(in srgb, var(--tsx-link) 85%, #000) !important;
  font: 700 13px/1.5 Cairo, sans-serif !important;
  text-align: start;
}
body.tsx #productModal .pm-actions-footer > #pmVarHint { display: inline-flex; align-items: center; }
body.tsx #productModal .pm-actions-footer > #pmVarHint:empty { display: none !important; }
body.tsx #productModal .pm-actions-footer > .tsx-more-hint { justify-self: end; }

/* One close control only: the × on the photo. The buy bar gives its full
   width to «أضف إلى السلة». (Swipe-down and the back button still close.) */
body.tsx #productModal .pm-close-footer { grid-template-columns: minmax(0, 1fr) !important; }
body.tsx #productModal .pm-close-footer #pmAdd { grid-column: 1 / -1 !important; }
body.tsx #productModal .pm-close-footer:not(:has(#pmAdd[hidden])) .pm-bottom-close { display: none !important; }

/* App use (Appilix, iOS/Android): the close button lives in the thumb zone,
   beside «أضف إلى السلة». The photo × is kept only on desktop. */
@media (max-width: 991.98px) {
  body.tsx #productModal .modal-content > .modal-header { display: none !important; }
  body.tsx #productModal .pm-close-footer { grid-template-columns: minmax(0, 1fr) 52px !important; }
  body.tsx #productModal .pm-close-footer #pmAdd { grid-column: 1 !important; }
  body.tsx #productModal .pm-close-footer:not(:has(#pmAdd[hidden])) .pm-bottom-close {
    display: inline-flex !important;
    grid-column: 2 !important;
  }
  body.tsx #productModal .pm-close-footer .pm-bottom-close {
    align-items: center; justify-content: center;
    width: 52px; height: 52px;
    border: 1px solid #d9dde2 !important;
    background: #fff !important;
    color: var(--tsx-ink) !important;
  }
  body.tsx #productModal .pm-close-footer .pm-bottom-close i { font-size: 18px; }
  body.tsx #productModal .pm-close-footer:has(#pmAdd[hidden]) { grid-template-columns: 1fr !important; }
}
@media (min-width: 992px) {
  body.tsx #productModal .pm-close-footer .pm-bottom-close { display: none !important; }
  body.tsx #productModal .pm-close-footer:has(#pmAdd[hidden]) .pm-bottom-close { display: inline-flex !important; }
}

/* Grab handle on phones: shows the sheet can be swiped down to close. */
@media (max-width: 767.98px) {
  body.tsx #productModal .modal-content { position: relative; }
  body.tsx #productModal .modal-content::after {
    content: "";
    position: absolute;
    z-index: 7;
    top: 8px;
    left: 50%;
    width: 40px;
    height: 5px;
    margin-left: -20px;
    border-radius: 3px;
    background: rgb(20 26 34 / 28%);
    box-shadow: 0 0 0 1px rgb(255 255 255 / 60%);
    pointer-events: none;
  }
}

/* "Swipe down to close" teaching tip (first 3 opens on a phone). */
body.tsx #productModal .tsx-swipe-tip { display: none; }
@media (max-width: 767.98px) {
  body.tsx #productModal .tsx-swipe-tip {
    display: inline-flex;
    position: absolute;
    z-index: 7;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -6px);
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgb(20 26 34 / 78%);
    color: #fff;
    font: 600 12px/1.4 Cairo, sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
  }
  body.tsx #productModal .tsx-swipe-tip i { font-size: 12px; }
  body.tsx #productModal.tsx-show-swipe-tip .tsx-swipe-tip { opacity: 1; transform: translate(-50%, 0); }
  body.tsx #productModal.tsx-show-swipe-tip .modal-content { animation: tsxSheetNudge 1.1s ease-in-out .35s 1; }
}
@keyframes tsxSheetNudge {
  0%, 100% { transform: translateY(0); }
  35% { transform: translateY(18px); }
  60% { transform: translateY(0); }
  78% { transform: translateY(7px); }
}
@media (prefers-reduced-motion: reduce) {
  body.tsx #productModal.tsx-show-swipe-tip .modal-content { animation: none; }
}

/* ===== Section titles: no vertical bar (it read as the letter ا) ===== */
body.tsx #shopBrowse h5::before { content: none !important; display: none !important; }
body.tsx #shopBrowse h5,
body.tsx #shopBrowse .home-block > h5 {
  display: block;
  margin: 10px 0 14px !important;
  font: 800 19px/1.4 Cairo, sans-serif !important;
  letter-spacing: 0;
}
body.tsx #shopBrowse h5::after {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-top: 6px;
  border-radius: 3px;
  background: var(--tsx-link, var(--tsx-accent));
}

/* ===== Product card v2 =====
   White tile, framed square photo, name, then one row: price (right) and the
   add button (left). Heart stays on the photo. */
body.tsx .store-product .card {
  position: relative;
  padding: 6px !important;
  border: 1px solid #edf0f2 !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgb(20 26 34 / 4%) !important;
  overflow: hidden !important;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
/* Buttons position against the whole card, not just the photo. */
body.tsx .store-product .card > .position-relative { position: static !important; border-radius: 13px; }
body.tsx .store-product .card .carousel { position: relative; }
body.tsx .store-product img.tsx-card-img,
body.tsx .store-product .card .tsx-no-photo {
  aspect-ratio: 1 / 1;
  border-radius: 13px !important;
  background: #f6f6f4;
}
body.tsx .store-product .card .carousel,
body.tsx .store-product .card .carousel-inner { border-radius: 13px; overflow: hidden; }
body.tsx .store-product .like-btn {
  top: 14px !important; right: 14px !important;
  width: 34px !important; height: 34px !important;
  background: rgb(255 255 255 / 94%) !important;
  box-shadow: 0 1px 4px rgb(20 26 34 / 12%) !important;
}
body.tsx .store-product .like-btn i { font-size: 16px !important; }
body.tsx .store-product .card-body {
  padding: 10px 6px 6px !important;
  padding-inline-end: 50px !important; /* room for the add button on the price row */
  min-height: 0;
}
body.tsx .store-product .card-body .prod-name {
  min-height: calc(1.45em * 2);
  margin: 0 0 6px !important;
  font: 700 14px/1.45 Cairo, sans-serif !important;
  padding-inline-end: 0;
  margin-inline-end: -44px !important; /* name may use the full width above the price row */
}
body.tsx .store-product .card-body .product-description { margin-inline-end: -44px !important; }
body.tsx .store-product .product-price { min-height: 40px; display: flex; align-items: center; }
body.tsx .store-product .price-new { font-size: 17px !important; }
body.tsx .store-product .product-price .price-row { gap: 0 8px !important; }
body.tsx .store-product .disc-badge { font-size: 11px !important; }
body.tsx .store-product .cart-fab {
  top: auto !important;
  bottom: 12px !important;
  left: 12px !important;
  right: auto !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  background: var(--tsx-cta) !important;
  color: var(--tsx-cta-ink) !important;
  box-shadow: none !important;
  opacity: 1 !important;
  transform: none !important;
  transition: filter .15s ease, transform .15s ease !important;
}
body.tsx .store-product .cart-fab:active { transform: scale(.94) !important; }
body.tsx .store-product .cart-fab i { font-size: 18px; }
@media (hover: hover) {
  body.tsx .store-product .card:hover {
    border-color: #e2e6ea !important;
    box-shadow: 0 10px 24px rgb(20 26 34 / 9%) !important;
    transform: translateY(-2px);
  }
  body.tsx .store-product .cart-fab:hover { filter: brightness(1.08); }
}
@media (max-width: 380px) {
  body.tsx .store-product .price-new { font-size: 15px !important; }
  body.tsx .store-product .cart-fab { width: 36px !important; height: 36px !important; }
}
/* Name uses the full card width; only the price row leaves room for the add button. */
body.tsx .store-product .card-body { padding: 10px 6px 6px !important; }
body.tsx .store-product .card-body .prod-name,
body.tsx .store-product .card-body .product-description { margin-inline-end: 0 !important; }
body.tsx .store-product .product-price { padding-inline-end: 48px; }
body.tsx .store-product .card { border-color: #e7eaee !important; }

/* Breathing room between the header and the banner. */
body.tsx .store-page.topbar-below .hero-shell {
  padding-top: 14px !important;
  background: linear-gradient(var(--brand) 0 62px, #fff 62px) !important;
}
@media (min-width: 768px) {
  body.tsx .store-page.topbar-below .hero-shell { padding-top: 24px !important; background: var(--brand) !important; }
}

/* Scroll indicator under the category row: a short track whose thumb shows
   position and that more categories continue to the left. Hidden when all fit. */
body.tsx #shopBrowse .tsx-cat-rail + .category-scroll-track {
  display: block !important;
  width: 80px;
  height: 4px;
  margin: 2px auto 18px;
  border-radius: 4px;
  background: #e8ebee;
}
body.tsx #shopBrowse .tsx-cat-rail + .category-scroll-track[hidden] { display: none !important; }
body.tsx #shopBrowse .tsx-cat-rail + .category-scroll-track .category-scroll-thumb {
  border-radius: 4px;
  background: var(--tsx-link, var(--tsx-accent));
  transition: transform .12s linear;
}
body.tsx #shopBrowse .cat-flex.cat-flex.tsx-cat-rail { margin-bottom: 8px !important; }

/* Search field focus: soft store-coloured ring instead of a hard black outline. */
body.tsx #shopSearchPanel .shop-search-controls { transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
body.tsx #shopSearchPanel .shop-search-controls:focus-within {
  outline: none !important;
  border-color: var(--tsx-link, var(--tsx-accent)) !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tsx-link, var(--tsx-accent)) 16%, transparent) !important;
}
body.tsx #shopSearchPanel .shop-search-controls input:focus,
body.tsx #shopSearchPanel .shop-search-controls input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
body.tsx #shopSearchPanel .shop-search-controls:focus-within .shop-search-icon { color: var(--tsx-link, var(--tsx-accent)); }
body.tsx #shopSearchPanel .shop-search-controls input { caret-color: var(--tsx-link, var(--tsx-accent)) !important; }

/* Search field: no borders, focused or not — just the white field. */
body.tsx #shopSearchPanel .shop-search-controls,
body.tsx #shopSearchPanel .shop-search-controls:focus-within,
body.tsx.tsx-brand-pale #shopSearchPanel .shop-search-controls {
  border: 0 !important;
  outline: none !important;
}
body.tsx #shopSearchPanel .shop-search-controls:focus-within {
  box-shadow: 0 2px 10px rgb(20 26 34 / 14%) !important;
}
body.tsx.tsx-brand-pale #shopSearchPanel .shop-search-controls { background: var(--tsx-surface) !important; }

/* ===== Store menu (offcanvas) ===== */
body.tsx #storeMenuPanel.offcanvas {
  width: min(86vw, 340px) !important;
  border: 0 !important;
  border-start-end-radius: 0;
  border-top-left-radius: 22px;
  border-bottom-left-radius: 22px;
  background: #fff;
  box-shadow: -12px 0 40px rgb(20 26 34 / 18%);
  font-family: Cairo, sans-serif;
}
/* Header: store identity on the store colour. */
body.tsx #storeMenuPanel .offcanvas-header {
  display: flex; align-items: center; gap: 12px;
  padding: max(18px, env(safe-area-inset-top)) 16px 18px 18px;
  border: 0 !important;
  background: var(--brand);
  color: var(--brand-contrast, #fff);
  border-top-left-radius: 22px;
}
body.tsx #storeMenuPanel .tsx-menu-id { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
body.tsx #storeMenuPanel .tsx-menu-id img {
  width: 52px; height: 52px; flex: none;
  padding: 6px; object-fit: contain;
  border-radius: 16px;
  background: rgb(255 255 255 / 14%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 22%);
}
body.tsx.tsx-brand-pale #storeMenuPanel .tsx-menu-id img,
body.tsx.tsx-brand-light #storeMenuPanel .tsx-menu-id img { background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 10%); }
body.tsx #storeMenuPanel .tsx-menu-id-copy { display: grid; min-width: 0; }
body.tsx #storeMenuPanel .offcanvas-title {
  margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 800 17px/1.4 Cairo, sans-serif; color: inherit;
}
body.tsx #storeMenuPanel .tsx-menu-id-copy span { font: 500 12px/1.4 Cairo, sans-serif; opacity: .78; }
body.tsx #storeMenuPanel .btn-close {
  flex: none; width: 40px; height: 40px; margin: 0 !important; padding: 0;
  border-radius: 50%;
  background-color: rgb(255 255 255 / 16%);
  background-size: 14px;
  opacity: 1;
  box-shadow: none !important;
}
body.tsx.tsx-brand-strong #storeMenuPanel .btn-close { filter: invert(1) grayscale(1) brightness(2); background-color: rgb(0 0 0 / 16%); }
body.tsx.tsx-brand-pale #storeMenuPanel .btn-close,
body.tsx.tsx-brand-light #storeMenuPanel .btn-close { background-color: rgb(0 0 0 / 6%); }

/* Body */
body.tsx #storeMenuPanel .offcanvas-body { padding: 14px 12px max(24px, env(safe-area-inset-bottom)); }
body.tsx #storeMenuPanel .dropdown-menu {
  position: static !important; display: block !important; float: none;
  width: 100%; min-width: 0; margin: 0 !important; padding: 0 !important;
  border: 0 !important; box-shadow: none !important; background: transparent !important;
  transform: none !important; inset: auto !important;
}
body.tsx #storeMenuPanel .tsx-menu-label {
  margin: 16px 12px 6px;
  font: 700 11px/1.4 Cairo, sans-serif;
  color: var(--tsx-muted);
}
body.tsx #storeMenuPanel :is(a.dropdown-item, summary.dropdown-item) {
  display: flex !important; align-items: center; gap: 12px;
  min-height: 52px;
  margin: 0 0 2px;
  padding: 7px 10px !important;
  border-radius: 14px;
  background: transparent;
  color: var(--tsx-ink) !important;
  font: 600 15px/1.4 Cairo, sans-serif !important;
  white-space: normal;
  text-decoration: none;
  cursor: pointer;
}
body.tsx #storeMenuPanel :is(a.dropdown-item, summary.dropdown-item):is(:hover, :focus-visible) { background: var(--tsx-surface) !important; }
body.tsx #storeMenuPanel :is(a.dropdown-item, summary.dropdown-item) > i.bi:first-child {
  display: grid; place-items: center; flex: none;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tsx-link, var(--tsx-accent)) 10%, #fff);
  color: var(--tsx-link, var(--tsx-accent));
  font-size: 18px; margin: 0 !important;
}
body.tsx #storeMenuPanel .tsx-chev,
body.tsx #storeMenuPanel .category-chevron {
  margin-inline-start: auto !important;
  font-size: 13px; color: #b3bac3;
  width: auto !important; height: auto !important; background: none !important;
  transition: transform .2s ease;
}
/* Sign-in card */
body.tsx #storeMenuPanel a.visitor-auth-login {
  min-height: 64px;
  margin-bottom: 4px;
  padding: 10px 12px !important;
  border: 1px solid color-mix(in srgb, var(--tsx-link, var(--tsx-accent)) 18%, #fff);
  background: color-mix(in srgb, var(--tsx-link, var(--tsx-accent)) 6%, #fff);
}
body.tsx #storeMenuPanel a.visitor-auth-login > i.bi:first-child { background: var(--tsx-cta); color: var(--tsx-cta-ink); }
body.tsx #storeMenuPanel .tsx-menu-text { display: grid; gap: 1px; min-width: 0; }
body.tsx #storeMenuPanel .tsx-menu-text b { font: 800 15px/1.4 Cairo, sans-serif; }
body.tsx #storeMenuPanel .tsx-menu-text small { font: 500 12px/1.45 Cairo, sans-serif; color: var(--tsx-muted); }
/* Signed-in card */
body.tsx #storeMenuPanel .recognized-menu-item { padding: 0 !important; margin-bottom: 4px; background: none !important; }
body.tsx #storeMenuPanel .visitor-account-card {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px; border-radius: 16px;
  background: color-mix(in srgb, var(--tsx-link, var(--tsx-accent)) 6%, #fff);
  border: 1px solid color-mix(in srgb, var(--tsx-link, var(--tsx-accent)) 18%, #fff);
}
/* Categories: expandable list of pills */
body.tsx #storeMenuPanel details.store-menu-categories > summary { list-style: none; }
body.tsx #storeMenuPanel details.store-menu-categories > summary::-webkit-details-marker { display: none; }
body.tsx #storeMenuPanel details.store-menu-categories[open] .category-chevron { transform: rotate(180deg); }
body.tsx #storeMenuPanel details.store-menu-categories > nav {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 4px 10px 12px;
  padding-inline-start: 60px;
}
body.tsx #storeMenuPanel a.dropdown-item.store-menu-category {
  display: inline-flex !important; width: auto;
  min-height: 36px !important; margin: 0;
  padding: 5px 14px !important;
  border: 1px solid var(--tsx-line);
  border-radius: 999px;
  background: #fff;
  font: 600 13px/1.4 Cairo, sans-serif !important;
  color: var(--tsx-ink-2) !important;
}
body.tsx #storeMenuPanel a.dropdown-item.store-menu-category[aria-current="page"] {
  background: var(--tsx-ink) !important; border-color: var(--tsx-ink); color: #fff !important;
}
/* Trusty group */
body.tsx #storeMenuPanel #marketplaceLinks { border-top: 0 !important; margin: 0; padding: 0; }
body.tsx #storeMenuPanel #marketplaceLinks a.dropdown-item > i.bi:first-child { background: var(--tsx-surface); color: var(--tsx-ink-2); }
body.tsx #storeMenuPanel .tsx-menu-label + #marketplaceLinks,
body.tsx #storeMenuPanel .tsx-menu-label:has(+ #marketplaceLinks) { }
body.tsx #storeMenuPanel .tsx-menu-label:has(+ #marketplaceLinks) {
  padding-top: 14px; border-top: 1px solid var(--tsx-line); margin-top: 14px;
}
body.tsx #storeMenuPanel .visitor-auth-logout > i.bi:first-child { background: #fdecec; color: #c62f3a; }
body.tsx #storeMenuPanel details.store-menu-categories,
body.tsx #storeMenuPanel details.store-menu-categories > nav { border: 0 !important; box-shadow: none !important; margin-inline: 0 !important; }

/* ===== Phone number sheet (#mobileModal) ===== */
body.tsx .tsx-phone-modal .modal-dialog { max-width: 400px; }
body.tsx .tsx-phone-modal .modal-content {
  position: relative;
  border: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 60px rgb(20 26 34 / 24%);
  overflow: hidden;
  font-family: Cairo, sans-serif;
}
body.tsx .tsx-phone-modal .modal-body {
  display: grid;
  justify-items: center;
  gap: 0;
  padding: 32px 22px 20px;
  text-align: center;
}
body.tsx .tsx-phone-icon {
  display: grid; place-items: center;
  width: 60px; height: 60px; margin-bottom: 14px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--tsx-link, var(--tsx-accent)) 12%, #fff);
  color: var(--tsx-link, var(--tsx-accent));
  font-size: 26px;
}
body.tsx .tsx-phone-modal .modal-title { margin: 0 0 6px; font: 800 20px/1.4 Cairo, sans-serif; color: var(--tsx-ink); }
body.tsx .tsx-phone-lead { margin: 0 0 20px; max-width: 32ch; font: 400 14px/1.7 Cairo, sans-serif; color: var(--tsx-muted); }
body.tsx .tsx-phone-field {
  position: relative; width: 100%;
  display: flex; align-items: center;
  border-radius: 14px;
  background: var(--tsx-surface);
  transition: box-shadow .15s ease, background-color .15s ease;
}
body.tsx .tsx-phone-field i {
  position: absolute; right: 16px;
  font-size: 18px; color: var(--tsx-muted); pointer-events: none;
}
body.tsx .tsx-phone-field input.form-control {
  height: 56px;
  padding: 0 48px 0 16px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  font: 700 19px/1 Cairo, sans-serif;
  letter-spacing: .06em;
  text-align: left;
  color: var(--tsx-ink);
  box-shadow: none !important;
  outline: none !important;
}
body.tsx .tsx-phone-field input.form-control::placeholder { color: #a8b0ba; font-weight: 500; letter-spacing: .04em; }
body.tsx .tsx-phone-field:focus-within { background: #fff; box-shadow: 0 2px 12px rgb(20 26 34 / 14%); }
body.tsx .tsx-phone-field:focus-within i { color: var(--tsx-link, var(--tsx-accent)); }
body.tsx .tsx-phone-err {
  width: 100%;
  margin-top: 8px;
  font: 600 13px/1.5 Cairo, sans-serif;
  color: var(--tsx-sale);
  text-align: start;
}
body.tsx .tsx-phone-modal:has(.tsx-phone-err:not([style*="none"])) .tsx-phone-field { box-shadow: 0 0 0 2px var(--tsx-sale); background: #fff; }
body.tsx .tsx-phone-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--tsx-cta) !important;
  color: var(--tsx-cta-ink) !important;
  font: 800 16px/1.3 Cairo, sans-serif !important;
}
body.tsx .tsx-phone-cancel {
  min-height: 44px;
  margin-top: 6px;
  padding: 6px 16px;
  border: 0;
  background: none;
  color: var(--tsx-muted);
  font: 600 14px/1.4 Cairo, sans-serif;
}
body.tsx .tsx-phone-cancel:hover { color: var(--tsx-ink); }
body.tsx .tsx-sheet-close {
  position: absolute; top: 12px; left: 12px;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: var(--tsx-surface);
  color: var(--tsx-ink-2);
  font-size: 15px;
}
/* Phones: a bottom sheet with a grab handle (swipe down closes it). */
@media (max-width: 767.98px) {
  body.tsx .tsx-phone-modal .modal-dialog {
    position: fixed; inset: auto 0 0 0;
    max-width: none; min-height: 0; margin: 0;
    align-items: flex-end;
    transform: translateY(100%);
    transition: transform .28s ease-out;
  }
  body.tsx .tsx-phone-modal.show .modal-dialog { transform: none; }
  body.tsx .tsx-phone-modal .modal-content { border-radius: 24px 24px 0 0; box-shadow: 0 -12px 40px rgb(20 26 34 / 18%); }
  body.tsx .tsx-phone-modal .modal-body { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  body.tsx .tsx-phone-modal .modal-content::before {
    content: ""; position: absolute; top: 8px; left: 50%;
    width: 40px; height: 5px; margin-left: -20px;
    border-radius: 3px; background: #d5d9de;
  }
}

/* Same product preview look on every page (older page copies carry their own styles). */
body.tsx #productModal .pm-close-footer .pm-actions-footer,
body.tsx #productModal .pm-footer-main { background: transparent !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; }
body.tsx #productModal #pmCat .cat-badge {
  position: static !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  background: #f2f3f5 !important;
  color: #596273 !important;
  font: 600 11px/1.5 Cairo, sans-serif !important;
}
body.tsx #productModal .pm-trust {
  display: block !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--tsx-muted) !important;
  font: 400 12px/1.6 Cairo, sans-serif !important;
}
body.tsx #productModal .pm-meta-row,
body.tsx #productModal #pmContent .col-md-5 > #pmCat { margin-bottom: 6px !important; }

/* Header "back to store" button (favourites / info pages). */
body.tsx .topbar .store-home-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 12px;
  color: var(--brand-contrast, #fff);
  font-size: 1.3rem; text-decoration: none;
}
body.tsx .topbar .store-home-btn:hover { background: color-mix(in srgb, currentColor 14%, transparent); }

/* ===== Cart (offcanvas) ===== */
body.tsx #cartPanel.tsx-cart {
  width: min(92vw, 400px) !important;
  border: 0 !important;
  border-top-left-radius: 22px;
  border-bottom-left-radius: 22px;
  box-shadow: -12px 0 40px rgb(20 26 34 / 18%);
  font-family: Cairo, sans-serif;
}
body.tsx #cartPanel .offcanvas-header {
  padding: max(16px, env(safe-area-inset-top)) 18px 14px !important;
  border-bottom: 1px solid var(--tsx-line) !important;
}
body.tsx #cartPanel .offcanvas-title { font: 800 18px/1.4 Cairo, sans-serif; color: var(--tsx-ink); display: flex; align-items: center; gap: 8px; }
body.tsx #cartPanel .btn-close { width: 40px; height: 40px; padding: 0; border-radius: 50%; background-color: var(--tsx-surface); background-size: 13px; opacity: 1; box-shadow: none !important; }
body.tsx #cartPanel .offcanvas-body { padding: 8px 16px max(16px, env(safe-area-inset-bottom)) !important; }
body.tsx #cartPanel #cartItems { display: grid; align-content: start; gap: 0; }
body.tsx .tsx-cart-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--tsx-line);
}
body.tsx .tsx-cart-thumb {
  width: 72px; height: 72px;
  display: grid; place-items: center;
  border-radius: 14px; overflow: hidden;
  background: var(--tsx-surface); color: #b7bdc6; font-size: 22px;
}
body.tsx .tsx-cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
body.tsx .tsx-cart-info { display: grid; gap: 2px; min-width: 0; }
body.tsx .tsx-cart-name {
  font: 700 14px/1.45 Cairo, sans-serif; color: var(--tsx-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
body.tsx .tsx-cart-variant { font: 500 12px/1.4 Cairo, sans-serif; color: var(--tsx-muted); }
body.tsx .tsx-cart-unit { font: 500 12px/1.4 Cairo, sans-serif; color: var(--tsx-muted); }
body.tsx .tsx-cart-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
body.tsx .tsx-cart-line-total { font: 800 16px/1.3 Cairo, sans-serif; color: var(--tsx-ink); font-variant-numeric: tabular-nums; }
/* Quantity stepper: one soft pill, round buttons, trash replaces − at quantity 1. */
body.tsx .tsx-stepper {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--tsx-surface);
}
body.tsx .tsx-stepper button {
  display: grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 50%;
  background: #fff;
  color: var(--tsx-ink);
  font-size: 14px;
  box-shadow: 0 1px 3px rgb(20 26 34 / 12%);
  transition: transform .12s ease, background-color .12s ease;
}
body.tsx .tsx-stepper button:active { transform: scale(.92); }
body.tsx .tsx-stepper button.is-remove { color: #c62f3a; }
body.tsx .tsx-stepper span { min-width: 28px; text-align: center; font: 800 15px/1 Cairo, sans-serif; color: var(--tsx-ink); }
/* Summary */
body.tsx #cartPanel .cart-summary,
body.tsx #cartPanel .offcanvas-body > .border-top { border-top: 1px solid var(--tsx-line) !important; padding-top: 14px !important; margin-top: 8px; }
body.tsx #cartPanel .cart-summary > .d-flex,
body.tsx #cartPanel .offcanvas-body > .border-top > .d-flex { align-items: baseline; font: 700 15px/1.4 Cairo, sans-serif !important; color: var(--tsx-muted); }
body.tsx #cartPanel #cartTotal { font: 800 22px/1.2 Cairo, sans-serif; color: var(--tsx-ink); font-variant-numeric: tabular-nums; }
body.tsx #cartPanel #btnCheckout {
  min-height: 52px; border: 0 !important; border-radius: 14px !important;
  background: var(--tsx-cta) !important; color: var(--tsx-cta-ink) !important;
  font: 800 16px/1.3 Cairo, sans-serif !important;
}
body.tsx #cartPanel #btnCheckout:disabled { opacity: .4; }
body.tsx #cartPanel #cartEmpty { padding-block: 48px !important; font: 600 15px/1.6 Cairo, sans-serif; }
body.tsx #cartPanel #cartEmpty i { color: #c3c9d0; }
body.tsx #cartPanel #cartItems:empty { flex-grow: 0 !important; }
body.tsx #cartPanel #cartEmpty { flex-grow: 1; display: grid; place-content: center; }

/* Cart line: delete is always available (top corner of each item). */
body.tsx .tsx-cart-line { grid-template-columns: 72px minmax(0, 1fr) 36px; }
body.tsx .tsx-cart-remove {
  align-self: start;
  display: grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 50%;
  background: transparent;
  color: #9aa2ad;
  font-size: 16px;
  transition: background-color .15s ease, color .15s ease;
}
body.tsx .tsx-cart-remove:hover,
body.tsx .tsx-cart-remove:focus-visible { background: #fdecec; color: #c62f3a; }
body.tsx .tsx-stepper button:disabled { opacity: .4; box-shadow: none; }

/* Phones: the store colour forms a full stage behind the banner, closing with a
   soft rounded edge instead of cutting across the artwork. */
@media (max-width: 767.98px) {
  body.tsx .store-page.topbar-below .hero-shell,
  body.tsx .hero-shell {
    background: var(--brand) !important;
    padding-bottom: 18px !important;
    border-radius: 0 0 24px 24px !important;
  }
  body.tsx .tsx-hero-frame { box-shadow: 0 10px 24px rgb(0 0 0 / 22%); }
  body.tsx.tsx-brand-pale .hero-shell { box-shadow: inset 0 -1px 0 var(--tsx-line); }
}

/* Phones: edge-to-edge banner directly under the header (full width, square corners). */
@media (max-width: 767.98px) {
  html body.tsx .store-page .hero-shell,
  html body.tsx .hero-shell {
    padding: 0 !important;
    background: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  html body.tsx .hero-shell .tsx-hero-frame {
    width: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  html body.tsx .hero.hero-has-image { max-width: none !important; }
}
@media (max-width: 767.98px) {
  html body.tsx .store-page.topbar-below .hero-shell.hero-shell,
  html body.tsx .store-page.topbar-overlay .hero-shell.hero-shell {
    padding: 0 !important;
    background: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}

/* Sign-out sits apart from the link groups. */
body.tsx #storeMenuPanel .visitor-auth-logout { margin-top: 14px !important; position: relative; }
body.tsx #storeMenuPanel .visitor-auth-logout::before {
  content: ""; position: absolute; top: -8px; left: 10px; right: 10px;
  border-top: 1px solid var(--tsx-line);
}
body.tsx #storeMenuPanel .visitor-auth-logout { color: #c62f3a !important; }

/* Respect the page's sign-in state: hidden items stay hidden (fixes the sign-in
   card showing next to the signed-in card). */
body.tsx #storeMenuPanel .visitor-hidden,
body.tsx #storeMenuPanel .dropdown-item[style*="display:none"],
body.tsx #storeMenuPanel .dropdown-item[style*="display: none"] { display: none !important; }

/* Signed-in card, matching the menu style. */
body.tsx #storeMenuPanel .recognized-menu-item {
  display: block !important;
  min-height: 0 !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
}
body.tsx #storeMenuPanel .visitor-account-card {
  display: flex !important; align-items: center; gap: 12px;
  width: 100%;
  padding: 12px !important;
  border-radius: 16px !important;
  border: 1px solid color-mix(in srgb, var(--tsx-link, var(--tsx-accent)) 18%, #fff) !important;
  background: color-mix(in srgb, var(--tsx-link, var(--tsx-accent)) 6%, #fff) !important;
  color: var(--tsx-ink) !important;
  box-shadow: none !important;
}
body.tsx #storeMenuPanel .visitor-account-icon {
  display: grid !important; place-items: center; flex: none;
  width: 38px !important; height: 38px !important;
  border-radius: 12px !important;
  background: var(--tsx-cta) !important; color: var(--tsx-cta-ink) !important;
  font-size: 18px; box-shadow: none !important;
}
body.tsx #storeMenuPanel .visitor-account-copy { display: grid; gap: 1px; min-width: 0; flex: 1; }
body.tsx #storeMenuPanel .visitor-greeting { font: 800 15px/1.4 Cairo, sans-serif !important; color: var(--tsx-ink) !important; }
body.tsx #storeMenuPanel .visitor-recognized-mobile { font: 600 13px/1.4 Cairo, sans-serif !important; color: var(--tsx-muted) !important; direction: ltr; text-align: right; letter-spacing: .03em; }
body.tsx #storeMenuPanel .visitor-online-chip {
  display: inline-flex !important; align-items: center; gap: 5px;
  padding: 3px 10px !important;
  border: 0 !important; border-radius: 999px !important;
  background: #e8f6ee !important; color: #1f7a45 !important;
  font: 700 11px/1.4 Cairo, sans-serif !important; box-shadow: none !important;
}
body.tsx #storeMenuPanel .visitor-online-dot { width: 7px !important; height: 7px !important; border-radius: 50%; background: #22a35a !important; box-shadow: none !important; }
html body.tsx #storeMenuPanel .dropdown-item.visitor-hidden,
html body.tsx #storeMenuPanel .dropdown-item[style*="display:none"],
html body.tsx #storeMenuPanel .dropdown-item[style*="display: none"] { display: none !important; }
