/* Hoeksfontein Package Builder — touchscreen POS */

.hpb {
  /* Hard gold — Elementor --e-global-color-* often empty/invalid on front */
  --hpb-gold: #c29330;
  --hpb-gold-dark: #a67b24;
  --hpb-ink: #1a1a1a;
  --hpb-muted: #6b6b6b;
  --hpb-line: #e8e4da;
  --hpb-bg: #f7f5f0;
  --hpb-panel: #ffffff;
  --hpb-danger: #b42318;
  --hpb-tap: 46px;
  --hpb-qty: 30px;
  --hpb-radius: 16px;
  --hpb-font: var(--e-global-typography-primary-font-family, "Montserrat", system-ui, sans-serif);

  font-family: var(--hpb-font);
  color: var(--hpb-ink);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 1rem 0 2rem;
}

.hpb *,
.hpb *::before,
.hpb *::after {
  box-sizing: border-box;
}

.hpb img {
  max-width: 100%;
  height: auto;
}

.hpb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 1rem;
  align-items: start;
}

.hpb-steps {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hpb-step {
  background: var(--hpb-panel);
  border: 1px solid var(--hpb-line);
  border-radius: var(--hpb-radius);
  padding: 0.95rem 1rem 0.85rem;
}

.hpb-step__label {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.hpb-step__desc {
  margin: 0;
  color: var(--hpb-muted);
  line-height: 1.4;
  font-size: 0.92rem;
}

.hpb-step__body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.hpb-step__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--hpb-line);
}

.hpb-step__icon {
  width: 64px;
  height: 64px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--hpb-line);
  background: #fff;
  flex: 0 0 auto;
}

.hpb-step__icon[hidden] {
  display: none !important;
}

.hpb-step__foot:has(.hpb-step__icon[hidden]) {
  justify-content: flex-end;
}

/* Selected lines + ticket lines — always white */
.hpb-line {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--hpb-line);
  border-radius: 14px;
  background: #fff;
}

.hpb-line__img {
  width: 48px;
  height: 48px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  background: #fff;
  display: block;
}

.hpb-line__name {
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.25;
}

.hpb-line__price {
  color: var(--hpb-muted);
  font-size: 0.8rem;
  margin-top: 0.1rem;
}

.hpb-line__actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

/* Buttons — beat theme square/black resets */
.hpb .hpb-btn,
.hpb button.hpb-btn,
.hpb .hpb-pill,
.hpb button.hpb-pill {
  appearance: none;
  -webkit-appearance: none;
  border-style: solid;
  border-width: 2px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
  line-height: 1.2;
  text-transform: none;
  box-shadow: none;
}

.hpb .hpb-btn,
.hpb button.hpb-btn {
  border-color: var(--hpb-gold);
  background: var(--hpb-gold);
  color: #fff;
  min-height: var(--hpb-tap);
  padding: 0.5rem 1.05rem;
  border-radius: 999px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.hpb-ico {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  display: block;
  overflow: visible;
}

/* Labeled action buttons — slightly larger, sharper icons */
.hpb .hpb-open-sheet .hpb-ico,
.hpb .hpb-add-package .hpb-ico,
.hpb .hpb-clear .hpb-ico,
.hpb .hpb-sheet__back .hpb-ico,
.hpb .hpb-sheet__done .hpb-ico,
.hpb .hpb-btn--compact .hpb-ico {
  width: 16px;
  height: 16px;
}

.hpb .hpb-btn--icon .hpb-ico,
.hpb button.hpb-btn--icon .hpb-ico {
  width: 12px;
  height: 12px;
}

.hpb .hpb-btn:active,
.hpb .hpb-pill:active {
  transform: scale(0.98);
}

.hpb .hpb-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hpb .hpb-btn--ghost,
.hpb button.hpb-btn--ghost {
  background: #fff;
  color: var(--hpb-gold);
}

.hpb .hpb-clear,
.hpb button.hpb-clear {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--hpb-gold);
  box-shadow: none !important;
}

.hpb .hpb-clear:hover,
.hpb .hpb-clear:focus-visible,
.hpb button.hpb-clear:hover,
.hpb button.hpb-clear:focus-visible {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--hpb-ink);
}

.hpb .hpb-clear:hover .hpb-ico,
.hpb .hpb-clear:focus-visible .hpb-ico,
.hpb button.hpb-clear:hover .hpb-ico,
.hpb button.hpb-clear:focus-visible .hpb-ico {
  color: #000;
}

.hpb .hpb-clear .hpb-ico,
.hpb button.hpb-clear .hpb-ico {
  width: 18px;
  height: 18px;
}

