/**
 * E-Store Admin Dashboard Styles
 */

/* Global Variables */
:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  
  --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
}

/* Body and Typography */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: #f8f9fa;
  color: #212529;
}

/* Navbar Customization */
.navbar-dark .navbar-nav .nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
}

/* Cards */
.card {
  border: none;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Product Cards */
.product-card img {
  height: 200px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.product-card .card-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.product-card .card-text {
  color: #6c757d;
  font-size: 0.9rem;
}

/* Badges */
.badge {
  font-weight: 500;
  padding: 0.4em 0.8em;
  border-radius: 4px;
}

/* Buttons */
.btn {
  border-radius: var(--border-radius);
  padding: 0.4rem 1rem;
  font-weight: 500;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Modal Styles */
.modal-content {
  border-radius: var(--border-radius);
  border: none;
}

.modal-header {
  border-bottom: 1px solid #dee2e6;
}

.modal-body {
  padding: 1.5rem;
}

/* Forms */
.form-label {
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.form-control,
.form-select {
  border-radius: var(--border-radius);
  border: 1px solid #ced4da;
  padding: 0.5rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Dashboard Stats Cards */
.bg-primary, .bg-success, .bg-warning, .bg-info {
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

.display-4 {
  font-weight: 700;
}

/* Loading Spinner */
.spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--secondary-color);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
}

/* Toast Notifications */
.toast {
  border-radius: var(--border-radius);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--danger-color);
}

/* Responsive Grid Adjustments */
@media (max-width: 768px) {
  .display-4 {
    font-size: 2rem;
  }
  
  .card-img-top {
    height: 150px;
  }
}

/* Print Styles */
@media print {
  .btn, .dropdown-menu {
    display: none;
  }
  
  .product-card {
    break-inside: avoid;
    margin-bottom: 1rem;
  }
}

/* Hover Animations */
.product-card {
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Focus States for Accessibility */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Selection Color */
::selection {
  background-color: var(--primary-color);
  color: white;
}

/* User Menu Dropdown */
.dropdown-menu {
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  border: none;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
}

/* Share Button */
[data-bs-toggle='modal'] {
  transition: opacity 0.3s ease;
}

[data-bs-toggle='modal']:hover {
  opacity: 0.8;
}

/* Category Pills (for future use) */
.category-pill {
  background-color: var(--info-color);
  color: white;
  padding: 0.25em 0.6em;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* Price Display */
.price-display {
  font-family: 'Courier New', monospace;
  letter-spacing: -0.5px;
}

/* Dimensions/Size Badges */
.dimension-badge {
  display: inline-block;
  background-color: var(--secondary-color);
  color: white;
  padding: 0.2em 0.6em;
  border-radius: 12px;
  font-size: 0.8rem;
  margin: 0.25em;
}

/* Responsive Images */
.img-fluid {
  transition: transform 0.3s ease;
}

.img-fluid:hover {
  transform: scale(1.05);
}

/* Card Group for Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Status Indicators */
.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
}

.status-indicator.published {
  background-color: var(--success-color);
}

.status-indicator.draft {
  background-color: var(--warning-color);
}

/* Table Styles (for future use) */
.table {
  border-radius: var(--border-radius);
  overflow: hidden;
}

.table thead th {
  background-color: #f8f9fa;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

/* Animation Keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card {
  animation: fadeIn 0.5s ease;
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #212529;
    color: #f8f9fa;
  }
  
  .card {
    background-color: #343a40;
  }
  
  .form-control,
  .form-select {
    background-color: #495057;
    border-color: #6c757d;
    color: #f8f9fa;
  }
}
