/* Shared styles for Terzon Admin product pages (accessories, phones & tablets, laptops & PCs) */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
}
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 250px;
  background-color: #343a40;
  padding-top: 20px;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid #495057;
}
.sidebar-brand {
  color: white;
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
}
.sidebar-brand span {
  color: #3f51b5;
}
.sidebar-menu {
  padding: 20px 0;
}
.sidebar-menu-item {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s;
}
.sidebar-menu-item:hover,
.sidebar-menu-item.active {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}
.sidebar-menu-item i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}
.main-content {
  margin-left: 250px;
  padding: 20px;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}
.page-title h1 {
  font-size: 24px;
  margin-bottom: 5px;
}
.page-title p {
  color: #6c757d;
  margin-bottom: 0;
}
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}
.search-box {
  position: relative;
  width: 300px;
}
.search-box input {
  width: 100%;
  padding: 10px 40px 10px 15px;
  border: 1px solid #ced4da;
  border-radius: 4px;
}
.search-box i {
  position: absolute;
  right: 15px;
  top: 12px;
  color: #6c757d;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.product-card {
  background-color: white;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.product-image {
  height: 200px;
  width: 100%;
  object-fit: cover;
  border-bottom: 1px solid #f0f0f0;
}
.product-body {
  padding: 15px;
}
.product-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 48px;
}
.product-category {
  display: inline-block;
  padding: 3px 8px;
  background-color: #f1f1f1;
  border-radius: 15px;
  font-size: 12px;
  margin-bottom: 10px;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.product-price {
  font-size: 18px;
  font-weight: 600;
  color: #3f51b5;
}
.product-stock {
  font-size: 13px;
  font-weight: 500;
}
.stock-low {
  color: #dc3545;
}
.stock-available {
  color: #28a745;
}
.product-actions {
  display: flex;
  gap: 10px;
}
.product-action-btn {
  flex: 1;
  padding: 8px;
  text-align: center;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.edit-btn {
  background-color: #e9ecef;
  color: #495057;
}
.edit-btn:hover {
  background-color: #dee2e6;
}
.delete-btn {
  background-color: #f8d7da;
  color: #721c24;
}
.delete-btn:hover {
  background-color: #f5c6cb;
}
.pagination {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}
.product-wrapper {
  position: relative;
}
.product-status {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  padding: 3px 8px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 500;
  color: white;
}
.status-new {
  background-color: #4caf50;
}
.status-sale {
  background-color: #f44336;
}
.status-featured {
  background-color: #ff9800;
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1a1a1a;
    color: #e0e0e0;
  }
  .sidebar {
    background-color: #212529;
  }
  .sidebar-header {
    border-bottom-color: #343a40;
  }
  .sidebar-brand span {
    color: #6573c3;
  }
  .main-content {
    background-color: #1a1a1a;
  }
  .page-header {
    border-bottom-color: #343a40;
  }
  .page-title p {
    color: #adb5bd;
  }
  .filter-bar,
  .product-card {
    background-color: #212529;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }
  .search-box input {
    background-color: #2c3034;
    border-color: #495057;
    color: #e0e0e0;
  }
  .search-box i {
    color: #adb5bd;
  }
  .product-image {
    border-bottom-color: #343a40;
  }
  .product-category {
    background-color: #343a40;
    color: #e0e0e0;
  }
  .edit-btn {
    background-color: #343a40;
    color: #e0e0e0;
  }
  .edit-btn:hover {
    background-color: #495057;
  }
  .delete-btn {
    background-color: #350f0f;
    color: #e0e0e0;
  }
  .delete-btn:hover {
    background-color: #491515;
  }
  .form-select {
    background-color: #2c3034;
    border-color: #495057;
    color: #e0e0e0;
  }
  .btn-outline-secondary {
    color: #adb5bd;
    border-color: #495057;
  }
  .btn-outline-secondary:hover {
    background-color: #343a40;
    color: #e0e0e0;
  }
  .btn-primary {
    background-color: #3f51b5;
    border-color: #3f51b5;
  }
  .page-link {
    background-color: #212529;
    border-color: #343a40;
    color: #e0e0e0;
  }
  .page-item.disabled .page-link {
    background-color: #1a1a1a;
    border-color: #343a40;
    color: #6c757d;
  }
}
