/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    background-color: #f5f7fb;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #2A3F54;
    color: white;
    min-height: 100vh;
    position: fixed;
    left: 0;
}

.sidebar h2 {
    text-align: center;
    padding: 20px;
    background-color: #1A2732;
    font-size: 1.4rem;
}

.sidebar ul {
    list-style: none;
    padding: 20px 0;
}

.sidebar ul li {
    padding: 15px 20px;
    cursor: pointer;
}

.sidebar ul li:hover,
.sidebar ul li.active {
    background-color: #1A2732;
}

.sidebar ul li i {
    margin-right: 15px;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 20px;
    width: calc(100% - 250px);
}

.header {
    background-color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.header h1 {
    font-size: 1.5rem;
    color: #333;
}

.add-btn {
    background: #ff4d4d;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
}

.add-btn:hover {
    background: #e60000;
}

/* Messages */
.alert {
    padding: 12px 18px;
    font-size: 1rem;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert.success {
    background: #28a745;
    color: #fff;
}

.alert.error {
    background: #dc3545;
    color: #fff;
}

/* Dropdown */
.select-container {
    margin: 20px 0;
}

.select-box select {
    padding: 10px 15px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

table thead {
    background-color:  #9C7E99;
    color: white;
}

table th,
table td {
    text-align: left;
    padding: 15px 20px;
    font-size: 0.95rem;
}

table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Single Image */
.product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

/* MULTIPLE IMAGES SUPPORT */
.product-images {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;          /* wrap if many images */
    max-width: 260px;         /* stops table from stretching */
}

.product-images img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
}

/* Status */
.status {
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: bold;
}

.status.available {
    background-color: #28a745;
    color: white;
}

.status.out-of-stock {
    background-color: #dc3545;
    color: white;
}

/* Buttons */
.btn {
    padding: 6px 12px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-right: 5px;
}

.btn-edit {
    background-color: #ffc107;
    color: white;
}

.btn-edit:hover {
    background-color: #e0a800;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
}

.btn-delete:hover {
    background-color: #c82333;
}

.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.delete-form {
    display: inline;
}
.confirm-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: 0.25s ease;
  z-index: 9999;
}

.confirm-popup.show {
  visibility: visible;
  opacity: 1;
}

.popup-box {
  background: #fff;
  padding: 25px 30px;
  width: 300px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  animation: pop 0.25s ease;
}

@keyframes pop {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.popup-box p {
  font-size: 16px;
  margin-bottom: 18px;
}

.popup-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

#confirmYes {
  background: #e63946;
  border: none;
  padding: 8px 20px;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

#confirmNo {
  background: #dcdcdc;
  border: none;
  padding: 8px 20px;
  color: #333;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

#confirmYes:hover {
  background: #c91f33;
}

#confirmNo:hover {
  background: #bfbfbf;
}
