@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary:       #17324d;
  --primary-dark:  #0f2235;
  --primary-light: #2a4f72;

  --gold:          #c89b3c;
  --gold-dark:     #a97d24;
  --gold-light:    #e8c472;

  --bg:            #f0ede8;
  --bg-card:       #ffffff;
  --bg-dark:       #0d1b2a;

  --text-primary:  #0f1923;
  --text-secondary:#3d4f5e;
  --text-muted:    #7a8c99;

  --border:        #ddd8d0;
  --border-dark:   #c4bdb3;

  --success:       #1a6b3a;
  --error:         #9b1a1a;
  --warning:       #8a4a00;

  --shadow-sm:     0 1px 3px rgba(15,34,53,0.10);
  --shadow-md:     0 4px 14px rgba(15,34,53,0.14);
  --shadow-lg:     0 8px 28px rgba(15,34,53,0.18);


  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     12px;
  --radius-xl:     18px;

  --font-display:  'Montserrat', sans-serif;
  --font-body:     'Inter', sans-serif;

  --max-w:         480px;
  --header-h:      52px;
  --transition:    0.18s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html { font-size: 14px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overscroll-behavior-y: none;
}

/* ============ APP WRAPPER ============ */
.app-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,0,0,0.14);
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 4px; }

/* ============ SCREEN MANAGER ============ */
.screen { display: none; flex-direction: column; min-height: 100vh; }
.screen.active { display: flex; }

/* ============ LANDING SCREEN ============ */
#screen-landing {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 55%, #0a1a28 100%);
  align-items: center;
  justify-content: center;
  padding: 48px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Geometric accent — industrial feel */
#screen-landing::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 340px; height: 340px;
  border: 60px solid rgba(200,155,60,0.08);
  border-radius: 50%;
}
#screen-landing::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 220px; height: 220px;
  border: 40px solid rgba(200,155,60,0.05);
  border-radius: 50%;
}

.landing-logo { margin-bottom: 32px; animation: fadeInDown 0.6s ease; }
.landing-logo-img {
  width: 200px; max-width: 80%; height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.landing-tagline {
  margin-top: 10px;
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.landing-social {
  display: flex; justify-content: center; gap: 16px;
  margin-bottom: 40px;
  animation: fadeIn 0.5s 0.2s ease both;
}
.social-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: var(--transition);
}
.social-btn:hover { border-color: var(--gold); color: var(--gold); }

.landing-actions {
  width: 100%; display: flex; flex-direction: column; gap: 12px;
  animation: fadeInUp 0.6s 0.3s ease both;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none;
  border-radius: var(--radius-sm);   /* sharper than HKR's 50px */
  font-family: var(--font-body);
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  padding: 13px 24px;
  position: relative; overflow: hidden;
  text-decoration: none;
  white-space: nowrap;
  -webkit-user-select: none; user-select: none;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: var(--gold);
  border: 1px solid var(--primary-light);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-light);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-gold {
  background: var(--gold);
  color: var(--primary-dark);
  border: 1px solid var(--gold-dark);
  font-weight: 700;
}
.btn-gold:hover:not(:disabled) { background: var(--gold-dark); color: #fff; }

.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.55);
  color: #fff;
}
.btn-outline-dark {
  background: transparent;
  border: 1.5px solid var(--border-dark);
  color: var(--text-primary);
}
.btn-outline-dark:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--error); color: #fff; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.72rem; }
.btn-lg { padding: 15px 28px; font-size: 0.84rem; }

.btn-loading .btn-text { opacity: 0; }
.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ============ HEADER ============ */
.app-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--primary);
  height: var(--header-h);
  display: flex; align-items: center;
  padding: 0 12px; gap: 8px;
  flex-shrink: 0;
  border-bottom: 2px solid var(--gold);
}
.header-back {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); flex-shrink: 0;
}
.header-back:hover { background: rgba(255,255,255,0.18); }
.header-title { color: #fff; flex: 1; display: flex; align-items: center; }
.header-logo { height: 36px; width: auto; object-fit: contain; filter: brightness(0) invert(1); }

.header-user-btn, .header-cart-btn {
  position: relative;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); flex-shrink: 0;
}
.header-user-btn:hover, .header-cart-btn:hover { background: rgba(255,255,255,0.2); }
.header-user-btn.logged-in { background: var(--gold); border-color: var(--gold-dark); color: var(--primary-dark); }

