/* POS catalog — category horizontal scroll (chip bar) */

:root {
  --pos-cat-bar-bg: #f0f4f8;
  --pos-cat-chip-bg: #fff;
  --pos-cat-chip-border: #d8e0ea;
  --pos-cat-chip-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  /* md chip — white old pattern */
  --pos-cat-chip-h: 2.75rem;
  --pos-cat-nav-size: 1.75rem;
  --pos-cat-primary: #017bff;
  --pos-cat-primary-hover: #0168e6;
  --pos-cat-primary-rgb: 1, 123, 255;
}

#typeProducts {
  --pos-cat-primary: #017bff;
  --pos-cat-primary-hover: #0168e6;
  --pos-cat-primary-rgb: 1, 123, 255;
}

/* —— Bar layout —— */
#typeProducts.pos-cat-bar {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  background: var(--pos-cat-bar-bg);
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  gap: 0;
}

.pos-cat-bar-fixed {
  flex: 0 0 auto;
  z-index: 14;
  display: flex;
  align-items: center;
  padding: 0.4rem 0.45rem 0.4rem 0.5rem;
  background: var(--pos-cat-bar-bg);
  border-right: 1px solid #e2e8f0;
}

.pos-cat-bar-scroll-wrap {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
}

/* Edge fade (shown when scrollable) */
.pos-cat-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2.25rem;
  z-index: 11;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pos-cat-fade--left {
  left: 0;
  background: linear-gradient(90deg, var(--pos-cat-bar-bg) 35%, transparent);
}

.pos-cat-fade--right {
  right: 0;
  background: linear-gradient(270deg, var(--pos-cat-bar-bg) 35%, transparent);
}

.pos-cat-bar-scroll-wrap.pos-cat-can-left .pos-cat-fade--left,
.pos-cat-bar-scroll-wrap.pos-cat-can-right .pos-cat-fade--right {
  opacity: 1;
}

