.main {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a3a1e 0%, #2c5530 50%, #1a3a1e 100%);
  background-attachment: fixed;
  padding-top: 80px;
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  position: relative;
  z-index: 100;
}

.header h1 {
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.loading {
  text-align: center;
  color: #c8e6c9;
  font-size: 1.2rem;
  padding: 60px 20px;
}

.emptyState {
  text-align: center;
  color: #c8e6c9;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin: 40px 0;
}

.emptyState p {
  font-size: 1.1rem;
  margin: 10px 0;
}

.adminControls {
  display: flex;
  gap: 10px;
}

.editButton {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.editButton:hover {
  background: linear-gradient(135deg, #388e3c 0%, #4caf50 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.deleteButton {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.deleteButton:hover {
  background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
  transform: translateY(-2px);
}

.formContainer {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.formContainer h2 {
  color: #ffffff;
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.productForm {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.formGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.formGroup label {
  color: #c8e6c9;
  font-weight: 500;
  font-size: 0.95rem;
}

.formGroup input,
.formGroup textarea {
  padding: 12px 15px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.formGroup input:focus,
.formGroup textarea:focus {
  outline: none;
  border-color: #66bb6a;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 10px rgba(102, 187, 106, 0.3);
}

.formGroup input::placeholder,
.formGroup textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.formGroup textarea {
  resize: vertical;
  min-height: 80px;
}

.formGroup input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  cursor: pointer;
}

.formGroup label input[type="checkbox"] {
  display: inline;
  width: auto;
}

.formRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.formActions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.saveButton {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.saveButton:hover {
  background: linear-gradient(135deg, #388e3c 0%, #4caf50 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.cancelButton {
  background: rgba(255, 255, 255, 0.1);
  color: #c8e6c9;
  border: 2px solid rgba(255, 255, 255, 0.2);
  padding: 12px 30px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.cancelButton:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.categorySection {
  margin-bottom: 50px;
}

.categoryTitle {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.productsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.productCard {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.productCard:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: rgba(102, 187, 106, 0.5);
}

.productImage {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  background: rgba(255, 255, 255, 0.05);
}

.productInfo {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.productName {
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 10px 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.productDescription {
  color: #c8e6c9;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 15px 0;
  flex: 1;
}

.productPrice {
  color: #66bb6a;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 10px 0;
}

.productStock {
  margin: 10px 0;
}

.inStock {
  color: #4caf50;
  font-weight: 500;
  font-size: 0.9rem;
}

.outOfStock {
  color: #f44336;
  font-weight: 500;
  font-size: 0.9rem;
}

.productActions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.productActions .editButton,
.productActions .deleteButton,
.productActions .archiveButton,
.productActions .unarchiveButton {
  flex: 1;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.archiveButton {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.archiveButton:hover {
  background: linear-gradient(135deg, #f57c00 0%, #ff9800 100%);
  transform: translateY(-2px);
}

.unarchiveButton {
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.unarchiveButton:hover {
  background: linear-gradient(135deg, #1976D2 0%, #2196F3 100%);
  transform: translateY(-2px);
}

.addToCartButton {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 10px;
}

.addToCartButton:hover {
  background: linear-gradient(135deg, #388e3c 0%, #4caf50 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.cartHeader {
  display: flex;
  gap: 10px;
  align-items: center;
  position: relative;
  z-index: 100;
}

.cartButton {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  z-index: 101;
}

.cartButton:hover {
  background: linear-gradient(135deg, #f57c00 0%, #ff9800 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.cartTotal {
  color: #66bb6a;
  font-weight: 600;
  font-size: 1.1rem;
}

.cartOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000 !important;
  backdrop-filter: blur(2px);
}

.cartSidebar {
  position: fixed !important;
  right: 0;
  top: 60px;
  width: 400px;
  max-width: 90vw;
  height: calc(100vh - 60px);
  background: rgba(26, 58, 30, 0.98);
  backdrop-filter: blur(10px);
  border-left: 2px solid rgba(102, 187, 106, 0.3);
  border-top: none;
  padding: 20px;
  padding-top: 0;
  overflow-y: auto;
  z-index: 10001 !important;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  overflow-x: hidden;
  animation: slideIn 0.3s ease-out;
}

.cartSidebar .cartHeader {
  padding-top: 20px;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.cartSidebar h2 {
  color: #ffffff;
  margin: 0 0 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.closeCartButton {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.closeCartButton:hover {
  background: rgba(255, 255, 255, 0.1);
}

.emptyCart {
  text-align: center;
  color: #c8e6c9;
  padding: 40px 20px;
}

.cartItems {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.cartItem {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.cartItemInfo {
  flex: 1;
}

.cartItemInfo h4 {
  color: #ffffff;
  margin: 0 0 5px 0;
  font-size: 1rem;
}

.cartItemInfo p {
  color: #c8e6c9;
  margin: 5px 0;
  font-size: 0.9rem;
}

.cartItemQuantity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.cartItemQuantity button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.cartItemQuantity button:hover:not(:disabled) {
  background: rgba(102, 187, 106, 0.3);
  border-color: #66bb6a;
}

.cartItemQuantity button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cartItemQuantity span {
  color: #ffffff;
  font-weight: 500;
  min-width: 30px;
  text-align: center;
}

.cartItemSubtotal {
  color: #66bb6a !important;
  font-weight: 600 !important;
  margin-top: 10px !important;
}

.removeFromCartButton {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  height: fit-content;
}

.removeFromCartButton:hover {
  background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
}

.cartFooter {
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  margin-top: 20px;
}

.cartFooter .cartTotal {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.checkoutButton {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  width: 100%;
  transition: all 0.3s ease;
}

.checkoutButton:hover {
  background: linear-gradient(135deg, #388e3c 0%, #4caf50 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.productReviews {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ratingDisplay {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.stars {
  color: #ffc107;
  font-size: 1.2rem;
}

.ratingText {
  color: #c8e6c9;
  font-size: 0.9rem;
}

.reviewButton {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  width: 100%;
}

.reviewButton:hover {
  background: rgba(102, 187, 106, 0.2);
  border-color: #66bb6a;
}

.reviewModalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.reviewModal {
  background: rgba(26, 58, 30, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 30px;
  max-width: 600px;
  max-height: 80vh;
  width: 100%;
  border: 2px solid rgba(102, 187, 106, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.reviewModalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.reviewModalHeader h2 {
  color: #ffffff;
  margin: 0;
}

.closeModalButton {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.closeModalButton:hover {
  background: rgba(255, 255, 255, 0.1);
}

.reviewModalContent {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ratingInput label,
.reviewTextInput label {
  color: #c8e6c9;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

.starRating {
  display: flex;
  gap: 5px;
}

.starButton {
  background: transparent;
  border: none;
  color: #ffc107;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease;
}

.starButton:hover {
  transform: scale(1.2);
}

.reviewTextInput textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

.reviewTextInput textarea:focus {
  outline: none;
  border-color: #66bb6a;
  background: rgba(255, 255, 255, 0.15);
}

.existingReview {
  padding: 10px;
  background: rgba(255, 152, 0, 0.1);
  border-radius: 5px;
  border: 1px solid rgba(255, 152, 0, 0.3);
}

.existingReview p {
  color: #ff9800;
  margin: 0;
  font-size: 0.9rem;
}

.reviewModalActions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.submitReviewButton {
  flex: 1;
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.submitReviewButton:hover {
  background: linear-gradient(135deg, #388e3c 0%, #4caf50 100%);
  transform: translateY(-2px);
}

.cancelReviewButton {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 12px 24px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.cancelReviewButton:hover {
  background: rgba(255, 255, 255, 0.2);
}

.reviewsList {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 10px;
}

.reviewItem {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 15px;
}

.reviewHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.reviewRating {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reviewRatingNumber {
  color: #c8e6c9;
  font-size: 0.9rem;
  font-weight: 500;
}

.reviewMeta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.reviewerName {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
}

.reviewDate {
  color: #a5d6a7;
  font-size: 0.85rem;
}

.reviewText {
  color: #e8f5e9;
  line-height: 1.6;
  margin-top: 10px;
}

.reviewText p {
  margin: 0;
}

.emptyReviews {
  text-align: center;
  padding: 40px 20px;
  color: #c8e6c9;
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .formRow {
    grid-template-columns: 1fr;
  }

  .productsGrid {
    grid-template-columns: 1fr;
  }

  .formActions {
    flex-direction: column;
  }

  .saveButton,
  .cancelButton {
    width: 100%;
  }
}

