/* FreshMart — Main Stylesheet
   Inspired by BigBasket/Amazon — Green & Orange accent */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Nunito:wght@400;500;600;700&display=swap');

/* ── Reset & Variables ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #2E7D32;
  --green-dark:  #1B5E20;
  --green-light: #E8F5E9;
  --green-mid:   #43A047;
  --orange:      #E65100;
  --orange-light:#FFF3E0;
  --orange-mid:  #F57C00;
  --red:         #C62828;
  --yellow:      #F9A825;
  --text:        #1A1A1A;
  --text-muted:  #757575;
  --text-light:  #9E9E9E;
  --border:      #E0E0E0;
  --bg:          #F5F7FA;
  --bg-card:     #FFFFFF;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.08);
  --shadow-md:   0 4px 12px rgba(0,0,0,.1);
  --shadow-lg:   0 8px 24px rgba(0,0,0,.12);
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --font-head:   'Plus Jakarta Sans', sans-serif;
  --font-body:   'Nunito', sans-serif;
  --transition:  .2s ease;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ─────────────────────────────────────────── */
h1,h2,h3,h4,h5 { font-family: var(--font-head); font-weight: 700; line-height: 1.3; }
a { color: var(--green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-dark); }
img { max-width: 100%; display: block; }

/* ── Utilities ──────────────────────────────────────────── */
.container { max-width: 1260px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; justify-content: center; align-items: center; }
.flex-gap-1   { gap: 8px; }
.flex-gap-2   { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5,1fr); gap: 16px; }

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 14px;
}
.alert-success { background: var(--green-light); color: var(--green-dark); border: 1px solid #A5D6A7; }
.alert-error   { background: #FFEBEE; color: var(--red); border: 1px solid #EF9A9A; }
.alert-warning { background: #FFF8E1; color: #E65100; border: 1px solid #FFE082; }
.alert-info    { background: #E3F2FD; color: #0D47A1; border: 1px solid #90CAF9; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary   { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: var(--green); border-color: var(--green); }
.btn-secondary:hover { background: var(--green-light); }
.btn-orange    { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-mid); color: #fff; transform: translateY(-1px); }
.btn-danger    { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: .85; }
.btn-sm  { padding: 6px 14px; font-size: 13px; }
.btn-lg  { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(46,125,50,.12); }
.form-control.error { border-color: var(--red); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.form-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-header { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.card-body   { padding: 20px; }
.card-footer { padding: 16px 20px; background: var(--bg); border-top: 1px solid var(--border); }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-top {
  background: var(--green-dark);
  padding: 6px 0;
  font-size: 12px;
  color: rgba(255,255,255,.8);
  text-align: center;
}
.header-main {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-mid) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
}
.logo-text { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--green-dark); line-height: 1; }
.logo-tagline { font-size: 10px; color: var(--orange); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }

.search-bar {
  flex: 1;
  display: flex;
  border: 2px solid var(--green);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.search-bar:focus-within { box-shadow: 0 0 0 3px rgba(46,125,50,.18); }
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 16px;
  font-size: 14px;
  font-family: var(--font-body);
}
.search-bar button {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 0 20px;
  cursor: pointer;
  font-size: 16px;
  transition: background var(--transition);
}
.search-bar button:hover { background: var(--green-dark); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: background var(--transition);
  font-size: 11px;
  font-weight: 700;
  position: relative;
}
.header-btn:hover { background: var(--bg); color: var(--green); }
.header-btn svg { width: 22px; height: 22px; }
.cart-count {
  position: absolute;
  top: 4px;
  right: 8px;
  background: var(--orange);
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
}

/* ── Navigation ─────────────────────────────────────────── */
.header-nav {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-list a {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  transition: color var(--transition);
  border-bottom: 3px solid transparent;
}
.nav-list a:hover, .nav-list a.active { color: var(--green); border-bottom-color: var(--green); }

/* ── Hero / Banner ──────────────────────────────────────── */
.hero-banner {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 50%, #66BB6A 100%);
  color: #fff;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; }
.hero-badge { display: inline-block; background: var(--orange); color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 16px; }
.hero-title  { font-size: 42px; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.hero-title span { color: var(--yellow); }
.hero-subtitle { font-size: 17px; opacity: .85; margin-bottom: 28px; }

/* ── Section Headers ─────────────────────────────────────── */
.section { padding: 40px 0; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-title { font-size: 22px; font-weight: 800; color: var(--text); position: relative; }
.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--green);
  margin-top: 6px;
  border-radius: 2px;
}
.view-all { font-size: 13px; font-weight: 700; color: var(--green); }

/* ── Category Cards ─────────────────────────────────────── */
.category-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px 12px;
  text-align: center;
  text-decoration: none;
  border: 1.5px solid var(--border);
  transition: all var(--transition);
  display: block;
}
.category-card:hover { border-color: var(--green); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.category-img { width: 80px; height: 80px; object-fit: cover; border-radius: 50%; margin: 0 auto 12px; border: 3px solid var(--green-light); }
.category-name { font-weight: 700; font-size: 13px; color: var(--text); }

/* ── Product Cards ──────────────────────────────────────── */
.product-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover { border-color: var(--green); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}
.product-img-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg);
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.05); }
.product-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-cat  { font-size: 11px; color: var(--text-light); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.product-name { font-weight: 700; font-size: 14px; margin-bottom: 8px; color: var(--text); line-height: 1.4; flex: 1; }
.product-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.product-price { font-size: 18px; font-weight: 800; color: var(--green-dark); }
.product-mrp   { font-size: 13px; color: var(--text-light); text-decoration: line-through; }
.product-discount { font-size: 12px; font-weight: 700; color: var(--orange); }
.product-gst   { font-size: 11px; color: var(--text-light); margin-bottom: 10px; }
.product-stock-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-bottom: 10px; }
.stock-in    { background: var(--green-light); color: var(--green-dark); }
.stock-low   { background: #FFF8E1; color: #E65100; }
.stock-out   { background: #FFEBEE; color: var(--red); }

.qty-control { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.qty-btn { width: 30px; height: 30px; border: 2px solid var(--green); border-radius: 6px; background: #fff; color: var(--green); font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.qty-btn:hover { background: var(--green); color: #fff; }
.qty-input { width: 44px; text-align: center; border: 2px solid var(--border); border-radius: 6px; padding: 4px; font-size: 14px; font-weight: 700; }

/* ── Cart ───────────────────────────────────────────────── */
.cart-page { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img { width: 90px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.cart-item-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.cart-item-sub  { font-size: 13px; color: var(--text-muted); }
.cart-remove { background: none; border: none; color: var(--red); cursor: pointer; font-size: 13px; font-weight: 600; padding: 4px 8px; border-radius: 4px; }
.cart-remove:hover { background: #FFEBEE; }

/* ── Price Summary Box ──────────────────────────────────── */
.price-summary { background: #fff; border-radius: var(--radius-md); border: 1px solid var(--border); overflow: hidden; }
.price-summary-title { font-weight: 800; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; padding: 14px 18px; background: var(--bg); border-bottom: 1px solid var(--border); color: var(--text-muted); }
.price-row { display: flex; justify-content: space-between; padding: 10px 18px; font-size: 14px; border-bottom: 1px solid var(--border); }
.price-row:last-child { border-bottom: none; }
.price-row.total { font-weight: 800; font-size: 17px; background: var(--green-light); color: var(--green-dark); }
.price-row.discount { color: var(--red); }
.price-row.discount .val { color: var(--red); }

/* ── Coupon Input ───────────────────────────────────────── */
.coupon-box { padding: 16px 18px; border-top: 1px solid var(--border); }
.coupon-input-row { display: flex; gap: 8px; }
.coupon-input-row input { flex: 1; }
.coupon-msg { margin-top: 8px; font-size: 13px; font-weight: 600; }
.coupon-msg.ok  { color: var(--green); }
.coupon-msg.err { color: var(--red); }

/* ── Pincode Checker ─────────────────────────────────────── */
.pincode-box { padding: 16px 18px; border-top: 1px solid var(--border); }
.pincode-box h4 { margin-bottom: 10px; font-size: 14px; }
.pincode-result { margin-top: 8px; font-size: 13px; font-weight: 600; }
.pincode-ok  { color: var(--green); }
.pincode-err { color: var(--red); }

/* ── Checkout ────────────────────────────────────────────── */
.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
.checkout-section { margin-bottom: 24px; }
.checkout-section h3 { font-size: 16px; margin-bottom: 14px; color: var(--green-dark); padding-bottom: 8px; border-bottom: 2px solid var(--green-light); }

.address-card {
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition);
  margin-bottom: 10px;
}
.address-card:hover, .address-card.selected { border-color: var(--green); background: var(--green-light); }
.address-label { font-weight: 700; font-size: 12px; text-transform: uppercase; color: var(--orange); margin-bottom: 4px; }

/* ── Order History / Status ──────────────────────────────── */
.order-card { margin-bottom: 16px; }
.order-card-header { display: flex; justify-content: space-between; align-items: center; }
.order-num { font-weight: 800; font-size: 15px; }
.order-date { font-size: 12px; color: var(--text-light); }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* ── Status Stepper ─────────────────────────────────────── */
.stepper { display: flex; align-items: flex-start; gap: 0; margin: 24px 0; overflow-x: auto; padding-bottom: 8px; }
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  flex: 1;
  position: relative;
}
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
}
.step.done:not(:last-child)::after { background: var(--green); }
.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  font-size: 14px;
  transition: all var(--transition);
}
.step.done .step-dot   { background: var(--green); border-color: var(--green); color: #fff; }
.step.active .step-dot { background: var(--orange); border-color: var(--orange); color: #fff; }
.step-label { font-size: 11px; font-weight: 700; text-align: center; margin-top: 8px; color: var(--text-light); }
.step.done .step-label   { color: var(--green); }
.step.active .step-label { color: var(--orange); }

/* ── Admin Layout ───────────────────────────────────────── */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: var(--green-dark);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-logo { padding: 22px 20px; border-bottom: 1px solid rgba(255,255,255,.1); font-weight: 800; font-size: 18px; }
.sidebar-logo span { color: var(--yellow); }
.sidebar-nav { padding: 12px 0; }
.sidebar-section { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; padding: 12px 20px 6px; color: rgba(255,255,255,.4); }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-link:hover, .sidebar-link.active { color: #fff; background: rgba(255,255,255,.1); border-left-color: var(--yellow); }
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.admin-content { padding: 28px; background: var(--bg); overflow-y: auto; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.admin-title { font-size: 24px; font-weight: 800; }
.admin-title small { display: block; font-size: 13px; color: var(--text-muted); font-weight: 500; margin-top: 2px; }

/* ── Stats Cards ─────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-bottom: 28px; }
.stat-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.stat-info { flex: 1; min-width: 0; }
.stat-value { font-family: var(--font-head); font-weight: 800; font-size: 26px; line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-top: 4px; }
.stat-green  { background: var(--green-light); }
.stat-orange { background: var(--orange-light); }
.stat-blue   { background: #E3F2FD; }
.stat-red    { background: #FFEBEE; }

/* ── Data Tables ─────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  padding: 12px 16px;
  text-align: left;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.data-table tr:hover td { background: var(--bg); }
.data-table tr:last-child td { border-bottom: none; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; align-items: center; justify-content: center; margin-top: 24px; }
.page-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--green); color: var(--green); }
.page-btn.active { background: var(--green); border-color: var(--green); color: #fff; }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* ── Product Detail ─────────────────────────────────────── */
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.gallery-main { aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); background: var(--bg); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition);
}
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--green); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { background: var(--green-dark); color: rgba(255,255,255,.8); padding: 50px 0 0; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand { font-family: var(--font-head); }
.footer-brand h3 { color: #fff; font-size: 22px; margin-bottom: 10px; }
.footer-brand p  { font-size: 13px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: 14px; margin-bottom: 14px; font-weight: 700; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a  { color: rgba(255,255,255,.65); font-size: 13px; transition: color var(--transition); }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; text-align: center; font-size: 12px; color: rgba(255,255,255,.4); }

/* ── Loading Spinner ─────────────────────────────────────── */
.spinner { width: 24px; height: 24px; border: 3px solid rgba(46,125,50,.2); border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ───────────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  background: #1A1A1A;
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease;
  max-width: 320px;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.success { background: var(--green-dark); }
.toast.error   { background: var(--red); }
.toast.warning { background: #E65100; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); padding: 12px 0; flex-wrap: wrap; }
.breadcrumb a { color: var(--green); font-weight: 600; }
.breadcrumb span { color: var(--text-light); }

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn .2s ease;
  position: relative;
}
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-muted); }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-5 { grid-template-columns: repeat(4,1fr); }
  .cart-page, .checkout-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .header-main { flex-wrap: wrap; gap: 12px; }
  .search-bar { order: 3; flex: 1 0 100%; }
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2,1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .product-detail-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
}

/* alert-danger alias for alert-error */
.alert-danger { background: #FFEBEE; color: var(--red); border: 1px solid #EF9A9A; }
.alert-warning { background: #FFF8E1; color: #E65100; border: 1px solid #FFCC02; }
.alert-info { background: #E3F2FD; color: #1565C0; border: 1px solid #90CAF9; }