/* —— Scroll track —— */
#pro-type-scroll.pro-type,
.pos-cat-scroll.pro-type {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 0.4rem;
  padding: 0.4rem 2.35rem 0.4rem 0.5rem;
  width: 100%;
  min-height: calc(var(--pos-cat-chip-h) + 0.8rem);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#pro-type-scroll.pro-type::-webkit-scrollbar,
.pos-cat-scroll.pro-type::-webkit-scrollbar {
  display: none;
  height: 0;
}

.pro-type .btn-typePro.d-flex {
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}

.pro-type .btn-typePro .badge,
.pro-type .btn-typePro .pos-cat-qty-badge {
  margin-top: 0 !important;
  margin-left: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2em 0.55em;
  line-height: 1.2;
  box-shadow: none;
  vertical-align: middle;
}

/* —— Category chips — white old pattern —— */
#typeProducts .btn-typePro,
.pos-cat-bar-fixed .btn-typePro {
  width: auto !important;
  min-width: min-content;
  max-width: none;
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: var(--pos-cat-chip-h);
  padding: 0.45rem 1rem;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.25;
  border-radius: 999px !important;
  border: 1px solid var(--pos-cat-chip-border) !important;
  background: var(--pos-cat-chip-bg) !important;
  color: #334155 !important;
  box-shadow: var(--pos-cat-chip-shadow);
}

#typeProducts .btn-typePro:hover:not(.active),
.pos-cat-bar-fixed .btn-typePro:hover:not(.active),
#typeProducts .btn-typePro.btn-outline-primary:hover:not(.active),
.pos-cat-bar-fixed .btn-typePro.btn-outline-primary:hover:not(.active) {
  border-color: #94a3b8 !important;
  color: #0f172a !important;
  background: #fff !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

#typeProducts .btn-typePro.btn-outline-primary:not(.active),
.pos-cat-bar .btn-typePro.btn-outline-primary:not(.active) {
  border: 1px solid var(--pos-cat-chip-border) !important;
  background: #fff !important;
  color: #334155 !important;
}

#typeProducts .btn-typePro.btn-outline-primary:not(.active) .badge.badge-danger,
#typeProducts .btn-typePro.btn-outline-primary:not(.active) .pos-cat-qty-badge,
.pos-cat-bar .btn-typePro.btn-outline-primary:not(.active) .badge.badge-danger,
.pos-cat-bar .btn-typePro.btn-outline-primary:not(.active) .pos-cat-qty-badge {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  color: #fff !important;
}

#typeProducts .btn-typePro:active,
.pos-cat-bar-fixed .btn-typePro:active {
  transform: scale(0.97);
}

.pos-cat-bar-fixed .btn-typePro {
  min-height: var(--pos-cat-chip-h);
}

.pos-cat-chip--all.btn-typePro:not(.active) {
  border-color: #93c5fd !important;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%) !important;
  color: #334155 !important;
}

.pos-cat-chip--pin .badge ion-icon {
  font-size: 0.95rem;
  vertical-align: middle;
}

/* Active chip */
#typeProducts .btn-typePro.active,
.pos-cat-bar .btn-typePro.active,
.pos-cat-bar-fixed .btn-typePro.active {
  background: var(--pos-cat-primary) !important;
  border-color: var(--pos-cat-primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(var(--pos-cat-primary-rgb), 0.35);
}

#typeProducts .btn-typePro.active .badge.badge-danger,
#typeProducts .btn-typePro.active .pos-cat-qty-badge,
.pos-cat-bar .btn-typePro.active .badge.badge-danger,
.pos-cat-bar .btn-typePro.active .pos-cat-qty-badge,
.pos-cat-bar-fixed .btn-typePro.active .badge.badge-danger,
.pos-cat-bar-fixed .btn-typePro.active .pos-cat-qty-badge {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-color: transparent !important;
  color: #dc3545 !important;
}

#typeProducts .btn-typePro.active .badge.badge-danger ion-icon,
#typeProducts .btn-typePro.active .pos-cat-qty-badge ion-icon,
.pos-cat-bar .btn-typePro.active .badge.badge-danger ion-icon,
.pos-cat-bar .btn-typePro.active .pos-cat-qty-badge ion-icon,
.pos-cat-bar-fixed .btn-typePro.active .badge.badge-danger ion-icon,
.pos-cat-bar-fixed .btn-typePro.active .pos-cat-qty-badge ion-icon {
  color: #dc3545 !important;
}

/* —— Scroll nav buttons —— */
.pos-cat-nav.pc-sfab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--pos-cat-nav-size);
  height: var(--pos-cat-nav-size);
  padding: 0;
  line-height: 1;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #cbd5e1;
  color: var(--pos-cat-primary, #017bff);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  opacity: 0;
  pointer-events: none;
}

.pos-cat-bar-scroll-wrap .pos-cat-nav.pc-sfab {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 13;
}

.pos-cat-bar-scroll-wrap .pos-cat-nav--prev#slideLeft {
  left: 6px;
}

.pos-cat-bar-scroll-wrap .pos-cat-nav--next#slideRight {
  right: 6px;
}

#typeProducts:hover
  .pos-cat-bar-scroll-wrap.pos-cat-has-overflow
  .pos-cat-nav.pc-sfab,
.pos-cat-bar-scroll-wrap.pos-cat-has-overflow
  .pos-cat-nav.pc-sfab.pos-cat-nav-visible,
#typeProducts.pos-cat-fabs-show
  .pos-cat-bar-scroll-wrap.pos-cat-has-overflow
  .pos-cat-nav.pc-sfab {
  opacity: 1;
  pointer-events: auto;
}

.pos-cat-bar-scroll-wrap.pos-cat-can-left
  .pos-cat-nav--prev.pos-cat-nav-visible,
.pos-cat-bar-scroll-wrap.pos-cat-can-right
  .pos-cat-nav--next.pos-cat-nav-visible,