.cart-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--gold); color: var(--primary-dark);
  font-size: 0.6rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; opacity: 0; transform: scale(0);
  transition: var(--transition);
}
.cart-badge.show { opacity: 1; transform: scale(1); }

/* ============ QUICK ORDER SECTION ============ */
.quick-order-section {
  background: var(--primary-dark);
  border-bottom: 2px solid var(--gold);
  padding: 10px 12px 12px;
}
.qo-header {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--gold); margin-bottom: 8px;
}
.qo-search-input {
  width: 100%;
  padding: 9px 36px 9px 12px;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s;
}
.qo-search-input::placeholder { color: rgba(255,255,255,0.4); }
.qo-search-input:focus { border-color: var(--gold); background: rgba(255,255,255,0.12); }

.qo-result-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-top: 6px;
}
.qo-result-thumb {
  width: 42px; height: 42px; border-radius: 4px;
  object-fit: cover;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; overflow: hidden;
}
.qo-result-info { flex: 1; min-width: 0; }
.qo-result-name { font-size: 0.78rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qo-result-price { font-size: 0.7rem; color: var(--gold); font-weight: 600; }
.qo-result-min { font-size: 0.64rem; color: rgba(255,255,255,0.45); }

/* QO quantity control */
.qo-qty-wrap {
  display: flex; align-items: center; gap: 4px;
}
.qo-qty-input {
  width: 64px;
  padding: 5px 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}
.qo-qty-input::-webkit-outer-spin-button,
.qo-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qo-qty-btn {
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 3px;
  color: #fff;
  font-size: 1rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--transition); flex-shrink: 0;
}
.qo-qty-btn:hover { background: var(--gold); border-color: var(--gold-dark); color: var(--primary-dark); }
.qo-add-btn {
  padding: 6px 12px;
  background: var(--gold); border: none;
  border-radius: var(--radius-sm);
  color: var(--primary-dark);
  font-family: var(--font-body);
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  cursor: pointer; white-space: nowrap;
  transition: var(--transition);
}
.qo-add-btn:hover { background: var(--gold-dark); color: #fff; }
.qo-add-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============ MENU HEADER / STICKY NAV ============ */
.menu-header {
  background: var(--primary);
  padding: 10px 12px 0;
  position: sticky; top: var(--header-h); z-index: 90;
  /* offset for quick-order section height */
}
.menu-search-bar {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; cursor: pointer;
}
.menu-search-bar span { font-size: 0.78rem; color: rgba(255,255,255,0.5); }

.cat-nav {
  display: flex; gap: 6px;
  overflow-x: auto; overflow-y: hidden;
  padding-bottom: 10px;
  scrollbar-width: none; -ms-overflow-style: none;
  cursor: grab; -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap; user-select: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 0.72rem; font-weight: 500;
  color: rgba(255,255,255,0.65);
  cursor: pointer; transition: var(--transition);
  white-space: nowrap; background: transparent;
}
.cat-pill.active, .cat-pill:hover {
  background: var(--gold); border-color: var(--gold);
  color: var(--primary-dark); font-weight: 700;
}

/* ============ FILTER BUTTONS ============ */
.filter-tag-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-dark);
  background: var(--bg); color: var(--text-primary);
  font-family: var(--font-body); font-size: 0.76rem; font-weight: 500;
  cursor: pointer; transition: 0.15s; white-space: nowrap;
}
.filter-tag-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-tag-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ============ MENU CONTENT ============ */
.menu-content { padding: 12px; padding-bottom: 80px; }
.category-section { margin-bottom: 20px; }
.category-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0 8px;
}
.category-header h2 {
  font-size: 0.95rem; color: var(--text-primary);
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.category-header .count { font-size: 0.72rem; color: var(--text-muted); }
.category-toggle {
  background: none; border: none; color: var(--text-muted);
  font-size: 1rem; cursor: pointer; padding: 4px; transition: var(--transition);
}
.category-toggle.collapsed { transform: rotate(-90deg); }

/* ============ PRODUCT CARD — Wholesale style ============ */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  display: flex; align-items: stretch; gap: 0;
  position: relative; transition: var(--transition);
  cursor: pointer; overflow: hidden;
}
.product-card:hover { box-shadow: var(--shadow-sm); border-left-color: var(--gold); }
.product-card:active { transform: scale(0.99); }

