/* =========================================================
   CUEVA Quick Sale — dashboard visual system
   Presentation only. Existing Quick Sale logic is unchanged.
========================================================= */

.global-sale-sheet{
  --qs-ink:#17191d;
  --qs-muted:#777a80;
  --qs-line:rgba(23,25,29,.075);
  --qs-surface:#ffffff;
  --qs-canvas:#f5f5f3;
  --qs-gold:#b88722;
  --qs-gold-soft:#faf4e6;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",Roboto,Arial,sans-serif;
  top:var(--qs-visible-top,0px);
  bottom:auto;
  height:var(--qs-visible-height,100dvh);
}

.global-sale-backdrop{
  background:rgba(18,19,22,.42);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
}

.global-sale-card{
  position:relative;
  width:min(680px,100%);
  max-height:var(--qs-card-max-height,min(94dvh,900px));
  border:1px solid rgba(255,255,255,.68);
  border-bottom:0;
  border-radius:30px 30px 0 0;
  background:var(--qs-canvas);
  box-shadow:0 -20px 70px rgba(17,19,23,.20);
  overscroll-behavior:contain;
}

.global-sale-head-actions{display:flex;gap:7px;align-items:center}
.global-sale-history-btn{display:flex;gap:5px;align-items:center;height:42px;padding:0 12px;border:1px solid var(--qs-line);border-radius:15px;background:#f7f7f6;color:var(--qs-ink);font-size:10px;font-weight:800}
.global-sale-history-btn i{color:var(--qs-gold)}

/* Keep the complete checkout usable above the iOS keyboard. */
@media(max-width:720px){
  .global-sale-sheet.keyboard-open .global-sale-card{
    height:100%;
    max-height:100%;
    border-radius:24px 24px 0 0;
  }

  .global-sale-sheet.checkout-keyboard-open .global-sale-head,
  .global-sale-sheet.checkout-keyboard-open .global-sale-search-wrap,
  .global-sale-sheet.checkout-keyboard-open .global-sale-type-tabs,
  .global-sale-sheet.checkout-keyboard-open .global-sale-items{
    display:none!important;
  }

  .global-sale-sheet.checkout-keyboard-open .global-sale-cart:not([hidden]){
    flex:1 1 auto;
    width:100%;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    border-radius:24px 24px 0 0;
    overflow-y:auto;
  }
}

.global-sale-handle{
  display:none;
}

.global-sale-head{
  align-items:center;
  padding:16px 20px 15px;
  border-bottom:1px solid var(--qs-line);
  background:var(--qs-surface);
}

.global-sale-head span{
  color:var(--qs-gold);
  font-size:9px;
  font-weight:850;
  letter-spacing:.16em;
}

.global-sale-head h2{
  margin:3px 0 0;
  color:var(--qs-ink);
  font-size:26px;
  font-weight:780;
  line-height:1.06;
  letter-spacing:-.045em;
}

.global-sale-head p{
  margin-top:5px;
  color:#8b8d92;
  font-size:11px;
}

.global-sale-close{
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border:1px solid var(--qs-line);
  border-radius:15px;
  background:#f7f7f6;
  color:var(--qs-ink);
  font-size:15px;
  box-shadow:0 2px 7px rgba(17,19,23,.035);
}

.global-sale-history{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;padding:13px 16px 16px;overflow:hidden}
.global-sale-history-head{display:flex;gap:10px;align-items:center;margin-bottom:10px}
.global-sale-history-head>button{display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--qs-line);border-radius:12px;background:#fff;color:var(--qs-ink)}
.global-sale-history-head div{display:flex;flex-direction:column;gap:2px}
.global-sale-history-head strong{font-size:15px}.global-sale-history-head small{color:#85888e;font-size:9px}
.global-sale-history-list{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;gap:9px;overflow-y:auto;-webkit-overflow-scrolling:touch}
.global-sale-history-sale{border:1px solid var(--qs-line);border-radius:17px;background:#fff;overflow:hidden}
.global-sale-history-sale>header{display:flex;justify-content:space-between;align-items:center;padding:11px 12px;background:#f7f7f5}
.global-sale-history-sale>header div{display:flex;flex-direction:column;gap:2px}.global-sale-history-sale>header strong{font-size:11px}.global-sale-history-sale>header small{color:#85888e;font-size:8px}
.global-sale-history-item{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center;padding:10px 12px;border-top:1px solid var(--qs-line)}
.global-sale-history-item>div{display:flex;min-width:0;flex-direction:column;gap:2px}.global-sale-history-item>div strong{overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.global-sale-history-item small{color:#85888e;font-size:8px}.global-sale-history-item>span{font-size:10px;font-weight:800}
.global-sale-history-item button{height:29px;padding:0 10px;border:1px solid rgba(184,135,34,.25);border-radius:9px;background:var(--qs-gold-soft);color:#9b731c;font-size:9px;font-weight:850}
.global-sale-history-item>b{color:#989ba0;font-size:8px}.global-sale-history-item.returned{opacity:.6}
.global-sale-history-empty{display:grid;place-items:center;min-height:160px;color:#85888e;font-size:10px}
.global-sale-card.history-open>.global-sale-search-wrap,.global-sale-card.history-open>.global-sale-type-tabs,.global-sale-card.history-open>.global-sale-items,.global-sale-card.history-open>.global-sale-cart{display:none!important}

.global-sale-return-modal{position:absolute;z-index:20;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:12px;background:rgba(20,21,24,.38);-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px)}
.global-sale-return-modal[hidden]{display:none!important}
.global-sale-return-card{width:100%;max-height:92%;padding:16px;border-radius:23px;background:#fff;overflow-y:auto;box-shadow:0 -16px 45px rgba(17,19,23,.2)}
.global-sale-return-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px}.global-sale-return-head>div{display:flex;flex-direction:column;gap:3px}.global-sale-return-head small{color:var(--qs-gold);font-size:8px;font-weight:850;letter-spacing:.14em}.global-sale-return-head strong{font-size:17px}.global-sale-return-head button{display:grid;place-items:center;width:36px;height:36px;border:1px solid var(--qs-line);border-radius:12px;background:#f7f7f6}
.global-sale-return-card>label{display:flex;flex-direction:column;gap:6px;margin-top:10px;color:#6f7278;font-size:9px;font-weight:800;text-transform:uppercase}
.global-sale-return-card select,.global-sale-return-card textarea{width:100%;min-height:42px;padding:10px;border:1px solid rgba(23,25,29,.1);border-radius:12px;background:#fff;color:var(--qs-ink);font-family:inherit;font-size:11px;font-weight:600;text-transform:none;outline:0}
.global-sale-return-qty{display:grid;grid-template-columns:42px 1fr 42px;gap:7px}.global-sale-return-qty button,.global-sale-return-qty input{height:42px;border:1px solid rgba(23,25,29,.1);border-radius:12px;background:#fff;color:var(--qs-ink);text-align:center;font-size:15px;font-weight:800}.global-sale-return-card label>small{color:#92959a;font-size:8px;text-transform:none}
.global-sale-return-stock{display:grid!important;grid-template-columns:20px 1fr;align-items:center;padding:11px;border:1px solid rgba(184,135,34,.18);border-radius:13px;background:#fffaf0;text-transform:none!important}.global-sale-return-stock input{width:17px;height:17px;accent-color:var(--qs-gold)}.global-sale-return-stock span{display:flex;flex-direction:column;gap:2px}.global-sale-return-stock strong{color:var(--qs-ink);font-size:10px}.global-sale-return-stock small{color:#85888e;font-size:8px;font-weight:600}
.global-sale-return-summary{display:flex;justify-content:space-between;align-items:center;margin-top:11px;padding:11px;border-radius:13px;background:#f5f5f3;color:#777a80;font-size:10px}.global-sale-return-summary strong{color:var(--qs-ink);font-size:14px}
.global-sale-return-confirm{width:100%;height:48px;margin-top:11px;border:0;border-radius:14px;background:#17191d;color:#fff;font-size:12px;font-weight:850}.global-sale-return-confirm:disabled{opacity:.55}

@media(max-width:390px){.global-sale-history-btn span{display:none}.global-sale-history-btn{width:42px;justify-content:center;padding:0}}

.global-sale-close:active,
.global-sale-type-tabs button:active,
.global-sale-payment-tabs button:active,
.global-sale-checkout:active{
  transform:scale(.98);
}

.global-sale-search-wrap{
  flex:0 0 auto;
  height:46px;
  margin:13px 16px 9px;
  padding:0 15px;
  border:1px solid rgba(23,25,29,.09);
  border-radius:16px;
  background:#fff;
  box-shadow:0 3px 14px rgba(17,19,23,.035);
}

.global-sale-search-wrap:focus-within{
  border-color:rgba(184,135,34,.48);
  box-shadow:0 0 0 3px rgba(184,135,34,.08);
}

.global-sale-search-wrap i{
  color:#8b8d92;
  font-size:14px;
}

.global-sale-search-wrap input{
  color:var(--qs-ink);
  font-size:14px;
  font-weight:500;
}

.global-sale-search-wrap input::placeholder{
  color:#a4a5a9;
}

.global-sale-type-tabs{
  flex:0 0 auto;
  gap:4px;
  margin:0 16px 10px;
  padding:4px;
  overflow:visible;
  border:1px solid rgba(23,25,29,.055);
  border-radius:15px;
  background:#ececea;
}

.global-sale-type-tabs button{
  flex:1 1 0;
  min-width:0;
  padding:8px 10px;
  border:0;
  border-radius:11px;
  background:transparent;
  color:#6f7278;
  font-size:12px;
  font-weight:750;
  transition:background .16s ease,color .16s ease,transform .12s ease;
}

.global-sale-type-tabs button.active{
  border-color:var(--qs-ink);
  background:var(--qs-ink);
  color:#fff;
  box-shadow:0 4px 12px rgba(17,19,23,.14);
}

.global-sale-items{
  display:grid;
  align-content:start;
  grid-auto-rows:max-content;
  flex:1 1 auto;
  gap:8px;
  min-height:125px;
  padding:0 16px 14px;
  overscroll-behavior:contain;
}

.global-sale-item{
  grid-template-columns:50px minmax(0,1fr) auto;
  gap:11px;
  min-height:70px;
  padding:9px 11px 9px 9px;
  border:1px solid var(--qs-line);
  border-radius:18px;
  background:#fff;
  color:var(--qs-ink);
  box-shadow:0 3px 14px rgba(17,19,23,.028);
}

.global-sale-item:last-child{
  border-bottom:1px solid var(--qs-line);
}

.global-sale-item:not(.unavailable):active{
  border-color:rgba(184,135,34,.24);
  background:#fffdf8;
  transform:scale(.995);
}

.global-sale-item.unavailable{
  opacity:.43;
  background:#f8f8f7;
  box-shadow:none;
}

.global-sale-item-image{
  width:50px;
  height:50px;
  border-color:rgba(23,25,29,.06);
  border-radius:15px;
  background:var(--qs-gold-soft);
  font-size:21px;
}

.global-sale-item-copy small{
  color:#96989d;
  font-size:8px;
  font-weight:800;
  letter-spacing:.11em;
}

.global-sale-item-copy strong{
  margin-top:2px;
  color:var(--qs-ink);
  font-size:14px;
  font-weight:770;
  line-height:1.15;
  letter-spacing:-.015em;
}

.global-sale-item-copy em{
  margin-top:3px;
  color:#85888e;
  font-size:10px;
}

.global-sale-item-price{
  gap:9px;
  padding:0;
  border:0;
  background:transparent;
}

.global-sale-item-price:disabled{
  cursor:not-allowed;
}

.global-sale-item-price strong{
  color:var(--qs-ink);
  font-size:13px;
  font-weight:800;
}

.global-sale-item-price i,
.global-sale-item-price b{
  width:34px;
  height:34px;
  border:1px solid rgba(184,135,34,.18);
  border-radius:12px;
  background:var(--qs-gold-soft);
  color:var(--qs-gold);
  box-shadow:none;
  font-size:12px;
  font-weight:850;
}

.global-sale-item-price b{
  border-color:var(--qs-ink);
  background:var(--qs-ink);
  color:#e0b654;
}

.global-sale-empty{
  align-self:center;
  margin:auto;
  color:#8a8d93;
  font-size:12px;
}

.global-sale-cart{
  flex:0 1 auto;
  max-height:min(58dvh,560px);
  padding:13px 16px calc(16px + env(safe-area-inset-bottom));
  border-top:1px solid rgba(23,25,29,.08);
  border-radius:25px 25px 0 0;
  background:#fff;
  box-shadow:0 -10px 35px rgba(17,19,23,.075);
  overscroll-behavior:contain;
}

.global-sale-section-title{
  margin:0 0 7px;
}

.global-sale-section-title strong{
  color:var(--qs-ink);
  font-size:16px;
  font-weight:800;
  letter-spacing:-.025em;
}

.global-sale-section-title>div{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:2px;
}

.global-sale-section-title>div small{
  color:#94969b;
  font-size:9px;
  font-weight:650;
  line-height:1.2;
}

.global-sale-section-title button{
  padding:6px 2px;
  color:#9e4b34;
  font-size:11px;
  font-weight:800;
}

.global-sale-cart-row{
  grid-template-columns:40px minmax(0,1fr) auto auto 22px;
  gap:8px;
  padding:9px 0;
  border-bottom:1px solid var(--qs-line);
}

.global-sale-cart-image{
  width:40px;
  height:40px;
  border-color:rgba(23,25,29,.06);
  border-radius:12px;
  background:var(--qs-gold-soft);
}

.global-sale-cart-row>div:nth-child(2) strong{
  color:var(--qs-ink);
  font-size:12px;
  font-weight:760;
}

.global-sale-cart-row small{
  margin-top:2px;
  color:#92949a;
  font-size:9px;
}

.global-sale-qty{
  gap:6px;
}

.global-sale-qty button{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  padding:0;
  border:1px solid rgba(23,25,29,.08);
  border-radius:10px;
  background:#f7f7f6;
  color:var(--qs-ink);
  font-size:16px;
  line-height:1;
}

.global-sale-qty strong{
  min-width:15px;
  color:var(--qs-ink);
  text-align:center;
  font-size:12px;
}

.global-sale-cart-row>strong{
  color:var(--qs-ink);
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.global-sale-remove{
  color:#a0a2a7;
}

.global-sale-total-row{
  margin:2px 0 10px;
  padding:11px 13px;
  border-radius:15px;
  background:#f5f5f3;
  color:#686b72;
  font-size:12px;
  font-weight:700;
}

.global-sale-total-row strong{
  color:var(--qs-ink);
  font-size:19px;
  font-weight:850;
  letter-spacing:-.025em;
}

.global-sale-customer-block{
  margin:0 0 11px;
  border:1px solid rgba(184,135,34,.13);
  border-radius:16px;
  background:#fffcf5;
}

.global-sale-customer-block summary{
  padding:12px 13px;
  color:var(--qs-ink);
  font-size:12px;
  font-weight:780;
}

.global-sale-customer-block summary small{
  color:#96989d;
  font-size:10px;
}

.global-sale-customer-grid{
  gap:8px;
  padding:0 11px 11px;
}

.global-sale-customer-grid span,
.global-sale-credit-picker span,
.global-sale-payment>span{
  color:#85888e;
  font-size:8px;
  font-weight:850;
  letter-spacing:.12em;
}

.global-sale-customer-grid input,
.global-sale-credit-picker select{
  height:42px;
  border:1px solid rgba(23,25,29,.09);
  border-radius:12px;
  background:#fff;
  color:var(--qs-ink);
  font-size:12px;
}

.global-sale-customer-grid input:focus,
.global-sale-credit-picker select:focus{
  border-color:rgba(184,135,34,.48);
  box-shadow:0 0 0 3px rgba(184,135,34,.08);
}

.global-sale-customer-suggestions{
  border-color:var(--qs-line);
  border-radius:12px;
  box-shadow:0 8px 25px rgba(17,19,23,.09);
}

.global-sale-payment{
  gap:7px;
}

.global-sale-payment-mode{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:4px;
  padding:4px;
  border:1px solid rgba(23,25,29,.08);
  border-radius:13px;
  background:#f1f1ef;
}
.global-sale-payment-mode button{
  min-height:35px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:#777a80;
  font-size:10px;
  font-weight:800;
}
.global-sale-payment-mode button.active{background:#fff;color:var(--qs-ink);box-shadow:0 3px 10px rgba(17,19,23,.08)}

.global-sale-payment-tabs{
  gap:7px;
}

.global-sale-payment-tabs button{
  min-width:0;
  height:43px;
  padding:0 8px;
  border:1px solid rgba(23,25,29,.08);
  border-radius:13px;
  background:#f7f7f6;
  color:#73767d;
  font-size:10px;
  font-weight:780;
}

.global-sale-payment-tabs button i{
  margin-right:5px;
  color:#96989d;
}

.global-sale-payment-tabs button.active{
  border-color:var(--qs-ink);
  background:var(--qs-ink);
  color:#fff;
  box-shadow:0 5px 14px rgba(17,19,23,.13);
}

.global-sale-payment-tabs button.active i{
  color:#e0b654;
}

.global-sale-credit-picker{
  padding:10px;
  border:1px solid rgba(184,135,34,.13);
  border-radius:14px;
  background:#fffcf5;
}

.global-sale-credit-trigger{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  min-height:44px;
  margin-top:7px;
  padding:0 12px;
  border:1px solid rgba(184,135,34,.34);
  border-radius:12px;
  background:#fff;
  color:var(--qs-ink);
  text-align:left;
  font-size:11px;
  font-weight:700;
}

.global-sale-credit-trigger>span{
  overflow:hidden;
  color:var(--qs-ink);
  font-size:11px;
  font-weight:700;
  letter-spacing:0;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.global-sale-credit-trigger i{color:#8b8e94;font-size:10px}

.global-sale-credit-picker.invalid{
  border-color:rgba(164,48,45,.42);
  background:#fff8f7;
}

.global-sale-credit-picker.invalid>span,
.global-sale-credit-picker.invalid .global-sale-credit-trigger>span{
  color:#a4302d;
}

.global-sale-credit-picker.invalid .global-sale-credit-trigger{
  border-color:#a4302d;
  box-shadow:0 0 0 3px rgba(164,48,45,.10);
}

.global-sale-credit-picker.invalid .global-sale-credit-trigger i{color:#a4302d}

.global-sale-credit-options{
  max-height:190px;
  margin-top:7px;
  overflow-y:auto;
  border:1px solid var(--qs-line);
  border-radius:12px;
  background:#fff;
  box-shadow:0 10px 25px rgba(17,19,23,.09);
}

.global-sale-credit-options button{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto 18px;
  align-items:center;
  gap:9px;
  width:100%;
  padding:10px 11px;
  border:0;
  border-bottom:1px solid var(--qs-line);
  background:#fff;
  color:var(--qs-ink);
  text-align:left;
}

.global-sale-credit-options button:last-child{border-bottom:0}
.global-sale-credit-options button>span{display:flex;min-width:0;flex-direction:column;letter-spacing:0}
.global-sale-credit-options strong{overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.global-sale-credit-options small{margin-top:2px;color:#85888e;font-size:9px}
.global-sale-credit-options b{font-size:10px;white-space:nowrap}
.global-sale-credit-options i{visibility:hidden;color:var(--qs-gold);font-size:10px}
.global-sale-credit-options button.selected{background:#fffaf0}
.global-sale-credit-options button.selected i{visibility:visible}
.global-sale-credit-empty{padding:13px;color:#85888e;font-size:10px;text-align:center}

.global-sale-split{display:flex;flex-direction:column;gap:7px}
#globalSaleSplitRows{display:flex;flex-direction:column;gap:7px}
.global-sale-split-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(105px,.8fr) 34px;gap:7px;align-items:center}
.global-sale-split-row select,
.global-sale-split-row label{height:42px;border:1px solid rgba(23,25,29,.09);border-radius:12px;background:#fff;color:var(--qs-ink)}
.global-sale-split-row select{min-width:0;padding:0 10px;font-size:11px;font-weight:750}
.global-sale-split-row label{display:flex;align-items:center;padding:0 10px}
.global-sale-split-row label span{color:#8b8e94;font-size:10px;font-weight:750}
.global-sale-split-row input{min-width:0;width:100%;border:0;outline:0;background:transparent;color:var(--qs-ink);text-align:right;font-size:12px;font-weight:800}
.global-sale-split-row input::placeholder{color:var(--qs-ink);opacity:1}
.global-sale-split-row>button{display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:10px;background:#f3f3f1;color:#989ba0}
.global-sale-split-row>button:disabled{visibility:hidden}
.global-sale-split-add{align-self:flex-start;padding:5px 2px;border:0;background:transparent;color:#9b731c;font-size:10px;font-weight:800}
.global-sale-split-add i{margin-right:6px}
.global-sale-split-summary{display:flex;justify-content:space-between;padding:9px 11px;border-radius:12px;background:#f5f5f3;color:#777a80;font-size:9px}
.global-sale-split-summary span{display:flex;gap:5px;align-items:center}
.global-sale-split-summary strong{color:var(--qs-ink);font-size:10px}
.global-sale-split-summary #globalSaleSplitRemaining:not(.balanced){color:#9e4b34}
.global-sale-split-summary #globalSaleSplitRemaining.balanced{color:#31744b}

.global-sale-payment-mode[hidden],
.global-sale-payment-tabs[hidden],
.global-sale-split[hidden],
.global-sale-split-add[hidden]{display:none!important}

.global-sale-payment.single-method>span{display:none}
.global-sale-payment.single-method .global-sale-payment-mode{display:none!important}
.global-sale-payment.single-method .global-sale-payment-tabs{
  display:flex;
  align-items:center;
  min-height:46px;
  padding:0 13px;
  border:1px solid rgba(23,25,29,.08);
  border-radius:13px;
  background:#f7f7f6;
}
.global-sale-payment.single-method .global-sale-payment-tabs::before{
  content:"Payment method";
  margin-right:auto;
  color:#85888e;
  font-size:9px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.global-sale-payment.single-method .global-sale-payment-tabs button:not([hidden]){
  flex:0 0 auto;
  width:auto;
  height:auto;
  padding:0;
  border:0;
  background:transparent;
  color:var(--qs-ink);
  box-shadow:none;
  font-size:11px;
  pointer-events:none;
}
.global-sale-payment.single-method .global-sale-payment-tabs button:not([hidden]) i{color:var(--qs-gold)}

.global-sale-checkout{
  height:55px;
  margin-top:11px;
  padding:0 17px;
  border-radius:16px;
  background:var(--qs-ink);
  color:#fff;
  box-shadow:0 9px 24px rgba(17,19,23,.16);
  font-size:13px;
  font-weight:820;
  transition:transform .12s ease,opacity .16s ease;
}

.global-sale-checkout strong{
  color:#e0b654;
  font-size:16px;
  font-weight:850;
}

.global-sale-toast{
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background:var(--qs-ink,#17191d);
  color:#fff;
  box-shadow:0 12px 35px rgba(17,19,23,.22);
}

@media(max-width:560px){
  .global-sale-head p{display:none}

  .global-sale-payment-tabs button{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:4px;
    font-size:9px;
  }

  .global-sale-payment-tabs button i{
    margin:0;
    font-size:12px;
  }

  .global-sale-cart{
    max-height:60dvh;
  }
}

@media(max-width:390px){
  .global-sale-head{
    padding-left:16px;
    padding-right:16px;
  }

  .global-sale-head h2{font-size:24px}

  .global-sale-search-wrap,
  .global-sale-type-tabs{
    margin-left:12px;
    margin-right:12px;
  }

  .global-sale-items{
    padding-left:12px;
    padding-right:12px;
  }

  .global-sale-cart{
    padding-left:12px;
    padding-right:12px;
  }

  .global-sale-item{
    grid-template-columns:46px minmax(0,1fr) auto;
    padding-left:8px;
  }

  .global-sale-item-image{
    width:46px;
    height:46px;
  }

  .global-sale-cart-row{
    grid-template-columns:36px minmax(0,1fr) auto auto 18px;
    gap:6px;
  }

  .global-sale-cart-image{
    width:36px;
    height:36px;
  }

  .global-sale-qty button{
    width:27px;
    height:27px;
  }

  .global-sale-payment-tabs{
    gap:5px;
  }
}

@media(min-width:721px){
  .global-sale-card{
    margin-bottom:18px;
    border-bottom:1px solid rgba(255,255,255,.68);
    border-radius:30px;
  }

  .global-sale-cart{
    border-radius:25px 25px 30px 30px;
  }
}

/* v2 — give Current Sale enough working space on phones */
.global-sale-card:has(.global-sale-cart:not([hidden])) .global-sale-items{
  flex:1 1 130px;
  min-height:110px;
}

.global-sale-cart:not([hidden]){
  flex:0 0 auto;
  height:min(50dvh,480px);
  min-height:min(50dvh,480px);
  max-height:min(64dvh,620px);
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  transition:none;
}

.global-sale-cart:not([hidden]) .global-sale-section-title{
  position:sticky;
  top:-13px;
  z-index:3;
  margin:-13px -16px 7px;
  padding:14px 16px 8px;
  border-bottom:1px solid rgba(23,25,29,.055);
  background:rgba(255,255,255,.96);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
}

@media(max-width:390px){
  .global-sale-cart:not([hidden]){
    height:min(52dvh,480px);
    min-height:min(52dvh,480px);
    max-height:66dvh;
  }

  .global-sale-cart:not([hidden]) .global-sale-section-title{
    margin-left:-12px;
    margin-right:-12px;
    padding-left:12px;
    padding-right:12px;
  }
}

/* v3 — catalogue touch compacts the cart; cart touch expands it */
@media(max-width:720px){
  .global-sale-card.catalog-active .global-sale-cart:not([hidden]){
    box-sizing:border-box;
    height:82px;
    min-height:82px;
    max-height:82px;
    padding-bottom:0;
    overflow:hidden;
  }

  .global-sale-card.catalog-active:has(.global-sale-cart:not([hidden])) .global-sale-items{
    flex:1 1 auto;
    min-height:210px;
  }

  .global-sale-card.catalog-active .global-sale-section-title{
    box-sizing:border-box;
    position:static;
    height:82px;
    margin:-13px -16px 0;
    padding:0 16px;
    border-bottom:0;
    border-radius:24px 24px 0 0;
    background:#fff;
  }

  .global-sale-card.catalog-active .global-sale-section-title>div small{
    color:#8d8f94;
    font-size:10px;
    font-weight:700;
  }

  .global-sale-card.catalog-active #globalSaleCart,
  .global-sale-card.catalog-active .global-sale-total-row,
  .global-sale-card.catalog-active .global-sale-customer-block,
  .global-sale-card.catalog-active .global-sale-payment,
  .global-sale-card.catalog-active .global-sale-checkout{
    display:none!important;
  }

}

@media(max-width:390px){
  .global-sale-card.catalog-active .global-sale-section-title{
    margin-left:-12px;
    margin-right:-12px;
    padding-left:12px;
    padding-right:12px;
  }
}