#typeProducts:hover
  .pos-cat-bar-scroll-wrap.pos-cat-can-left
  .pos-cat-nav--prev,
#typeProducts:hover
  .pos-cat-bar-scroll-wrap.pos-cat-can-right
  .pos-cat-nav--next,
#typeProducts.pos-cat-fabs-show
  .pos-cat-bar-scroll-wrap.pos-cat-can-left
  .pos-cat-nav--prev,
#typeProducts.pos-cat-fabs-show
  .pos-cat-bar-scroll-wrap.pos-cat-can-right
  .pos-cat-nav--next {
  opacity: 1;
  pointer-events: auto;
}

.pos-cat-nav.pc-sfab:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.pos-cat-nav.pc-sfab:active {
  transform: translateY(-50%) scale(0.92);
}

.pos-cat-nav.pc-sfab ion-icon {
  color: inherit;
  font-size: 1.05rem;
  vertical-align: middle;
}

/* —— Salon / spa catalog tile pattern (image + title + blue price) —— */
:root {
  --pos-catalog-grid-bg: #fff;
  --pos-catalog-tile-radius: 0.5rem;
  --pos-catalog-tile-border: #dde3ea;
  --pos-catalog-price-blue: #0b7dda;
  --pos-catalog-variant-blue: #017bff;
}

/* Product grid — responsive columns (≈6 on wide desktop) */
#getCartList.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.5rem;
  margin: 0;
  width: 100%;
  align-content: start;
  align-items: stretch;
  background: var(--pos-catalog-grid-bg);
}

#getCartList > .cart-product-item {
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
}

#getCartList > .catalog-more-wrap,
#getCartList > .catalog-end-pad,
#getCartList > .btn-add-product-wrapper,
#getCartList > .col-sm-12,
#getCartList > .col-12 {
  grid-column: 1 / -1;
  width: 100% !important;
  max-width: 100% !important;
}

/* Card shell — white tile, light border (salon pattern) */
.pos-catalog-card.btn,
.btn.pos-catalog-card,
.pos-catalog-card--tile.btn {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 100%;
  text-align: center;
  overflow: visible !important;
  position: relative !important;
  background-color: #fff !important;
  border-width: 1px !important;
  border-color: var(--pos-catalog-tile-border) !important;
  border-radius: var(--pos-catalog-tile-radius) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  padding: 0 !important;
}

.pos-catalog-card--tile.border-primary,
.pos-catalog-card--tile.border-warning,
.pos-catalog-card--tile.border-danger,
.pos-catalog-card--tile.border-secondary {
  border-width: 1px !important;
}

.pos-catalog-media-wrap {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: var(--pos-catalog-tile-radius) var(--pos-catalog-tile-radius) 0
    0;
}

/* Media — square thumb (real image + no-image placeholder) */
#getCartList .cart-product-item .img-thumbnail-div,
.cart-product-item .img-thumbnail-div,
.pos-catalog-card .img-thumbnail-div,
.pos-catalog-card > img.img-thumbnail {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  display: block;
  overflow: hidden;
  position: relative;
  padding: 0;
  margin: 0;
  background-color: #fff;
  border-top-right-radius: 0.5rem;
  border-top-left-radius: 0.5rem;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  box-shadow: none;
  object-fit: cover;
  text-align: center;
}

#getCartList .cart-product-item .img-placeholder,
.cart-product-item .img-placeholder,
.pos-catalog-card .img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  background: #fff;
  position: absolute;
  inset: 0;
}

/* Footer: title + price */
.pos-catalog-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 auto;
  width: 100%;
  margin-top: auto;
  background: #fff;
  border-radius: 0 0 var(--pos-catalog-tile-radius)
    var(--pos-catalog-tile-radius);
}