.hpb .hpb-open-sheet,
.hpb button.hpb-open-sheet {
  min-height: 38px !important;
  height: auto !important;
  width: auto !important;
  padding: 0.35rem 0.85rem !important;
  font-size: 0.85rem !important;
  gap: 0.35rem;
  margin-left: auto;
}

.hpb .hpb-btn--primary,
.hpb button.hpb-btn--primary {
  width: 100%;
  background: var(--hpb-gold);
  color: #fff;
  border-color: var(--hpb-gold);
}

.hpb .hpb-btn--primary:hover,
.hpb .hpb-btn--primary:focus-visible {
  background: var(--hpb-gold-dark);
  border-color: var(--hpb-gold-dark);
}

.hpb .hpb-btn--added,
.hpb button.hpb-btn--added {
  background: #2f9e44 !important;
  border-color: #2f9e44 !important;
  color: #fff !important;
}

.hpb .hpb-btn--added:hover,
.hpb .hpb-btn--added:focus-visible {
  background: #278a3a !important;
  border-color: #278a3a !important;
}

/* Compact actions — Select / Back / Next — not full-width POS slabs */
.hpb .hpb-btn--compact,
.hpb button.hpb-btn--compact {
  width: auto !important;
  min-width: 0 !important;
  min-height: 32px !important;
  height: auto !important;
  padding: 0.28rem 0.7rem !important;
  font-size: 0.8rem !important;
  line-height: 1.15 !important;
  flex: 0 0 auto;
  align-self: center;
}

/* Compact qty — separate from primary taps */
.hpb .hpb-btn--icon,
.hpb button.hpb-btn--icon,
.hpb .hpb-qty .hpb-btn {
  min-width: var(--hpb-qty) !important;
  width: var(--hpb-qty) !important;
  height: var(--hpb-qty) !important;
  min-height: var(--hpb-qty) !important;
  padding: 0 !important;
  font-size: 1rem;
  line-height: 1;
  border-radius: 50% !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 1.5px;
}

.hpb .hpb-btn--danger,
.hpb button.hpb-btn--danger {
  border-color: transparent;
  background: transparent;
  color: var(--hpb-danger);
}

/* Remove line — not the qty circle style */
.hpb .hpb-btn--remove,
.hpb button.hpb-btn--remove {
  border-color: transparent;
  background: transparent;
  color: var(--hpb-danger);
  min-width: 36px !important;
  width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  flex: 0 0 auto;
}

.hpb .hpb-btn--remove .hpb-ico,
.hpb button.hpb-btn--remove .hpb-ico {
  width: 18px;
  height: 18px;
}

.hpb .hpb-btn--remove:hover,
.hpb .hpb-btn--remove:focus-visible,
.hpb button.hpb-btn--remove:hover,
.hpb button.hpb-btn--remove:focus-visible {
  background: rgba(180, 35, 24, 0.08);
}

.hpb-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.hpb-qty__val {
  min-width: 1.35rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Ticket */
.hpb-ticket {
  --hpb-sticky-top: 7.5rem; /* overridden by JS from sticky header height */
  position: sticky;
  top: var(--hpb-sticky-top);
  align-self: start;
  background: var(--hpb-panel);
  border: 1px solid var(--hpb-line);
  border-radius: var(--hpb-radius);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 8px 28px rgba(194, 147, 48, 0.08);
  max-height: calc(100vh - var(--hpb-sticky-top) - 1.25rem);
  overflow: hidden;
}

.hpb-ticket__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--hpb-line);
  flex: 0 0 auto;
}

.hpb-ticket__total-value {
  color: var(--hpb-gold-dark);
  font-size: 1.15rem;
}

.hpb-ticket__lines {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.hpb-ticket__empty {
  color: var(--hpb-muted);
  font-size: 0.9rem;
}

.hpb-ticket__actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 0 0 auto;
}

/* Sheet */
.hpb-sheet[hidden] {
  display: none !important;
}

.hpb-sheet {
  position: fixed;
  inset: 0;
  z-index: 100000;
}

.hpb-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 10, 0.5);
}