.product-card-info { flex: 1; padding: 12px; min-width: 0; }

.product-code {
  font-size: 0.64rem; font-weight: 700;
  color: var(--gold-dark); text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 3px;
}
.product-name {
  font-size: 0.88rem; font-weight: 600;
  color: var(--text-primary); line-height: 1.3;
  margin-bottom: 3px;
}
.product-desc {
  font-size: 0.72rem; color: var(--text-secondary); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 8px;
}
.product-price-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.product-price {
  font-size: 0.95rem; font-weight: 700;
  color: var(--text-primary);
}
.product-price-label {
  font-size: 0.62rem; color: var(--text-muted); font-weight: 400;
}
.product-min-qty {
  font-size: 0.62rem; font-weight: 700;
  color: var(--primary); background: rgba(23,50,77,0.07);
  padding: 2px 7px; border-radius: 3px;
}
.product-stock-badge {
  font-size: 0.62rem; font-weight: 700;
  padding: 2px 7px; border-radius: 3px;
}
.stock-ok  { color: var(--success); background: rgba(26,107,58,0.08); }
.stock-low { color: var(--warning); background: rgba(138,74,0,0.08); }
.stock-out { color: var(--error);   background: rgba(155,26,26,0.08); }

/* Product tags */
.product-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 5px; }
.ptag {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 0.6rem; font-weight: 700;
  padding: 2px 6px; border-radius: 3px; letter-spacing: 0.3px;
  text-transform: uppercase;
}
.ptag-featured { background: #fff8e1; color: #7a5800; }
.ptag-seller   { background: #fce4ec; color: #880e4f; }
.ptag-new      { background: #e8f5e9; color: #1a6b3a; }
.ptag-offer    { background: #e3f2fd; color: #0d47a1; }
.ptag-cotton   { background: #f3e5f5; color: #4a148c; }
.ptag-sports   { background: #e0f2f1; color: #00695c; }

.product-card-img {
  width: 100px; height: 100px; object-fit: cover; flex-shrink: 0;
  background: var(--bg); display: block;
}
.product-card-img-placeholder {
  width: 100px; height: 100px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--bg), var(--border));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
.add-btn-wrap { position: absolute; bottom: 10px; right: 10px; }
.add-btn {
  background: var(--primary); border: none;
  color: var(--gold); font-size: 0.72rem; font-weight: 700;
  padding: 5px 14px; border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition); letter-spacing: 0.5px;
  text-transform: uppercase;
}
.add-btn:hover { background: var(--primary-light); color: #fff; }

/* ============ QTY CONTROLS (cart/product) ============ */
.qty-control {
  display: flex; align-items: center; gap: 0;
  background: var(--primary); border-radius: var(--radius-sm); overflow: hidden;
}
.qty-btn {
  width: 28px; height: 28px; background: none; border: none;
  color: #fff; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-weight: 600;
  transition: var(--transition);
}
.qty-btn:hover { background: rgba(255,255,255,0.15); }
.qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.qty-num {
  font-size: 0.8rem; font-weight: 700; color: #fff;
  min-width: 32px; text-align: center;
}
/* Inline qty input in sheet */
.qty-input-inline {
  width: 72px; padding: 5px 6px;
  border: 1.5px solid var(--border-dark); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.84rem; font-weight: 700;
  text-align: center; color: var(--text-primary); background: var(--bg);
  outline: none;
  -moz-appearance: textfield;
}
.qty-input-inline::-webkit-outer-spin-button,
.qty-input-inline::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input-inline:focus { border-color: var(--primary); background: #fff; }
.qty-control-inline { border-radius: var(--radius-sm); }
.qty-control-inline .qty-btn { width: 26px; height: 26px; }
.qty-control-inline .qty-num { min-width: 22px; font-size: 0.78rem; }

/* ============ CART BAR ============ */
.cart-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--max-w);
  padding: 10px 12px; background: var(--bg);
  border-top: 1px solid var(--border); z-index: 200; display: none;
}
.cart-bar.show { display: block; }
.cart-bar-inner {
  background: var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; transition: var(--transition);
  border-left: 4px solid var(--gold);
}
.cart-bar-inner:hover { background: var(--primary-light); }
.cart-bar-info { display: flex; flex-direction: column; }
.cart-bar-count { font-size: 0.72rem; color: rgba(255,255,255,0.6); }
.cart-bar-total { font-size: 0.95rem; font-weight: 700; color: #fff; }
.cart-bar-cta {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 700; color: var(--gold);
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* ============ CART SCREEN ============ */
.cart-content { padding: 12px; padding-bottom: 120px; flex: 1; }
.cart-from-label { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 12px; }

.cart-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 12px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.cart-item-img {
  width: 56px; height: 56px; border-radius: var(--radius-sm);
  object-fit: cover; background: var(--bg); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 0.82rem; font-weight: 600; margin-bottom: 2px; }
.cart-item-sub  { font-size: 0.7rem; color: var(--text-muted); }
.cart-item-price { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); }
.cart-item-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* Bill Summary */
.bill-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px; margin-bottom: 12px;
}
.bill-card h3 {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 12px;
}
.bill-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 0.8rem;
}
.bill-row:last-child { margin-bottom: 0; }
.bill-row.total {
  border-top: 1px solid var(--border); padding-top: 10px; margin-top: 8px;
  font-weight: 700; font-size: 0.88rem;
}
.bill-row .label { color: var(--text-secondary); }
.bill-row .value { color: var(--text-primary); font-weight: 500; }
.bill-row.discount .value { color: var(--success); }
.bill-row.total .value { color: var(--primary); font-size: 1rem; }

/* Coupon row */
.coupon-input-row {
  display: flex; gap: 6px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 10px 12px; margin-bottom: 12px; align-items: center;
}
.coupon-input-row input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-family: var(--font-body); font-size: 0.82rem; color: var(--text-primary);
}
.coupon-apply-btn {
  flex-shrink: 0; padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--primary);
  background: var(--primary); color: var(--gold);
  font-family: var(--font-body); font-size: 0.74rem; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: 0.15s;
}
.coupon-applied-row {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(26,107,58,0.08); border: 1.5px solid rgba(26,107,58,0.2);
  border-radius: var(--radius-md); padding: 10px 12px; margin-bottom: 12px; gap: 8px;
}
.coupon-applied-tag { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600; color: var(--success); }
.coupon-remove {
  background: none; border: 1px solid rgba(26,107,58,0.3); border-radius: var(--radius-sm);
  color: var(--success); font-size: 0.68rem; font-weight: 600;
  padding: 3px 8px; cursor: pointer;
}

/* ============ CHECKOUT ============ */
.checkout-content { padding: 12px; padding-bottom: 100px; flex: 1; }
.section-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px; margin-bottom: 12px;
}
.section-card-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.7px; color: var(--text-muted); margin-bottom: 12px;
}

