/* ===== Vyapar Vaani Marketplace — Professional E-commerce UI ===== */
:root {
  --primary: #FF9900;
  --primary-dark: #E88B00;
  --primary-light: #FFF3E0;
  --accent: #232F3E;
  --accent-light: #37475A;
  --bg: #EAEDED;
  --bg-white: #FFFFFF;
  --text: #0F1111;
  --text-secondary: #565959;
  --text-muted: #888C8C;
  --border: #D5D9D9;
  --border-light: #E7E7E7;
  --success: #067D62;
  --success-bg: #E7F8F2;
  --warning: #C7511F;
  --warning-bg: #FFF5EE;
  --danger: #CC0C39;
  --danger-bg: #FFECEF;
  --info: #007185;
  --info-bg: #E3F5F7;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-xl: 0 8px 32px rgba(0,0,0,0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --header-h: 64px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 44px;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* ===== LOGIN SCREEN ===== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #232F3E 0%, #37475A 50%, #485769 100%);
  position: relative;
  overflow: hidden;
}
.login-screen::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -30%;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,153,0,0.12) 0%, transparent 70%);
}
.login-card {
  background: var(--bg-white);
  padding: 48px 40px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}
.login-card .brand { text-align: center; margin-bottom: 32px; }
.login-card .brand-logo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin-bottom: 12px; border: 3px solid var(--accent); }
.login-card .brand h1 { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.login-card .brand p { font-size: 0.9rem; color: var(--text-secondary); margin-top: 4px; }
.login-card .form-group { margin-bottom: 16px; }
.login-card .form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.login-card .form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.login-card .form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,153,0,0.15);
}
.login-note {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 6px;
  padding: 7px 10px;
  background: rgba(255,153,0,0.07);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.5;
}
.btn-login {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: var(--bg-white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 8px;
}
.btn-login:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ===== TOP HEADER ===== */
.top-header {
  height: var(--header-h);
  background: var(--accent);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.top-header .logo { display: flex; align-items: center; gap: 10px; }
.top-header .logo-img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.3); flex-shrink: 0; }
.top-header .logo-text { font-size: 1.2rem; font-weight: 800; color: var(--bg-white); letter-spacing: -0.3px; }
.top-header .logo-text span { color: var(--primary); }