/* Name under real image — single-line truncate */
.pos-catalog-card.btn > .pos-catalog-name,
.btn.pos-catalog-card > .pos-catalog-name,
.pos-catalog-card > .pos-catalog-name,
.pos-catalog-footer .pos-catalog-name--below {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 0 0 auto;
  margin-bottom: 0 !important;
  padding: 0.35rem 0.35rem 0.15rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8125rem;
  line-height: 1.35;
  font-weight: 600;
  color: #0f172a;
  background: #fff;
}

/* Variant badge on image (S/M/L circle, Full/Half pill) */
.pos-catalog-variant {
  position: absolute;
  z-index: 11;
  background: var(--pos-catalog-variant-blue);
  color: #fff;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.pos-catalog-variant--dot {
  left: 6px;
  top: 6px;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.pos-catalog-variant--pill.pos-catalog-variant--bl {
  left: 6px;
  right: auto;
  top: auto;
  bottom: 6px;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.02em;
}

.pos-catalog-mode-title {
  font-size: inherit;
  font-weight: 700;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

/* Name inside no-image square */
.pos-catalog-card .img-placeholder .pos-catalog-name {
  position: relative;
  width: 100%;
  max-height: 100%;
  min-width: 0;
  flex: 1 1 auto;
  margin-bottom: 0 !important;
  padding: 0.35rem;
  text-align: center;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  font-size: clamp(0.8125rem, 3.2vw, 1rem);
  line-height: 1.3;
  font-weight: 600;
  color: #1e293b;
  background: transparent;
}

.pos-catalog-card.btn,
.btn.pos-catalog-card {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

@media (max-width: 575.98px) {
  .pos-catalog-card > .pos-catalog-name {
    font-size: clamp(0.8125rem, 3.4vw, 0.9375rem);
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .pos-catalog-card > .pos-catalog-name {
    font-size: clamp(0.875rem, 2.8vw, 1rem);
  }
}

@media (min-width: 992px) {
  .pos-catalog-card > .pos-catalog-name {
    font-size: clamp(0.9375rem, 1.05vw, 1.0625rem);
  }
}

/* Price — bright blue (salon pattern) */
.pos-catalog-card .pos-catalog-price,
.pos-catalog-card > .pos-catalog-price,
.pos-catalog-footer .pos-catalog-price {
  margin-top: 0;
  flex: 0 0 auto;
  width: 100%;
  padding: 0 0.35rem 0.45rem;
  background: #fff;
  border-top: none;
  border-radius: 0;
}

.pos-catalog-price .pos-catalog-price-val,
.pos-catalog-price b {
  display: block;
  margin: 0;
  color: var(--pos-catalog-price-blue);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-catalog-qty-badge {
  position: absolute !important;
  right: 5px !important;
  top: 5px !important;
  left: auto !important;
  z-index: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  min-height: 1.65rem;
  font-size: 1rem !important;
  font-weight: 700;
  line-height: 1.1;
  padding: 0.28rem 0.5rem !important;
}

@supports not (aspect-ratio: 1 / 1) {
  #getCartList .cart-product-item .img-thumbnail-div,
  .cart-product-item .img-thumbnail-div,
  .pos-catalog-card .img-thumbnail-div,
  .pos-catalog-card > img.img-thumbnail {
    height: 0;
    padding-top: 100%;
  }

  .pos-catalog-card > img.img-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding-top: 0;
  }
}

.pos-catalog-card--adding {
  pointer-events: none;
  opacity: 0.72;
}

/* Top-left check — badge-success (same family as qty badge top-right) */
.badge.pos-catalog-add-ok,
.pos-catalog-add-ok.badge {
  position: absolute !important;
  left: 6px !important;
  top: 6px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 12;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  padding: 0.15rem 0.3rem !important;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
  animation: none !important;
}

.pos-catalog-add-ok ion-icon {
  display: block;
  width: 0.95rem;
  height: 0.95rem;
  min-width: 0.95rem;
  min-height: 0.95rem;
  margin: 0;
  padding: 0;
  color: inherit;
  --ionicon-stroke-width: 56px;
}

/* Qty badge stays top-right, under variant / add-ok overlays */
.pos-catalog-card > .badge.rounded-pill,
.pos-catalog-card > .pos-catalog-qty-badge {
  z-index: 0;
  left: auto !important;
  right: 6px !important;
  top: 6px !important;
}

/* Panel flash disabled — success feedback on catalog card only (no shadow) */
#bill-cart-panel.pos-cart-add-flash,
#pos-mobile-cart-bar.pos-cart-add-flash,
.sell-catalog-col.pos-catalog-add-flash {
  box-shadow: none !important;
  outline: none !important;
}

.pos-catalog-card-busy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 0.5rem;
  z-index: 3;
}

.pb-li--pending {
  opacity: 0.92;
}

.pb-li--pending .cart-pending-thumb {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  border-radius: 0.35rem;
}

@media (min-width: 576px) {
  #getCartList.row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  #getCartList.row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0.55rem;
  }
}

@media (min-width: 1200px) {
  #getCartList.row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  #getCartList.row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.6rem;
    padding: 0.6rem;
  }
}

/* Pagination marker only — scroll loads more, no “load more” button / loading dots */
.catalog-more-wrap--pager-only {
  grid-column: 1 / -1;
  width: 100% !important;
  max-width: 100% !important;
  height: 0;
  min-height: 0;
  padding: 0 !important;
  margin: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.catalog-end-pad {
  height: 2rem;
}

/* —— Mode toggle —— */
.pos-cat-mode-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
}

.pos-cat-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

.pos-cat-mode-btn ion-icon {
  font-size: 1.15rem;
  pointer-events: none;
}

.pos-cat-mode-btn.is-active {
  background: #fff;
  color: var(--pp-admin-primary, #017bff);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* —— Catalog split (tree + products) —— */
.pos-catalog-split {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  min-width: 0;
}

.sell-catalog-col--tree .pos-catalog-split {
  flex-direction: row;
  background: #f4f6f9;
}

.sell-catalog-col--chips .pos-catalog-split {
  background: #fff;
}

.pos-catalog-main {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: opacity 0.2s ease;
}

.sell-catalog-col--tree .pos-catalog-main {
  background: #fff;
}

.sell-catalog-col--chips .pos-catalog-main {
  background: #fff;
}

.sell-catalog-col--tree .pos-search-header {
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid #e8ecf1;
  padding: 0.5rem 0.65rem 0.45rem;
}

.sell-catalog-col--tree.pos-catalog-content-fade .pos-catalog-main {
  opacity: 0.72;
}

.sell-catalog-col--view-table .pos-cat-tree-sidebar {
  display: none !important;
}

.sell-catalog-col--view-table .pos-catalog-split {
  flex-direction: column;
}

#posCatalogScroll,
.pos-catalog-scroll,
.pos-catalog-scroll--app-footer #getCartList {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--pp-scroll-thumb, rgba(15, 23, 42, 0.38)) transparent;
}

#posCatalogScroll::-webkit-scrollbar,
.pos-catalog-scroll::-webkit-scrollbar,
.pos-catalog-scroll--app-footer #getCartList::-webkit-scrollbar {
  width: var(--pp-scroll-size, 5px);
  height: var(--pp-scroll-size, 5px);
}

#posCatalogScroll::-webkit-scrollbar,
.pos-catalog-scroll::-webkit-scrollbar,
.pos-catalog-scroll--app-footer #getCartList::-webkit-scrollbar {
  background: transparent;
}

