/* =============================================
   The Peoples Butchery — Global Design System
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
  --bg-base: #080808;
  --bg-surface: #111111;
  --bg-card: #1a1a1a;
  --bg-elevated: #222222;
  --border: #2c2c2c;
  --border-light: #383838;

  --primary: #c0392b;
  --primary-hover: #e74c3c;
  --primary-glow: rgba(192, 57, 43, 0.25);
  --gold: #e8a020;
  --gold-light: #f5b942;
  --gold-glow: rgba(232, 160, 32, 0.2);

  --text-primary: #f0f0f0;
  --text-secondary: #999999;
  --text-muted: #666666;
  --text-on-primary: #ffffff;

  --success: #27ae60;
  --success-bg: rgba(39, 174, 96, 0.12);
  --warning: #f39c12;
  --warning-bg: rgba(243, 156, 18, 0.12);
  --error: #e74c3c;
  --error-bg: rgba(231, 76, 60, 0.12);
  --info: #3498db;
  --info-bg: rgba(52, 152, 219, 0.12);

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-primary: 0 4px 24px rgba(192, 57, 43, 0.3);
  --shadow-gold: 0 4px 24px rgba(232, 160, 32, 0.25);

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.12s ease;

  --font-head: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --navbar-h: 70px;
}

/* ── Bottom Navigation ── */
.bottom-nav {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 480px;
  background: rgba(18, 18, 18, 0.82);
  backdrop-filter: blur(15px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  z-index: 9990;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  gap: 4px;
  padding: 10px;
  min-width: 64px;
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
}

.bottom-nav-item .nav-icon {
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}

.bottom-nav-item:active {
  transform: scale(0.9);
}

.bottom-nav-item.active {
  color: var(--gold);
  background: rgba(232, 160, 32, 0.1);
}

.bottom-nav-item.active .nav-icon {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 8px rgba(232, 160, 32, 0.4));
}

.bottom-nav-item .cart-badge {
  position: absolute;
  top: 4px;
  right: 12px;
  background: var(--primary);
  color: white;
  font-size: 0.6rem;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  border: 2px solid #121212;
  display: none;
}

@media (min-width: 769px) {
  .bottom-nav {
    display: none;
  }
}

/* ── Google Maps Modal ── */
.map-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.map-modal-overlay.open {
  display: flex;
}