.form-group { margin-bottom: 12px; }
.form-label {
  display: block; font-size: 0.72rem; font-weight: 600;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.3px;
  margin-bottom: 5px;
}
.form-label .required { color: var(--error); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--border-dark); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.82rem; color: var(--text-primary);
  background: var(--bg); outline: none; transition: border-color 0.18s;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary); background: #fff;
}
.form-input.error { border-color: var(--error); }
.form-textarea { resize: none; min-height: 70px; }
.input-with-prefix { display: flex; gap: 8px; align-items: center; }
.input-prefix {
  flex-shrink: 0; padding: 10px 10px;
  border: 1.5px solid var(--border-dark); border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 600; background: var(--bg); color: var(--text-primary);
  white-space: nowrap;
}

/* ============ CHECKOUT FOOTER ============ */
.checkout-footer {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--max-w);
  background: var(--bg-card); border-top: 1px solid var(--border);
  padding: 10px 12px 16px; z-index: 200;
}
.checkout-total-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 0.8rem;
}
.checkout-total-row .total { font-size: 1.1rem; font-weight: 700; color: var(--primary); }

/* ============ SUCCESS SCREEN ============ */
.success-screen-bg { background: var(--bg); align-items: center; justify-content: center; }

/* ============ BOTTOM SHEETS ============ */
.bottom-sheet-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.52); z-index: 300;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.bottom-sheet-overlay.show { opacity: 1; pointer-events: all; }
.bottom-sheet {
  position: fixed; bottom: 0; left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%; max-width: var(--max-w);
  background: var(--bg-card);
  border-radius: 16px 16px 0 0;
  z-index: 301;
  transition: transform 0.32s cubic-bezier(0.32,0.72,0,1);
  max-height: 90vh; overflow-y: auto;
  border-top: 3px solid var(--primary);
}
.bottom-sheet.show { transform: translateX(-50%) translateY(0); }
.sheet-drag-handle {
  width: 40px; height: 4px; background: var(--border-dark);
  border-radius: 2px; margin: 10px auto 6px; cursor: grab;
}
.sheet-footer {
  position: sticky; bottom: 0; background: var(--bg-card);
  padding: 12px 16px 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}

