/* 
 * Custom Furniture ERP & E-Commerce Platform CSS
 * Main stylesheet for the public website
 */

/* Custom Variables */
:root {
  /* Warm Premium Color Palette */
  --primary-color: #8B4513; /* Dark Wood Brown */
  --secondary-color: #D2B48C; /* Cream/Tan */
  --accent-color: #5D4037; /* Deep Brown */
  --light-color: #F5F5DC; /* Cream */
  --dark-color: #3E2723; /* Soft Black */
  --success-color: #81C784;
  --warning-color: #FFB74D;
  
  /* Typography */
  --font-primary: 'Montserrat', sans-serif;
  --font-secondary: 'Playfair Display', serif;
  
  /* Spacing */
  --section-padding: 5rem;
  --card-radius: 1rem;
  --btn-radius: 50px;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  color: var(--dark-color);
  line-height: 1.6;
  overflow-x: hidden;
  background-color: #FFF8F0; /* Light cream background */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  font-weight: 600;
  line-height: 1.3;
}

a {
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  text-decoration: none;
}

.img-fluid {
  max-width: 100%;
  height: auto;
}

.btn {
  border-radius: var(--btn-radius);
  padding: 12px 30px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border: none;
  color: white;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-color), #4E342E);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.3);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(139, 69, 19, 0.2);
}

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

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

/* Header Styles */
header {
  z-index: 1000;
  background: rgba(255, 248, 240, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(139, 69, 19, 0.1);
  transition: all 0.3s ease;
}

header.scrolled {
  background: rgba(255, 248, 240, 0.98);
  box-shadow: 0 5px 20px rgba(62, 39, 35, 0.1);
}

/* Enhanced Sidebar Styles */
.sidebar {
  background: linear-gradient(180deg, #8B4513 0%, #5D4037 100%) !important;
  color: white;
  min-height: 100vh;
  box-shadow: 3px 0 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><path d="M0 0L100 100M100 0L0 100" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>');
  opacity: 0.3;
}

.sidebar .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  padding: 12px 20px;
  margin: 4px 10px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.sidebar .nav-link:hover {
  color: white !important;
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.25);
  color: white !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sidebar .nav-link i {
  width: 20px;
  margin-right: 12px;
  text-align: center;
}

.sidebar-heading {
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 20px 20px 10px 20px;
  font-weight: 600;
}

.sidebar .badge {
  background: #FF6B35 !important;
  color: white !important;
  font-weight: 600;
  min-width: 25px;
  border-radius: 12px;
  padding: 3px 8px;
}

.user-info-panel {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  margin: 20px;
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info-panel .badge {
  background: #FFD700 !important;
  color: #3E2723 !important;
  font-weight: 700;
  margin-top: 10px;
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-brand i {
  font-size: 1.5rem;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  font-weight: 500;
  margin: 0 10px;
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

/* Hero Section */
.hero-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.display-4 {
  font-size: 3.5rem;
  font-weight: 700;
}

@media (max-width: 768px) {
  .display-4 {
    font-size: 2.5rem;
  }
  
  .hero-section {
    min-height: auto;
    padding: 50px 0;
  }
}

/* Card Styles */
.card {
  border: none;
  transition: all 0.3s ease;
  border-radius: var(--card-radius);
  background: linear-gradient(to bottom, #ffffff, #FFF8F0);
  border: 1px solid rgba(139, 69, 19, 0.1);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(139, 69, 19, 0.2) !important;
  border-color: rgba(139, 69, 19, 0.3);
}

.card-header {
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.05), rgba(93, 64, 55, 0.05));
  border-bottom: 1px solid rgba(139, 69, 19, 0.1);
  font-weight: 600;
  color: var(--dark-color);
}

.product-card {
  background: linear-gradient(to bottom, #ffffff, #FFF8F0);
  border: 1px solid rgba(139, 69, 19, 0.1);
}

.product-card:hover {
  border-color: rgba(139, 69, 19, 0.3);
}

.product-badge {
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Dashboard Metric Cards */
.metric-card {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.metric-card .icon-box {
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.1), rgba(93, 64, 55, 0.1));
  transition: all 0.3s ease;
}

.metric-card:hover .icon-box {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.2), rgba(93, 64, 55, 0.2));
}

/* Chart Containers */
.chart-container {
  background: white;
  border-radius: var(--card-radius);
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.chart-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.icon-box {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.step-number {
  font-size: 1.5rem;
  font-weight: bold;
}

/* Gallery Section */
.overlay {
  transition: opacity 0.3s ease;
}

.hover-effect:hover {
  opacity: 1 !important;
}

/* How It Works Section */
.how-it-works-steps {
  counter-reset: step-counter;
}

.how-it-works-steps .step-card {
  counter-increment: step-counter;
  position: relative;
}

.how-it-works-steps .step-card::before {
  content: counter(step-counter);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Footer */
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.1);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

footer a {
  color: #bbb;
}

footer a:hover {
  color: white;
}

/* Form Styles */
.form-control {
  border-radius: 50px;
  padding: 12px 20px;
  border: 1px solid #ddd;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(44, 62, 80, 0.25);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .display-4 {
    font-size: 2.5rem !important;
  }
  
  .hero-section {
    padding: 3rem 0 !important;
  }
  
  .product-card {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 768px) {
  .display-4 {
    font-size: 2rem !important;
  }
  
  .hero-section {
    text-align: center;
  }
  
  .btn-lg {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .section-padding {
    padding: 2.5rem 0 !important;
  }
}

@media (max-width: 576px) {
  .display-4 {
    font-size: 1.75rem !important;
  }
  
  .card-body {
    padding: 1.5rem !important;
  }
  
  .navbar-nav {
    text-align: center;
  }
  
  .nav-link {
    margin: 5px 0;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Utility Classes */
.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.shadow-lg {
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.rounded {
  border-radius: 0.375rem !important;
}

.rounded-3 {
  border-radius: 0.5rem !important;
}

.rounded-4 {
  border-radius: 0.75rem !important;
}

/* Spacing Utilities */
.mt-5 {
  margin-top: 3rem !important;
}

.mb-5 {
  margin-bottom: 3rem !important;
}

.py-5 {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1a252f;
}