#posCatalogScroll::-webkit-scrollbar-track,
.pos-catalog-scroll::-webkit-scrollbar-track,
.pos-catalog-scroll--app-footer #getCartList::-webkit-scrollbar-track {
  background: transparent !important;
  box-shadow: none;
}

#posCatalogScroll::-webkit-scrollbar-thumb,
.pos-catalog-scroll::-webkit-scrollbar-thumb,
.pos-catalog-scroll--app-footer #getCartList::-webkit-scrollbar-thumb {
  background-color: var(--pp-scroll-thumb, rgba(15, 23, 42, 0.38));
  border-radius: 999px;
  border: none;
  background-clip: border-box;
  box-shadow: none;
}

.sell-catalog-col--tree #posCatalogScroll,
.sell-catalog-col--chips #posCatalogScroll {
  background: #fff;
  transition: opacity 0.22s ease;
}

.sell-catalog-col--chips.pos-catalog-content-fade #posCatalogScroll {
  opacity: 0.55;
}

.sell-catalog-col--view-table #typeProducts {
  display: none !important;
}

.sell-catalog-col--view-table .pos-cat-toggle-chips {
  display: none !important;
}

/* Tree sidebar — admin dashboard light (mk-flat style) */
.pos-cat-tree-sidebar {
  --pos-cat-tree-primary: var(--pp-admin-primary, #017bff);
  --pos-cat-tree-divider: #e8ecf1;
  --pos-cat-tree-text: #1e293b;
  flex: 0 0 auto;
  width: 168px;
  max-width: 42vw;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  color: var(--pos-cat-tree-text);
  border: none;
  border-right: 1px solid var(--pos-cat-tree-divider);
  box-shadow: 1px 0 0 rgba(15, 23, 42, 0.04);
}

.pos-cat-tree-sidebar__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  margin: 0;
  scroll-behavior: smooth;
}