.top-header .search-bar {
  flex: 1;
  max-width: 560px;
  margin: 0 24px;
  display: flex;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.top-header .search-bar input {
  flex: 1;
  padding: 10px 14px;
  border: none;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}
.top-header .search-bar select {
  padding: 0 12px;
  border: none;
  border-left: 1px solid var(--border);
  font-size: 0.82rem;
  font-family: inherit;
  background: #F3F3F3;
  color: var(--text-secondary);
  cursor: pointer;
  outline: none;
}
.top-header .header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.header-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--bg-white);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.header-btn:hover { border-color: var(--bg-white); background: rgba(255,255,255,0.08); }
.header-btn .btn-label { font-size: 0.72rem; color: #CCC; line-height: 1; }
.header-btn .btn-value { font-size: 0.88rem; font-weight: 700; line-height: 1; }
.header-btn.cart-btn { position: relative; }
.header-btn.cart-btn .cart-icon { font-size: 1.5rem; }
.cart-count {
  position: absolute;
  top: 0;
  right: 2px;
  background: var(--primary);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-btn.orders-btn { color: var(--primary); font-weight: 700; }

/* ===== SUB HEADER ===== */
.sub-header {
  background: var(--accent-light);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
}
.sub-header a {
  color: var(--bg-white);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0.85;
  transition: opacity 0.2s;
  cursor: pointer;
}
.sub-header a:hover { opacity: 1; }

/* ===== MAIN LAYOUT ===== */
.main-layout {
  display: flex;
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px 16px;
  gap: 20px;
  min-height: calc(100vh - var(--header-h) - 40px);
}
.products-area { flex: 1; min-width: 0; }

.orders-panel {
  width: 360px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-h) + 20px);
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

/* ===== PRODUCT GRID ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.15s;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.product-card .card-img {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #F7F7F7;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.product-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.product-card:hover .card-img img { transform: scale(1.04); }
.card-img .placeholder { font-size: 3.5rem; opacity: 0.4; }
.card-img .badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 4px; }

.badge-sm { font-size: 0.68rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; display: inline-block; }
.badge-quality { background: #FFF8E1; color: #F57F17; }
.badge-upi { background: #E8F5E9; color: #2E7D32; }
.badge-ondc { background: #E3F2FD; color: #1565C0; }
.badge-cod { background: #FFF3E0; color: #E65100; }
.badge-stock { background: var(--danger-bg); color: var(--danger); }

.product-card .card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-body .p-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.card-body .p-seller { font-size: 0.76rem; color: var(--text-muted); margin-bottom: 8px; }
.card-body .p-price { font-size: 1.15rem; font-weight: 800; color: var(--text); margin-bottom: 2px; }
.card-body .p-price .unit { font-size: 0.78rem; font-weight: 400; color: var(--text-secondary); }
.card-body .p-stock { font-size: 0.76rem; color: var(--success); margin-bottom: 10px; }
.card-body .p-stock.low { color: var(--warning); }
.card-body .p-stock.out { color: var(--danger); }
.card-body .p-desc { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-body .card-actions { margin-top: auto; display: flex; gap: 8px; }

.btn-add-cart {
  flex: 1;
  padding: 9px 0;
  background: var(--primary);
  color: var(--bg-white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-add-cart:hover { background: var(--primary-dark); }

.btn-buy-now {
  padding: 9px 14px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-buy-now:hover { background: #FFE8CC; }
.btn-disabled { background: var(--border) !important; color: var(--text-muted) !important; border-color: var(--border) !important; cursor: not-allowed !important; }

/* ===== ORDERS PANEL ===== */
.orders-panel-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-white);
  z-index: 2;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.orders-panel-header h3 { font-size: 0.95rem; font-weight: 700; }
.orders-panel-header .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(6,125,98,0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(6,125,98,0); }
}
.orders-panel-body { padding: 0; flex: 1; overflow-y: auto; }
.orders-empty { padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }
.orders-empty .empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.4; }