/* Qty in sheet — wholesale style with text input */
.sheet-qty-control {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg); border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm); padding: 4px 6px;
}

/* ============ USER SHEET ============ */
.user-bottom-sheet { max-height: 90vh; }
.offers-bottom-sheet { max-height: 85vh; }
.offers-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 10px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: #fff; z-index: 2;
}
.offers-sheet-title { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); }
.offers-close-btn {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-dark); background: var(--bg);
  color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.offers-sheet-content { padding: 10px 12px 32px; overflow-y: auto; }
.user-sheet-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px 10px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: #fff; z-index: 2;
}
.user-sheet-title {
  flex: 1; display: flex; align-items: center; gap: 7px;
  font-size: 0.88rem; font-weight: 700; color: var(--text-primary); overflow: hidden;
}
.profile-avatar-lg {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--primary); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; flex-shrink: 0;
}
.profile-menu-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  cursor: pointer; border-bottom: 1px solid var(--border); transition: background 0.15s;
  font-size: 0.82rem; font-weight: 500; color: var(--text-primary);
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:hover { background: var(--bg); }
.profile-menu-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: rgba(23,50,77,0.06); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.profile-menu-item.profile-menu-danger { color: var(--error); }
.user-avatar-initials { font-size: 0.74rem; font-weight: 700; color: var(--gold); line-height: 1; }
.otp-box {
  width: 42px; height: 48px; border: 2px solid var(--border-dark);
  border-radius: var(--radius-sm); text-align: center; font-size: 1.1rem;
  font-weight: 700; font-family: var(--font-body); background: var(--bg);
  outline: none; transition: border-color 0.2s;
}
.otp-box:focus { border-color: var(--primary); background: #fff; }

/* ============ SKELETON ============ */
.skeleton {
  background: linear-gradient(90deg, var(--bg) 25%, var(--border) 50%, var(--bg) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-card {
  background: var(--bg-card); border-radius: var(--radius-md);
  margin-bottom: 10px; padding: 12px; display: flex; gap: 10px;
  border: 1px solid var(--border);
}
.skeleton-img { width: 80px; height: 80px; border-radius: var(--radius-sm); flex-shrink: 0; }
.skeleton-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line { height: 12px; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }

/* ============ EMPTY STATE ============ */
.empty-state { text-align: center; padding: 60px 24px; color: var(--text-muted); }
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 0.82rem; }

/* ============ TOAST ============ */
.toast-container {
  position: fixed; top: calc(var(--header-h) + 8px); left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px); max-width: calc(var(--max-w) - 24px);
  z-index: 1000; display: flex; flex-direction: column; gap: 6px;
  pointer-events: none;
}
.toast {
  background: var(--text-primary); color: #fff; padding: 10px 14px;
  border-radius: var(--radius-sm); font-size: 0.78rem;
  display: flex; align-items: center; gap: 8px;
  animation: slideDown 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  pointer-events: none; box-shadow: var(--shadow-lg);
  border-left: 3px solid var(--gold);
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--error); }
.toast.warning { background: var(--warning); }