.pos-cat-tree-item {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0.5rem 1rem;
  min-height: 44px;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--pos-cat-tree-divider);
  background: #fff;
  color: var(--pos-cat-tree-text);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  line-height: 1.35;
  cursor: pointer;
  position: relative;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.pos-cat-tree-item:last-child {
  border-bottom: none;
}

.pos-cat-tree-item:hover,
.pos-cat-tree-item:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.05);
  color: var(--pos-cat-tree-text);
}

.pos-cat-tree-item.is-active {
  background: var(--pos-cat-tree-primary);
  color: #fff;
  font-weight: 600;
  border-bottom-color: #0069d9;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

.pos-cat-tree-item.is-active:hover,
.pos-cat-tree-item.is-active:focus {
  background: #0069d9;
  color: #fff;
}

.pos-cat-tree-item__label {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

/* Mobile drawer */
.pos-cat-tree-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10045;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.pos-cat-tree-backdrop.is-visible {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 991.98px) {
  .sell-catalog-col--tree .pos-cat-tree-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 10050;
    width: min(78vw, 220px);
    max-width: 220px;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.12);
  }

  .sell-catalog-col--tree.pos-cat-tree-open .pos-cat-tree-sidebar {
    transform: translateX(0);
  }

  .sell-catalog-col--tree #posCatalogScroll {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 992px) {
  .pos-cat-tree-sidebar {
    width: 180px;
    transform: none !important;
    transition: width 0.2s ease;
  }

  .sell-catalog-col--tree.pos-cat-tree-open .pos-cat-tree-sidebar,
  .sell-catalog-col--tree .pos-cat-tree-sidebar {
    transform: none !important;
  }

  .pos-cat-tree-backdrop {
    display: none !important;
  }
}

.sell-catalog-col--chips .pos-search-header {
  background: #fff;
}

.sell-catalog-col--chips .pos-cat-panel-chips {
  flex-shrink: 0;
}

/* md category chips — same size on desktop and mobile */
#typeProducts .btn-typePro.btn-md,
.pos-cat-bar-fixed .btn-typePro.btn-md {
  min-height: var(--pos-cat-chip-h);
  padding: 0.45rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.25;
}

@media (max-width: 991.98px) {
  :root {
    --pos-cat-nav-size: 2rem;
  }

  #pro-type-scroll.pro-type,
  .pos-cat-scroll.pro-type {
    padding-right: 2.6rem;
    gap: 0.45rem;
  }
}
