/* ==========================================================================
   BAROMASE TERO PARBON - PREMIUM VEDIC E-COMMERCE DESIGN SYSTEM
   ========================================================================== */

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

:root {
  /* Royal Vedic Spiritual Palette */
  --vedic-maroon-dark: #240b03;
  --vedic-maroon: #3d1406;
  --vedic-maroon-light: #5e1f0a;
  
  --vedic-gold-glow: #fef08a;
  --vedic-gold-light: #fde047;
  --vedic-gold: #d97706;
  --vedic-gold-dark: #b45309;
  --vedic-amber: #b45309;
  
  --vedic-saffron: #ea580c;
  --vedic-saffron-light: #fed7aa;
  
  --sacred-bg: #fbf9f5;
  --sacred-surface: #ffffff;
  --sacred-card-bg: #fffdfa;
  
  --text-primary: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #78716c;
  --text-gold: #b45309;

  --border-subtle: #f0eae1;
  --border-gold: rgba(217, 119, 6, 0.25);
  --border-gold-strong: rgba(217, 119, 6, 0.55);

  --font-serif-sacred: 'Cinzel', 'Marcellus', Georgia, serif;
  --font-serif-sub: 'Marcellus', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Base Body Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--sacred-bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography Utilities */
.font-serif-sacred {
  font-family: var(--font-serif-sacred);
}

.font-serif-sub {
  font-family: var(--font-serif-sub);
}

/* Sacred Glow & Gradients */
.bg-vedic-gradient {
  background: linear-gradient(135deg, #2a0c03 0%, #451a03 50%, #2a0c03 100%);
}

.bg-vedic-radial {
  background: radial-gradient(circle at 50% 0%, #5e1f0a 0%, #2a0c03 85%);
}

.bg-gold-gradient {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #b45309 100%);
}

.bg-gold-shimmer {
  background: linear-gradient(90deg, #b45309 0%, #f59e0b 50%, #b45309 100%);
  background-size: 200% auto;
  animation: shimmer 3s infinite linear;
}

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

.text-gold-gradient {
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.border-gold-glow {
  border-color: var(--border-gold);
  box-shadow: 0 0 15px rgba(217, 119, 6, 0.15);
}

/* Diya Flicker Animation */
@keyframes diya-flame {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.8));
  }
  25% {
    transform: scale(1.08, 0.95) rotate(-2deg);
    filter: drop-shadow(0 0 10px rgba(234, 88, 12, 0.9));
  }
  50% {
    transform: scale(0.96, 1.05) rotate(2deg);
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.85));
  }
  75% {
    transform: scale(1.04, 0.98) rotate(-1deg);
    filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.95));
  }
}

.diya-glow {
  animation: diya-flame 3s infinite ease-in-out;
  display: inline-block;
}

/* Premium Product Cards */
.product-card {
  background-color: var(--sacred-card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #d97706, transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 10;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-gold);
  box-shadow: 0 16px 32px -8px rgba(61, 20, 6, 0.12), 0 0 0 1px rgba(217, 119, 6, 0.2);
}

.product-card:hover::before {
  opacity: 1;
}

.product-card-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  background: radial-gradient(circle, #fffbf2 0%, #fef3c7 100%);
  overflow: hidden;
}

.product-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Category Cards with Vedic Shrine Arches */
.category-card {
  background: var(--sacred-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-gold);
  box-shadow: 0 14px 28px -6px rgba(61, 20, 6, 0.1);
}

.category-arch-img {
  border-radius: 1rem;
  transition: transform 0.5s ease;
}

.category-card:hover .category-arch-img {
  transform: scale(1.06);
}

/* Status & Promotional Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: capitalize;
  letter-spacing: 0.025em;
}

.badge-active, .badge-completed {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-pending {
  background-color: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
}

.badge-processing {
  background-color: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.badge-cancelled {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.badge-inactive {
  background-color: #f5f5f4;
  color: #78716c;
  border: 1px solid #e7e5e4;
}

.badge-sacred {
  background: linear-gradient(135deg, #78350f, #451a03);
  color: #fef08a;
  border: 1px solid rgba(254, 240, 138, 0.4);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 0.375rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  padding: 0.875rem 1.25rem;
  border-radius: 0.75rem;
  background: #1c1917;
  color: #fdfbf7;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(217, 119, 6, 0.3);
}

.toast-success {
  border-left: 4px solid #10b981;
}

.toast-error {
  border-left: 4px solid #ef4444;
}

.toast-warning {
  border-left: 4px solid #f59e0b;
}

@keyframes slideInRight {
  from {
    transform: translateX(110%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Search Dropdown Suggestion Box */
.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border-gold);
  border-radius: 0.875rem;
  box-shadow: 0 16px 36px -6px rgba(45, 14, 4, 0.18);
  margin-top: 0.375rem;
  z-index: 60;
  max-height: 400px;
  overflow-y: auto;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #faf5ef;
  transition: all 0.2s ease;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover {
  background-color: #fffbeb;
}

/* Mobile Sticky Bottom Bar */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(36, 11, 3, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(217, 119, 6, 0.3);
  z-index: 45;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0.25rem env(safe-area-inset-bottom);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: #f5f0ea;
}

::-webkit-scrollbar-thumb {
  background: #d4c5b3;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b45309;
}

/* ==========================================================================
   ADMIN PANEL - STICKY / FIXED SIDEBAR & MOBILE DRAWER
   ========================================================================== */
.admin-sticky-sidebar {
  position: fixed;
  top: 3.5rem; /* 56px matching header h-14 */
  bottom: 0;
  left: 0;
  width: 16rem; /* 256px */
  height: calc(100vh - 3.5rem);
  max-height: calc(100vh - 3.5rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Sleek minimalist scrollbar for admin sidebar */
.admin-sticky-sidebar::-webkit-scrollbar {
  width: 5px;
}

.admin-sticky-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.admin-sticky-sidebar::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 9999px;
}

.admin-sticky-sidebar::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}

/* Mobile Admin Drawer when opened (< 768px) */
@media (max-width: 767px) {
  #admin-sidebar:not(.hidden) {
    display: block !important;
    position: fixed !important;
    top: 3.5rem !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 16rem !important;
    height: calc(100vh - 3.5rem) !important;
    max-height: calc(100vh - 3.5rem) !important;
    z-index: 40 !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.35), 0 8px 10px -6px rgba(0, 0, 0, 0.2) !important;
  }
}
