/* ============ A2YMART SHARED STYLES ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --orange: #1034a6;
  --orange-dark: #0b2478;
  --orange-light: #edf1fd;
  --dark: #16161a;
  --gray: #757575;
  --bg: #f5f5f5;
  --white: #ffffff;
  --green: #26aa99;
  --red: #e02020;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0,0,0,.08);
}
body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: #222;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; }
input, select, textarea { font-family: inherit; }

/* ---------- TOP BAR ---------- */
.topbar {
  background: linear-gradient(100deg, var(--orange) 0%, #3b5fd9 100%);
  color: #fff;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(16,52,166,.35);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.logo {
  font-size: 26px; font-weight: 800; letter-spacing: -1px;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.logo .bag { font-size: 28px; }
.logo em { font-style: normal; color: #c8d6f7; }
.logo-img {
  height: 48px; width: auto; display: block;
  border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.searchbox {
  flex: 1; min-width: 200px; display: flex; background: #fff;
  border-radius: 8px; overflow: hidden; align-items: stretch;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.searchbox input {
  flex: 1; border: none; padding: 11px 14px; font-size: 15px; outline: none;
  min-width: 0; background: #fff; color: #222;
}
.searchbox .search-go {
  background: var(--orange-dark); color: #fff; padding: 0 18px; font-size: 16px;
}
.searchbox .search-clear {
  background: #fff; color: #999; padding: 0 10px; font-size: 14px;
  display: flex; align-items: center;
}
.searchbox .search-clear:hover { color: var(--red); }
.cart-btn {
  position: relative; background: #ffdf00; color: #1034a6;
  border-radius: 8px; padding: 9px 16px; font-size: 20px;
  transition: background .2s, transform .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  display: inline-flex; align-items: center; justify-content: center;
}
.cart-btn:hover { background: #ffe94d; transform: translateY(-1px); }
.cart-btn .trolley {
  width: 24px; height: 24px; display: block; fill: currentColor;
}
.cart-count {
  position: absolute; top: -6px; right: -6px; background: var(--orange);
  color: #fff; font-size: 11px; font-weight: 800;
  border-radius: 10px; padding: 2px 6px; border: 2px solid #ffdf00;
}
.owner-link {
  font-size: 12px; opacity: .9; background: rgba(0,0,0,.18);
  padding: 8px 12px; border-radius: 8px;
}
.owner-link:hover { background: rgba(0,0,0,.32); }

/* ---------- LIVE BADGE ---------- */
.live-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px;
  font-weight: 700; padding: 4px 10px; border-radius: 20px;
}
.live-badge .dot { width: 8px; height: 8px; border-radius: 50%; }
.live-on { background: rgba(38,170,153,.15); color: var(--green); }
.live-on .dot { background: var(--green); animation: pulse 1.4s infinite; }
.live-off { background: rgba(255,255,255,.2); color: #fff; }
.live-off .dot { background: #ffd76e; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ---------- LAYOUT ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 16px; }
.section-title {
  font-size: 15px; font-weight: 700; color: var(--orange);
  text-transform: uppercase; letter-spacing: 1px; margin: 22px 0 12px;
  display: flex; align-items: center; gap: 8px;
}

/* ---------- CATEGORIES ---------- */
.cat-strip {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(90px,1fr));
  gap: 10px; background: #fff; padding: 16px; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cat-item {
  text-align: center; padding: 12px 6px; border-radius: 8px;
  cursor: pointer; transition: all .15s; border: 2px solid transparent;
}
.cat-item:hover { background: var(--orange-light); transform: translateY(-2px); }
.cat-item.active { border-color: var(--orange); background: var(--orange-light); }
.cat-item .ico { font-size: 30px; }
.cat-item .nm { font-size: 11px; margin-top: 6px; color: #444; font-weight: 600; }

/* ---------- PRODUCT GRID ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr));
  gap: 14px;
}
.card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.13); }
.card-img {
  height: 150px; background: linear-gradient(135deg,#dbe4fa,#eef2fc);
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column; }
.card-name { font-size: 14px; font-weight: 600; line-height: 1.3; min-height: 36px; }
.card-cat { font-size: 11px; color: var(--gray); margin: 4px 0; }
.card-price { font-size: 17px; font-weight: 800; color: var(--orange); }
.card-time {
  font-size: 11px; color: var(--gray); margin: 4px 0 8px;
  display: flex; align-items: center; gap: 4px;
}
.card-stock { font-size: 11px; color: var(--green); font-weight: 600; }
.card-stock.out { color: var(--red); }
.add-btn {
  margin-top: auto; background: var(--orange); color: #fff;
  padding: 9px; border-radius: 6px; font-weight: 700; font-size: 13px;
  transition: background .15s;
}
.add-btn:hover { background: var(--orange-dark); }
.add-btn:disabled { background: #ccc; cursor: not-allowed; }

.empty {
  text-align: center; padding: 60px 20px; color: var(--gray);
  background: #fff; border-radius: var(--radius);
}
.empty .big { font-size: 50px; }

/* ---------- CART DRAWER ---------- */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: -420px; width: 400px; max-width: 92vw;
  height: 100%; background: #fff; z-index: 201; transition: right .25s;
  display: flex; flex-direction: column; box-shadow: -4px 0 20px rgba(0,0,0,.2);
}
.drawer.open { right: 0; }
.drawer-head {
  padding: 16px; background: var(--orange); color: #fff;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; font-size: 17px;
}
.drawer-head button { background: none; color: #fff; font-size: 22px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px; }
.cart-row {
  display: flex; gap: 10px; align-items: center; padding: 10px;
  border-bottom: 1px solid #eee;
}
.cart-row .thumb {
  width: 52px; height: 52px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg,#dbe4fa,#eef2fc);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  overflow: hidden;
}
.cart-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-row .info { flex: 1; }
.cart-row .info .n { font-size: 13px; font-weight: 600; }
.cart-row .info .p { font-size: 13px; color: var(--orange); font-weight: 700; }
.qty-controls { display: flex; align-items: center; gap: 6px; }
.qty-controls button {
  width: 26px; height: 26px; border-radius: 6px; background: var(--orange-light);
  color: var(--orange); font-weight: 800; font-size: 15px;
}
.qty-controls span { min-width: 22px; text-align: center; font-weight: 700; font-size: 14px; }
.remove-x { background: none; color: var(--red); font-size: 17px; }
.drawer-foot { padding: 16px; border-top: 1px solid #eee; }
.total-row {
  display: flex; justify-content: space-between; font-size: 17px;
  font-weight: 800; margin-bottom: 12px;
}
.total-row span:last-child { color: var(--orange); }
.checkout-btn {
  width: 100%; background: var(--orange); color: #fff; padding: 13px;
  border-radius: 8px; font-size: 15px; font-weight: 800;
}
.checkout-btn:hover { background: var(--orange-dark); }

/* ---------- MODALS ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 300;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff; border-radius: 14px; width: 440px; max-width: 100%;
  max-height: 90vh; overflow-y: auto; padding: 24px;
  animation: popIn .2s;
}
@keyframes popIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h3 { margin-bottom: 14px; font-size: 19px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: #555; margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid #ddd; border-radius: 8px;
  font-size: 14px; outline: none; transition: border .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--orange); }
.btn {
  padding: 11px 18px; border-radius: 8px; font-weight: 700; font-size: 14px;
}
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-dark); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-red { background: var(--red); color: #fff; }
.btn-gray { background: #eee; color: #444; }
.btn-block { width: 100%; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }

/* ---------- TOAST ---------- */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--dark); color: #fff; padding: 12px 22px; border-radius: 30px;
  font-size: 14px; font-weight: 600; z-index: 500; transition: transform .3s;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- LOGIN PAGE ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #16161a 0%, #0a1230 60%, #1034a6 160%);
  padding: 20px;
}
.login-card {
  background: #fff; border-radius: 18px; padding: 40px 34px; width: 400px;
  max-width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.4); text-align: center;
}
.login-card .logo-big { font-size: 40px; }
.login-card h1 { font-size: 24px; margin: 8px 0 4px; }
.login-card h1 em { font-style: normal; color: var(--orange); }
.login-card p { color: var(--gray); font-size: 13px; margin-bottom: 22px; }
.login-card input {
  width: 100%; padding: 13px 14px; border: 2px solid #eee; border-radius: 10px;
  font-size: 15px; outline: none; margin-bottom: 12px; text-align: center;
  letter-spacing: 2px;
}
.login-card input:focus { border-color: var(--orange); }
.login-err { color: var(--red); font-size: 13px; font-weight: 600; min-height: 18px; margin-bottom: 6px; }
.shake { animation: shake .35s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-8px)} 75%{transform:translateX(8px)} }

/* ---------- OWNER DASHBOARD ---------- */
.owner-topbar { background: var(--dark); }
.owner-topbar .logo em { color: var(--orange); }
.tabs {
  display: flex; gap: 6px; background: #fff; padding: 8px; border-radius: 12px;
  box-shadow: var(--shadow); margin-bottom: 18px; flex-wrap: wrap;
}
.tab {
  flex: 1; min-width: 110px; padding: 11px 6px; border-radius: 8px; background: none;
  font-weight: 700; font-size: 13px; color: #666; transition: all .15s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.tab:hover { background: var(--orange-light); color: var(--orange); }
.tab.active { background: var(--orange); color: #fff; }
.tab .badge {
  background: var(--red); color: #fff; font-size: 10px; padding: 2px 7px;
  border-radius: 10px; font-weight: 800;
}
.tab.active .badge { background: #fff; color: var(--orange); }

.stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  background: #fff; border-radius: 12px; padding: 16px; box-shadow: var(--shadow);
  border-left: 4px solid var(--orange);
}
.stat .num { font-size: 26px; font-weight: 800; }
.stat .lbl { font-size: 12px; color: var(--gray); font-weight: 600; }

.panel { background: #fff; border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.panel-head h2 { font-size: 17px; }

/* owner product list */
.prod-row {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border: 1px solid #eee; border-radius: 10px; margin-bottom: 10px;
}
.prod-row .thumb {
  width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg,#dbe4fa,#eef2fc);
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  overflow: hidden;
}
.prod-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.prod-row .meta { flex: 1; }
.prod-row .meta .n { font-weight: 700; font-size: 14px; }
.prod-row .meta .sub { font-size: 12px; color: var(--gray); }
.prod-row .price { font-weight: 800; color: var(--orange); }
.icon-btn { background: #f2f2f2; border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.icon-btn:hover { background: #e5e5e5; }
.icon-btn.danger { background: #fdecec; color: var(--red); }
.icon-btn.danger:hover { background: #f9d4d4; }

/* orders */
.order-card {
  border: 1px solid #eee; border-radius: 12px; padding: 14px; margin-bottom: 12px;
  border-left: 5px solid #f5a623;
}
.order-card.done { border-left-color: var(--green); opacity: .8; }
.order-card.new { border-left-color: var(--red); background: #fffaf8; }
.order-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.order-head .who { font-weight: 800; font-size: 15px; }
.order-time { font-size: 12px; color: var(--gray); }
.order-items { font-size: 13px; color: #444; margin: 6px 0; }
.order-items li { margin-left: 18px; margin-bottom: 2px; }
.order-total { font-weight: 800; color: var(--orange); }
.status-pill {
  font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 20px;
  text-transform: uppercase;
}
.status-pending { background: #fff3d6; color: #b07b00; }
.status-done { background: #d9f2ee; color: var(--green); }
.order-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- TEAM ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 14px; }
.member-card {
  border-radius: 14px; padding: 20px 16px; text-align: center; color: #fff;
  position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.member-card.owner { background: linear-gradient(145deg,#1b1b20,#000); border: 1px solid #333; }
.member-card.agent { background: linear-gradient(145deg,#e02020,#8e0b0b); }
.member-card .avatar {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  font-weight: 800; background: rgba(255,255,255,.15); border: 2px solid rgba(255,255,255,.35);
}
.member-card .m-name { font-weight: 800; font-size: 16px; }
.member-card .m-title { font-size: 12px; opacity: .8; margin-top: 3px; }
.role-tag {
  display: inline-block; margin-top: 10px; font-size: 10px; font-weight: 800;
  letter-spacing: 1.5px; padding: 4px 12px; border-radius: 20px;
  background: rgba(255,255,255,.18); text-transform: uppercase;
}
.member-card .del-member {
  position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.15);
  color: #fff; border-radius: 8px; width: 28px; height: 28px; font-size: 13px;
}
.member-card .del-member:hover { background: rgba(255,255,255,.35); }

/* join banner on shop */
.join-banner {
  margin-top: 26px; background: linear-gradient(120deg, var(--dark), #0c1638);
  color: #fff; border-radius: 14px; padding: 26px; display: flex;
  justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.join-banner h3 { font-size: 20px; }
.join-banner h3 em { font-style: normal; color: var(--orange); }
.join-banner p { font-size: 13px; opacity: .8; margin-top: 4px; }

footer { text-align: center; padding: 30px 16px; color: var(--gray); font-size: 12px; }

/* ---------- THEME TOGGLE BUTTON ---------- */
.theme-btn {
  background: rgba(255,255,255,.15); color: #fff; border-radius: 8px;
  padding: 9px 13px; font-size: 17px; transition: background .2s;
}
.theme-btn:hover { background: rgba(255,255,255,.3); }

/* ---------- SIGN IN ---------- */
.signin-btn {
  background: rgba(0,0,0,.18); color: #fff; border-radius: 8px;
  padding: 8px 14px; font-size: 13px; font-weight: 700;
}
.signin-btn:hover { background: rgba(0,0,0,.32); }
.user-chip {
  display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.18);
  border-radius: 20px; padding: 5px 6px 5px 14px; font-size: 13px; font-weight: 700;
  color: #fff;
}
.user-chip .out {
  background: rgba(255,255,255,.2); color: #fff; border-radius: 14px;
  padding: 4px 10px; font-size: 11px; font-weight: 700;
}
.user-chip .out:hover { background: rgba(255,255,255,.4); }

/* ---------- RECEIPT ---------- */
.receipt {
  background: #fff; color: #111; width: 320px; max-width: 100%;
  margin: 0 auto; padding: 22px 20px; font-family: 'Courier New', monospace;
  font-size: 13px; border-radius: 4px;
}
.receipt .r-center { text-align: center; }
.receipt .r-logo { font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.receipt .r-sub { font-size: 11px; color: #555; margin-top: 2px; }
.receipt .r-dash { border-top: 1px dashed #999; margin: 10px 0; }
.receipt .r-row { display: flex; justify-content: space-between; gap: 8px; margin: 3px 0; }
.receipt .r-row .l { flex: 1; }
.receipt .r-total { font-weight: 800; font-size: 15px; }
.receipt .r-small { font-size: 11px; color: #555; }
#receiptModal .modal { width: 380px; }

@media print {
  body * { visibility: hidden !important; }
  #receiptModal, #receiptModal * { visibility: visible !important; }
  #receiptModal { position: absolute !important; inset: 0 !important; background: #fff !important; display: block !important; padding: 0 !important; }
  #receiptModal .modal { box-shadow: none !important; width: 100% !important; max-height: none !important; padding: 0 !important; animation: none !important; }
  #receiptModal .no-print { display: none !important; }
  .receipt { width: 100%; }
}

/* ---------- PACKAGE TRACKING ---------- */
.track-btn {
  background: rgba(255,255,255,.15); color: #fff; border-radius: 8px;
  padding: 8px 14px; font-size: 13px; font-weight: 700; transition: background .2s;
}
.track-btn:hover { background: rgba(255,255,255,.3); }
#trackModal .modal { width: 520px; }

.track-order {
  border: 1px solid #eee; border-radius: 12px; padding: 14px; margin-bottom: 14px;
}
.track-order .t-head {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 6px; margin-bottom: 4px;
}
.track-order .t-id { font-weight: 800; font-size: 14px; }
.track-order .t-time { font-size: 11px; color: var(--gray); }
.track-order .t-items { font-size: 12px; color: var(--gray); margin: 4px 0 12px; }

.timeline { display: flex; align-items: flex-start; }
.t-step { flex: 1; text-align: center; position: relative; }
.t-step .t-dot {
  width: 34px; height: 34px; border-radius: 50%; margin: 0 auto;
  background: #eee; display: flex; align-items: center; justify-content: center;
  font-size: 15px; position: relative; z-index: 2; border: 3px solid #eee;
  transition: all .25s; filter: grayscale(1); opacity: .55;
}
.t-step .t-lbl { font-size: 10px; font-weight: 700; color: #999; margin-top: 6px; }
.t-step::before {
  content: ""; position: absolute; top: 17px; left: -50%; width: 100%;
  height: 4px; background: #eee; z-index: 1;
}
.t-step:first-child::before { display: none; }
.t-step.done .t-dot {
  background: var(--orange-light); border-color: var(--orange);
  filter: none; opacity: 1;
}
.t-step.done .t-lbl { color: var(--orange); }
.t-step.done::before { background: var(--orange); }
.t-step.current .t-dot {
  background: var(--orange); border-color: var(--orange);
  box-shadow: 0 0 0 5px rgba(16,52,166,.2); animation: glowPulse 1.5s infinite;
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 0 5px rgba(16,52,166,.2); }
  50% { box-shadow: 0 0 0 9px rgba(16,52,166,.08); }
}
.track-status-line {
  margin-top: 12px; text-align: center; font-size: 13px; font-weight: 700;
  color: var(--orange); background: var(--orange-light);
  padding: 8px; border-radius: 8px;
}

/* owner progress buttons */
.progress-ctrl { margin-top: 12px; }
.progress-ctrl .p-lbl { font-size: 11px; font-weight: 800; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.progress-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.p-btn {
  padding: 7px 12px; border-radius: 20px; font-size: 12px; font-weight: 700;
  background: #f0f0f0; color: #777; border: 2px solid transparent; transition: all .15s;
}
.p-btn:hover { border-color: var(--orange); color: var(--orange); }
.p-btn.done { background: var(--orange-light); color: var(--orange); }
.p-btn.current { background: var(--orange); color: #fff; }

/* ============ DARK MODE ============ */
body.dark {
  --bg: #101014;
  --white: #1b1b22;
  --gray: #9a9aa5;
  --orange-light: #161e3a;
  --shadow: 0 2px 10px rgba(0,0,0,.5);
  background: var(--bg);
  color: #e8e8ee;
}
body.dark .cat-strip, body.dark .card, body.dark .panel, body.dark .stat,
body.dark .tabs, body.dark .empty, body.dark .modal, body.dark .drawer,
body.dark .login-card {
  background: #1b1b22; color: #e8e8ee;
}
body.dark .card-name, body.dark .panel-head h2, body.dark .stat .num,
body.dark .order-head .who, body.dark .modal h3, body.dark .login-card h1,
body.dark .prod-row .meta .n, body.dark .total-row,
body.dark .qty-controls span, body.dark .cart-row .info .n { color: #f0f0f5; }
body.dark .cat-item .nm { color: #ccccd6; }
body.dark .cat-item:hover, body.dark .cat-item.active { background: #161e3a; }
body.dark .card-img, body.dark .cart-row .thumb, body.dark .prod-row .thumb {
  background: linear-gradient(135deg,#181e30,#191f2e);
}
body.dark .tab { color: #9a9aa5; }
body.dark .tab:hover { background: #161e3a; color: var(--orange); }
body.dark .tab.active { background: var(--orange); color: #fff; }
body.dark .prod-row, body.dark .order-card { border-color: #2c2c36; }
body.dark .order-card.new { background: #141a30; }
body.dark .order-items, body.dark .order-items li { color: #c5c5cf; }
body.dark .field input, body.dark .field select, body.dark .field textarea,
body.dark .login-card input {
  background: #12121a; border-color: #33333f; color: #e8e8ee;
}
body.dark .icon-btn { background: #26262f; color: #ddd; }
body.dark .icon-btn:hover { background: #33333f; }
body.dark .icon-btn.danger { background: #3a1d1d; color: #ff7b7b; }
body.dark .btn-gray { background: #2c2c36; color: #ddd; }
body.dark .cart-row { border-bottom-color: #2c2c36; }
body.dark .drawer-foot { border-top-color: #2c2c36; }
body.dark .qty-controls button { background: #161e3a; }
body.dark .join-banner { background: linear-gradient(120deg,#000,#070f28); }
body.dark .login-card p { color: #9a9aa5; }
body.dark .empty { color: #9a9aa5; }
body.dark .receipt { background: #fff; color: #111; } /* receipt always white for printing */
body.dark .track-order { border-color: #2c2c36; }
body.dark .t-step .t-dot { background: #26262f; border-color: #26262f; }
body.dark .t-step::before { background: #26262f; }
body.dark .t-step.done .t-dot { background: #161e3a; border-color: var(--orange); }
body.dark .t-step.done::before { background: var(--orange); }
body.dark .t-step.current .t-dot { background: var(--orange); }
body.dark .p-btn { background: #26262f; color: #9a9aa5; }
body.dark .p-btn.done { background: #161e3a; color: var(--orange); }
body.dark .p-btn.current { background: var(--orange); color: #fff; }
body.dark .track-order .t-id { color: #f0f0f5; }

/* ============ DESKTOP POLISH (big screens) ============ */
@media (min-width: 1000px) {
  .container { padding: 20px 24px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
  .card-img { height: 175px; font-size: 64px; }
  .cat-strip { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; padding: 20px; }
  .cat-item .ico { font-size: 34px; }
  .cat-item .nm { font-size: 12px; }
  .section-title { font-size: 16px; margin: 28px 0 14px; }
  .topbar-inner { padding: 14px 24px; gap: 16px; }
  .searchbox { max-width: 560px; }
  .join-banner { padding: 32px 36px; }
  .team-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
}

/* ============ TABLET ============ */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ============ MOBILE ============ */
@media (max-width: 640px) {
  /* topbar: logo + icons on row 1, search full-width below */
  .topbar-inner { padding: 10px 12px; gap: 8px; }
  .logo { font-size: 21px; order: 1; }
  .logo .bag { font-size: 22px; }
  .logo-img { height: 38px; border-radius: 8px; }
  #liveBadge { order: 2; margin-left: auto; }
  .theme-btn { order: 3; padding: 8px 11px; font-size: 15px; }
  .track-btn { order: 4; padding: 8px 10px; font-size: 12px; }
  .cart-btn { order: 5; padding: 8px 13px; font-size: 18px; }
  .cart-btn .trolley { width: 21px; height: 21px; }
  #signinArea { order: 6; }
  .signin-btn { padding: 7px 11px; font-size: 12px; }
  .user-chip { font-size: 12px; padding: 4px 5px 4px 11px; }
  .searchbox { order: 10; flex-basis: 100%; min-width: 0; }
  .searchbox input { padding: 10px 12px; font-size: 14px; }

  .container { padding: 12px; }
  .section-title { font-size: 13px; margin: 18px 0 10px; }

  /* categories: horizontal swipe strip like Shopee */
  .cat-strip {
    display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 12px; gap: 4px; scrollbar-width: none;
  }
  .cat-strip::-webkit-scrollbar { display: none; }
  .cat-item { flex: 0 0 76px; padding: 10px 4px; }
  .cat-item .ico { font-size: 26px; }
  .cat-item .nm { font-size: 10px; }

  /* product grid: 2 tidy columns */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-img { height: 130px; font-size: 46px; }
  .card-body { padding: 8px 10px 10px; }
  .card-name { font-size: 13px; min-height: 34px; }
  .card-price { font-size: 15px; }
  .add-btn { padding: 8px; font-size: 12px; }

  /* cart drawer: full width */
  .drawer { width: 100%; max-width: 100%; right: -100%; }

  /* modals: near full width, comfy padding */
  .modal { padding: 18px; border-radius: 12px; }
  .modal h3 { font-size: 17px; }
  #trackModal .modal { width: 100%; }
  .timeline { margin: 0 -4px; }
  .t-step .t-dot { width: 28px; height: 28px; font-size: 12px; border-width: 2px; }
  .t-step::before { top: 14px; height: 3px; }
  .t-step .t-lbl { font-size: 8.5px; }

  .join-banner { padding: 20px 16px; text-align: center; justify-content: center; }
  .join-banner h3 { font-size: 17px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .member-card { padding: 16px 10px; }
  .member-card .avatar { width: 50px; height: 50px; font-size: 21px; }
  .member-card .m-name { font-size: 14px; }

  .checkout-btn, .btn { -webkit-tap-highlight-color: transparent; }
}

/* very small phones */
@media (max-width: 360px) {
  .grid { gap: 8px; }
  .card-img { height: 110px; font-size: 40px; }
  .track-btn { font-size: 11px; padding: 7px 8px; }
}

/* ---------- PRODUCT VIEW (Shopee style) ---------- */
.pv-modal { width: 760px; max-width: 96vw; padding: 0; overflow: hidden; }
.pv-grid { display: grid; grid-template-columns: 320px 1fr; }
.pv-imgbox {
  background: linear-gradient(135deg,#dbe4fa,#eef2fc);
  display: flex; align-items: center; justify-content: center;
  min-height: 320px; font-size: 110px; overflow: hidden;
}
.pv-imgbox img { width: 100%; height: 100%; object-fit: cover; }
.pv-info { padding: 22px; }
.pv-name { font-size: 19px; font-weight: 800; line-height: 1.3; }
.pv-meta { font-size: 12px; color: var(--gray); margin: 8px 0; display: flex; gap: 12px; flex-wrap: wrap; }
.pv-pricebox {
  background: var(--orange-light); border-radius: 10px; padding: 14px 16px;
  font-size: 26px; font-weight: 800; color: var(--orange); margin: 12px 0;
}
.pv-seller {
  display: flex; align-items: center; gap: 10px; border: 1px solid #eee;
  border-radius: 10px; padding: 10px 14px; margin: 12px 0;
}
.pv-seller .avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--orange);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px;
}
.pv-seller .s-name { font-weight: 700; font-size: 14px; }
.pv-seller .s-sub { font-size: 11px; color: var(--gray); }
.pv-desc-title { font-size: 13px; font-weight: 800; margin-top: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--gray); }
.pv-desc { font-size: 13px; color: #444; line-height: 1.6; white-space: pre-wrap; margin-top: 6px; max-height: 150px; overflow-y: auto; }
.pv-qty { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.pv-qty .lbl { font-size: 13px; font-weight: 700; color: var(--gray); }
.pv-actions { display: flex; gap: 10px; margin-top: 6px; }
.pv-actions .btn { flex: 1; padding: 13px; }
.pv-close {
  position: absolute; top: 10px; right: 12px; background: rgba(0,0,0,.4);
  color: #fff; border-radius: 50%; width: 34px; height: 34px; font-size: 16px; z-index: 5;
}
.pv-wrap { position: relative; }
@media (max-width: 700px) {
  .pv-grid { grid-template-columns: 1fr; }
  .pv-imgbox { min-height: 220px; font-size: 80px; }
}
body.dark .pv-info, body.dark .pv-modal { background: #1b1b22; }
body.dark .pv-name { color: #f0f0f5; }
body.dark .pv-seller { border-color: #2c2c36; }
body.dark .pv-desc { color: #c5c5cf; }
body.dark .pv-imgbox { background: linear-gradient(135deg,#181e30,#141a30); }

/* ---------- PAYMENT QR ---------- */
.pay-block { border: 1px solid #eee; border-radius: 12px; padding: 14px; margin-bottom: 12px; text-align: center; }
.pay-block .p-name { font-weight: 800; font-size: 14px; }
.pay-block .p-amt { color: var(--orange); font-weight: 800; font-size: 20px; margin: 6px 0; }
.pay-block img { width: 230px; max-width: 100%; border-radius: 10px; border: 1px solid #eee; }
.pay-block .no-qr { padding: 24px; color: var(--gray); font-size: 13px; background: #f7f7f7; border-radius: 10px; }
body.dark .pay-block { border-color: #2c2c36; }
body.dark .pay-block .no-qr { background: #26262f; }

/* ---------- PAYMENT PROOF UPLOAD ---------- */
.proof-box {
  margin-top: 12px; border: 2px dashed #ccc; border-radius: 10px; padding: 12px;
}
.proof-box .proof-lbl { font-size: 12px; font-weight: 800; color: #777; margin-bottom: 8px; }
#paidBtn:disabled { background: #ccc; cursor: not-allowed; }
body.dark .proof-box { border-color: #2c2c36; }

/* ---------- MY ORDERS TABS (TikTok style) ---------- */
.order-tabs {
  display: flex; gap: 6px; margin-top: 14px; overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px;
}
.order-tabs::-webkit-scrollbar { display: none; }
.ot {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 20px; font-size: 12px;
  font-weight: 800; background: #f1f1f1; color: #777; white-space: nowrap;
}
.ot.active { background: var(--orange); color: #fff; }
body.dark .ot { background: #26262f; color: #9a9aa5; }
body.dark .ot.active { background: var(--orange); color: #fff; }
.t-paybtn { margin-top: 10px; }

/* ---------- SCANNER ---------- */
.scan-box {
  margin-top: 10px; border-radius: 10px; padding: 12px; font-size: 12px;
  background: #f7f7f7; text-align: left;
}
.scan-box .row { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-weight: 600; }
.scan-ok { color: var(--green); }
.scan-bad { color: var(--red); }
.scan-warn { color: #b07b00; }
.scan-spin {
  display: inline-block; width: 14px; height: 14px; border: 2px solid #ccc;
  border-top-color: var(--orange); border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
body.dark .scan-box { background: #26262f; }

/* ---------- UPLOAD BUTTON ---------- */
.upload-btn { margin-top: 4px; width: 100%; font-size: 13px; padding: 11px; }

/* ---------- MOBILE PRODUCT VIEW FIX (description visible) ---------- */
@media (max-width: 700px) {
  .pv-modal { max-height: 92vh; overflow-y: auto; }
  .pv-imgbox { min-height: 180px; max-height: 220px; }
  .pv-info { padding: 16px; }
  .pv-desc { max-height: none; overflow-y: visible; }
  .pv-name { font-size: 16px; }
  .pv-pricebox { font-size: 21px; padding: 10px 14px; }
  .pv-actions { position: sticky; bottom: 0; background: inherit; padding-top: 8px; }
}


/* ---------- CENTERED LOGO ---------- */
.topbar-inner .logo { flex-basis: 100%; display: flex; justify-content: center; order: -1; margin-bottom: 4px; }
.topbar-inner { justify-content: center; }


/* ---------- TRANSPARENT TOPBAR LOGO ---------- */
.logo-img { border-radius: 0 !important; box-shadow: none !important; background: none !important; height: 56px; }
@media (max-width: 640px) { .logo-img { height: 42px; } }


/* ---------- CHAT POPUP (bottom-right) ---------- */
.chat-fab {
  position: fixed; bottom: 20px; right: 20px; z-index: 260;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--orange); color: #fff; font-size: 26px;
  box-shadow: 0 6px 20px rgba(0,0,0,.3); transition: transform .15s;
}
.chat-fab:hover { transform: scale(1.08); }
#chatModal { background: transparent !important; pointer-events: none; }
#chatModal .modal {
  pointer-events: auto; position: fixed; bottom: 90px; right: 20px;
  width: 360px !important; max-width: calc(100vw - 32px);
  max-height: 65vh !important; margin: 0;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  animation: chatUp .2s;
}
@keyframes chatUp { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) {
  #chatModal .modal { bottom: 86px; right: 12px; }
  .chat-fab { bottom: 16px; right: 16px; }
}

/* ---------- PRO SELLER BUTTON ---------- */
.seller-cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(120deg, #e02020, #b31414);
  color: #fff; border-radius: 10px; padding: 9px 16px;
  font-size: 13px; font-weight: 800; letter-spacing: .3px;
  box-shadow: 0 3px 10px rgba(224,32,32,.35);
  border: 1px solid rgba(255,255,255,.25);
  transition: transform .15s, box-shadow .15s;
}
.seller-cta:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(224,32,32,.5); }

/* ============ PRO ANIMATIONS ============ */
/* animated tick */
.tick-anim { width: 90px; height: 90px; display: block; margin: 0 auto; }
.tick-circle {
  fill: none; stroke: var(--green); stroke-width: 3;
  stroke-dasharray: 166; stroke-dashoffset: 166;
  animation: tickCircle .7s ease forwards;
}
.tick-check {
  fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 48; stroke-dashoffset: 48;
  animation: tickCheck .45s .65s ease forwards;
}
@keyframes tickCircle { to { stroke-dashoffset: 0; } }
@keyframes tickCheck { to { stroke-dashoffset: 0; } }

/* typing dots */
.typing-dots { display: inline-flex; gap: 4px; padding-top: 4px; }
.typing-dots i {
  width: 7px; height: 7px; border-radius: 50%; background: #1a3c8b; opacity: .4;
  animation: typeDot 1.2s infinite;
}
.typing-dots i:nth-child(2) { animation-delay: .2s; }
.typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes typeDot { 0%,100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }

/* page entrance animations */
.card, .prod-row, .order-card, .stat, .member-card { animation: fadeUp .4s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card:nth-child(2) { animation-delay: .04s; } .card:nth-child(3) { animation-delay: .08s; }
.card:nth-child(4) { animation-delay: .12s; } .card:nth-child(5) { animation-delay: .16s; }
.card:nth-child(6) { animation-delay: .2s; }

/* button press feedback */
.btn:active, .add-btn:active, .tab:active, .cart-btn:active { transform: scale(.96); }
.btn, .add-btn, .tab { transition: transform .12s, background .2s, box-shadow .2s; }

/* modal pop */
.modal { animation: popIn .25s cubic-bezier(.34,1.4,.64,1); }

/* topbar buttons hover lift */
.signin-btn:hover, .track-btn:hover, .theme-btn:hover { transform: translateY(-1px); }
.signin-btn, .track-btn, .theme-btn { transition: transform .15s, background .2s; }

/* ---------- GAMING MARKETPLACE (itemku style) ---------- */
.gt-tile {
  background: #fff; border-radius: 12px; padding: 12px 6px; text-align: center;
  cursor: pointer; box-shadow: var(--shadow); border: 2px solid transparent;
  transition: all .15s;
}
.gt-tile:hover { transform: translateY(-2px); border-color: #7c5cff; }
.gt-tile.active { border-color: #7c5cff; background: #f3efff; }
.gt-tile .gt-ic { font-size: 26px; }
.gt-tile .gt-nm { font-size: 10px; font-weight: 800; color: #555; margin-top: 4px; }
.gcard .card-price { color: #7c5cff; }
body.dark .gt-tile { background: #1b1b22; }
body.dark .gt-tile.active { background: #241645; }
body.dark .gt-tile .gt-nm { color: #cbb8ff; }

/* ---------- TOP-UP BANNERS (itemku style) ---------- */
.tu-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px;
}
.tu-card {
  position: relative; border-radius: 16px; overflow: hidden; cursor: pointer;
  aspect-ratio: 2/3; box-shadow: 0 4px 16px rgba(0,0,0,.25);
  transition: transform .18s, box-shadow .18s;
}
.tu-card:hover { transform: translateY(-4px) scale(1.015); box-shadow: 0 10px 28px rgba(0,0,0,.4); }
.tu-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tu-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; padding: 14px;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.65) 100%);
}
.tu-badge {
  background: linear-gradient(120deg, #ffb400, #ffd54d); color: #1a1200;
  font-size: 12px; font-weight: 800; padding: 5px 16px; border-radius: 8px;
  margin-bottom: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.tu-btn {
  width: 80%; padding: 11px; border-radius: 12px; font-weight: 800; font-size: 14px;
  background: rgba(20,30,60,.55); color: #fff; border: 2px solid rgba(255,255,255,.7);
  backdrop-filter: blur(4px); transition: background .15s;
}
.tu-card:hover .tu-btn { background: var(--orange); border-color: var(--orange); }
@media (max-width: 900px) { .tu-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .tu-row { gap: 8px; } .tu-btn { padding: 9px; font-size: 12px; } }

/* ---------- TOP-UP PACKAGES ---------- */
.tu-row-2 { grid-template-columns: repeat(2, 1fr) !important; max-width: 560px; margin-left: auto; margin-right: auto; }
.tu-packs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tu-pack {
  border: 2px solid #e5e5e5; border-radius: 12px; padding: 12px; text-align: center;
  cursor: pointer; transition: all .15s;
}
.tu-pack:hover { border-color: #7c5cff; transform: translateY(-2px); box-shadow: 0 4px 14px rgba(124,92,255,.2); }
.tu-pack.oos { opacity: .45; cursor: not-allowed; }
.tp-ic { font-size: 26px; }
.tp-name { font-size: 12px; font-weight: 800; margin-top: 4px; line-height: 1.3; }
.tp-price { font-size: 15px; font-weight: 800; color: #7c5cff; margin-top: 4px; }
.tp-sub { font-size: 10px; color: var(--gray); margin-top: 3px; }
body.dark .tu-pack { border-color: #2c2c36; }
.tu-unconfirmed {
  margin-top: 8px; padding: 9px; border-radius: 8px; text-align: center;
  font-size: 12px; font-weight: 800; color: #b07b00; background: #fff3d6;
  animation: pulseSoft 2s infinite;
}
@keyframes pulseSoft { 0%,100% { opacity: 1; } 50% { opacity: .65; } }
body.dark .tu-unconfirmed { background: #2a2410; }

/* ---------- MY PURCHASES ---------- */
.purch-card {
  border: 1px solid #eee; border-radius: 12px; padding: 14px; margin-bottom: 12px;
  animation: fadeUp .3s ease both;
}
.code-box {
  margin-top: 10px; border: 2px dashed var(--orange); border-radius: 10px;
  padding: 12px; text-align: center; background: var(--orange-light);
}
.code-value {
  font-family: 'Courier New', monospace; font-size: 15px; font-weight: 800;
  margin-top: 4px; word-break: break-all; white-space: pre-wrap;
}
body.dark .purch-card { border-color: #2c2c36; }

/* ---------- GIFT CARD IMAGES (fully visible) ---------- */
.card-img img[style*="contain"] { object-fit: contain !important; }

/* ============ TV VIEW (smart TVs & huge screens, 1900px+) ============ */
@media (min-width: 1900px) {
  html { font-size: 20px; }
  .container { max-width: 1720px; padding: 32px 40px; }
  .topbar-inner { max-width: 1720px; padding: 20px 40px; gap: 22px; }
  .logo-img { height: 84px; }
  .searchbox { max-width: 900px; border-radius: 14px; }
  .searchbox input { padding: 18px 24px; font-size: 20px; }
  .searchbox .search-go { padding: 0 30px; font-size: 22px; }
  .track-btn, .signin-btn, .theme-btn { font-size: 17px; padding: 14px 22px; border-radius: 12px; }
  .cart-btn { padding: 15px 24px; border-radius: 14px; }
  .cart-btn .trolley { width: 34px; height: 34px; }
  .cart-count { font-size: 15px; padding: 3px 9px; }
  .seller-cta { font-size: 17px; padding: 14px 24px; }

  .section-title { font-size: 24px; margin: 40px 0 20px; }
  .cat-strip { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; padding: 28px; border-radius: 18px; }
  .cat-item { padding: 20px 10px; border-radius: 14px; }
  .cat-item .ico { font-size: 48px; }
  .cat-item .nm { font-size: 16px; margin-top: 10px; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
  .card { border-radius: 16px; }
  .card-img { height: 260px; font-size: 90px; }
  .card-body { padding: 16px 18px 18px; }
  .card-name { font-size: 20px; min-height: 52px; }
  .card-cat { font-size: 15px; }
  .card-price { font-size: 26px; }
  .card-time, .card-stock { font-size: 15px; }
  .add-btn { padding: 15px; font-size: 18px; border-radius: 10px; }

  .join-banner { padding: 44px 52px; border-radius: 20px; }
  .join-banner h3 { font-size: 30px; }
  .join-banner p { font-size: 18px; }
  .btn { font-size: 18px; padding: 15px 26px; border-radius: 12px; }

  .modal { width: 640px; padding: 36px; border-radius: 20px; font-size: 18px; }
  .modal h3 { font-size: 27px; }
  .field label { font-size: 16px; }
  .field input, .field select, .field textarea { padding: 15px 18px; font-size: 18px; border-radius: 12px; }
  .pv-modal { width: 1100px; }
  .pv-imgbox { min-height: 480px; font-size: 150px; }
  .pv-name { font-size: 28px; }
  .pv-pricebox { font-size: 36px; }
  .pv-desc { font-size: 17px; max-height: 260px; }

  .drawer { width: 560px; right: -580px; }
  .drawer-head { font-size: 23px; padding: 24px; }
  .cart-row .thumb { width: 76px; height: 76px; }
  .cart-row .info .n { font-size: 17px; }
  .checkout-btn { padding: 19px; font-size: 20px; }

  .chat-fab { width: 80px; height: 80px; font-size: 36px; bottom: 32px; right: 32px; }
  #chatModal .modal { width: 500px !important; bottom: 128px; right: 32px; }

  .team-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
  #toast { font-size: 19px; padding: 17px 32px; }
}

/* ---------- TV REMOTE / KEYBOARD FOCUS (D-pad navigation) ---------- */
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible,
.cat-item:focus-visible, .card:focus-visible {
  outline: 4px solid #ffdf00 !important;
  outline-offset: 3px;
  border-radius: 8px;
  z-index: 5;
}