.map-modal {
  width: 100%;
  max-width: 900px;
  height: 80vh;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.map-modal-header {
  padding: 16px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.map-search-container {
  padding: 12px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

#map-canvas {
  flex: 1;
  width: 100%;
  background: #222;
}

.map-modal-footer {
  padding: 16px 24px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.pac-container {
  z-index: 10000 !important;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
}

.pac-item {
  padding: 10px 14px;
  color: var(--text-primary);
  border-top: 1px solid var(--border);
  cursor: pointer;
}

.pac-item:hover {
  background-color: var(--bg-surface);
}

.pac-item-query {
  color: var(--text-primary);
  font-size: 14px;
}

.pac-matched {
  color: var(--gold);
}

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

html, body {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.row, .grid, .grid-2, .grid-3, .grid-4 {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input,
textarea,
select {
  font-family: inherit;
}

ul {
  list-style: none;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ─────────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
}

.heading-xl {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.heading-lg {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.heading-md {
  font-size: clamp(1.3rem, 2.5vw, 2rem);
}

.heading-sm {
  font-size: 1.1rem;
  font-weight: 600;
}

.text-muted {
  color: var(--text-secondary);
}

.text-gold {
  color: var(--gold);
}

.text-primary-color {
  color: var(--primary);
}

.text-success {
  color: var(--success);
}

.text-warning {
  color: var(--warning);
}

.text-error {
  color: var(--error);
}

/* ─────────────────────────────────────────────
   LAYOUT
───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-lg {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.gap-6 {
  gap: 24px;
}

.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media(max-width:768px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media(max-width:900px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─────────────────────────────────────────────
   NAVBAR
───────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--navbar-h);
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
  border-bottom-color: rgba(192, 57, 43, 0.2);
}

.navbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), #8b1a13);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 17px;
  color: #fff;
  letter-spacing: -1px;
  box-shadow: var(--shadow-primary);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-name span {
  color: var(--gold);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Fix: Hide mobile-only action buttons on desktop (they show inside mobile menu) */
.mobile-actions {
  display: none;
}

.cart-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: var(--transition);
}

.cart-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-head);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Hamburger ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  width: 40px;
  height: 40px;
  justify-content: center;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav ── */
@media(max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .navbar-nav {
    display: none;
  }

  /* Hide action buttons in top bar on mobile — they move into the menu */
  .navbar-actions .btn:not(.cart-btn) {
    display: none;
  }

  .navbar-nav.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: var(--navbar-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 8, 8, 0.98);
    backdrop-filter: blur(24px);
    padding: 20px 16px 32px;
    gap: 4px;
    overflow-y: auto;
    border-top: 1px solid var(--border);
    animation: slideDown 0.22s ease forwards;
  }

  .navbar-nav.open .nav-link {
    font-size: 1.05rem;
    padding: 14px 16px;
    border-radius: var(--radius);
    border-bottom: 1px solid var(--border);
  }

  .navbar-nav.open .nav-link:last-of-type {
    border-bottom: none;
  }

  /* Mobile action buttons injected into nav menu */
  .navbar-nav.open .mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }

  .navbar-nav.open .mobile-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 0.95rem;
  }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ─────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #8b1a13);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(192, 57, 43, 0.4);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #c47c10);
  color: #000;
  border-color: transparent;
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-outline:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: var(--text-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.btn-sm {
  padding: 7px 16px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 15px 36px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-full {
  width: 100%;
}

.btn-icon {
  padding: 10px;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-danger {
  background: var(--error);
  color: #fff;
}

/* ─────────────────────────────────────────────
   CARDS
───────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow);
}

.card-glass {
  background: rgba(26, 26, 26, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
}

.card-body {
  padding: 24px;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
}

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* Stat Cards */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.stat-icon.red {
  background: var(--primary-glow);
  color: var(--primary);
}

.stat-icon.gold {
  background: var(--gold-glow);
  color: var(--gold);
}

.stat-icon.green {
  background: var(--success-bg);
  color: var(--success);
}

.stat-icon.blue {
  background: var(--info-bg);
  color: var(--info);
}

.stat-value {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ─────────────────────────────────────────────
   FORMS
───────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
  appearance: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-card);
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* ── Browser autofill override (prevents white-on-dark bg) ── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--bg-surface) inset !important;
  box-shadow: 0 0 0 1000px var(--bg-surface) inset !important;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: var(--text-primary);
}

.form-control.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px var(--error-bg);
}

.form-error {
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 6px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media(max-width:600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Input with icon */
.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.input-icon-right {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.input-icon-right:hover {
  color: var(--text-primary);
}

.input-group .form-control {
  padding-left: 44px;
}

.input-group .form-control.has-right {
  padding-right: 44px;
}

/* ─────────────────────────────────────────────
   BADGES / PILLS
───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-head);
  letter-spacing: 0.3px;
}

.badge-red {
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid rgba(192, 57, 43, 0.3);
}

.badge-gold {
  background: var(--gold-glow);
  color: var(--gold);
  border: 1px solid rgba(232, 160, 32, 0.3);
}

.badge-green {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(39, 174, 96, 0.3);
}

.badge-blue {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.badge-gray {
  background: rgba(100, 100, 100, 0.15);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* Order status badges */
.status-pending {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(243, 156, 18, 0.3);
}

.status-processing {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.status-delivering {
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid rgba(192, 57, 43, 0.3);
}

.status-delivered {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(39, 174, 96, 0.3);
}

.status-collected {
  background: var(--success-bg);
  color: var(--success);
}

.status-cancelled {
  background: var(--error-bg);
  color: var(--error);
}

/* ─────────────────────────────────────────────
   TABLES
───────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead tr {
  background: var(--bg-elevated);
}

th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: var(--transition-fast);
}

tbody tr:hover {
  background: var(--bg-elevated);
}

/* ─────────────────────────────────────────────
   TABS
───────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  background: var(--bg-surface);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.tab-btn.active.red {
  color: var(--primary);
  border: 1px solid rgba(192, 57, 43, 0.2);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@media(max-width:600px) {
  .tabs {
    flex-direction: column;
  }
}

/* ─────────────────────────────────────────────
   MODALS
───────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn 0.15s ease;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
  padding: 24px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1rem;
}

.modal-close:hover {
  background: var(--error-bg);
  color: var(--error);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ─────────────────────────────────────────────
   TOAST NOTIFICATIONS
───────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 500;
  max-width: 340px;
  pointer-events: all;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.hide {
  animation: slideOutRight 0.3s ease forwards;
}

.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast.success {
  border-color: rgba(39, 174, 96, 0.3);
}

.toast.success .toast-icon {
  color: var(--success);
}

.toast.error {
  border-color: rgba(231, 76, 60, 0.3);
}

.toast.error .toast-icon {
  color: var(--error);
}

.toast.warning {
  border-color: rgba(243, 156, 18, 0.3);
}

.toast.warning .toast-icon {
  color: var(--warning);
}

.toast.info {
  border-color: rgba(52, 152, 219, 0.3);
}

.toast.info .toast-icon {
  color: var(--info);
}

/* ─────────────────────────────────────────────
   HERO SECTIONS
───────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(192, 57, 43, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(232, 160, 32, 0.08) 0%, transparent 40%),
    var(--bg-base);
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
}

.hero-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(192, 57, 43, 0.1);
  border: 1px solid rgba(192, 57, 43, 0.25);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--gold-glow);
  border: 1px solid rgba(232, 160, 32, 0.3);
  border-radius: var(--radius-full);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─────────────────────────────────────────────
   PRODUCT CARDS
───────────────────────────────────────────── */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: rgba(192, 57, 43, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.product-img {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img img {
  transform: scale(1.07);
}

.product-category-tag {
  position: absolute;
  top: 12px;
  left: 12px;
}

.product-info {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.product-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  flex: 1;
  margin-bottom: 16px;
  line-height: 1.5;
}

.product-extras {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.extra-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.extra-toggle span {
  color: var(--gold);
  font-weight: 600;
}

.extra-toggle.active {
  border-color: var(--primary);
  background: rgba(192, 57, 43, 0.15);
  color: var(--text-primary);
}

.extra-toggle:hover {
  border-color: var(--primary);
  color: var(--text-primary);
}

.pap-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.78rem;
}
.pap-label { color: var(--text-secondary); }
.pap-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
  transition: color .15s;
}
.pap-btn:hover:not(:disabled) { color: var(--gold); }
.pap-btn:disabled { opacity: 0.3; cursor: default; }
.pap-count { font-weight: 700; color: var(--text-primary); min-width: 14px; text-align: center; }
.pap-price { color: var(--gold); font-weight: 600; }

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 12px;
}

.product-price {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--gold);
}

.product-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.qty-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.qty-display {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  min-width: 24px;
  text-align: center;
}

/* ── Weight-based cart controls ─────────────── */
.weight-ctrl-wrap {
  margin-top: 12px;
  position: relative;
  z-index: 2;
}

.weight-ctrl {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.weight-dual-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.weight-field {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  background: #2e2e2e;
  border: 2px solid #666;
  border-radius: 10px;
  padding: 8px 12px;
  transition: border-color 0.2s, background 0.2s;
  cursor: text;
}
.weight-field:focus-within {
  border-color: var(--gold);
  background: #363636;
}

.weight-inp {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
  -moz-appearance: textfield;
  min-width: 0;
  pointer-events: auto;
  cursor: text;
}
.weight-inp::-webkit-outer-spin-button,
.weight-inp::-webkit-inner-spin-button { -webkit-appearance: none; }

.weight-lbl {
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}

.weight-sep {
  font-size: 0.9rem;
  color: #888;
  flex-shrink: 0;
  pointer-events: none;
}

.weight-ctrl.in-cart .weight-field {
  border-color: var(--gold);
  background: rgba(232, 160, 32, 0.1);
}

/* ─────────────────────────────────────────────
   DELIVERY LOCATION
───────────────────────────────────────────── */

.delivery-addr-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.delivery-addr-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s;
}

.delivery-addr-input:focus { border-color: var(--primary); }

.locate-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.locate-btn:hover { border-color: var(--primary); }

.delivery-suggestions {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 4px;
  overflow: hidden;
  max-height: 180px;
  overflow-y: auto;
}

.delivery-suggestions:empty { display: none; }

.delivery-suggestion-item {
  padding: 9px 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}

.delivery-suggestion-item:last-child { border-bottom: none; }
.delivery-suggestion-item:hover { background: var(--bg-card); color: var(--text-primary); }

.delivery-distance-tag {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
}

/* ─────────────────────────────────────────────
   CHAT WIDGET
───────────────────────────────────────────── */

#chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(192, 57, 43, 0.5);
  z-index: 1000;
  transition: var(--transition);
}

#chat-fab:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(192, 57, 43, 0.7); }

.chat-fab-icon { font-size: 1.4rem; }
.chat-fab-close { font-size: 1rem; color: white; display: none; }
#chat-fab.open .chat-fab-icon { display: none; }
#chat-fab.open .chat-fab-close { display: block; }

#chat-panel {
  position: fixed;
  bottom: 96px;
  right: 28px;
  width: 340px;
  max-height: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

#chat-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.chat-header-info { display: flex; align-items: center; gap: 10px; }

.chat-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.chat-name { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.chat-status { font-size: 0.72rem; color: var(--gold); }
.chat-close-btn { background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; padding: 4px; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-msg-bot {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.chat-msg-user {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.chat-typing { display: flex; gap: 4px; align-items: center; padding: 10px 14px; }

.chat-typing span {
  width: 7px;
  height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing-bounce 1.2s infinite ease-in-out;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-6px); opacity: 1; }
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
}

.chat-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input:focus { border-color: var(--primary); }

.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.chat-send-btn:hover { background: #a93226; }

@media (max-width: 480px) {
  #chat-panel { right: 12px; left: 12px; width: auto; bottom: 88px; }
  #chat-fab { right: 16px; bottom: 20px; }
}

/* ─────────────────────────────────────────────
   CART PANEL
───────────────────────────────────────────── */
.cart-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 1500;
  width: 400px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
}

.cart-panel.open {
  transform: translateX(0);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  display: none;
}

.cart-overlay.open {
  display: block;
  animation: fadeIn 0.2s ease;
}

.cart-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  transition: var(--transition);
}

.cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.cart-item-price {
  color: var(--gold);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
}

.cart-item-remove {
  color: var(--text-muted);
  font-size: 1rem;
  padding: 4px;
  transition: var(--transition);
}

.cart-item-remove:hover {
  color: var(--error);
}

.cart-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cart-empty-icon {
  font-size: 3rem;
  opacity: 0.4;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
}

.cart-summary {
  margin-bottom: 16px;
}

.cart-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.cart-row.total {
  color: var(--text-primary);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 6px;
}

.cart-delivery-options {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.delivery-option {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.delivery-option.selected {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.delivery-option input {
  display: none;
}

.delivery-option-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.delivery-option-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media(max-width:480px) {
  .cart-panel {
    width: 100%;
  }
}

/* ─────────────────────────────────────────────
   STEP FORM (Registration)
───────────────────────────────────────────── */
.steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}

.step-item {
  display: flex;
  align-items: center;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}

.step-item.done .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.step-item.active .step-circle {
  background: linear-gradient(135deg, var(--primary), #8b1a13);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

.step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  margin: 0 8px;
}

.step-item.active .step-label {
  color: var(--primary);
}

.step-item.done .step-label {
  color: var(--success);
}

.step-line {
  width: 40px;
  height: 2px;
  background: var(--border);
  margin: 0 4px;
}

.step-item.done~.step-item .step-line {
  background: var(--success);
}

@media(max-width:500px) {
  .step-label {
    display: none;
  }

  .step-line {
    width: 20px;
  }
}

/* Step form pages */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

/* ─────────────────────────────────────────────
   SIDEBAR LAYOUT (Dashboard / Admin)
───────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 0;
}

.sidebar {
  width: 260px;
  min-height: 100vh;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 500;
  overflow-y: auto;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #8b1a13);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

.user-avatar.gold {
  background: linear-gradient(135deg, var(--gold), #c47c10);
  color: #000;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.sidebar-nav {
  padding: 12px 12px;
  flex: 1;
}

.sidebar-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 8px 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  cursor: pointer;
  user-select: none;
  outline: none;
}

.sidebar-link:focus-visible {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--gold);
}

.sidebar-link:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid rgba(192, 57, 43, 0.2);
}

.sidebar-link .link-icon {
  font-size: 1.1rem;
  width: 20px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}

/* Balance card in sidebar */
.sidebar-balance {
  margin: 12px 12px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(232, 160, 32, 0.08), rgba(192, 57, 43, 0.08));
  border: 1px solid rgba(232, 160, 32, 0.2);
  border-radius: var(--radius-lg);
}

.balance-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.balance-amount {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--gold);
}

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 28px;
  min-height: 100vh;
}

.page-header {
  margin-bottom: 28px;
}

.page-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 600;
  height: 60px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.mobile-topbar .brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1rem;
}

.sidebar-toggle {
  padding: 8px;
  color: var(--text-secondary);
  font-size: 1.2rem;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 490;
  background: rgba(0, 0, 0, 0.6);
}

@media(max-width:900px) {
  .mobile-topbar {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 80px 16px 28px;
  }
}

/* ─────────────────────────────────────────────
   REF NUMBER DISPLAY
───────────────────────────────────────────── */
.ref-card {
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.08), rgba(232, 160, 32, 0.06));
  border: 1px solid rgba(232, 160, 32, 0.25);
  border-radius: var(--radius-xl);
  padding: 28px;
  text-align: center;
}

.ref-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.ref-number {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: 4px;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(232, 160, 32, 0.3);
}

.ref-copy {
  margin-top: 12px;
}

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
}

.footer-brand {
  margin-bottom: 16px;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-heading {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--primary);
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-info-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-info-item span:first-child {
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media(max-width:768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ─────────────────────────────────────────────
   SECTION LABELS
───────────────────────────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.2);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

/* ─────────────────────────────────────────────
   HOW IT WORKS
───────────────────────────────────────────── */
.how-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.step-num {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary), #8b1a13);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.2rem;
  color: #fff;
  box-shadow: var(--shadow-primary);
  flex-shrink: 0;
}

.step-num.gold {
  background: linear-gradient(135deg, var(--gold), #c47c10);
  color: #000;
}

/* ─────────────────────────────────────────────
   ANIMATIONS
───────────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(80px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(80px);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--border) 50%, var(--bg-elevated) 75%);
  background-size: 200% auto;
  animation: shimmer 1.5s linear infinite;
  border-radius: var(--radius);
}

/* ─────────────────────────────────────────────
   PAGE AUTH WRAPPER
───────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.auth-left {
  flex: 1;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 560px;
  background: var(--bg-base);
}

.auth-right {
  flex: 1;
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.15), rgba(232, 160, 32, 0.05)),
    var(--bg-surface);
  border-left: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.auth-right-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.auth-decorations {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@media(max-width:900px) {
  .auth-right {
    display: none;
  }

  .auth-left {
    max-width: 100%;
    padding: 32px 24px;
  }
}

/* ─────────────────────────────────────────────
   MISC UTILITIES
───────────────────────────────────────────── */
.mt-1 {
  margin-top: 4px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 12px;
}

.mt-4 {
  margin-top: 16px;
}

.mt-6 {
  margin-top: 24px;
}

.mt-8 {
  margin-top: 32px;
}

.mb-1 {
  margin-bottom: 4px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-3 {
  margin-bottom: 12px;
}

.mb-4 {
  margin-bottom: 16px;
}

.mb-6 {
  margin-bottom: 24px;
}

.mb-8 {
  margin-bottom: 32px;
}

.p-4 {
  padding: 16px;
}

.p-6 {
  padding: 24px;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.font-head {
  font-family: var(--font-head);
}

.font-bold {
  font-weight: 700;
}

.w-full {
  width: 100%;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.overflow-hidden {
  overflow: hidden;
}

.relative {
  position: relative;
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Alert boxes */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.alert-info {
  background: var(--info-bg);
  border: 1px solid rgba(52, 152, 219, 0.3);
  color: var(--info);
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid rgba(39, 174, 96, 0.3);
  color: var(--success);
}

.alert-warning {
  background: var(--warning-bg);
  border: 1px solid rgba(243, 156, 18, 0.3);
  color: var(--warning);
}

.alert-error {
  background: var(--error-bg);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: var(--error);
}

/* Empty state */
.empty-state {
  padding: 60px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-icon {
  font-size: 3rem;
  opacity: 0.35;
}

.empty-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
}

.empty-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  max-width: 280px;
}

/* Order card */
.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  transition: var(--transition);
}

.order-card:hover {
  border-color: var(--border-light);
}

.order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.order-id {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
}

.order-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.order-items-list {
  margin-bottom: 12px;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 4px 0;
  color: var(--text-secondary);
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 8px;
  font-family: var(--font-head);
  font-weight: 700;
}

/* Product manager */
.product-admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
}

.product-admin-img {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  background: var(--bg-elevated);
}

.product-admin-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-admin-info {
  padding: 16px;
  flex: 1;
}

.product-admin-actions {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Phase 5: Visuals & Sponsorship ── */
.sponsor-brand {
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
}

.d-k-logo {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.d-k-logo span {
  color: var(--gold);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.8s ease-out forwards;
}

.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 0.5s ease-out backwards;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* Specials Ribbon */
.ribbon-special {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--gold);
  color: black;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 10;
  text-transform: uppercase;
  animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {
  0% {
    transform: scale(1);
    box-shadow: 0 2px 5px rgba(232, 160, 32, 0.4);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(232, 160, 32, 0.6);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 2px 5px rgba(232, 160, 32, 0.4);
  }
}

.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 20px;
}

.pricing-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.order-card-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
}

.order-card-detail.escalated {
  border-color: var(--error);
  box-shadow: 0 0 15px rgba(231, 76, 60, 0.2);
}

.escalation-badge {
  background: var(--error);
  color: white;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
  vertical-align: middle;
  margin-left: 8px;
}

.order-id {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.95rem;
}

.order-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.order-items-summary {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.order-foot-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 60%;
}

.order-card-total {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--gold);
}

.order-tracking {
  margin-top: 24px;
  padding: 0 10px;
}

.tracking-track {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 10px;
  position: relative;
  margin-bottom: 20px;
}

.tracking-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--gold), var(--primary));
  transition: width 0.8s ease-in-out;
}

.tracking-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  flex: 1;
}

.step span {
  width: 32px;
  height: 32px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
  z-index: 2;
}

.step label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step.active span {
  border-color: var(--gold);
  background: var(--gold-glow);
  transform: scale(1.1);
}

.step.active label {
  color: var(--gold);
}

/* .floating-actions removed as per V2 design — support moved to footer */

.float-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
  border: none;
  position: relative;
}

.float-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4);
}

.float-whatsapp {
  background: #25D366;
}

.float-chat {
  background: var(--primary);
  background: linear-gradient(135deg, var(--primary), #8e44ad);
}

.float-btn .badge-ai {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--gold);
  color: black;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 10px;
  border: 1px solid white;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.float-whatsapp {
  animation: pulse-green 2s infinite;
}

.chat-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 350px;
  height: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1999;
}

.chat-window.open {
  display: flex;
  animation: slideUp 0.3s ease;
}

.chat-header {
  padding: 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-status {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.5;
}

.msg.ai {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  align-self: flex-start;
}

.msg.user {
  background: var(--primary);
  color: white;
  align-self: flex-end;
}

.chat-input-area {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}