.hpb-sheet__panel {
  position: absolute;
  inset: 4vh 4vw;
  background: var(--hpb-panel);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.hpb-form-hint {
  flex: 0 0 auto;
  margin: auto 0 0;
  padding: 0.85rem 1rem 0.35rem;
  width: 100%;
  text-align: center;
  color: var(--hpb-muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.hpb-sheet__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--hpb-line);
  background: #fff;
  flex: 0 0 auto;
  order: -1;
  min-height: 48px;
}

.hpb-sheet__title {
  font-weight: 700;
  font-size: 0.9rem;
  text-align: left;
  line-height: 1.25;
  color: var(--hpb-ink);
  min-width: 0;
  flex: 1 1 auto;
}

.hpb-sheet__tray {
  flex: 0 0 auto;
  margin-left: auto;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--hpb-gold-dark);
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hpb-sheet__tray[hidden] {
  display: none !important;
}

.hpb-tray-total {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hpb-tray-total__price {
  font-variant-numeric: tabular-nums;
}

.hpb-tray-total.is-empty {
  opacity: 0.55;
}

.hpb-sheet__bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem 0.55rem;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-top: 1px solid var(--hpb-line);
  border-bottom: none;
  background: #fff;
  flex: 0 0 auto;
  order: 3;
}

.hpb-sheet__back,
.hpb-sheet__done {
  flex: 0 0 auto;
  width: auto !important;
  max-width: none;
}

.hpb .hpb-sheet__done,
.hpb button.hpb-sheet__done {
  margin-left: auto !important;
}

.hpb-tray-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--hpb-gold);
}

.hpb-tray-badge .hpb-ico {
  width: 22px;
  height: 22px;
}

.hpb-tray-badge__count {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #c62828;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

/* Sheet nav chips — small, arrow-led */
.hpb .hpb-sheet__back,
.hpb .hpb-sheet__done,
.hpb button.hpb-sheet__back,
.hpb button.hpb-sheet__done {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 0.55rem !important;
  font-size: 0.72rem !important;
  font-weight: 700;
  gap: 0.2rem;
  line-height: 1 !important;
}

.hpb .hpb-sheet__back .hpb-ico,
.hpb .hpb-sheet__done .hpb-ico,
.hpb button.hpb-sheet__back .hpb-ico,
.hpb button.hpb-sheet__done .hpb-ico {
  width: 13px;
  height: 13px;
}

.hpb .hpb-sheet__done[hidden],
.hpb .hpb-sheet__back[hidden] {
  display: none !important;
}

.hpb-sheet__tools {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  background: #fff;
  flex: 0 0 auto;
}

.hpb-sheet__tools--top {
  order: 0;
  border-bottom: 1px solid var(--hpb-line);
}

.hpb-sheet__tools--bottom {
  order: 2;
  border-top: 1px solid var(--hpb-line);
}

.hpb-sheet__list {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--hpb-bg);
  min-height: 0;
  order: 1;
}

.hpb-tools__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  justify-content: space-between;
}

.hpb .hpb-search {
  width: 100%;
  min-height: 40px;
  border: 1.5px solid var(--hpb-line);
  border-radius: 999px !important;
  padding: 0 0.95rem;
  font: inherit;
  font-size: 0.95rem;
  background: #fff;
}

.hpb .hpb-search:focus {
  outline: none;
  border-color: var(--hpb-gold);
}

