/* ============================================================
   AppStash Store — Main Stylesheet
   Dark gradient UI, mobile-first, fully responsive
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:        #0a0a14;
  --bg2:       #0f0f1e;
  --bg3:       #13132a;
  --card:      #16162e;
  --card2:     #1a1a36;
  --border:    #2a2a4a;
  --primary:   #6366f1;
  --primary2:  #818cf8;
  --accent:    #8b5cf6;
  --accent2:   #a78bfa;
  --green:     #10b981;
  --red:       #ef4444;
  --gold:      #f59e0b;
  --teal:      #06b6d4;
  --text:      #e2e8f0;
  --muted:     #94a3b8;
  --muted2:    #64748b;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 4px 24px rgba(99,102,241,0.12);
  --shadow2:   0 8px 40px rgba(0,0,0,0.4);
  --transition: all 0.25s ease;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 99px; }

/* ── Container ──────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .3px;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99,102,241,0.5); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--primary2);
  border: 1.5px solid var(--primary);
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-danger {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}
.btn-danger:hover { background: #dc2626; }

.btn-sm { padding: 7px 16px !important; font-size: 13px !important; }
.btn-glow { box-shadow: 0 0 30px rgba(99,102,241,0.6) !important; }
.w-full { width: 100%; display: block; text-align: center; }

/* ── Form Inputs ────────────────────────────────────────────── */
.form-input {
  width: 100%;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.form-input::placeholder { color: var(--muted2); }
textarea.form-input { resize: vertical; min-height: 80px; }
select.form-input option { background: var(--bg3); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.form-group small { display: block; font-size: 12px; color: var(--muted2); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert-success {
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.4);
  color: #6ee7b7;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
}
.alert-error {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.4);
  color: #fca5a5;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.badge-paid     { background: rgba(16,185,129,0.2); color: #6ee7b7; }
.badge-pending  { background: rgba(245,158,11,0.2); color: #fcd34d; }
.badge-delivered{ background: rgba(99,102,241,0.2); color: #a5b4fc; }
.badge-cancelled{ background: rgba(239,68,68,0.2);  color: #fca5a5; }
.badge-active   { background: rgba(16,185,129,0.2); color: #6ee7b7; }

/* ══════════════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,20,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary2), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}
.nav-search { flex: 1; max-width: 420px; display: flex; gap: 8px; }
.search-input {
  flex: 1;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 50px;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.search-btn {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 9px 16px;
  border-radius: 50px;
  font-size: 14px;
  transition: var(--transition);
}
.search-btn:hover { background: var(--accent); }
.cart-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1.5px solid var(--border);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.cart-btn:hover { border-color: var(--primary); color: var(--primary2); }
.cart-count {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════ */
.hero {
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: 80px 20px 60px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { flex: 1; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  color: var(--primary2);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary2), var(--accent2), #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 460px;
}
.hero-visual {
  flex: 0 0 auto;
  width: 320px;
  height: 320px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.floating-card {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: float 3s ease-in-out infinite;
}
.card1 { top: 10%;  left: 0%;   animation-delay: 0s; }
.card2 { top: 10%;  right: 0%;  animation-delay: 0.75s; }
.card3 { bottom: 10%; left: 0%; animation-delay: 1.5s; }
.card4 { bottom: 10%; right: 0%;animation-delay: 2.25s; }

@keyframes float {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-12px); }
}

/* ══════════════════════════════════════════════════════════════
   OFFERS SECTION
══════════════════════════════════════════════════════════════ */
.offers-section {
  padding: 20px 20px 0;
  max-width: 1200px;
  margin: 0 auto;
}
.offers-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.offer-card {
  flex: 0 0 auto;
  min-width: 280px;
  max-width: 360px;
  border-radius: var(--radius);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
}
.offer-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 180px;
  height: 180px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.offer-badge {
  display: inline-block;
  background: rgba(255,255,255,0.25);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.offer-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.offer-card p  { font-size: 13px; opacity: .85; margin-bottom: 8px; }
.offer-card small { font-size: 11px; opacity: .7; }

/* ══════════════════════════════════════════════════════════════
   CATEGORIES PILLS
══════════════════════════════════════════════════════════════ */
.categories-section { padding: 28px 20px 0; max-width: 1200px; margin: 0 auto; }
.cat-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-pill {
  background: var(--card);
  border: 1.5px solid var(--border);
  color: var(--muted);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}
.cat-pill:hover, .cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}

/* ══════════════════════════════════════════════════════════════
   PRODUCTS SECTION
══════════════════════════════════════════════════════════════ */
.products-section { padding: 40px 20px 80px; max-width: 1200px; margin: 0 auto; }
.section-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 28px; }
.section-header h2 { font-size: 28px; font-weight: 800; }
.section-header p  { color: var(--muted2); font-size: 14px; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 12px 40px rgba(99,102,241,0.2);
}
.product-img-wrap {
  position: relative;
  height: 200px;
  background: var(--bg3);
  overflow: hidden;
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.05); }
.product-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  background: linear-gradient(135deg, var(--bg3), var(--card2));
}
.discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--red);
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.cat-tag {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(10,10,20,0.75);
  backdrop-filter: blur(6px);
  color: var(--muted);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.product-info { padding: 16px; }
.product-info h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; line-height: 1.3; }
.product-desc { font-size: 13px; color: var(--muted); margin-bottom: 14px; line-height: 1.5; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price-wrap { display: flex; flex-direction: column; }
.price { font-size: 18px; font-weight: 800; color: var(--primary2); }
.original-price { font-size: 12px; color: var(--muted2); text-decoration: line-through; }
.add-cart-btn {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
}
.add-cart-btn:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(99,102,241,0.4); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty-icon { font-size: 64px; margin-bottom: 8px; }
.empty-state h3 { font-size: 20px; font-weight: 700; }
.empty-state p  { color: var(--muted); }

/* ══════════════════════════════════════════════════════════════
   BUYER FLOAT BUTTON & MODAL
══════════════════════════════════════════════════════════════ */
.buyer-float {
  position: fixed;
  bottom: 28px;
  left: 28px;
  background: linear-gradient(135deg, var(--accent), #ec4899);
  color: #fff;
  padding: 12px 22px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 28px rgba(139,92,246,0.45);
  transition: var(--transition);
  z-index: 99;
}
.buyer-float:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 10px 36px rgba(139,92,246,0.55); }

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  max-width: 460px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow2);
  animation: slideUp 0.3s ease;
}
.modal-lg { max-width: 680px; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { color: var(--text); background: var(--card2); }
.modal-icon { font-size: 48px; margin-bottom: 16px; }
.modal h2   { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.modal p    { color: var(--muted); margin-bottom: 20px; font-size: 14px; }
.success-msg {
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.4);
  color: #6ee7b7;
  padding: 14px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: linear-gradient(135deg, var(--green), #059669);
  color: #fff;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(16,185,129,0.4);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(.175,.885,.32,1.275);
  z-index: 300;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ══════════════════════════════════════════════════════════════
   CART PAGE
══════════════════════════════════════════════════════════════ */
.page-container { max-width: 1100px; margin: 40px auto; padding: 0 20px; }
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 32px; font-weight: 800; }
.page-header p  { color: var(--muted); margin-top: 4px; }

.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  transition: var(--transition);
}
.cart-item:hover { border-color: var(--primary); }
.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-item-qty button {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.cart-item-qty button:hover { background: var(--primary); border-color: var(--primary); }
.cart-item-qty span { font-weight: 700; min-width: 24px; text-align: center; }
.cart-item-total { font-weight: 800; color: var(--primary2); font-size: 15px; min-width: 80px; text-align: right; }
.remove-btn { background: none; border: none; font-size: 18px; opacity: .5; transition: var(--transition); }
.remove-btn:hover { opacity: 1; transform: scale(1.2); }

.summary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 80px;
}
.summary-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.summary-row.total { border-bottom: none; font-size: 18px; font-weight: 800; color: var(--text); padding-top: 16px; }

/* ══════════════════════════════════════════════════════════════
   CHECKOUT PAGE
══════════════════════════════════════════════════════════════ */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
  flex-wrap: nowrap;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.step span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: var(--transition);
}
.step.active { color: var(--primary2); }
.step.active span { background: var(--primary); border-color: var(--primary); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border); min-width: 30px; max-width: 80px; margin: 0 8px; }

