/* ============================================================
   Plant Store — Modern Soft Green Aesthetic
   Palette: Sage green, mint, cream, warm white
   Vibe: Clean, premium, Gen-Z friendly
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,700&display=swap');

:root {
  /* Core palette (Emerald) */
  --green-900: #064e3b;
  --green-800: #065f46;
  --green-700: #047857;
  --green-600: #059669;
  --green-500: #10b981;
  --green-400: #34d399;
  --green-300: #6ee7b7;
  --green-200: #a7f3d0;
  --green-100: #d1fae5;
  --green-50:  #ecfdf5;

  /* Semantic */
  --primary:       var(--green-800);
  --primary-light: var(--green-600);
  --primary-dark:  var(--green-900);
  --accent:        #d4af37; /* Elegant subtle gold accent for stars/highlights */

  /* Neutrals — warm tinted */
  --bg:         #fcfcfc;
  --surface:    #ffffff;
  --surface-2:  #f8faf9;
  --border:     #ebeceb;
  --border-2:   #dcdedd;

  /* Text */
  --text:       #111827;
  --text-2:     #374151;
  --text-light: #6b7280;
  --text-muted: #9ca3af;

  /* Feedback */
  --danger:   #ef4444;
  --danger-bg:#fef2f2;
  --warning:  #f59e0b;
  --warn-bg:  #fffbeb;
  --success:  var(--green-600);
  --info:     #3b82f6;
  --info-bg:  #eff6ff;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.03);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.08);
  --shadow:    var(--shadow-sm);

  /* Shape */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration: 300ms;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-light); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--primary); }

img { max-width: 100%; display: block; }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.page-content { padding: 36px 0; }

/* ── Navbar ── */
.navbar {
  background: #ffffff;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.navbar-brand {
  color: #222;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
  font-family: 'Fraunces', serif;
}
.navbar-brand span { font-size: 1.5rem; }
.navbar-logo { max-height: 40px; width: auto; object-fit: contain; }
.navbar-brand-fallback { display: none; align-items: center; gap: 8px; color: #222; }
.footer-logo { max-height: 48px; width: auto; object-fit: contain; margin-bottom: 8px; display: block; }
.auth-logo-wrap { text-align: center; margin-bottom: 20px; }
.auth-logo { max-height: 64px; width: auto; object-fit: contain; }
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.navbar-nav a {
  color: #444;
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--duration) var(--ease);
}
.navbar-nav a:hover {
  color: var(--green-800);
}
.navbar-nav a.active {
  color: var(--green-800);
  font-weight: 700;
}
.navbar-nav .badge {
  background: var(--danger);
  color: white;
  border-radius: var(--radius-full);
  padding: 1px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: 3px;
  vertical-align: middle;
}
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: #222;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green-600) 60%, var(--green-400) 100%);
  color: white;
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.hero p {
  font-size: 1.1rem;
  opacity: 0.88;
  margin-bottom: 28px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-header {
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  color: white;
  padding: 16px 22px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.1px;
}
.card-body { padding: 22px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.1px;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(4,120,87,0.25);
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  box-shadow: 0 6px 20px rgba(4,120,87,0.35);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--green-50);
  color: var(--primary);
  border-color: var(--green-300);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--green-400);
}
.btn-outline:hover {
  background: var(--green-50);
  border-color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 2px 10px rgba(224,82,82,0.25);
}
.btn-danger:hover {
  background: #c94444;
  color: white;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover { background: var(--surface-2); }

.btn-sm  { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg  { padding: 13px 30px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-2);
  letter-spacing: 0.2px;
}
.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  transition: all var(--duration) var(--ease);
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(82,183,136,0.18);
  background: var(--surface);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control.error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(224,82,82,0.12); }
