/* ============================================================
   AgriMart — Purple & Green Theme
   ============================================================ */

:root {
  --purple:        #7c3aed;
  --purple-dark:   #5b21b6;
  --purple-light:  #ede9fe;
  --purple-mid:    #a855f7;
  --green:         #16a34a;
  --green-dark:    #14532d;
  --green-light:   #dcfce7;
  --green-mid:     #22c55e;
  --accent:        #f59e0b;
  --accent-light:  #fef3c7;
  --text:          #1e1b4b;
  --text-muted:    #6b7280;
  --border:        #e5e7eb;
  --bg:            #f9fafb;
  --card-bg:       #ffffff;
  --danger:        #dc2626;
  --danger-light:  #fef2f2;
  --header-h:      112px;
  --radius:        10px;
  --shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:     0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:     0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: var(--purple-mid); border-radius: 3px; }

/* ── Typography Helpers ────────────────────────────────── */
.text-purple   { color: var(--purple)     !important; }
.text-green    { color: var(--green)      !important; }
.text-accent   { color: var(--accent)     !important; }
.bg-purple     { background: var(--purple) !important; color: #fff !important; }
.bg-green      { background: var(--green)  !important; color: #fff !important; }
.bg-purple-light { background: var(--purple-light) !important; }
.bg-green-light  { background: var(--green-light)  !important; }

/* ══════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 100%);
  box-shadow: var(--shadow-lg);
}

.site-logo { cursor: pointer; }
.logo-agri { color: #fff; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }
.logo-mart { color: var(--green-mid); font-size: 1.5rem; font-weight: 800; }

/* Search */
.search-form .search-input {
  height: 42px;
  border: none;
  font-size: 14px;
  background: rgba(255,255,255,.95);
  box-shadow: none !important;
}
.search-form .search-input:focus { background: #fff; }
.btn-search {
  height: 42px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 16px;
  transition: background .2s;
}
.btn-search:hover { background: #d97706; color: #fff; }

/* Header Nav Buttons */
.h-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(255,255,255,.9);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  transition: background .2s;
  cursor: pointer;
  white-space: nowrap;
}
.h-nav-btn i { font-size: 20px; }
.h-nav-btn:hover { background: rgba(255,255,255,.15); color: #fff; }

.cart-icon .cart-badge {
  position: absolute;
  top: -2px;
  right: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  width: 17px;
  height: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Category Bar */
.cat-bar {
  background: var(--purple-dark);
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 6px 0;
}
.cat-bar a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all .2s;
}
.cat-bar a:hover { background: rgba(255,255,255,.15); color: #fff; }
.cat-bar::-webkit-scrollbar { height: 0; }

/* ── WhatsApp Float ───────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 9000;
  background: #25d366;
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(37,211,102,.4);
  transition: transform .2s;
  text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.1); color: #fff; }

/* ══════════════════════════════════════════════════════════
   HERO SLIDER
══════════════════════════════════════════════════════════ */
.hero-banner {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 55%, var(--green-dark) 100%);
  color: #fff;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='2' fill='rgba(255,255,255,.06)'/%3E%3C/svg%3E");
}
.hero-banner h1 { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 800; position: relative; }
.hero-banner p  { font-size: 1rem; opacity: .88; margin: .75rem 0 1.5rem; position: relative; }
.btn-hero {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: .75rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform .2s, background .2s;
  position: relative;
}
.btn-hero:hover { transform: translateY(-2px); background: #d97706; color: #fff; }
.btn-hero-outline {
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.5);
  color: #fff;
  padding: .75rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  margin-left: .75rem;
  transition: background .2s;
  position: relative;
}
.btn-hero-outline:hover { background: rgba(255,255,255,.25); color: #fff; }

/* ══════════════════════════════════════════════════════════
   SECTIONS
══════════════════════════════════════════════════════════ */
.section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  padding: 1.5rem 1rem .75rem;
  position: relative;
  padding-left: 1.5rem;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 22px;
  background: linear-gradient(180deg, var(--purple), var(--green));
  border-radius: 2px;
  margin-top: 12px;
}

/* ══════════════════════════════════════════════════════════
   CATEGORY CARDS
══════════════════════════════════════════════════════════ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .75rem;
  padding: 0 1rem 1.5rem;
}
.cat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1rem .5rem;
  text-align: center;
  cursor: pointer;
  border: 1.5px solid var(--border);
  transition: all .25s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.cat-card:hover {
  border-color: var(--purple);
  box-shadow: 0 4px 16px rgba(124,58,237,.15);
  transform: translateY(-3px);
  color: var(--purple);
}
.cat-card .cat-icon { font-size: 2rem; margin-bottom: .4rem; display: block; }
.cat-card p { font-size: 12px; font-weight: 700; margin: 0; }
.cat-card small { font-size: 10px; color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════
   PRODUCT CARDS
══════════════════════════════════════════════════════════ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 1rem;
  padding: 0 1rem 1.5rem;
}
.prod-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: all .25s;
  display: flex;
  flex-direction: column;
}
.prod-card:hover {
  box-shadow: 0 8px 24px rgba(124,58,237,.15);
  border-color: var(--purple);
  transform: translateY(-3px);
}
.prod-img {
  background: linear-gradient(135deg, var(--purple-light), var(--green-light));
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
}
.prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}
.prod-badge-green {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}
.prod-info { padding: .75rem; flex: 1; display: flex; flex-direction: column; gap: .3rem; }
.prod-info .cat-tag {
  display: inline-block;
  background: var(--purple-light);
  color: var(--purple);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.prod-info h4 { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.3; }
.prod-info .stars { color: #f59e0b; font-size: 11px; }
.prod-info .price { color: var(--purple); font-weight: 800; font-size: 15px; }
.prod-info .orig  { color: var(--text-muted); font-size: 12px; text-decoration: line-through; }
.btn-add-cart {
  width: 100%;
  background: linear-gradient(135deg, var(--purple), var(--green));
  color: #fff;
  border: none;
  padding: .55rem;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
  margin-top: auto;
}
.btn-add-cart:hover { opacity: .88; }

/* ══════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════ */
.btn-primary-am {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: #fff;
  border: none;
  padding: .65rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
}
.btn-primary-am:hover { opacity: .9; transform: translateY(-1px); }

.btn-green-am {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
  border: none;
  padding: .65rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-green-am:hover { opacity: .88; }

.btn-accent {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: .55rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.btn-accent:hover { background: #d97706; color: #fff; }

.btn-outline-purple {
  background: transparent;
  color: var(--purple);
  border: 1.5px solid var(--purple);
  padding: .6rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
}
.btn-outline-purple:hover { background: var(--purple); color: #fff; }

/* ══════════════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════════════ */
.form-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: .3rem; }
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: .6rem .85rem;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
}
.form-control:focus, .form-select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
  outline: none;
}

/* Auth Card */
.auth-wrap { min-height: 90vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--border);
}
.auth-card h2 { font-size: 1.5rem; font-weight: 800; }
.auth-card .sub { color: var(--text-muted); font-size: 13px; margin-bottom: 1.5rem; }
.auth-card .auth-logo-bar {
  background: linear-gradient(135deg, var(--purple-dark), var(--green-dark));
  border-radius: 12px 12px 0 0;
  padding: 1.5rem;
  text-align: center;
  margin: -2.5rem -2rem 2rem;
  color: #fff;
}

/* ══════════════════════════════════════════════════════════
   ALERTS
══════════════════════════════════════════════════════════ */
.alert { padding: .75rem 1rem; border-radius: 8px; font-size: 13px; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.alert-success { background: var(--green-light); border: 1px solid #86efac; color: var(--green-dark); }
.alert-danger  { background: var(--danger-light); border: 1px solid #fca5a5; color: var(--danger); }
.alert-info    { background: var(--purple-light); border: 1px solid #c4b5fd; color: var(--purple-dark); }
.alert-warning { background: var(--accent-light); border: 1px solid #fcd34d; color: #92400e; }

/* ══════════════════════════════════════════════════════════
   STATUS BADGES
══════════════════════════════════════════════════════════ */
.badge-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.s-pending        { background: #fef3c7; color: #92400e; }
.s-confirmed      { background: var(--purple-light); color: var(--purple-dark); }
.s-processing     { background: #ede9fe; color: #5b21b6; }
.s-shipped        { background: #dbeafe; color: #1e40af; }
.s-out_for_delivery { background: #e0f2fe; color: #075985; }
.s-delivered      { background: var(--green-light); color: var(--green-dark); }
.s-cancelled      { background: var(--danger-light); color: var(--danger); }
.s-returned       { background: #f3e8ff; color: #6b21a8; }
.s-paid           { background: var(--green-light); color: var(--green-dark); }
.s-failed         { background: var(--danger-light); color: var(--danger); }
.s-active         { background: var(--green-light); color: var(--green-dark); }
.s-inactive       { background: #f1f5f9; color: #475569; }

/* ══════════════════════════════════════════════════════════
   DASHBOARD / USER PANEL
══════════════════════════════════════════════════════════ */
.dash-layout { display: flex; min-height: calc(100vh - var(--header-h)); }

.dash-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--purple-dark) 0%, #1e1b4b 100%);
  padding: 1.5rem 0;
}
.dash-sidebar .user-pill {
  display: flex; align-items: center; gap: .75rem;
  padding: 0 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 1rem;
}
.avatar-circle {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-mid), var(--green));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 18px; flex-shrink: 0;
}
.user-name  { color: #fff; font-weight: 700; font-size: 14px; }
.user-email { color: rgba(255,255,255,.6); font-size: 11px; }

.dash-nav a {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1.25rem;
  color: rgba(255,255,255,.7);
  text-decoration: none; font-size: 13px; font-weight: 500;
  border-right: 3px solid transparent;
  transition: all .2s;
}
.dash-nav a i { font-size: 17px; width: 20px; }
.dash-nav a:hover, .dash-nav a.active {
  background: rgba(167,139,250,.15);
  color: #fff;
  border-right-color: var(--green-mid);
}

.dash-content { flex: 1; padding: 1.5rem; background: var(--bg); overflow-x: hidden; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1.5px solid var(--border);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--green));
}
.stat-val   { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stat-icon  { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-size: 2rem; opacity: .1; }

/* Table */
.am-table { width: 100%; border-collapse: collapse; }
.am-table th {
  background: linear-gradient(135deg, var(--purple-light), var(--green-light));
  padding: .75rem 1rem;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--purple-dark);
  border-bottom: 2px solid var(--purple-light);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.am-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.am-table tr:hover td { background: rgba(124,58,237,.03); }
.am-table tr:last-child td { border-bottom: none; }

/* Card Panel */
.card-panel { background: var(--card-bg); border-radius: var(--radius); border: 1.5px solid var(--border); padding: 1.5rem; }
.card-panel-header { font-weight: 700; font-size: 15px; padding-bottom: .75rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }

/* Address Card */
.addr-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: .75rem;
  position: relative;
  transition: border-color .2s;
}
.addr-card.is-default { border-color: var(--purple); background: var(--purple-light); }
.addr-card .default-tag {
  position: absolute; top: .5rem; right: .5rem;
  background: var(--purple); color: #fff;
  font-size: 10px; padding: 2px 8px; border-radius: 4px; font-weight: 700;
}

/* ══════════════════════════════════════════════════════════
   CART PAGE
══════════════════════════════════════════════════════════ */
.cart-item { display: flex; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--border); align-items: center; }
.cart-item-thumb { width: 72px; height: 72px; background: linear-gradient(135deg, var(--purple-light), var(--green-light)); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; flex-shrink: 0; }
.qty-ctrl { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; }
.qty-btn {
  width: 28px; height: 28px;
  border: 1.5px solid var(--purple-light);
  background: var(--purple-light);
  color: var(--purple);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; font-weight: 700;
}
.qty-btn:hover { background: var(--purple); color: #fff; border-color: var(--purple); }
.qty-val { font-weight: 800; font-size: 15px; min-width: 28px; text-align: center; }

/* Order Summary */
.order-summary { background: var(--card-bg); border-radius: var(--radius); border: 1.5px solid var(--border); padding: 1.5rem; position: sticky; top: 120px; }
.order-summary h3 { font-size: 1rem; font-weight: 800; padding-bottom: .75rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.summary-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: .6rem; }
.summary-row.total { font-weight: 800; font-size: 16px; padding-top: .75rem; border-top: 2px solid var(--purple-light); margin-top: .75rem; color: var(--purple); }
.summary-row .save { color: var(--green); font-weight: 700; }

/* ══════════════════════════════════════════════════════════
   CHECKOUT
══════════════════════════════════════════════════════════ */
.checkout-step { margin-bottom: 1rem; }
.step-header {
  display: flex; align-items: center; gap: .75rem;
  background: var(--card-bg); border: 1.5px solid var(--border);
  border-radius: 8px 8px 0 0; padding: .85rem 1.25rem;
}
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--green));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; flex-shrink: 0;
}
.step-body { background: var(--card-bg); border: 1.5px solid var(--border); border-top: none; border-radius: 0 0 8px 8px; padding: 1.25rem; }

.addr-select { border: 1.5px solid var(--border); border-radius: 8px; padding: .85rem; margin-bottom: .75rem; cursor: pointer; transition: all .2s; }
.addr-select:hover, .addr-select.selected { border-color: var(--purple); background: var(--purple-light); }
.pay-opt { display: flex; align-items: center; gap: .75rem; border: 1.5px solid var(--border); border-radius: 8px; padding: .85rem; margin-bottom: .75rem; cursor: pointer; transition: all .2s; }
.pay-opt:hover, .pay-opt.selected { border-color: var(--green); background: var(--green-light); }
.pay-opt i { font-size: 1.4rem; }

/* ══════════════════════════════════════════════════════════
   PRODUCT DETAIL
══════════════════════════════════════════════════════════ */
.prod-detail-img {
  background: linear-gradient(135deg, var(--purple-light), var(--green-light));
  border-radius: 12px;
  height: 340px;
  display: flex; align-items: center; justify-content: center;
  font-size: 7rem;
  border: 1.5px solid var(--border);
  position: relative;
  overflow: hidden;
}
.prod-detail-img img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.price-big { font-size: 2rem; font-weight: 800; color: var(--purple); }

/* ══════════════════════════════════════════════════════════
   PAGE HERO
══════════════════════════════════════════════════════════ */
.page-hero {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple), var(--green-dark));
  color: #fff;
  padding: 2rem;
  text-align: center;
}
.page-hero h2 { font-size: 1.6rem; font-weight: 800; }
.page-hero p  { opacity: .85; font-size: 14px; margin-top: .4rem; }

/* ══════════════════════════════════════════════════════════
   ADMIN PANEL
══════════════════════════════════════════════════════════ */
.admin-wrap { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 250px;
  flex-shrink: 0;
  background: #0f0a1e;
  padding-bottom: 2rem;
}
.admin-logo {
  padding: 1.25rem 1.5rem;
  font-size: 1rem; font-weight: 800;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: block;
}
.admin-logo span { color: #a78bfa; }

.admin-nav .nav-section {
  padding: .6rem 1.5rem .2rem;
  font-size: 10px; font-weight: 700;
  color: #4b5563; text-transform: uppercase; letter-spacing: 1px;
  margin-top: .5rem;
}
.admin-nav a {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1.5rem;
  color: #9ca3af; text-decoration: none; font-size: 13px; font-weight: 500;
  border-right: 3px solid transparent;
  transition: all .2s;
}
.admin-nav a i { font-size: 17px; width: 20px; }
.admin-nav a:hover, .admin-nav a.active {
  background: rgba(167,139,250,.12);
  color: #a78bfa;
  border-right-color: #a78bfa;
}

.admin-content { flex: 1; background: #f8f7ff; padding: 1.5rem; overflow-x: hidden; }
.admin-header { background: #fff; border-bottom: 1px solid var(--border); padding: .85rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }

/* Admin Stats */
.admin-stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid #ede9fe;
  display: flex; align-items: center; gap: 1rem;
}
.admin-stat-icon {
  width: 48px; height: 48px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.aci-purple { background: var(--purple-light); }
.aci-green  { background: var(--green-light); }
.aci-amber  { background: var(--accent-light); }
.aci-red    { background: var(--danger-light); }
.admin-stat-card .as-val { font-size: 1.5rem; font-weight: 800; color: #0f172a; }
.admin-stat-card .as-lbl { font-size: 12px; color: #64748b; }

/* Admin Table */
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid #ede9fe; }
.admin-table th { background: linear-gradient(90deg, #f5f3ff, #f0fdf4); padding: .75rem 1rem; text-align: left; font-size: 11px; font-weight: 700; color: var(--purple-dark); border-bottom: 1px solid #ede9fe; text-transform: uppercase; letter-spacing: .5px; }
.admin-table td { padding: .75rem 1rem; border-bottom: 1px solid #f5f3ff; font-size: 13px; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #faf9ff; }

.btn-act { padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; transition: all .2s; }
.btn-act-edit { background: var(--purple-light); color: var(--purple-dark); }
.btn-act-edit:hover { background: #c4b5fd; }
.btn-act-del  { background: var(--danger-light); color: var(--danger); }
.btn-act-del:hover { background: #fecaca; }
.btn-act-view { background: var(--green-light); color: var(--green-dark); }
.btn-act-view:hover { background: #86efac; }

/* ══════════════════════════════════════════════════════════
   BENEFITS SECTION
══════════════════════════════════════════════════════════ */
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; padding: 0 1rem 2rem; }
.benefit-card { background: var(--card-bg); border-radius: var(--radius); border: 1.5px solid var(--border); padding: 1.25rem; text-align: center; }
.benefit-card i { font-size: 2rem; color: var(--green); margin-bottom: .5rem; display: block; }
.benefit-card h5 { font-size: 14px; font-weight: 700; }
.benefit-card p  { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ══════════════════════════════════════════════════════════
   AD BANNER
══════════════════════════════════════════════════════════ */
.ad-banner {
  margin: 0 1rem 2rem;
  background: linear-gradient(135deg, var(--purple), var(--green-dark));
  border-radius: 14px;
  padding: 2rem;
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  overflow: hidden;
  position: relative;
}
.ad-banner::before { content: ''; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; background: rgba(255,255,255,.07); border-radius: 50%; }

/* ══════════════════════════════════════════════════════════
   COUPON TICKER BAR
══════════════════════════════════════════════════════════ */
.coupon-ticker-wrap {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #4c1d95, #065f46);
  color: #fff;
  overflow: hidden;
  height: 42px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.coupon-ticker-label {
  flex-shrink: 0;
  background: rgba(255,255,255,.18);
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .5px;
  z-index: 2;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,.2);
}
.coupon-ticker-track {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}
.coupon-ticker-inner {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: tickerScroll 28s linear infinite;
  will-change: transform;
}
.coupon-ticker-inner:hover { animation-play-state: paused; }
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: 0 1.5rem;
  font-size: 13px;
  font-weight: 600;
}
.ticker-item strong {
  background: rgba(255,255,255,.2);
  padding: 1px 8px;
  border-radius: 4px;
  border: 1px dashed rgba(255,255,255,.5);
  letter-spacing: 1px;
  font-size: 12px;
}
.ticker-sep {
  color: rgba(255,255,255,.4);
  font-size: 18px;
  padding: 0 .25rem;
}
.ticker-copy {
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  transition: background .2s;
  line-height: 1;
}
.ticker-copy:hover { background: rgba(255,255,255,.35); }

/* ══════════════════════════════════════════════════════════
   COUPON OFFER CARDS
══════════════════════════════════════════════════════════ */
.coupon-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.coupon-offer-card {
  border-radius: 16px;
  padding: 1.5rem;
  color: #fff;
  display: flex;
  align-items: stretch;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  transition: transform .25s, box-shadow .25s;
}
.coupon-offer-card::before {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,.07);
  border-radius: 50%;
}
.coupon-offer-card::after {
  content: '';
  position: absolute;
  left: -20px; bottom: -20px;
  width: 100px; height: 100px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
}
.coupon-offer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.2);
}
.coupon-offer-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  position: relative;
  z-index: 1;
}
.coupon-off-tag {
  font-size: 1.05rem;
  font-weight: 800;
  background: rgba(255,255,255,.18);
  display: inline-block;
  padding: .2rem .75rem;
  border-radius: 6px;
  width: fit-content;
  letter-spacing: .5px;
}
.coupon-desc { font-size: 13px; opacity: .9; line-height: 1.5; margin-top: .25rem; }
.coupon-min  { font-size: 11px; opacity: .75; font-weight: 600; }
.coupon-expiry { font-size: 11px; opacity: .7; display: flex; align-items: center; gap: .3rem; margin-top: auto; padding-top: .5rem; }

.coupon-offer-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-left: 2px dashed rgba(255,255,255,.3);
  padding-left: 1rem;
  gap: .6rem;
  position: relative;
  z-index: 1;
  min-width: 110px;
}
.coupon-big-disc {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.coupon-code-box {
  display: flex;
  align-items: center;
  gap: .35rem;
  background: rgba(255,255,255,.15);
  border: 1.5px dashed rgba(255,255,255,.6);
  border-radius: 8px;
  padding: .3rem .6rem;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  cursor: pointer;
}
.coupon-copy-btn {
  background: rgba(255,255,255,.25);
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  transition: background .2s, transform .15s;
  line-height: 1;
}
.coupon-copy-btn:hover { background: rgba(255,255,255,.45); transform: scale(1.1); }
.coupon-copy-btn.copied { background: #22c55e !important; }
.coupon-shop-btn {
  background: rgba(255,255,255,.2);
  color: #fff;
  text-decoration: none;
  padding: .35rem .8rem;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  transition: background .2s;
  white-space: nowrap;
}
.coupon-shop-btn:hover { background: rgba(255,255,255,.35); color: #fff; }

/* ── copy toast ─────────────────────────── */
#copyToast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: #fff;
  padding: .5rem 1.2rem;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  z-index: 99999;
  pointer-events: none;
}
#copyToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media(max-width:600px){
  .coupon-cards-grid { grid-template-columns: 1fr; }
  .coupon-offer-right { min-width: 90px; }
  .coupon-big-disc { font-size: 1.6rem; }
}

/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
.site-footer { background: #0f0a1e; color: #9ca3af; }
.footer-heading { color: #e9d5ff; font-size: 14px; font-weight: 700; margin-bottom: .75rem; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: #9ca3af; text-decoration: none; font-size: 13px; transition: color .2s; }
.footer-links a:hover { color: #e9d5ff; }
.social-icons a { color: #9ca3af; font-size: 1.3rem; margin-right: .75rem; text-decoration: none; transition: color .2s; }
.social-icons a:hover { color: #a78bfa; }
.footer-bottom { background: rgba(0,0,0,.3); border-top: 1px solid rgba(255,255,255,.06); }

/* ══════════════════════════════════════════════════════════
   BREADCRUMB
══════════════════════════════════════════════════════════ */
.am-breadcrumb { padding: .75rem 1rem; font-size: 12px; color: var(--text-muted); }
.am-breadcrumb a { color: var(--purple); text-decoration: none; }
.am-breadcrumb a:hover { text-decoration: underline; }
.am-breadcrumb span { margin: 0 .35rem; }

/* ══════════════════════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════════════════════ */
.am-pagination { display: flex; gap: .35rem; justify-content: center; padding: 1.5rem 0; }
.am-pagination a, .am-pagination span {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600;
  text-decoration: none; color: var(--text);
  transition: all .2s;
}
.am-pagination a:hover { border-color: var(--purple); color: var(--purple); }
.am-pagination .current { background: var(--purple); color: #fff; border-color: var(--purple); }

/* ══════════════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════════════ */
.am-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 9999; align-items: center; justify-content: center; }
.am-modal-overlay.open { display: flex; }
.am-modal { background: #fff; border-radius: 14px; padding: 2rem; width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.am-modal h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 1.25rem; }
.modal-close { float: right; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-muted); margin-top: -4px; }

/* ══════════════════════════════════════════════════════════
   ORDER PROGRESS
══════════════════════════════════════════════════════════ */
.order-progress { display: flex; align-items: flex-start; margin-bottom: 1.5rem; overflow-x: auto; padding-bottom: 8px; }
.order-progress .op-step { flex: 1; text-align: center; position: relative; min-width: 80px; }
.order-progress .op-dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--border); color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; position: relative; z-index: 1;
}
.order-progress .op-step.done .op-dot { background: linear-gradient(135deg, var(--purple), var(--green)); color: #fff; }
.order-progress .op-line { position: absolute; top: 15px; left: 50%; right: -50%; height: 2px; background: var(--border); z-index: 0; }
.order-progress .op-step.done .op-line { background: linear-gradient(90deg, var(--purple), var(--green)); }
.order-progress .op-step:last-child .op-line { display: none; }
.order-progress .op-label { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.order-progress .op-step.done .op-label { color: var(--purple); font-weight: 700; }

/* ══════════════════════════════════════════════════════════
   LAZY LOADING
══════════════════════════════════════════════════════════ */
img.lazy { opacity: 0; transition: opacity .4s; }
img.lazy.loaded { opacity: 1; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .cart-layout { grid-template-columns: 1fr !important; }
  .checkout-layout { grid-template-columns: 1fr !important; }
  .dash-layout { flex-direction: column; }
  .dash-sidebar { width: 100%; }
  .admin-wrap { flex-direction: column; }
  .admin-sidebar { width: 100%; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-banner h1 { font-size: 1.4rem; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
