body.headerless-cart-page .commerce-cart-page--reference-redesign .jolfa-cart-card:not(.jolfa-cart-empty) {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
}
body.headerless-cart-page .commerce-cart-page--reference-redesign .jolfa-cart-card__head {
  min-height: 0 !important;
  padding-block: 11px !important;
}
body.headerless-cart-page .commerce-cart-page--reference-redesign .jolfa-cart-items {
  min-height: 0 !important;
  gap: 8px !important;
  padding-block: 8px !important;
}
body.headerless-cart-page .commerce-cart-page--reference-redesign .jolfa-cart-item {
  min-height: 0 !important;
  height: auto !important;
  box-sizing: border-box !important;
}
body.headerless-cart-page .commerce-cart-page--reference-redesign .jolfa-cart-item__side {
  min-height: 0 !important;
}
/* The only order summary is the original, fully functional checkout card. */
body.headerless-cart-page .jolfa-cart-quick-summary {display: none !important}

/* Root and branch navigation are links; make them visibly tappable without
   overlaying the following category page or intercepting taps. */
body.headerless-categories-page .mobile-category-all,
body.headerless-categories-page .mobile-category-branch-link {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 9px !important;
  position: relative !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  box-shadow: none !important;
  font-weight: 850 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: border-color .18s ease, background-color .18s ease !important;
  -webkit-tap-highlight-color: transparent;
}
body.headerless-categories-page .mobile-category-all:hover,
body.headerless-categories-page .mobile-category-branch-link:hover {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--border)) !important;
  background: var(--surface-tint) !important;
}
body.headerless-categories-page .mobile-category-all > i,
body.headerless-categories-page .mobile-category-branch-link > i {
  color: var(--primary) !important;
  flex-shrink: 0 !important;
}

/* The category button must not inherit old transparent/text-only link styling.
   It opens a fullscreen filter panel on phones and small tablet widths. */
@media (max-width: 980px) {
  body.jolfa-commerce-theme [data-commerce-catalog] {
    min-width: 0 !important;
  }
  body.jolfa-commerce-theme [data-commerce-filter-toggle] {
    display: inline-flex !important;
    position: relative !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: start !important;
    gap: 9px !important;
    width: auto !important;
    min-height: 44px !important;
    min-width: 110px !important;
    padding: 9px 16px !important;
    margin: 0 0 8px !important;
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border)) !important;
    border-radius: 13px !important;
    background: var(--surface) !important;
    color: var(--primary) !important;
    font: inherit !important;
    font-size: .84rem !important;
    font-weight: 900 !important;
    line-height: 1.4 !important;
    box-shadow: 0 3px 12px rgba(37,31,62,.06) !important;
    cursor: pointer !important;
    touch-action: manipulation;
    z-index: 3 !important;
    pointer-events: auto !important;
  }
  body.jolfa-commerce-theme [data-commerce-filter-toggle]:hover,
  body.jolfa-commerce-theme [data-commerce-filter-toggle][aria-expanded="true"] {
    background: var(--surface-tint) !important;
    border-color: color-mix(in srgb, var(--primary) 48%, var(--border)) !important;
  }
  body.jolfa-commerce-theme [data-commerce-filter-toggle] i {color: currentColor !important}
  body.jolfa-commerce-theme [data-commerce-filter-toggle]:focus-visible,
  body.headerless-categories-page .mobile-category-all:focus-visible,
  body.headerless-categories-page .mobile-category-branch-link:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent) !important;
    outline-offset: 3px !important;
  }
  body.jolfa-commerce-theme [data-commerce-filters] {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    z-index: 2600 !important;
    transform: translateY(102%) !important;
    pointer-events: none !important;
    visibility: hidden !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    transition: transform .26s cubic-bezier(.2,.8,.25,1), visibility 0s linear .26s !important;
  }
  body.jolfa-commerce-theme [data-commerce-filters].open {
    transform: translateY(0) !important;
    pointer-events: auto !important;
    visibility: visible !important;
    transition: transform .26s cubic-bezier(.2,.8,.25,1), visibility 0s !important;
  }
  body.jolfa-commerce-theme [data-commerce-filters] .commerce-filters__head {
    background: var(--surface) !important;
    color: var(--text) !important;
    border-bottom: 1px solid var(--border) !important;
  }
  body.jolfa-commerce-theme [data-commerce-filter-backdrop]:not([hidden]) {
    display: block !important;
    z-index: 2500 !important;
  }
  body.jolfa-commerce-theme [data-commerce-filter-backdrop][hidden] {display: none !important}
  html.commerce-filter-open {overflow: hidden !important}
  .commerce-mobile-filter-actions {
    background: var(--surface) !important;
    border-color: var(--border) !important;
  }
  .commerce-mobile-filter-apply {
    cursor: pointer !important;
  }
}
@media (max-width: 900px) {
  body.headerless-cart-page .commerce-cart-page--reference-redesign .jolfa-cart-hero {
    margin-bottom: 8px !important;
  }
  body.headerless-cart-page .commerce-cart-page--reference-redesign .jolfa-cart-items {
    gap: 7px !important;
    padding: 7px !important;
  }
  body.headerless-cart-page .commerce-cart-page--reference-redesign .jolfa-cart-item {
    gap: 9px !important;
    padding: 10px !important;
  }
  body.headerless-cart-page .commerce-cart-page--reference-redesign .jolfa-cart-item__title-en {
    margin-bottom: 5px !important;
  }
  body.headerless-cart-page .commerce-cart-page--reference-redesign .jolfa-cart-item__meta {
    gap: 4px !important;
  }
  body.headerless-cart-page .commerce-cart-page--reference-redesign .jolfa-cart-item__side {
    gap: 7px !important;
    padding-top: 0 !important;
  }
  body.headerless-cart-page .commerce-cart-page--reference-redesign .jolfa-cart-layout {
    row-gap: 11px !important;
  }
}
@media (max-width: 420px) {
  body.headerless-cart-page .commerce-cart-page--reference-redesign .jolfa-cart-item {
    padding: 8px !important;
  }
  body.headerless-cart-page .commerce-cart-page--reference-redesign .jolfa-cart-item__content h2 {
    margin-bottom: 2px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.jolfa-commerce-theme [data-commerce-filters] {transition: none !important}
}