.checkout-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.checkout-step { animation: fadeIn 0.3s ease; }
.checkout-main h2 { font-size: 22px; font-weight: 800; margin-bottom: 20px; }
.sub-text { color: var(--muted); font-size: 14px; margin-top: -12px; margin-bottom: 24px; }

.payment-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.payment-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.pay-tab {
  flex: 1;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  color: var(--muted);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}
.pay-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pay-content { animation: fadeIn 0.25s ease; }

.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
}
.qr-img {
  width: 200px;
  height: 200px;
  border: 3px solid var(--primary);
  border-radius: var(--radius);
  object-fit: contain;
  background: #fff;
  padding: 8px;
}
.qr-fallback {
  width: 200px;
  height: 200px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.qr-placeholder { font-size: 48px; }
.qr-fallback p  { font-size: 12px; color: var(--muted); }
.qr-fallback code { background: var(--bg3); padding: 2px 8px; border-radius: 4px; font-size: 11px; }
.pay-instruction { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.gpay-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
}
.gpay-icon { font-size: 48px; margin-bottom: 8px; }
.gpay-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.gpay-number {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary2);
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.gpay-upi { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.gpay-card p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

.ref-input-wrap { margin: 20px 0; }
.ref-input-wrap label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }

/* Buyer form in checkout */
.buyer-form .form-group { margin-bottom: 20px; }

/* Success screen */
.success-screen {
  text-align: center;
  padding: 60px 20px;
  max-width: 500px;
  margin: 0 auto;
}
.success-animation { font-size: 80px; margin-bottom: 24px; animation: bounceIn 0.6s ease; }
@keyframes bounceIn {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.success-screen h1 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.success-screen p  { color: var(--muted); margin-bottom: 20px; }
.success-order-id  {
  background: var(--card);
  border: 1px solid var(--border);
  display: inline-block;
  padding: 10px 24px;
  border-radius: 50px;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--muted);
}
.success-order-id strong { color: var(--primary2); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 60px 20px 30px;
  margin-top: 40px;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  padding-bottom: 40px;
}
.footer-grid h3 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.footer-grid h4 { font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }
.footer-grid p, .footer-grid a { font-size: 14px; color: var(--muted2); display: block; margin-bottom: 6px; transition: var(--transition); }
.footer-grid a:hover { color: var(--primary2); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 24px; border-top: 1px solid var(--border); text-align: center; font-size: 13px; color: var(--muted2); }

/* ══════════════════════════════════════════════════════════════
   ADMIN — LOGIN
══════════════════════════════════════════════════════════════ */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.2) 0%, transparent 60%), var(--bg);
}
.login-wrap { width: 100%; max-width: 420px; padding: 20px; }
.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--shadow2);
}
.login-logo {
  font-size: 56px;
  margin-bottom: 16px;
  display: block;
  animation: float 3s ease-in-out infinite;
}
.login-card h1 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.login-card > p { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.login-card .form-input { margin-bottom: 12px; }

/* ══════════════════════════════════════════════════════════════
   ADMIN — LAYOUT
══════════════════════════════════════════════════════════════ */
.admin-body { background: var(--bg); overflow-x: hidden; }
.admin-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 240px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.sidebar-logo {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary2), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-nav { padding: 12px 0; flex: 1; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.nav-item:hover { color: var(--text); background: rgba(99,102,241,0.08); }
.nav-item.active { color: var(--primary2); background: rgba(99,102,241,0.12); border-left-color: var(--primary); }
.nav-item.logout { margin-top: auto; color: var(--red); }
.nav-item.logout:hover { background: rgba(239,68,68,0.1); }

/* Main content */
.admin-main {
  flex: 1;
  margin-left: 240px;
  padding: 0 0 60px;
  min-width: 0;
}

/* Topbar */
.admin-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-topbar h1 { font-size: 20px; font-weight: 800; flex: 1; }
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 20px;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 28px 28px 0;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  right: 0; height: 3px;
}
.stat-card.purple::before { background: #6366f1; }
.stat-card.blue::before   { background: #3b82f6; }
.stat-card.green::before  { background: #10b981; }
.stat-card.gold::before   { background: #f59e0b; }
.stat-card.red::before    { background: #ef4444; }
.stat-card.teal::before   { background: #06b6d4; }
.stat-card.indigo::before { background: #8b5cf6; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-icon { font-size: 32px; }
.stat-info span { font-size: 22px; font-weight: 800; display: block; line-height: 1.2; }
.stat-info label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

/* Charts */
.charts-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; padding: 20px 28px; }
.chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.chart-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 20px; color: var(--muted); }

/* Table */
.table-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 28px;
}
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.table-header h3 { font-size: 16px; font-weight: 700; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table thead tr { background: var(--bg3); }
.data-table th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.data-table td { padding: 12px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:hover { background: rgba(99,102,241,0.05); }

/* Admin content padding */
.admin-content { padding: 28px; }
.page-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-actions h2 { font-size: 20px; font-weight: 800; }

/* Search bar */
.search-bar { display: flex; gap: 10px; flex-wrap: wrap; }
.search-bar .form-input { min-width: 220px; max-width: 320px; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero { flex-direction: column; padding: 50px 20px 40px; gap: 30px; }
  .hero-visual { display: none; }
  .hero h1 { font-size: 36px; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid > [style*="grid-column"] { grid-column: auto !important; }

  /* Admin mobile */
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); padding: 16px; }
  .charts-grid { padding: 0 16px; }
  .table-card { margin: 0 16px; }
  .admin-topbar { padding: 16px; }

  .steps { gap: 0; }
  .step-line { min-width: 20px; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .product-img-wrap { height: 150px; }
  .nav-search { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .cart-item { flex-wrap: wrap; }
  .cart-item-total { width: 100%; text-align: left; }
  .modal { padding: 24px 20px; }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}
.sidebar-overlay.show { display: block; }

/* ══════════════════════════════════════════════════════════════
   ADMIN — OFFERS PREVIEW GRID
══════════════════════════════════════════════════════════════ */
.offers-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 28px;
}
.offers-preview-grid .offer-card {
  flex: none;
  min-width: unset;
  max-width: unset;
}

/* ══════════════════════════════════════════════════════════════
   ADMIN — ALERT MARGIN FIX
══════════════════════════════════════════════════════════════ */
.admin-main > .alert-success,
.admin-main > .alert-error {
  margin: 20px 28px 0;
}