.hpb-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.hpb .hpb-pill,
.hpb button.hpb-pill {
  border-color: var(--hpb-line);
  background: #fff;
  color: var(--hpb-ink);
  min-height: 34px;
  padding: 0.3rem 0.8rem;
  border-radius: 999px !important;
  font-size: 0.82rem;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.hpb .hpb-pill .hpb-ico {
  width: 12px;
  height: 12px;
}

.hpb .hpb-pill.is-active,
.hpb .hpb-pill[aria-pressed="true"],
.hpb button.hpb-pill.is-active,
.hpb button.hpb-pill[aria-pressed="true"] {
  border-color: var(--hpb-gold);
  background: var(--hpb-gold);
  color: #fff;
}

.hpb-view-toggle {
  display: inline-flex;
  gap: 0.25rem;
  margin-left: auto;
  flex: 0 0 auto;
}

.hpb-tools__row--sort,
.hpb-tools__row--filters {
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.hpb-tools__pills {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
}

.hpb-tools__pills::-webkit-scrollbar {
  display: none;
}

.hpb-tools__sep {
  flex: 0 0 auto;
  color: var(--hpb-line);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0 0.1rem;
  user-select: none;
}

.hpb-tools__row--filters [data-filter-pills],
.hpb-tools__row--filters [data-sort-pills],
.hpb-tools__row--sort [data-sort-pills] {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 0.35rem;
}

.hpb-tools__row--filters [data-filter-pills] .hpb-pill,
.hpb-tools__row--filters [data-sort-pills] .hpb-pill {
  flex: 0 0 auto;
}

.hpb .hpb-view-toggle .hpb-pill,
.hpb .hpb-pill--icon,
.hpb button.hpb-pill--icon {
  min-width: 34px !important;
  width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border-radius: 50% !important;
}

.hpb .hpb-view-toggle .hpb-pill .hpb-ico,
.hpb .hpb-pill--icon .hpb-ico {
  width: 14px;
  height: 14px;
}

.hpb-sheet__list.is-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.55rem;
  align-content: start;
}

/* Product cards — always white */
.hpb-card {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  background: #fff !important;
  border: 1px solid var(--hpb-line);
  border-radius: 16px;
  padding: 0.6rem;
}

.hpb-card.is-in-package {
  border-color: #2f9e44;
  box-shadow: inset 0 0 0 1px rgba(47, 158, 68, 0.25);
}

.hpb-card__marker {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  right: auto;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #2f9e44;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(47, 158, 68, 0.35);
}

.hpb-card__marker .hpb-ico {
  width: 14px;
  height: 14px;
}

.hpb-sheet__list.is-grid .hpb-card {
  grid-template-columns: 1fr;
  text-align: center;
}

.hpb-card__media {
  position: relative;
  display: block;
}

.hpb-card__img {
  width: 76px;
  height: 76px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  background: #fff;
  display: block;
  flex: 0 0 auto;
}

.hpb-sheet__list.is-grid .hpb-card__media {
  width: 100%;
}

.hpb-sheet__list.is-grid .hpb-card__img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.hpb .hpb-card__more--icon,
.hpb button.hpb-card__more--icon {
  position: absolute !important;
  top: 0.35rem !important;
  right: 0.35rem !important;
  z-index: 2;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 999px !important;
  border: none !important;
  background: transparent !important;
  color: rgba(26, 26, 26, 0.45) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  gap: 0 !important;
  opacity: 0.55;
}

.hpb .hpb-card__more--icon .hpb-ico {
  width: 14px !important;
  height: 14px !important;
  opacity: 0.7;
}

.hpb .hpb-card__more--icon:hover,
.hpb .hpb-card__more--icon:focus-visible {
  background: transparent !important;
  border: none !important;
  color: rgba(26, 26, 26, 0.85) !important;
  opacity: 1;
  box-shadow: none !important;
}

.hpb .hpb-card__more--icon:hover .hpb-ico,
.hpb .hpb-card__more--icon:focus-visible .hpb-ico {
  opacity: 1;
}

.hpb-card__main {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.hpb-card__top {
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
  align-items: flex-start;
}

.hpb-sheet__list.is-grid .hpb-card__top {
  flex-direction: column;
  align-items: center;
}

.hpb-card__name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
}

.hpb-card__price {
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.88rem;
  color: var(--hpb-gold-dark);
}

/* List view only — truncated product blurb */
.hpb-card__desc {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
  margin: 0;
}

.hpb-card__desc--empty {
  justify-content: flex-end;
}

.hpb-card__desc-text {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  color: #6b6b6b;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.hpb-sheet__list.is-grid .hpb-card__desc {
  display: none !important;
}

.hpb .hpb-card__more,
.hpb button.hpb-card__more {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0.1rem 0.25rem;
  border: none !important;
  background: transparent !important;
  color: #1a1a1a !important;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  border-radius: 6px !important;
  min-height: 0 !important;
  height: auto !important;
  width: auto !important;
  box-shadow: none !important;
}

.hpb .hpb-card__more .hpb-ico {
  width: 12px;
  height: 12px;
  color: #1a1a1a;
}

.hpb .hpb-pill--sort {
  gap: 0.2rem;
  align-items: center;
}

.hpb .hpb-pill--sort > span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.hpb .hpb-pill__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95em;
  font-weight: 800;
  line-height: 1;
  height: 1em;
  margin-top: -0.12em; /* unicode ↑↓ sit optically low */
  opacity: 0.95;
}

/* Nested product detail modal — above sheet panel */
.hpb-product-modal[hidden] {
  display: none !important;
}

.hpb-product-modal {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.hpb-product-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 10, 0.55);
}

.hpb-product-modal__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* keep TL/BL radius; scroll lives on body */
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  padding: 0;
}

.hpb-product-modal__close {
  position: absolute !important;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
}

.hpb-product-modal__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 1rem 1.15rem;
  /* gutter so scrollbar sits inside panel, left corners stay rounded */
  scrollbar-gutter: stable;
}

.hpb-product-modal__gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
}

.hpb-product-modal__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: #f3f3f3;
}

.hpb-product-modal__gallery .hpb-product-modal__img:not(.is-main) {
  aspect-ratio: 1;
}

.hpb-product-modal__gallery:has(.hpb-product-modal__img:nth-child(2)) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hpb-product-modal__gallery:has(.hpb-product-modal__img:nth-child(2)) .is-main {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
}

.hpb-product-modal__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--hpb-ink);
  line-height: 1.25;
  padding-right: 2rem;
}

.hpb-product-modal__price {
  font-weight: 700;
  color: var(--hpb-gold-dark);
  font-size: 0.95rem;
}

.hpb-product-modal__cats {
  font-size: 0.78rem;
  color: #6b6b6b;
  margin-top: 0.2rem;
}

