/* ============================================
   BRICKS & MORTAR - DESIGN SYSTEM
   Brand Colors: Forest #183B2A, Deep Forest #102B20
   Warm Background #F8F7F2, Surface #FFFFFF
   Charcoal #172019, Muted #66706A, Terracotta #E8752E
   ============================================ */

/* CSS RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --bnb-forest: #183B2A;
  --bnb-deep: #102B20;
  --bnb-warm: #F8F7F2;
  --bnb-surface: #FFFFFF;
  --bnb-charcoal: #172019;
  --bnb-muted: #66706A;
  --bnb-terra: #E8752E;
  --bnb-terra-hover: #D4681F;
  --bnb-green-light: #E8F0EB;
  --bnb-border: #E2E0DB;
  --bnb-error: #D32F2F;
  --bnb-success: #2E7D32;
  --bnb-radius: 12px;
  --bnb-radius-sm: 8px;
  --bnb-radius-lg: 16px;
  --bnb-shadow: 0 1px 3px rgba(0,0,0,0.06);
  --bnb-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --bnb-shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --bnb-transition: all 0.2s ease;
  --bnb-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  font-family: var(--bnb-font);
  background: var(--bnb-warm);
  color: var(--bnb-charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--bnb-forest); text-decoration: none; transition: var(--bnb-transition); }
a:hover { color: var(--bnb-terra); }
img { max-width: 100%; height: auto; display: block; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 { color: var(--bnb-charcoal); line-height: 1.3; font-weight: 700; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }
p { margin-bottom: 0.75rem; color: var(--bnb-muted); }
.text-muted { color: var(--bnb-muted); }
.text-terra { color: var(--bnb-terra); }
.text-forest { color: var(--bnb-forest); }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }

/* LAYOUT */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.hidden { display: none !important; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

/* CARDS */
.card {
  background: var(--bnb-surface);
  border-radius: var(--bnb-radius);
  padding: 1.5rem;
  box-shadow: var(--bnb-shadow);
  transition: var(--bnb-transition);
}
.card:hover { box-shadow: var(--bnb-shadow-md); }
.card-flat { box-shadow: none; border: 1px solid var(--bnb-border); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.625rem 1.25rem; border-radius: var(--bnb-radius-sm);
  font-weight: 600; font-size: 0.9375rem; border: none; cursor: pointer;
  transition: var(--bnb-transition); text-decoration: none; gap: 0.5rem;
  line-height: 1.4;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--bnb-terra); color: #fff; }
.btn-primary:hover { background: var(--bnb-terra-hover); color: #fff; }
.btn-secondary { background: var(--bnb-forest); color: #fff; }
.btn-secondary:hover { background: var(--bnb-deep); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--bnb-border); color: var(--bnb-charcoal); }
.btn-outline:hover { border-color: var(--bnb-forest); color: var(--bnb-forest); }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1.0625rem; }
.btn-danger { background: var(--bnb-error); color: #fff; }
.btn-success { background: var(--bnb-success); color: #fff; }

/* FORMS */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; font-size: 0.875rem; margin-bottom: 0.375rem; color: var(--bnb-charcoal); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 0.625rem 0.875rem; border: 1.5px solid var(--bnb-border);
  border-radius: var(--bnb-radius-sm); background: var(--bnb-surface);
  font-size: 0.9375rem; transition: var(--bnb-transition); color: var(--bnb-charcoal);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--bnb-forest); box-shadow: 0 0 0 3px rgba(24,59,42,0.1);
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-help { font-size: 0.8125rem; color: var(--bnb-muted); margin-top: 0.25rem; }
.form-error { font-size: 0.8125rem; color: var(--bnb-error); margin-top: 0.25rem; }

/* NAVIGATION */
.navbar {
  background: var(--bnb-surface); padding: 0.875rem 0;
  border-bottom: 1px solid var(--bnb-border); position: sticky; top: 0; z-index: 100;
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 0 1.25rem;
}
.navbar-brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.25rem; color: var(--bnb-forest); }
.navbar-brand span { color: var(--bnb-terra); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { font-weight: 500; font-size: 0.9375rem; }
.nav-links a.active { color: var(--bnb-terra); }
.nav-search { flex: 1; max-width: 400px; margin: 0 2rem; }
.nav-search input {
  width: 100%; padding: 0.5rem 1rem; border: 1.5px solid var(--bnb-border);
  border-radius: 100px; background: var(--bnb-warm); font-size: 0.9375rem;
}

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--bnb-forest) 0%, var(--bnb-deep) 100%);
  color: #fff; padding: 5rem 0; text-align: center;
}
.hero h1 { color: #fff; font-size: 2.75rem; margin-bottom: 1rem; }
.hero p { color: rgba(255,255,255,0.85); font-size: 1.125rem; max-width: 600px; margin: 0 auto 2rem; }
.hero .btn-primary { font-size: 1.0625rem; padding: 0.875rem 2rem; }
.hero-search {
  max-width: 560px; margin: 0 auto; display: flex; gap: 0.5rem;
}
.hero-search input {
  flex: 1; padding: 0.875rem 1.25rem; border: none; border-radius: var(--bnb-radius-sm);
  font-size: 1rem;
}
.hero-search .btn { border-radius: var(--bnb-radius-sm); }

/* BUSINESS CARD */
.business-card {
  background: var(--bnb-surface); border-radius: var(--bnb-radius);
  overflow: hidden; box-shadow: var(--bnb-shadow); transition: var(--bnb-transition);
}
.business-card:hover { box-shadow: var(--bnb-shadow-lg); transform: translateY(-2px); }
.business-card-img { width: 100%; height: 200px; object-fit: cover; background: var(--bnb-green-light); }
.business-card-body { padding: 1.25rem; }
.business-card-title { font-size: 1.0625rem; font-weight: 700; margin-bottom: 0.25rem; }
.business-card-meta { font-size: 0.8125rem; color: var(--bnb-muted); display: flex; gap: 1rem; flex-wrap: wrap; }
.business-card-badge {
  display: inline-block; padding: 0.125rem 0.5rem; border-radius: 100px;
  font-size: 0.75rem; font-weight: 600;
}
.badge-featured { background: var(--bnb-terra); color: #fff; }
.badge-verified { background: var(--bnb-green-light); color: var(--bnb-forest); }
.badge-spotlight { background: #FFF3E0; color: #E65100; }

/* PRODUCT CARD */
.product-card {
  background: var(--bnb-surface); border-radius: var(--bnb-radius);
  overflow: hidden; box-shadow: var(--bnb-shadow); transition: var(--bnb-transition);
}
.product-card:hover { box-shadow: var(--bnb-shadow-md); }
.product-card-img { width: 100%; height: 180px; object-fit: cover; background: var(--bnb-green-light); }
.product-card-body { padding: 1rem; }
.product-card-price { font-weight: 700; color: var(--bnb-terra); font-size: 1.125rem; }
.product-card-title { font-size: 0.9375rem; font-weight: 600; margin: 0.25rem 0; }

/* NICHE CARD */
.niche-card {
  background: var(--bnb-surface); border-radius: var(--bnb-radius);
  padding: 1.5rem; text-align: center; box-shadow: var(--bnb-shadow);
  transition: var(--bnb-transition); border: 2px solid transparent;
}
.niche-card:hover { border-color: var(--bnb-terra); box-shadow: var(--bnb-shadow-md); }
.niche-card-count { font-size: 0.8125rem; color: var(--bnb-muted); }

/* ALERTS */
.alert {
  padding: 0.875rem 1.25rem; border-radius: var(--bnb-radius-sm);
  margin-bottom: 1rem; font-size: 0.9375rem;
}
.alert-success { background: #E8F5E9; color: #1B5E20; border: 1px solid #C8E6C9; }
.alert-error { background: #FFEBEE; color: #B71C1C; border: 1px solid #FFCDD2; }
.alert-info { background: #E3F2FD; color: #0D47A1; border: 1px solid #BBDEFB; }

/* TABLES */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--bnb-border); font-size: 0.9375rem; }
th { font-weight: 600; color: var(--bnb-muted); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.03em; }
tr:hover td { background: var(--bnb-warm); }

/* STATUS BADGES */
.status { padding: 0.25rem 0.625rem; border-radius: 100px; font-size: 0.75rem; font-weight: 600; display: inline-block; }
.status-active { background: #E8F5E9; color: #1B5E20; }
.status-pending { background: #FFF3E0; color: #E65100; }
.status-suspended { background: #FFEBEE; color: #B71C1C; }
.status-rejected { background: #FFEBEE; color: #B71C1C; }
.status-closed { background: #ECEFF1; color: #37474F; }

/* DASHBOARD SIDEBAR */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px; background: var(--bnb-deep); color: #fff; padding: 1.5rem 0;
  position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 200;
}
.sidebar-brand { padding: 0 1.5rem 1.5rem; font-weight: 700; font-size: 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-brand span { color: var(--bnb-terra); }
.sidebar-nav { padding: 1rem 0; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.5rem;
  color: rgba(255,255,255,0.7); font-size: 0.9375rem; font-weight: 500;
  transition: var(--bnb-transition);
}
.sidebar-nav a:hover, .sidebar-nav a.active { color: #fff; background: rgba(255,255,255,0.1); }
.sidebar-nav a.active { border-right: 3px solid var(--bnb-terra); }
.sidebar-section { padding: 0.5rem 1.5rem; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.4); margin-top: 1rem; }

.main-content { margin-left: 260px; flex: 1; padding: 2rem; background: var(--bnb-warm); min-height: 100vh; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.page-title { font-size: 1.5rem; font-weight: 700; }

/* STAT CARDS */
.stat-card { background: var(--bnb-surface); border-radius: var(--bnb-radius); padding: 1.25rem; box-shadow: var(--bnb-shadow); }
.stat-card-value { font-size: 1.75rem; font-weight: 700; color: var(--bnb-charcoal); }
.stat-card-label { font-size: 0.8125rem; color: var(--bnb-muted); margin-top: 0.25rem; }
.stat-card-icon { width: 40px; height: 40px; border-radius: var(--bnb-radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.stat-card-icon.green { background: var(--bnb-green-light); color: var(--bnb-forest); }
.stat-card-icon.orange { background: #FFF3E0; color: var(--bnb-terra); }

/* PAGINATION */
.pagination { display: flex; gap: 0.25rem; justify-content: center; margin-top: 1.5rem; }
.pagination a, .pagination span {
  padding: 0.5rem 0.875rem; border-radius: var(--bnb-radius-sm);
  font-size: 0.875rem; font-weight: 500;
}
.pagination a { background: var(--bnb-surface); color: var(--bnb-charcoal); }
.pagination a:hover { background: var(--bnb-green-light); }
.pagination .active { background: var(--bnb-forest); color: #fff; }

/* FOOTER */
.footer { background: var(--bnb-deep); color: rgba(255,255,255,0.7); padding: 3rem 0 1.5rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer a { color: rgba(255,255,255,0.7); font-size: 0.9375rem; }
.footer a:hover { color: var(--bnb-terra); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; text-align: center; font-size: 0.875rem; }

/* MOBILE MENU */
.mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.75rem; }
  .hero-search { flex-direction: column; }
  .nav-links { display: none; }
  .nav-search { display: none; }
  .mobile-toggle { display: block; }
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .admin-layout { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; gap: 1rem; align-items: flex-start; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* STOREFRONT */
.storefront-hero {
  height: 280px; background-size: cover; background-position: center;
  position: relative; border-radius: var(--bnb-radius-lg); overflow: hidden;
}
.storefront-hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 60%; background: linear-gradient(transparent, rgba(0,0,0,0.6));
}
.storefront-info { position: relative; z-index: 1; margin-top: -60px; padding: 0 2rem; }
.storefront-logo {
  width: 80px; height: 80px; border-radius: 50%; border: 3px solid #fff;
  background: var(--bnb-surface); object-fit: cover;
}
.storefront-contact { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.whatsapp-btn { background: #25D366; color: #fff; padding: 0.75rem 1.5rem; border-radius: var(--bnb-radius-sm); font-weight: 600; }
.whatsapp-btn:hover { background: #128C7E; color: #fff; }
.call-btn { background: var(--bnb-forest); color: #fff; padding: 0.75rem 1.5rem; border-radius: var(--bnb-radius-sm); font-weight: 600; }
.call-btn:hover { background: var(--bnb-deep); color: #fff; }

/* LOADING */
.spinner { width: 24px; height: 24px; border: 3px solid var(--bnb-border); border-top-color: var(--bnb-terra); border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state h3 { color: var(--bnb-charcoal); margin-bottom: 0.5rem; }
.empty-state p { color: var(--bnb-muted); margin-bottom: 1.5rem; }
