:root {
  --primary: #2e7d32;
  --primary-dark: #1b5e20;
  --primary-light: #e8f5e9;
  --accent: #ff8f00;
  --bg: #f6f8f6;
  --card: #ffffff;
  --text: #1c1f1e;
  --muted: #757575;
  --danger: #d32f2f;
  --success: #2e7d32;
  --border: #e5e8e5;
  --nav-height: 60px;
  --header-height: 56px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(20, 30, 20, 0.07);
  --shadow-md: 0 4px 14px rgba(20, 30, 20, 0.09);
  --shadow-lg: 0 10px 34px rgba(20, 30, 20, 0.14);
  --transition: 160ms ease;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: calc(var(--nav-height) + 10px);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

/* ---- Top header ---- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.app-header .brand { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.app-header .header-icons { display: flex; gap: 16px; align-items: center; }
.app-header a { color: #fff; text-decoration: none; }
.cart-badge {
  position: relative;
}
.cart-badge .count {
  position: absolute; top: -8px; right: -10px;
  background: var(--accent); color: #fff; font-size: 10px;
  border-radius: 50%; width: 17px; height: 17px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

/* ---- Bottom nav (native app style) ---- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 480px;
  margin: 0 auto;
  height: var(--nav-height);
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
  gap: 2px;
  padding-top: 6px;
}
.bottom-nav a.active { color: var(--primary); }
.bottom-nav svg { width: 22px; height: 22px; }

/* ---- Content ---- */
.content { padding: 14px; }

.page-title { font-size: 18px; font-weight: 700; margin: 6px 0 14px; }

/* ---- Search bar ---- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 14px);
  padding: 4px 6px 4px 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.04));
  transition: var(--transition, 0.15s ease);
}
.search-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light, rgba(0,0,0,0.06)); }
.search-icon { font-size: 15px; opacity: 0.6; flex-shrink: 0; }
.search-bar input[type="search"] {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  padding: 9px 2px;
  color: var(--text);
  min-width: 0;
}
.search-bar input[type="search"]::-webkit-search-cancel-button { display: none; }
.search-clear {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f1f1f1;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
}
.search-submit {
  flex-shrink: 0;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 9px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition, 0.15s ease);
}
.search-submit:hover { filter: brightness(1.06); }

/* ---- Category chips ---- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 6px; -webkit-overflow-scrolling: touch; }
.chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip:hover { border-color: var(--primary); }
.chip.active:hover { border-color: var(--primary); }

/* ---- Product grid ---- */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.product-card {
  background: var(--card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.product-card:hover, .product-card:focus-within { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card-media { display: block; text-decoration: none; position: relative; }
.product-card .category-tag {
  position: absolute; top: 8px; left: 8px;
  background: rgba(255,255,255,0.92); color: var(--primary-dark);
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px;
  letter-spacing: 0.2px;
}
/* .img-wrap is a fixed, square, clipped frame — ANY image placed inside it
   (product photo, or the site icon used as a placeholder) is always
   constrained to this frame, so it can never render "too big" regardless of
   the uploaded file's original resolution. */
.img-wrap { width: 100%; aspect-ratio: 1/1; background: #eef1ee; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.product-detail-img { border-radius: var(--radius-lg); margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.category-tag.static {
  display: inline-block; position: static; background: var(--primary-light); color: var(--primary-dark);
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px;
}
.product-detail-card { padding-top: 14px; }
.img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--transition); }
.product-card:hover .img-wrap img { transform: scale(1.04); }
.img-wrap .placeholder-icon { width: 45%; height: 45%; object-fit: contain; opacity: 0.5; }
.product-card .placeholder { font-size: 30px; color: #bbb; }
.product-card .info { padding: 10px 11px 11px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.product-card .name-link { text-decoration: none; color: inherit; }
.product-card .name {
  font-size: 13.5px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.product-card .unit { font-size: 11px; color: var(--muted); }
.product-card .card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.product-card .price { font-size: 15px; font-weight: 800; color: var(--primary-dark); }
.quick-add-form { margin: 0; }
.quick-add-btn {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: var(--primary); color: #fff; font-size: 18px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); transition: background var(--transition), transform var(--transition);
}
.quick-add-btn:hover { background: var(--primary-dark); transform: scale(1.08); }
.quick-add-btn:active { transform: scale(0.95); }
.out-of-stock-tag {
  position: absolute; inset: 0; background: rgba(255,255,255,0.72);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--danger);
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: scale(0.985); }
.btn.secondary { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); box-shadow: none; }
.btn.secondary:hover { background: var(--primary-light); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #a72521; }
.btn.small { width: auto; padding: 8px 15px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }

/* ---- Forms ---- */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; margin-bottom: 5px; font-weight: 600; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 14.5px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: #a8aca8; }
.error-box { background: #fdecea; color: var(--danger); padding: 11px 13px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 14px; border: 1px solid #f6c6c2; }
.success-box { background: var(--primary-light); color: var(--success); padding: 11px 13px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 14px; border: 1px solid #c3e6c5; }

/* ---- Auth screens ---- */
.auth-wrap { padding: 40px 22px; }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo .emoji { font-size: 46px; }
.auth-logo h1 { font-size: 20px; margin: 6px 0 2px; color: var(--primary-dark); }
.auth-logo p { font-size: 12.5px; color: var(--muted); margin: 0; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.auth-switch a { color: var(--primary); font-weight: 600; text-decoration: none; }

/* ---- Cart ---- */
.cart-item { display: flex; gap: 10px; background: #fff; border-radius: 10px; padding: 10px; margin-bottom: 10px; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.cart-item .thumb { width: 56px; height: 56px; border-radius: 8px; background: #eee; overflow: hidden; flex-shrink: 0; display: flex; align-items:center; justify-content:center; }
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .meta { flex: 1; min-width: 0; }
.cart-item .meta .name { font-size: 13.5px; font-weight: 600; }
.cart-item .meta .price { font-size: 12.5px; color: var(--muted); }
.qty-control { display: flex; align-items: center; gap: 10px; }
.qty-control button {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border);
  background: #fff; font-size: 16px; line-height: 1; cursor: pointer; color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center; transition: background var(--transition), border-color var(--transition);
}
.qty-control button:hover { background: var(--primary-light); border-color: var(--primary); }
.qty-control span { min-width: 18px; text-align: center; font-weight: 700; }

/* Larger stepper used on the product detail "Add to Cart" form */
.qty-stepper-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.qty-control-lg { gap: 0; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-control-lg button {
  width: 42px; height: 42px; border-radius: 0; border: none; background: var(--primary-light);
  font-size: 20px; color: var(--primary-dark); font-weight: 700;
}
.qty-control-lg button:hover { background: var(--primary); color: #fff; }
.qty-control-lg input[type="number"] {
  width: 52px; height: 42px; text-align: center; border: none; border-left: 1px solid var(--border);
  border-right: 1px solid var(--border); font-size: 16px; font-weight: 700; padding: 0;
  -moz-appearance: textfield;
}
.qty-control-lg input[type="number"]::-webkit-outer-spin-button,
.qty-control-lg input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.add-to-cart-form { padding-top: 16px; }
.cart-summary { background: #fff; border-radius: var(--radius-md); padding: 16px; margin-top: 8px; box-shadow: var(--shadow-sm); }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; }
.summary-row.total { font-weight: 700; font-size: 16px; border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 10px; }

/* ---- Cards / lists ---- */
.card { background: #fff; border-radius: var(--radius-md); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge.pending_payment { background: #fff3e0; color: #e65100; }
.badge.payment_submitted { background: #e3f2fd; color: #1565c0; }
.badge.approved { background: #e8f5e9; color: #2e7d32; }
.badge.delivered { background: #e0f2f1; color: #00695c; }
.badge.rejected, .badge.cancelled, .badge.dismissed { background: #fdecea; color: #c62828; }
.badge.pending { background: #fff3e0; color: #e65100; }
.badge.resolved { background: #e8f5e9; color: #2e7d32; }

.order-card .order-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.order-card .order-id { font-weight: 700; font-size: 14.5px; }
.order-card .order-date { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.order-card .item-line { font-size: 12.5px; color: var(--text); display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.order-card .item-line:last-of-type { border-bottom: none; }
.order-card .item-line .text-muted { display: block; margin-top: 2px; }
.order-card .order-total { font-weight: 700; margin-top: 8px; text-align: right; font-size: 15px; }

/* ---- Wallet ---- */
.wallet-hero { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-radius: var(--radius-lg); padding: 24px 20px; text-align: center; margin-bottom: 16px; box-shadow: var(--shadow-md); }
.wallet-hero .amount { font-size: 34px; font-weight: 800; margin: 6px 0; }
.wallet-hero .label { font-size: 12.5px; opacity: 0.9; }
.wallet-hero .wallet-add-btn {
  width: auto; display: inline-block; margin-top: 14px; padding: 9px 20px;
  background: rgba(255,255,255,0.16); border: 1.5px solid rgba(255,255,255,0.55);
  box-shadow: none; backdrop-filter: blur(2px);
}
.wallet-hero .wallet-add-btn:hover { background: rgba(255,255,255,0.28); }

/* ---- Profile hero ---- */
.profile-hero { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-radius: var(--radius-lg); padding: 26px 20px; text-align: center; margin-bottom: 16px; box-shadow: var(--shadow-md); }
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px;
  background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800;
}
.profile-name { font-size: 19px; font-weight: 800; }
.profile-mobile { font-size: 13px; opacity: 0.9; margin-top: 2px; }
.logout-btn { width: 100%; margin-top: 4px; margin-bottom: 4px; }
.ledger-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.ledger-row:last-child { border-bottom: none; }
.ledger-row .amt { font-weight: 700; color: var(--success); white-space: nowrap; }

/* ---- Use wallet balance at checkout ---- */
.wallet-use-card { border: 1.5px solid var(--primary-light); }
.wallet-use-row { display: flex; gap: 8px; align-items: center; }
.wallet-use-row input[type="number"] {
  flex: 1; padding: 10px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); font-size: 14.5px;
}
.wallet-use-row input[type="number"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,125,50,0.12); }
.wallet-use-row .btn.small { flex-shrink: 0; white-space: nowrap; }
.quick-amounts { margin: 8px 0 2px; }

/* ---- Payment remark ---- */
.remark-box {
  background: #fff8e1; border: 1px dashed #e0b73a; color: #7a5c00;
  border-radius: var(--radius-sm); padding: 10px 12px; margin: 10px 0; font-size: 13px; text-align: left;
}
.remark-box b { font-family: 'Courier New', monospace; letter-spacing: 0.3px; }

/* ---- Referral ---- */
.referral-code-box { background: #fff; border: 2px dashed var(--primary); border-radius: 12px; padding: 16px; text-align: center; margin-bottom: 16px; }
.referral-code-box .code { font-size: 24px; font-weight: 800; letter-spacing: 2px; color: var(--primary-dark); margin: 6px 0; }
.referral-code-box .link { font-size: 11.5px; color: var(--muted); word-break: break-all; }
.level-block { margin-bottom: 12px; }
.level-block .level-title { font-size: 13px; font-weight: 700; color: var(--primary-dark); margin-bottom: 6px; }
.level-users { display: flex; flex-direction: column; gap: 6px; }
.level-user { background: #fff; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; display: flex; justify-content: space-between; }

/* ---- QR pay ---- */
.qr-wrap { text-align: center; background: #fff; border-radius: var(--radius-lg); padding: 22px 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.qr-wrap img { width: 220px; height: 220px; margin: 10px auto; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.upi-id-display { font-size: 15px; font-weight: 700; color: var(--primary-dark); background: var(--primary-light); padding: 9px; border-radius: var(--radius-sm); margin: 8px 0; letter-spacing: 0.2px; }
.amount-display { font-size: 28px; font-weight: 800; margin: 6px 0; color: var(--primary-dark); }

/* ---- Tables (admin) ---- */
.admin-body { padding-bottom: 30px; }
table.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-sm); overflow: hidden; font-size: 13px; box-shadow: var(--shadow-sm); }
table.data-table th, table.data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
table.data-table th { background: #eef2ee; font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--muted); }
table.data-table tbody tr { transition: background var(--transition); }
table.data-table tbody tr:hover { background: #f5faf5; }
table.data-table tbody tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat-card { background: #fff; border-radius: var(--radius-md); padding: 16px 14px; text-align: center; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition); }
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card .num { font-size: 21px; font-weight: 800; color: var(--primary-dark); }
.stat-card .label { font-size: 11px; color: var(--muted); margin-top: 3px; }

.admin-menu { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.admin-menu a {
  flex: 1 1 45%; text-align: center; padding: 11px; background: #fff; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text); font-size: 13px; font-weight: 600; box-shadow: var(--shadow-sm);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.admin-menu a:hover { box-shadow: var(--shadow-md); }
.admin-menu a.active { background: var(--primary); color: #fff; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state .icon { font-size: 42px; margin-bottom: 12px; opacity: 0.7; }

a.link { color: var(--primary); }
.text-muted { color: var(--muted); font-size: 12.5px; }
.fw-bold { font-weight: 700; }
.mt-2 { margin-top: 10px; }
.mb-2 { margin-bottom: 10px; }

.brand-logo { width: 24px; height: 24px; object-fit: contain; border-radius: 5px; vertical-align: middle; }

/* =========================================================================
   RESPONSIVE: mobile stays a native-app-style experience (bottom nav bar,
   narrow single column, like an Android app). Desktop switches to a normal
   wide website layout (top navigation bar, multi-column grid, no bottom nav).
   ========================================================================= */

/* Desktop top navigation — hidden on mobile by default */
.desktop-topbar { display: none; }

@media (min-width: 900px) {
  body { padding-bottom: 0; }

  .app-container { max-width: 1180px; }

  /* Hide the mobile app-style header + bottom tab bar entirely on desktop */
  .mobile-only-header, .bottom-nav { display: none; }

  /* Show the desktop top navigation bar */
  .desktop-topbar {
    display: block;
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  }
  .desktop-topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 0 24px;
  }
  .desktop-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 19px;
    font-weight: 800;
    color: var(--primary-dark);
    text-decoration: none;
    white-space: nowrap;
  }
  .desktop-brand .brand-logo { width: 32px; height: 32px; }
  .desktop-links {
    display: flex;
    gap: 26px;
    flex: 1;
  }
  .desktop-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 600;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
  }
  .desktop-links a:hover, .desktop-links a.active { color: var(--primary-dark); border-bottom-color: var(--primary); }
  .desktop-account { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
  .desktop-account .btn.small { width: auto; }
  .desktop-username { font-size: 13.5px; color: var(--muted); text-decoration: none; }
  .desktop-username:hover { color: var(--primary-dark); text-decoration: underline; }

  /* Content gets real website breathing room */
  .content { padding: 28px 24px 50px; }
  .page-title { font-size: 24px; margin-bottom: 20px; }

  /* Wider product / grid layouts */
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .admin-menu a { flex: 1 1 auto; }

  /* Cart / checkout / auth become centered cards instead of full-bleed mobile panels */
  .cart-summary, .qr-wrap, .card { max-width: 720px; }
  .auth-wrap {
    max-width: 420px;
    margin: 50px auto;
    background: #fff;
    border-radius: 18px;
    padding: 34px;
    box-shadow: 0 6px 30px rgba(0,0,0,0.08);
  }

  /* Two-column shop layout: chips/filters beside product grid content stays simple,
     but give the grid area more visual room */
  .product-card .name { font-size: 14.5px; }
}

@media (min-width: 1200px) {
  .product-grid { grid-template-columns: repeat(5, 1fr); }
}