.hpb-product-modal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.hpb-product-modal__tags span {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #f0f0f0;
  color: #333;
}

.hpb-product-modal__content {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #6b6b6b;
}

.hpb-product-modal__content p {
  margin: 0 0 0.65rem;
}

.hpb-product-modal__actions {
  margin-top: 0.15rem;
  width: 100%;
}

.hpb-product-modal__content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.hpb-card__attrs {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Wizard form steps (2–4) — fill sheet, center card; hint pinned bottom */
.hpb-sheet__list.is-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem;
  min-height: 0;
}

.hpb-sheet__list.is-form .hpb-card--form {
  flex: 1 1 auto;
  width: 100%;
  max-width: 920px;
  min-height: 0;
  align-content: start;
  align-self: stretch;
  margin-left: auto;
  margin-right: auto;
}

.hpb-card--form {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  grid-template-columns: 88px minmax(0, 1fr);
  padding: 1.15rem 1.25rem;
  gap: 1rem;
}

.hpb-card--form .hpb-card__main {
  flex: 1;
  justify-content: flex-start;
  gap: 1rem;
  min-height: 0;
}

.hpb-card--form .hpb-card__img {
  width: 88px;
  height: 88px;
}

.hpb-card--form .hpb-card__attrs {
  gap: 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hpb-card--form .hpb-attr .hpb-pills {
  gap: 0.55rem;
}

/* Sparse forms (e.g. Step 3 one attribute) — narrower card, same bottom hint */
.hpb-sheet__list.is-form-sparse {
  align-items: center;
  justify-content: flex-start;
}

.hpb-sheet__list.is-form-sparse .hpb-card--form {
  max-width: 560px;
  padding: 2rem 1.75rem;
  align-self: center;
  width: 100%;
}

.hpb-sheet__list.is-form-sparse .hpb-card__attrs {
  justify-content: center;
}

@media (min-width: 768px) {
  .hpb-sheet__panel:has(.is-form),
  .hpb-sheet__panel:has(.is-enquire) {
    inset: 3vh 6vw;
  }

  .hpb-card--form {
    padding: 1.6rem 2rem;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 1.35rem;
  }

  .hpb-card--form .hpb-card__img {
    width: 120px;
    height: 120px;
  }

  .hpb-card--form .hpb-pill {
    min-height: 46px;
    padding: 0.55rem 1.15rem;
    font-size: 0.92rem;
  }

  .hpb-sheet__list.is-form .hpb-card--form {
    min-height: 0;
  }
}

/* Enquire form */
.hpb-sheet__list.is-enquire {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  overflow: auto;
}

.hpb-enquire-wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hpb-breakdown {
  background: #fff;
  border: 1px solid var(--hpb-line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.hpb-breakdown__head {
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--hpb-muted);
}

.hpb-breakdown__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.hpb-breakdown__left {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.hpb-breakdown__left strong {
  font-size: 0.82rem;
  color: var(--hpb-ink);
}

.hpb-breakdown__left span {
  font-size: 0.78rem;
  color: var(--hpb-muted);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.hpb-breakdown__price {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--hpb-gold-dark);
  white-space: nowrap;
  font-size: 0.85rem;
}

.hpb-breakdown__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--hpb-line);
  font-size: 0.95rem;
  font-weight: 700;
}

.hpb-enquire {
  width: 100%;
  background: #fff;
  border: 1px solid var(--hpb-line);
  border-radius: 18px;
  padding: 1.15rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hpb-enquire__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 700px) {
  .hpb-enquire__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hpb-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--hpb-ink);
}

.hpb-field em {
  color: var(--hpb-danger);
  font-style: normal;
}

.hpb-field--full {
  grid-column: 1 / -1;
}

.hpb .hpb-field input:not([type="hidden"]),
.hpb .hpb-field textarea,
.hpb .hpb-country__trigger,
.hpb button.hpb-country__trigger,
.hpb .hpb-country__search,
.hpb .hpb-date__trigger,
.hpb button.hpb-date__trigger {
  width: 100% !important;
  min-height: 42px !important;
  height: 42px !important;
  border: 1.5px solid var(--hpb-line) !important;
  border-radius: 12px !important;
  padding: 0.55rem 0.8rem !important;
  font: inherit !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  background: #fff !important;
  color: var(--hpb-ink) !important;
  box-shadow: none !important;
  outline: none !important;
}

.hpb .hpb-field textarea {
  height: auto !important;
  min-height: 96px !important;
  resize: vertical;
}

.hpb-date {
  position: relative;
}