/* ============ STATUS BADGES ============ */
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 3px;
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px;
}
.status-placed    { background: #e3f2fd; color: #1565c0; }
.status-accepted  { background: #f3e5f5; color: #6a1b9a; }
.status-dispatched { background: #e8f5e9; color: #1a6b3a; }
.status-delivered { background: #e8f5e9; color: #1a6b3a; }
.status-cancelled { background: #ffebee; color: #9b1a1a; }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 400;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card); border-radius: var(--radius-lg);
  width: 100%; max-width: 450px; padding: 20px;
  transform: scale(0.95); transition: transform 0.2s;
  border-top: 3px solid var(--primary);
}
.modal-overlay.show .modal { transform: scale(1); }
.modal h3 { font-size: 0.95rem; margin-bottom: 8px; }
.modal p  { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; }

/* ============ SUCCESS SCREEN CSS ============ */
.success-check-wrap {
  position: relative; width: 80px; height: 80px; margin-bottom: 20px;
}
.success-check-svg { width: 80px; height: 80px; }
.success-circle {
  stroke-dasharray: 226; stroke-dashoffset: 226;
  animation: drawCircle 0.6s ease-out 0.1s forwards;
  transform-origin: center; transform: rotate(-90deg);
}
.success-tick {
  stroke-dasharray: 50; stroke-dashoffset: 50;
  animation: drawTick 0.4s ease-out 0.7s forwards;
}
.success-breakdown-card {
  width: 100%; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px;
  margin: 4px 0 14px; text-align: left; box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--primary);
}
.success-heading {
  font-family: var(--font-display); font-size: 1.5rem;
  color: var(--primary); margin: 0 0 6px; letter-spacing: 0.5px;
}

/* ============ IMAGE LOADING ============ */
.prod-img-sk-wrap {
  width: 100px; height: 100px; position: relative; flex-shrink: 0; overflow: hidden;
}
.prod-img-skeleton {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg) 25%, var(--border) 50%, var(--bg) 75%);
  background-size: 200% 100%;
  animation: pg-shimmer 1.4s infinite linear;
}
.product-card-img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .3s; }
.product-card-img.pci-loaded { opacity: 1; }

/* ============ ADMIN NAV ============ */
.admin-nav { background: var(--primary); padding: 0 12px; display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--gold); }
.admin-nav-item {
  padding: 12px 14px; font-size: 0.74rem; font-weight: 600;
  color: rgba(255,255,255,0.55); cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap;
  text-decoration: none; text-transform: uppercase; letter-spacing: 0.3px;
  transition: var(--transition); margin-bottom: -2px;
}
.admin-nav-item.active { color: var(--gold); border-bottom-color: var(--gold); }
.admin-nav-item:hover { color: #fff; }
.admin-content { padding: 12px; flex: 1; }
.admin-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); margin-bottom: 10px; overflow: hidden;
}
.admin-card-header {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.admin-card-header h3 { font-size: 0.84rem; font-weight: 700; }
.admin-card-body { padding: 14px; }
.admin-shell { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); box-shadow: 0 0 40px rgba(0,0,0,.12); }

table { width: 100%; border-collapse: collapse; font-size: .78rem; }
th { background: var(--bg); padding: 8px 10px; text-align: left; font-weight: 700; font-size: .68rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); border-bottom: 1.5px solid var(--border); }
td { padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--text-primary); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }

/* ============ ADMIN LOGIN ============ */
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--primary); }
.admin-login-card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 32px 24px; width: 100%; max-width: 360px; border-top: 4px solid var(--gold); }
.admin-login-card .brand { text-align: center; margin-bottom: 24px; }
.admin-login-card .brand-name { font-family: var(--font-display); font-size: 1.6rem; color: var(--primary); font-weight: 800; letter-spacing: 1px; }
.admin-login-card .brand-sub { font-size: 0.68rem; letter-spacing: 3px; color: var(--text-muted); text-transform: uppercase; margin-top: 4px; }

/* Toggle switch */
.toggle-switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider { position: absolute; inset: 0; border-radius: 24px; background: var(--border-dark); cursor: pointer; transition: .25s; }
.toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; left: 3px; top: 3px; transition: .25s; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; background: var(--bg); border: 1.5px solid var(--border-dark); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; margin-bottom: 8px; }

/* ============ ANIMATIONS ============ */
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pulse { 0%,100% { opacity:.5; } 50% { opacity:.9; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawTick { to { stroke-dashoffset: 0; } }
@keyframes pg-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes confettiBurst { 0% { transform: translate(-50%,-50%) scale(0); opacity:1; } 60% { opacity:1; } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1); opacity:0; } }

/* ============ RESPONSIVE ============ */
@media (min-width: 768px) {
  body { background: #0d1b2a; }
  .app-shell { border-radius: 0; box-shadow: 0 0 80px rgba(0,0,0,0.5); min-height: 100vh; }
  @media print {
    .cart-bar, .app-header, .checkout-footer { display: none !important; }
  }
}
@media (max-width: 320px) {
  html { font-size: 13px; }
}