
/* Admin Products Table Styles */
.admin-products-container {
  padding: 2rem 0;
  background-color: #f8f9fa;
  min-height: 100vh;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.admin-title h1 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
}

.admin-title p {
  color: #6c757d;
  font-size: 1.1rem;
}

.admin-actions {
  display: flex;
  gap: 1rem;
}

.products-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
  border-left: 4px solid #007bff;
}

.stat-card h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #007bff;
  margin-bottom: 0.5rem;
}

.stat-card p {
  color: #6c757d;
  margin: 0;
  font-weight: 500;
}

.products-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin: 0 1rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.admin-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.admin-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
  vertical-align: middle;
}

.product-row:hover {
  background-color: #f8f9fa;
}

.product-image-cell {
  width: 80px;
  text-align: center;
}

.product-thumbnail {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.no-image-thumbnail {
  width: 50px;
  height: 50px;
  background-color: #f8f9fa;
  border: 1px dashed #dee2e6;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 0.8rem;
  margin: 0 auto;
}

.product-name-cell {
  font-weight: 600;
  color: #2c3e50;
  min-width: 150px;
}

.product-description-cell {
  color: #6c757d;
  max-width: 200px;
}

.product-price-cell {
  font-weight: 600;
  color: #28a745;
  font-size: 1.1rem;
}

.product-status-cell {
  text-align: center;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-active {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-inactive {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.product-actions-cell {
  text-align: center;
  min-width: 200px;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.action-buttons .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.no-products {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 0 1rem;
}

.no-products-content h3 {
  color: #6c757d;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.no-products-content p {
  color: #6c757d;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* Mobile responsiveness for admin table */
@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .admin-actions {
    justify-content: center;
  }

  .products-stats {
    grid-template-columns: 1fr;
  }

  .products-table-container {
    margin: 0;
    border-radius: 0;
  }

  .admin-table {
    font-size: 0.9rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.5rem;
  }

  .product-description-cell {
    max-width: 150px;
  }

  .action-buttons {
    flex-direction: column;
    gap: 0.25rem;
  }

  .action-buttons .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .admin-table {
    font-size: 0.8rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.5rem 0.25rem;
  }

  .product-thumbnail,
  .no-image-thumbnail {
    width: 40px;
    height: 40px;
  }

  .product-description-cell {
    display: none;
  }
}

/* Product Show View Styles */
.product-detail-container {
  margin-top: 2rem;
}

.product-detail-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  padding: 2rem;
}

.product-detail-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.no-image-large {
  width: 100%;
  height: 300px;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 1.1rem;
}

.no-image-large i {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.product-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.product-detail-header h2 {
  color: #2c3e50;
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.product-status {
  flex-shrink: 0;
}

.product-detail-price {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  text-align: center;
}

.price-large {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
}

.product-detail-description {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.product-detail-description h3 {
  color: #2c3e50;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.product-detail-description p {
  color: #495057;
  line-height: 1.6;
  margin: 0;
  font-size: 1rem;
}

.product-detail-meta {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5rem;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f3f4;
}

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

.meta-item strong {
  color: #495057;
  font-weight: 600;
}

.meta-item span {
  color: #6c757d;
  font-size: 0.9rem;
}

.product-actions-section {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-top: 2rem;
}

.product-actions-section h3 {
  color: #2c3e50;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
}

.action-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.action-buttons-grid .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-align: center;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.action-buttons-grid form {
  display: inline-block;
  margin: 0;
}

.action-buttons-grid form .btn {
  width: 100%;
  border: none;
  cursor: pointer;
}

.action-buttons-grid .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.action-buttons-grid .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.action-buttons-grid .btn-warning {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
}

.action-buttons-grid .btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.action-buttons-grid .btn-success {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  border: none;
}

.action-buttons-grid .btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

/* Responsive Design for Product Show */
@media (max-width: 768px) {
  .product-detail-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .product-detail-image,
  .no-image-large {
    height: 250px;
  }

  .product-detail-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-detail-header h2 {
    font-size: 1.5rem;
  }

  .price-large {
    font-size: 2rem;
  }

  .action-buttons-grid {
    grid-template-columns: 1fr;
  }

  .meta-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

@media (max-width: 480px) {
  .product-detail-card {
    padding: 1rem;
  }

  .product-detail-image,
  .no-image-large {
    height: 200px;
  }

  .product-detail-header h2 {
    font-size: 1.25rem;
  }

  .price-large {
    font-size: 1.75rem;
  }

  .product-detail-description,
  .product-detail-meta,
  .product-actions-section {
    padding: 1rem;
  }
}