.hpb .hpb-date__trigger,
.hpb button.hpb-date__trigger {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100% !important;
  min-height: 42px !important;
  height: 42px !important;
  border: 1.5px solid var(--hpb-line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--hpb-ink) !important;
  padding: 0.55rem 0.8rem !important;
  font: inherit !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  text-align: left;
  cursor: pointer;
  box-shadow: none !important;
}

.hpb-field.is-invalid .hpb-date__trigger {
  border-color: var(--hpb-danger) !important;
}

.hpb-date__display {
  flex: 1;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hpb-date__display.is-placeholder {
  color: #9a9a9a;
}

.hpb-date__ico {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--hpb-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hpb-date__ico svg {
  width: 18px;
  height: 18px;
  display: block;
}

.hpb-dp[hidden] {
  display: none !important;
}

.hpb-dp {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  background: #fff;
  border: 1.5px solid var(--hpb-line);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14);
  padding: 0.65rem 0.7rem 0.55rem;
}

.hpb-dp__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.hpb-dp__month {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--hpb-ink);
}

.hpb .hpb-dp__nav,
.hpb button.hpb-dp__nav {
  width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  border-radius: 8px !important;
  border: 1px solid var(--hpb-line) !important;
  background: #fff !important;
  color: var(--hpb-ink) !important;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 !important;
  cursor: pointer;
}

.hpb-dp__dows,
.hpb-dp__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.15rem;
}

.hpb-dp__dow {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #8a8a8a;
  padding: 0.25rem 0;
}

.hpb .hpb-dp__day,
.hpb button.hpb-dp__day {
  appearance: none;
  border: none !important;
  background: transparent !important;
  color: var(--hpb-ink) !important;
  min-height: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0 !important;
  box-shadow: none !important;
}

.hpb-dp__day.is-empty {
  pointer-events: none;
}

.hpb .hpb-dp__day.is-today {
  box-shadow: inset 0 0 0 1.5px var(--hpb-gold) !important;
}

.hpb .hpb-dp__day.is-selected,
.hpb button.hpb-dp__day.is-selected {
  background: var(--hpb-gold) !important;
  color: #fff !important;
}

.hpb .hpb-dp__day:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.hpb-dp__foot {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--hpb-line);
}

.hpb .hpb-dp__link,
.hpb button.hpb-dp__link {
  border: none !important;
  background: transparent !important;
  color: var(--hpb-gold-dark) !important;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0.1rem !important;
  min-height: 0 !important;
  height: auto !important;
  box-shadow: none !important;
}

.hpb .hpb-city__input,
.hpb input.hpb-city__input {
  width: 100% !important;
  min-height: 42px !important;
  height: 42px !important;
  border: 1.5px solid var(--hpb-line) !important;
  border-radius: 12px !important;
  padding: 0.55rem 0.8rem !important;
  background: #fff !important;
  color: var(--hpb-ink) !important;
  font: inherit !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}

.hpb-field.is-invalid .hpb-city__input {
  border-color: var(--hpb-danger) !important;
}

.hpb-field__error {
  display: block;
  min-height: 0;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--hpb-danger);
  line-height: 1.25;
}

.hpb-field__error:empty {
  display: none;
}

.hpb-field.is-invalid input,
.hpb-field.is-invalid textarea,
.hpb-field.is-invalid .hpb-country__trigger,
.hpb-field.is-invalid .hpb-date__trigger {
  border-color: var(--hpb-danger) !important;
}

.hpb-check {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--hpb-ink);
  cursor: pointer;
  user-select: none;
}

.hpb-check .hpb-field__error {
  flex: 1 1 100%;
  margin-left: 2rem;
}

.hpb-check.is-invalid {
  color: var(--hpb-danger);
}

.hpb-check.is-invalid .hpb-check__box {
  border-color: var(--hpb-danger);
}

