@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&display=swap');

:root {
  --primary: #15803d;
  --primary-light: #f0fdf4;
  --secondary: #059669;
  --accent: #22c55e;
  --background: #f8fafc;
  --surface: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #f1f5f9;
  --glass: rgba(255, 255, 255, 0.4);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-blur: blur(12px);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.glass-card {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
}

@keyframes scan-line {
  0% { top: 0; }
  100% { top: 100%; }
}

.scanning-container {
  position: relative;
  overflow: hidden;
}

.scanning-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(34, 197, 94, 0.8);
  box-shadow: 0 0 15px rgba(34, 197, 94, 1);
  z-index: 10;
  animation: scan-line 2s linear infinite;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--background);
  color: var(--text-main);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding-bottom: 90px;
  /* Space for sticky footer */
}

/* Navbar */
.navbar {
  box-shadow: var(--shadow-sm);
  z-index: 1060;
}

.navbar-brand {
  font-weight: 700;
  color: var(--primary) !important;
}

/* Hero Section */
.hero-wrapper {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 4rem 0 6rem;
  border-bottom-left-radius: 4rem;
  border-bottom-right-radius: 4rem;
  margin-bottom: -4rem;
  position: relative;
  z-index: 1;
}

/* Specific Sticky Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 1rem;
  z-index: 1050;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.bottom-nav .nav-item.active {
  color: var(--primary);
}

.bottom-nav .nav-item i {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

/* FAB Center Button */
.nav-center {
  position: relative;
  margin-top: -50px;
}

.fab-btn {
  width: 65px;
  height: 65px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 5px solid var(--background);
  box-shadow: 0 8px 16px rgba(21, 128, 61, 0.3);
  transition: transform 0.2s ease;
}

.fab-btn:hover {
  transform: scale(1.1);
  color: white;
}

/* Feature Cards */
.feature-card {
  background: white;
  border-radius: 1.5rem;
  border: none;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* Product Cards */
.product-card-modern {
  background: white;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  border: 1px solid var(--border);
}

.product-image-container {
  aspect-ratio: 1;
  background: #f1f5f9;
  position: relative;
}

.product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sidebar / Drawer */
.sidebar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 300px !important;
  height: 100vh !important;
  background: #ffffff !important;
  z-index: 99999 !important;
  transform: translateX(-100%) !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1) !important;
  padding: 1.5rem !important;
  display: flex !important;
  flex-direction: column !important;
  overflow-y: auto !important;
}

.sidebar.active {
  transform: translateX(0) !important;
}

.sidebar-header {
  margin-bottom: 2rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-bottom: 1px solid #f1f5f9 !important;
  padding-bottom: 1rem !important;
  width: 100% !important;
}

.sidebar-content {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
  width: 100% !important;
}

.sidebar .sidebar-link {
  display: flex !important;
  flex-direction: row !important;
  /* Icon and text in a row */
  align-items: center !important;
  padding: 1rem 1.25rem !important;
  color: #1e293b !important;
  /* var(--text-main) */
  text-decoration: none !important;
  border-radius: 1rem !important;
  transition: all 0.2s !important;
  font-weight: 500 !important;
  font-size: 1rem !important;
  width: 100% !important;
  margin-bottom: 0.5rem !important;
  white-space: nowrap !important;
}

.sidebar .sidebar-link i {
  width: 30px !important;
  margin-right: 15px !important;
  font-size: 1.25rem !important;
  color: #64748b !important;
  /* var(--text-muted) */
}

.sidebar .sidebar-link:hover,
.sidebar .sidebar-link.active {
  background: #f0fdf4 !important;
  /* var(--primary-light) */
  color: #15803d !important;
  /* var(--primary) */
}

.sidebar .sidebar-link:hover i,
.sidebar .sidebar-link.active i {
  color: #15803d !important;
}

.sidebar hr {
  border-top: 1px solid #f1f5f9 !important;
  margin: 1.5rem 0 !important;
  width: 100% !important;
}

/* Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1999;
  display: none;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-wrapper {
    padding: 3rem 0 5rem;
    border-bottom-left-radius: 2rem;
    border-bottom-right-radius: 2rem;
  }
}
/* Persistent Sidebar for Desktop (>= 992px) */
@media (min-width: 992px) {
    .admin-layout .offcanvas-lg-persistent {
        display: flex !important;
        visibility: visible !important;
        transform: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        border-right: 1px solid rgba(0, 0, 0, 0.05) !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        z-index: 1070 !important; /* Above navbar (1060) */
        background: #ffffff !important;
    }

    .admin-layout .offcanvas-lg-persistent .btn-close {
        display: none !important;
    }

    .admin-layout .offcanvas-lg-persistent .offcanvas-header {
        padding: 1.5rem 1rem !important;
    }

    /* Shift content when sidebar is present */
    .admin-layout .has-sidebar-desktop {
        margin-left: 280px !important;
        transition: margin-left 0.3s ease;
    }

    /* Adjust navbar when sidebar is present */
    .admin-layout .navbar.navbar-with-sidebar {
        margin-left: 280px !important;
        width: calc(100% - 280px) !important;
        border-radius: 0 0 0 1.5rem !important;
        transition: margin-left 0.3s ease, width 0.3s ease;
    }
    
    .admin-layout .navbar-with-sidebar .container {
        max-width: 100% !important;
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

/* Ensure list group items look premium */
.offcanvas .list-group-item {
    transition: all 0.2s ease;
    font-weight: 500;
}

.offcanvas .list-group-item:hover {
    padding-left: 1.5rem !important;
    background-color: var(--primary-light) !important;
    color: var(--primary) !important;
}

.offcanvas .list-group-item i {
    width: 20px;
}