.order-card {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}
.order-card:hover { background: #FAFAFA; }
.order-card:last-child { border-bottom: none; }
.order-card .oc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.order-card .oc-id { font-size: 0.78rem; font-weight: 700; color: var(--info); }
.order-card .oc-time { font-size: 0.72rem; color: var(--text-muted); }
.order-card .oc-items { font-size: 0.8rem; color: var(--text); margin-bottom: 6px; }
.order-card .oc-amount { font-size: 0.82rem; font-weight: 700; margin-bottom: 8px; }
.order-card .oc-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.status-pending { background: #FFF3E0; color: #E65100; }
.status-confirmed { background: var(--success-bg); color: var(--success); }
.status-cancelled { background: var(--danger-bg); color: var(--danger); }
.status-shipped { background: var(--info-bg); color: var(--info); }
.status-delivered { background: var(--success-bg); color: var(--success); }
.status-paid { background: #E8F5E9; color: #1B5E20; }

/* ===== CART SIDEBAR ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -460px;
  width: 440px;
  max-width: 100vw;
  height: 100vh;
  background: var(--bg-white);
  z-index: 700;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-sidebar.open { right: 0; }
.cart-sidebar .cart-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-sidebar .cart-header h2 { font-size: 1.1rem; font-weight: 700; }

.close-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--bg);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.close-btn:hover { background: var(--border); }

.cart-sidebar .cart-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-sidebar .cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  background: #FAFAFA;
}
.cart-sidebar .cart-footer .total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.cart-item-row:last-child { border-bottom: none; }
.cart-item-row .ci-info { flex: 1; }
.cart-item-row .ci-name { font-size: 0.85rem; font-weight: 600; }
.cart-item-row .ci-meta { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }
.cart-item-row .ci-price { font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.cart-item-row .ci-qty { display: flex; align-items: center; gap: 6px; margin: 0 10px; }
.qty-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-white);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: var(--bg); }
.qty-val { font-size: 0.85rem; font-weight: 600; min-width: 20px; text-align: center; }
.ci-remove { background: none; border: none; color: var(--danger); font-size: 0.75rem; cursor: pointer; padding: 4px; }
.ci-remove:hover { text-decoration: underline; }

.empty-cart-msg { text-align: center; padding: 40px 0; color: var(--text-muted); }
.empty-cart-msg .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-box {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 90%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  transform: translateY(20px);
  transition: transform 0.25s;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-box .modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-white);
  z-index: 1;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-box .modal-header h2 { font-size: 1.1rem; font-weight: 700; }
.modal-body { padding: 20px 24px; }

/* ===== CHECKOUT ===== */
.checkout-section { margin-bottom: 20px; }
.checkout-section h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-row { display: flex; gap: 12px; }
.form-group { flex: 1; margin-bottom: 12px; }
.form-group label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus { outline: none; border-color: var(--primary); }

.payment-options { display: flex; flex-direction: column; gap: 8px; }
.payment-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.payment-opt:hover { border-color: var(--primary); background: var(--primary-light); }
.payment-opt.selected { border-color: var(--primary); background: var(--primary-light); }
.payment-opt input[type="radio"] { accent-color: var(--primary); }
.payment-opt .po-icon { font-size: 1.4rem; }
.payment-opt .po-label strong { font-size: 0.85rem; display: block; }
.payment-opt .po-label small { font-size: 0.73rem; color: var(--text-muted); }

.order-summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.84rem; }
.order-summary-row.total {
  font-weight: 700;
  font-size: 0.95rem;
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
  margin-top: 4px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: var(--bg-white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }

.btn-secondary {
  padding: 10px 18px;
  background: var(--bg-white);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-secondary:hover { background: var(--bg); }

.btn-text {
  background: none;
  border: none;
  color: var(--info);
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

/* ===== UPI PAYMENT ===== */
.upi-screen { text-align: center; padding: 8px 0; }
.upi-screen h3 { font-size: 1.1rem; margin-bottom: 6px; }
.upi-screen .upi-amount { font-size: 2rem; font-weight: 800; color: var(--primary-dark); margin: 8px 0 4px; }
.upi-screen .upi-to { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 16px; }
.upi-qr-container {
  background: #F9F9F9;
  padding: 16px;
  border-radius: var(--radius-md);
  display: inline-block;
  margin-bottom: 12px;
}
.upi-qr-container img { border-radius: 8px; }
.upi-id-text { font-size: 0.82rem; color: var(--text-secondary); margin-top: 8px; font-family: monospace; }
.btn-upi-deep {
  display: inline-block;
  padding: 12px 28px;
  margin: 12px 0 16px;
  background: var(--success);
  color: var(--bg-white);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  font-family: inherit;
}
.upi-divider { display: flex; align-items: center; margin: 16px 0; }
.upi-divider::before,
.upi-divider::after { content: ''; flex: 1; border-top: 1px solid var(--border-light); }
.upi-divider span { padding: 0 12px; font-size: 0.78rem; color: var(--text-muted); }

.verify-btns { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; }
.verify-form { margin-top: 12px; }
.verify-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
  margin-bottom: 10px;
}
.file-upload-label {
  display: inline-block;
  padding: 10px 18px;
  background: var(--bg);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
}
.file-upload-label input[type="file"] { display: none; }
.screenshot-preview { max-width: 200px; margin: 10px auto; border-radius: 8px; display: block; }
.verify-hint { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 10px; text-align: center; }

/* verification result states */
.verify-analyzing {
  display: flex; align-items: center; gap: 10px;
  padding: 14px; background: var(--primary-light);
  border-radius: var(--radius-sm); font-size: 0.85rem;
  color: var(--primary-dark); margin-top: 12px;
}
.spinner {
  width: 16px; height: 16px; border: 2px solid var(--primary-dark);
  border-top-color: transparent; border-radius: 50%;
  animation: spin 0.8s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.verify-failed {
  margin-top: 14px; padding: 14px 12px;
  background: #fff5f5; border: 1.5px solid #fca5a5;
  border-radius: var(--radius-sm); text-align: center;
}
.verify-failed-icon { font-size: 2rem; margin-bottom: 6px; }
.verify-failed-msg {
  font-size: 0.85rem; color: #b91c1c;
  font-weight: 600; margin-bottom: 10px; line-height: 1.4;
}
.verify-details-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.78rem; margin: 8px 0 12px; text-align: left;
}
.verify-details-table td {
  padding: 4px 6px; border-bottom: 1px solid #fecaca;
  color: var(--text-secondary);
}
.verify-details-table td:first-child { color: var(--text-muted); width: 40%; }
.verify-details-table td strong { color: #1a1a1a; }
.verify-retry-btns {
  display: flex; flex-direction: column; gap: 8px;
  align-items: center; margin-top: 10px;
}

/* ===== ORDER CONFIRMATION ===== */
.order-confirm { text-align: center; padding: 16px 0; }
.order-confirm .success-icon { font-size: 3rem; margin-bottom: 8px; }
.order-confirm h2 { font-size: 1.2rem; margin-bottom: 6px; }
.order-confirm .oc-id { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 16px; }

.order-steps { display: flex; justify-content: center; gap: 0; margin: 20px 0; }
.order-step { display: flex; flex-direction: column; align-items: center; width: 80px; position: relative; }
.order-step .step-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 4px;
  border: 2px solid var(--border);
}
.order-step.active .step-icon { background: var(--success-bg); border-color: var(--success); }
.order-step .step-label { font-size: 0.68rem; color: var(--text-muted); text-align: center; }
.order-step.active .step-label { color: var(--success); font-weight: 600; }
.order-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 58px;
  width: calc(100% - 36px);
  height: 2px;
  background: var(--border);
}
.order-step.active:not(:last-child)::after { background: var(--success); }

.order-note { font-size: 0.82rem; color: var(--text-secondary); margin: 12px 0 16px; }

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 360px;
}
.toast.show { transform: translateX(0); }
.toast-success { background: var(--success); color: var(--bg-white); }
.toast-error { background: var(--danger); color: var(--bg-white); }
.toast-info { background: var(--accent); color: var(--bg-white); }

/* ===== SKELETON LOADER ===== */
.skeleton {
  background: linear-gradient(90deg, #F0F0F0 25%, #E0E0E0 50%, #F0F0F0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card { height: 340px; border-radius: var(--radius-md); }
.loading-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }

.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 0.9rem; color: var(--text-secondary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .orders-panel { width: 300px; }
}
@media (max-width: 900px) {
  .orders-panel { display: none; }
  .main-layout { padding: 12px; }
  .top-header .search-bar { max-width: 300px; margin: 0 12px; }
}
@media (max-width: 640px) {
  .top-header { padding: 0 10px; height: 56px; }
  .top-header .search-bar { display: none; }
  .top-header .logo-text { font-size: 1rem; }
  .top-header .logo-img { width: 32px; height: 32px; }
  .header-btn .btn-label { display: none; }
  .header-btn { padding: 6px 8px; font-size: 0.78rem; }
  .header-btn.cart-btn .cart-icon { font-size: 1.3rem; }
  .cart-count { font-size: 0.65rem; min-width: 16px; height: 16px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-card .card-img { aspect-ratio: 4/3; }
  .card-body { padding: 8px 10px 10px; }
  .card-body .p-name { font-size: 0.82rem; -webkit-line-clamp: 1; }
  .card-body .p-seller { font-size: 0.7rem; margin-bottom: 4px; }
  .card-body .p-desc { display: none; }
  .card-body .p-price { font-size: 0.95rem; margin-bottom: 1px; }
  .card-body .p-stock { font-size: 0.7rem; margin-bottom: 6px; }
  .card-body .card-actions { flex-direction: column; gap: 5px; }
  .btn-add-cart { padding: 8px 0; font-size: 0.78rem; }
  .btn-buy-now { padding: 8px 0; font-size: 0.78rem; text-align: center; }
  .sub-header { padding: 6px 10px; gap: 12px; }
  .sub-header a { font-size: 0.76rem; }
  .main-layout { padding: 8px; padding-bottom: 48px; }
  .modal-box { width: 100%; max-width: none; border-radius: 0; max-height: 100vh; }
  .modal-body { padding: 16px; }
  .modal-box .modal-header { padding: 14px 16px; }
  .form-row { flex-direction: column; gap: 0; }
  .checkout-section { margin-bottom: 14px; }
  .checkout-section h4 { font-size: 0.82rem; }
  .payment-opt { padding: 10px 12px; }
  .payment-opt .po-icon { font-size: 1.2rem; }
  .btn-primary { padding: 12px; font-size: 0.88rem; }
  .cart-sidebar { width: 100vw; max-width: 100vw; right: -100vw; }
  .cart-sidebar .cart-header { padding: 14px 16px; }
  .cart-sidebar .cart-body { padding: 12px 14px; }
  .cart-item-row { gap: 8px; }
  .cart-item-row .ci-name { font-size: 0.8rem; }
  .orders-mobile { width: 100vw; max-width: 100vw; right: -100vw; }
  .order-card { padding: 12px 14px; }
  .order-card .oc-id { font-size: 0.72rem; }
  .order-card .oc-items { font-size: 0.76rem; }
  .order-card .oc-amount { font-size: 0.78rem; }
  .toast { max-width: 280px; font-size: 0.8rem; padding: 10px 14px; }
  .toast-container { top: 64px; right: 10px; }
  .badge-sm { font-size: 0.62rem; padding: 2px 5px; }
  .ondc-footer { padding: 6px 10px; font-size: 0.7rem; }
  .ondc-badge-footer { font-size: 0.62rem; padding: 1px 6px; }
  .upi-screen .upi-amount { font-size: 1.6rem; }
  .upi-qr-container { padding: 12px; }
  .upi-qr-container img { width: 160px; height: 160px; }
  .btn-upi-deep { padding: 10px 20px; font-size: 0.82rem; }
  .verify-btns { gap: 6px; }
  .order-confirm .success-icon { font-size: 2.5rem; }
  .order-step { width: 65px; }
  .order-step .step-icon { width: 30px; height: 30px; font-size: 0.85rem; }
  .order-step .step-label { font-size: 0.62rem; }
}

/* ===== EXTRA SMALL PHONES (< 380px) ===== */
@media (max-width: 380px) {
  .products-grid { grid-template-columns: 1fr; gap: 8px; }
  .product-card { display: flex; flex-direction: row; }
  .product-card .card-img { width: 110px; min-width: 110px; aspect-ratio: 1/1; }
  .card-body .card-actions { flex-direction: row; }
  .btn-buy-now { flex: 1; }
  .top-header .logo-text { font-size: 0.9rem; }
  .header-btn .btn-value { font-size: 0.76rem; }
  .login-card { padding: 28px 20px; }
  .login-card .brand h1 { font-size: 1.3rem; }
  .login-card .brand-logo { width: 56px; height: 56px; }
}

/* ===== MOBILE ORDERS DRAWER ===== */
.orders-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.orders-mobile-overlay.open { opacity: 1; pointer-events: all; }
.orders-mobile {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-white);
  z-index: 700;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.orders-mobile.open { right: 0; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== ONDC FOOTER ===== */
.ondc-footer {
  background: linear-gradient(135deg, #1565C0, #0D47A1);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 0.78rem;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
}
.ondc-footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ondc-badge-footer {
  background: rgba(255,255,255,0.2);
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.7rem;
}