.hpb-check input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.hpb-check__box {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 0.05rem;
  border: 1.5px solid #c8c2b4;
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.hpb-check__box::after {
  content: '';
  width: 11px;
  height: 7px;
  margin-top: -1px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0.6);
  opacity: 0;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.hpb-check input[type='checkbox']:checked + .hpb-check__box {
  background: var(--hpb-gold);
  border-color: var(--hpb-gold-dark);
  box-shadow: none;
}

.hpb-check input[type='checkbox']:checked + .hpb-check__box::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

.hpb-check input[type='checkbox']:focus-visible + .hpb-check__box {
  outline: 2px solid rgba(194, 147, 48, 0.45);
  outline-offset: 2px;
}

.hpb-check:hover .hpb-check__box {
  border-color: var(--hpb-gold);
}

.hpb-check a {
  color: var(--hpb-gold-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hpb .hpb-sheet__done.is-disabled,
.hpb button.hpb-sheet__done.is-disabled {
  opacity: 0.4;
  filter: grayscale(0.35);
  cursor: not-allowed;
  pointer-events: auto;
}

.hpb .hpb-field input:focus,
.hpb .hpb-field textarea:focus,
.hpb .hpb-country__trigger:focus,
.hpb button.hpb-country__trigger:focus,
.hpb .hpb-country__search:focus,
.hpb .hpb-date__trigger:focus,
.hpb button.hpb-date__trigger:focus {
  outline: none !important;
  border-color: var(--hpb-gold) !important;
  box-shadow: none !important;
}

.hpb-field--country,
.hpb-enquire__grid > .hpb-field {
  align-self: stretch;
}

.hpb-field--country .hpb-country,
.hpb-field--country .hpb-country__trigger {
  height: 42px;
}

.hpb-country {
  position: relative;
}

.hpb .hpb-country__trigger,
.hpb button.hpb-country__trigger {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  cursor: pointer;
  width: 100% !important;
  background: #fff !important;
  color: var(--hpb-ink) !important;
  border: 1.5px solid var(--hpb-line) !important;
  border-radius: 12px !important;
  min-height: 42px;
  padding: 0.55rem 0.8rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: none !important;
}

.hpb-country__flag {
  font-size: 1.15rem;
  line-height: 1;
}

.hpb-country__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  background: #fff;
  border: 1.5px solid var(--hpb-line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.hpb-country__panel[hidden] {
  display: none !important;
}

.hpb-country__search {
  border: none !important;
  border-bottom: 1px solid var(--hpb-line) !important;
  border-radius: 0 !important;
  background: #fff !important;
}

.hpb .hpb-country__list {
  display: flex;
  flex-direction: column;
  max-height: 240px;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
}

.hpb button.hpb-country__option,
.hpb .hpb-country__option {
  appearance: none;
  -webkit-appearance: none;
  display: flex !important;
  flex: 0 0 auto;
  width: 100% !important;
  max-width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  padding: 0.6rem 0.85rem !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: var(--hpb-ink) !important;
  text-align: left;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  box-shadow: none !important;
  white-space: nowrap;
}

.hpb button.hpb-country__option:hover,
.hpb .hpb-country__option:hover {
  background: #f5f5f5 !important;
  color: var(--hpb-ink) !important;
}

.hpb button.hpb-country__option.is-active,
.hpb .hpb-country__option.is-active {
  background: rgba(194, 147, 48, 0.12) !important;
  color: var(--hpb-ink) !important;
}

.hpb-attr__label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--hpb-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hpb-card__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.hpb-sheet__list.is-grid .hpb-card__row {
  justify-content: center;
  flex-wrap: wrap;
  flex-direction: row;
}

.hpb-card__row .hpb-btn--primary,
.hpb-card__row .hpb-btn--compact {
  width: auto !important;
  min-width: 0 !important;
  min-height: 32px !important;
  padding: 0.28rem 0.7rem !important;
  font-size: 0.8rem !important;
  flex: 0 0 auto;
}

.hpb-empty {
  text-align: center;
  color: var(--hpb-muted);
  padding: 2rem 1rem;
  grid-column: 1 / -1;
}

.hpb-toast {
  position: fixed;
  left: 50%;
  bottom: calc(min(46vh, 360px) + 1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  background: var(--hpb-ink);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 100001;
  pointer-events: none;
  max-width: calc(100vw - 2rem);
  text-align: center;
}

@media (min-width: 961px) {
  .hpb-toast {
    bottom: 1.25rem;
  }
}

body.hpb-sheet-open {
  overflow: hidden;
}

@media (max-width: 960px) {
  .hpb {
    --hpb-tap: 42px;
    --hpb-qty: 28px;
    margin: 0.75rem 0 1.5rem;
  }

  .hpb-layout {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .hpb-layout {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    /* room for fixed action bar + theme bottom nav */
    padding-bottom: calc(5.5rem + var(--hpb-mobile-footer, 72px) + env(safe-area-inset-bottom, 0px));
  }

  /* Mobile: ticket scrolls with page — only action buttons stick */
  .hpb-ticket {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    width: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    overflow: visible;
    border-radius: var(--hpb-radius);
    border: 1px solid var(--hpb-line);
    box-shadow: 0 8px 28px rgba(194, 147, 48, 0.08);
    padding: 0.75rem;
  }

  .hpb-ticket__total {
    flex: 0 0 auto;
  }

  .hpb-ticket__lines {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .hpb-ticket__actions {
    position: fixed;
    left: 0;
    right: 0;
    /* clear Elementor sticky bottom nav (~68px) — JS refines --hpb-mobile-footer */
    bottom: calc(var(--hpb-mobile-footer, 72px) + env(safe-area-inset-bottom, 0px));
    z-index: 110;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    margin: 0;
    padding: 0.65rem 0.85rem;
    border-top: 1px solid var(--hpb-line);
    border-radius: 14px 14px 0 0;
    background: #fff;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
  }

  .hpb .hpb-ticket__actions .hpb-clear,
  .hpb button.hpb-ticket__actions .hpb-clear,
  .hpb-ticket__actions .hpb-clear {
    order: 1;
    width: auto !important;
    flex: 0 0 auto;
    min-height: 36px !important;
    padding: 0.35rem 0.7rem !important;
    font-size: 0.78rem !important;
  }

  .hpb .hpb-ticket__actions .hpb-add-package,
  .hpb button.hpb-ticket__actions .hpb-add-package,
  .hpb-ticket__actions .hpb-add-package {
    order: 2;
    width: auto !important;
    flex: 0 0 auto;
    margin-left: auto !important;
    min-height: 36px !important;
    padding: 0.35rem 0.85rem !important;
    font-size: 0.82rem !important;
  }

  .hpb-sheet__panel {
    inset: 0;
    border-radius: 0;
  }

  .hpb-sheet__bar {
    display: flex;
    flex-wrap: nowrap;
    padding: 0.45rem 0.6rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
    gap: 0.35rem 0.45rem;
    justify-content: flex-start;
    width: 100%;
  }

  .hpb-sheet__back {
    order: 1;
  }

  .hpb .hpb-sheet__done,
  .hpb button.hpb-sheet__done {
    order: 2;
    margin-left: auto !important;
    width: auto !important;
    min-width: 72px;
  }

  .hpb-sheet__top {
    padding: 0.5rem 0.65rem;
    gap: 0.45rem;
  }

  .hpb-sheet__title {
    text-align: left;
    font-size: 0.78rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hpb-tray-total__price {
    font-size: 0.78rem;
  }

  .hpb-tray-badge {
    width: 30px;
    height: 30px;
  }

  .hpb-sheet__list.is-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hpb-sheet__list.is-form,
  .hpb-sheet__list.is-enquire {
    padding: 0.65rem;
  }

  .hpb-card--form {
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 0.85rem;
    gap: 0.75rem;
  }

  .hpb-card--form .hpb-card__img {
    width: 64px;
    height: 64px;
  }

  .hpb-sheet__list.is-form-sparse .hpb-card--form {
    max-width: 100%;
    padding: 1.1rem;
  }

  .hpb-enquire,
  .hpb-breakdown {
    padding: 0.9rem;
    border-radius: 14px;
  }

  .hpb-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .hpb-card__desc-text {
    font-size: 10px;
  }

  .hpb-card__img {
    width: 64px;
    height: 64px;
  }

  .hpb-line {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  .hpb-line__img {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 640px) {
  .hpb-card__desc-text {
    font-size: 8px;
  }

  .hpb-sheet__tools {
    min-width: 0;
    max-width: 100%;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  .hpb-tools__row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hpb-tools__row--filters,
  .hpb-tools__row--sort {
    flex-wrap: nowrap;
    gap: 0.25rem;
    overflow: visible;
  }

  /* Fit All | Trophy | Non Trophy | Name | Price + view in one frame */
  .hpb-tools__pills {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    gap: 0.2rem;
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
    touch-action: manipulation;
  }

  .hpb-tools__row--filters [data-filter-pills],
  .hpb-tools__row--filters [data-sort-pills] {
    gap: 0.2rem;
  }

  .hpb .hpb-tools__pills .hpb-pill,
  .hpb button.hpb-tools__pills .hpb-pill,
  .hpb-tools__pills .hpb-pill {
    flex: 0 0 auto;
    min-height: 26px !important;
    height: auto !important;
    padding: 0.15rem 0.42rem !important;
    font-size: 0.62rem !important;
    font-weight: 650;
    gap: 0.12rem;
    border-width: 1.5px;
  }

  .hpb-tools__pills .hpb-pill__arrow {
    font-size: 0.9em;
    margin-top: -0.1em;
  }

  .hpb-tools__sep {
    font-size: 0.7rem;
    padding: 0;
    opacity: 0.85;
  }

  .hpb-view-toggle {
    flex: 0 0 auto;
    width: auto;
    margin-left: 0;
    gap: 0.15rem;
    justify-content: flex-end;
    background: transparent;
    box-shadow: none;
  }

  .hpb .hpb-view-toggle .hpb-pill,
  .hpb .hpb-view-toggle button.hpb-pill {
    min-width: 28px !important;
    width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
  }

  .hpb .hpb-view-toggle .hpb-pill .hpb-ico {
    width: 12px;
    height: 12px;
  }

  .hpb-line {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .hpb-line__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (min-width: 1100px) {
  .hpb-sheet__list.is-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }
}