.form-error { color: var(--danger); font-size: 0.78rem; margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.form-hint  { color: var(--text-muted); font-size: 0.78rem; margin-top: 5px; }

/* ── Alerts ── */
.alert {
  padding: 13px 18px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: var(--green-50);  border-color: var(--green-200); color: var(--green-700); }
.alert-danger  { background: var(--danger-bg); border-color: #f5c6c6;         color: #b91c1c; }
.alert-warning { background: var(--warn-bg);   border-color: #fde68a;         color: #92400e; }
.alert-info    { background: var(--info-bg);   border-color: #bfdbfe;         color: #1d4ed8; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.badge-success   { background: var(--green-100); color: var(--green-700); }
.badge-warning   { background: #fef3c7; color: #92400e; }
.badge-danger    { background: #fee2e2; color: #b91c1c; }
.badge-info      { background: #dbeafe; color: #1d4ed8; }
.badge-secondary { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }

/* Order status badges */
.status-pending          { background: #fef3c7; color: #92400e; }
.status-processed        { background: #dbeafe; color: #1e40af; }
.status-shipped          { background: #ede9fe; color: #5b21b6; }
.status-in_transit       { background: #e0e7ff; color: #3730a3; }
.status-out_for_delivery { background: #ccfbf1; color: #0f766e; }
.status-delivered        { background: var(--green-100); color: var(--green-700); }
.status-paid             { background: var(--green-100); color: var(--green-700); }
.status-rejected         { background: #fee2e2; color: #b91c1c; }

/* ── Section title ── */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 22px;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--green-200), transparent);
  border-radius: 2px;
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 22px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--primary-light); font-weight: 500; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-muted); }

/* ── Product Grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-300);
}
.product-card-img {
  width: 100%;
  height: 190px;
  background: linear-gradient(135deg, var(--green-50), var(--green-100));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  overflow: hidden;
  position: relative;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-body { padding: 14px 16px; flex: 1; }
.product-card-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary-light);
  margin-bottom: 5px;
}
.product-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}
.product-card-price { font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.product-card-price .original {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 400;
  margin-right: 4px;
}
.product-card-price .discount-badge {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  margin-left: 5px;
}
.product-card-stock { font-size: 0.75rem; color: var(--text-muted); margin-top: 5px; }
.product-card-stock.out { color: var(--danger); font-weight: 600; }
.product-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* ── Table ── */
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th {
  background: var(--green-50);
  color: var(--text-2);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  text-align: left;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--duration) var(--ease); }
.table tbody tr:hover td { background: var(--green-50); }

/* ── Pagination ── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--duration) var(--ease);
}
.pagination a:hover { background: var(--green-50); border-color: var(--green-300); color: var(--primary); }
.pagination .active { background: var(--primary); color: white; border-color: var(--primary); }

/* ── Cart ── */
.cart-item {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green-50), var(--green-100));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; color: var(--text); font-size: 0.95rem; margin-bottom: 3px; }
.cart-item-price { color: var(--primary); font-weight: 700; font-size: 0.9rem; }

/* ── Loading spinner ── */
.loading {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Admin layout ── */
.admin-layout { display: flex; min-height: calc(100vh - 64px); }
.admin-sidebar {
  width: 250px;
  background: var(--green-900);
  padding: 24px 0;
  flex-shrink: 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--duration) var(--ease);
  border-left: 3px solid transparent;
}
.admin-sidebar a:hover {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.95);
  border-left-color: var(--green-400);
}
.admin-sidebar a.active {
  background: rgba(255,255,255,0.1);
  color: white;
  border-left-color: var(--green-400);
}
.admin-sidebar .sidebar-title {
  color: rgba(255,255,255,0.3);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 18px 22px 7px;
  font-weight: 700;
}
.admin-content { flex: 1; padding: 32px; overflow-x: auto; background: var(--bg); }

/* ── Stats cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--duration) var(--ease);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-500), var(--green-300));
  border-radius: 3px 3px 0 0;
}
.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.stat-card .stat-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ── Chip / Tag ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--green-100);
  color: var(--green-700);
  border: 1px solid var(--green-200);
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 16px; opacity: 0.6; }
.empty-state p { font-size: 0.95rem; margin-bottom: 20px; }

/* ── Responsive ── */

/* Tablet landscape & below (1024px) */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-sidebar { width: 220px; }
}

/* Tablet portrait (768px) */
@media (max-width: 768px) {
  /* Navbar */
  .navbar { padding: 0 16px; }
  .navbar-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: white;
    padding: 12px 16px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    gap: 4px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    z-index: 199;
  }
  .navbar-nav.open { display: flex; }
  .navbar-nav li { width: 100%; }
  .navbar-nav a {
    border-radius: var(--radius);
    padding: 11px 16px;
    width: 100%;
    font-size: 1rem;
    color: #444;
  }
  .navbar-nav a:hover { background: #f9f9f9; color: var(--green-800); }
  .navbar-toggle { display: block; color: #222; }

  /* Layout */
  .container { padding: 0 16px; }
  .page-content { padding: 20px 0; }

  /* Hero */
  .hero { padding: 48px 16px; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 0.95rem; }

  /* Products */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card-img { height: 150px; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card .stat-value { font-size: 1.5rem; }

  /* Admin */
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
    display: flex;
    flex-wrap: wrap;
    padding: 8px;
    gap: 2px;
  }
  .admin-sidebar .sidebar-title { display: none; }
  .admin-sidebar a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border-left: none;
    font-size: 0.8rem;
    flex: 0 0 auto;
  }
  .admin-sidebar a:hover, .admin-sidebar a.active {
    border-left: none;
    background: rgba(255,255,255,0.15);
  }
  .admin-content { padding: 20px 16px; }

  /* Tables — horizontal scroll */
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
  .table { min-width: 600px; }

  /* Cards */
  .card-body { padding: 16px; }

  /* Responsive grid helpers */
  .grid-2 { grid-template-columns: 1fr; }
  .hide-mobile { display: none !important; }
}

/* Mobile (480px) */
@media (max-width: 480px) {
  .container { padding: 0 12px; }

  /* Products */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card-img { height: 130px; font-size: 2.5rem; }
  .product-card-body { padding: 10px 12px; }
  .product-card-title { font-size: 0.85rem; }
  .product-card-price { font-size: 0.95rem; }
  .product-card-footer { padding: 10px 12px; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* Hero */
  .hero { padding: 40px 12px; }
  .hero h1 { font-size: 1.6rem; }

  /* Buttons */
  .btn-lg { padding: 12px 22px; font-size: 0.9rem; }

  /* Section title */
  .section-title { font-size: 1.15rem; }
  .section-title::after { display: none; }

  /* Cart item */
  .cart-item { gap: 12px; }
  .cart-item-img { width: 64px; height: 64px; font-size: 1.5rem; }
}

/* Very small (360px) */
@media (max-width: 360px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .container { padding: 0 10px; }
  .navbar-brand { font-size: 1.1rem; }
}

/* ── Utility ── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Responsive grid helpers */
.col-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.col-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 768px) {
  .col-2 { grid-template-columns: 1fr; gap: 16px; }
  .col-3 { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 480px) {
  .col-2.keep-2 { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* Table wrapper for mobile scroll */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.table-wrap .table { min-width: 560px; border: none; }
.table-wrap .table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.table-wrap .table th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }

/* ── Home page specific ── */
@media (max-width: 640px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 360px) {
  .stats-bar { grid-template-columns: 1fr 1fr !important; }
  .stats-bar > div { padding: 14px 10px; }
}

/* ── Footer responsive ── */
footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 768px) {
  footer .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}
@media (max-width: 480px) {
  footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ── Profile & address responsive ── */
@media (max-width: 768px) {
  .profile-grid { grid-template-columns: 1fr !important; }
  .address-grid { grid-template-columns: 1fr !important; }
}

/* ── Admin order detail responsive ── */
@media (max-width: 768px) {
  .admin-order-grid { grid-template-columns: 1fr !important; }
}

/* ── Checkout & cart responsive ── */
@media (max-width: 768px) {
  .checkout-grid { grid-template-columns: 1fr !important; }
  .cart-layout   { grid-template-columns: 1fr !important; }
}

/* ── Product detail responsive ── */
@media (max-width: 640px) {
  .product-detail-grid { grid-template-columns: 1fr !important; }
}

/* ── Courier grid on mobile ── */
@media (max-width: 480px) {
  .courier-grid { grid-template-columns: 1fr !important; }
  .payment-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ── Prevent horizontal overflow globally ── */
body { overflow-x: hidden; }
* { max-width: 100%; }
img, video, iframe { max-width: 100%; height: auto; }

/* ── Hero Section (split layout Mooala style) ── */
.hero-section {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  min-height: 580px;
  background: #81A28A; /* Fresh elegant sage green */
  overflow: hidden;
}
.hero-overlay { display:none; }
.hero-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px 40px 80px 40px; text-align: left;
  max-width: 600px; margin-left: auto;
}
.hero-badge { display:none; }
.hero-logo { display:none; }
.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.05;
  margin-bottom: 24px;
}
.hero-subtitle {
  font-size: 1.15rem; color: #ffffff;
  max-width: 480px; margin: 0 0 40px; line-height: 1.6;
  font-weight: 500;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-hero-primary {
  background: #ffffff; color: #222222; font-weight: 700;
  padding: 16px 36px; border-radius: 4px; /* Flatter button */
  box-shadow: none;
  font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.5px;
  transition: all var(--duration) var(--ease);
}
.btn-hero-primary:hover { background: #f0f0f0; color: #111; transform: translateY(-1px); }
.btn-hero-secondary { display:none; }
.hero-visual {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 0; overflow: hidden;
}
.hero-visual img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: center right;
}
@media (max-width: 900px) {
  .hero-section { grid-template-columns: 1fr; min-height: 500px; }
  .hero-content { padding: 60px 24px; max-width: 100%; align-items: flex-start; text-align: left; }
  .hero-visual { display: none; }
}

/* ── Services Section ── */
.services-section { padding:52px 0; }
.services-header { text-align:center; margin-bottom:36px; }
.services-subtitle { color:var(--text-muted); font-size:1rem; margin-top:8px; }
.services-grid { display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:24px; }
.service-card { display:flex; flex-direction:column; align-items:center;
  text-align:center; padding:32px 24px; background:var(--surface);
  border:1px solid var(--border); border-radius:var(--radius-lg);
  text-decoration:none; color:inherit;
  transition:transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }
.service-card:hover { transform:translateY(-6px); box-shadow:var(--shadow-lg); }
.service-icon-wrap { width:72px; height:72px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  margin-bottom:16px; }
.service-icon { font-size:2rem; }
.service-name { font-size:1rem; font-weight:700; color:var(--text);
  margin-bottom:8px; }
.service-desc { font-size:0.85rem; color:var(--text-muted);
  line-height:1.6; flex:1; margin-bottom:16px; }
.service-link { font-size:0.82rem; color:var(--primary);
  font-weight:600; }
@media (max-width:640px) {
  .services-grid { grid-template-columns:1fr; }
}

/* ── Product Gallery ─────────────────────────────────────────── */
.product-gallery { outline:none; }
.gallery-main { width:100%; height:380px; background:#e8f5e9;
  border-radius:var(--radius); overflow:hidden; display:flex;
  align-items:center; justify-content:center; }
.gallery-main img { width:100%; height:100%; object-fit:cover; }
.gallery-placeholder { font-size:6rem; }
.gallery-thumbs { display:flex; gap:8px; margin-top:12px;
  overflow-x:auto; padding-bottom:4px; }
.gallery-thumb { width:72px; height:72px; object-fit:cover;
  border-radius:6px; cursor:pointer; border:2px solid transparent;
  flex-shrink:0; transition:border-color var(--duration) var(--ease); }
.gallery-thumb.active { border-color:var(--primary); }
.gallery-thumb:hover { border-color:var(--primary-light); }
@media (max-width:480px) {
  .gallery-thumbs { flex-wrap:nowrap; }
}

/* ── Additional responsive fixes ── */

/* Training detail */
@media (max-width: 768px) {
  .training-detail-layout { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  .training-info-grid { grid-template-columns: 1fr !important; }
}

/* Service & Consultation layout */
@media (max-width: 768px) {
  .service-layout      { grid-template-columns: 1fr !important; }
  .consultation-layout { grid-template-columns: 1fr !important; }
}

/* Payment layout */
@media (max-width: 768px) {
  .payment-layout  { grid-template-columns: 1fr !important; }
  .payment-summary { position: static !important; }
}

/* Cart layout */
@media (max-width: 640px) {
  .cart-layout { grid-template-columns: 1fr !important; }
  .cart-summary { position: static !important; }
  .cart-item { flex-wrap: wrap; }
  .cart-item-actions {
    flex-direction: row !important;
    align-items: center !important;
    width: 100%;
    justify-content: flex-end;
  }
}

/* Address form grid */
@media (max-width: 480px) {
  .address-form-grid { grid-template-columns: 1fr !important; }
}

/* Admin order grid */
@media (max-width: 900px) {
  .admin-order-grid  { grid-template-columns: 1fr !important; }
  .admin-status-grid { grid-template-columns: 1fr !important; }
}

/* Product detail grid */
@media (max-width: 640px) {
  .product-detail-grid {
    grid-template-columns: 1fr !important;
    padding: 16px !important;
    gap: 20px !important;
  }
  .gallery-main { height: 260px !important; }
}

/* Prevent section-title overflow on small screens */
@media (max-width: 480px) {
  .section-title { flex-wrap: wrap; }
  .section-title::after { display: none; }
}

/* Notification header wrap */
@media (max-width: 400px) {
  .notif-header { flex-direction: column !important; align-items: flex-start !important; }
}

/* Admin content padding on mobile */
@media (max-width: 480px) {
  .admin-content { padding: 16px 12px !important; }
}

/* Ensure all inline grids collapse properly */
@media (max-width: 768px) {
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 640px) {
  [style*="grid-template-columns:1fr 300px"],
  [style*="grid-template-columns:1fr 320px"],
  [style*="grid-template-columns:1fr 280px"],
  [style*="grid-template-columns: 1fr 300px"],
  [style*="grid-template-columns: 1fr 320px"],
  [style*="grid-template-columns: 1fr 280px"] {
    grid-template-columns: 1fr !important;
  }
}
