body {
  font-family: Arial;
  padding: 20px;
  background: #f7f7f7;
}

form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 300px;
  margin-bottom: 20px;
}

#product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.product-card {
  background: white;
  border: 1px solid #ddd;
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
 
}

.product-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.product-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.product-card:hover img {
  transform: scale(1.05);
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}



.admin-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

#admin-search,
#admin-category {
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  outline: none;
  flex: 1 1 200px;
  margin-bottom: 10px;
}

#admin-search:focus,
#admin-category:focus {
  border-color: #007bff;
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.3);
}


.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  padding: 40px 36px;
  border-radius: 16px;
  max-width: 700px;
  width: 95%;
  max-height: 85%;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  position: relative;
}

.modal-content img {
  max-width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 2px solid #ccc;
}

.modal-content h2 {
  font-size: 28px;
  font-weight: 700;
  color: #111;
  margin-bottom: 12px;
}

.modal-content p {
  font-size: 18px;
  color: #444;
  margin: 8px 0;
}.modal-content {
  background: #fff;
  padding: 28px 24px;
  border-radius: 14px;
  max-width: 520px;
  width: 90%;
  max-height: 80%;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  position: relative;
}

.modal-content img {
  max-width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1.5px solid #ccc;
}

.modal-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: #111;
  margin-bottom: 10px;
}

.modal-content p {
  font-size: 16px;
  color: #444;
  margin: 6px 0;
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 26px;
  font-weight: bold;
  color: #fff;
  background: #111;
  padding: 6px 14px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

.close-btn:hover {
  background: #333;
}


.fade-scale-enter {
  opacity: 0;
  transform: scale(0.9);
}

.fade-scale-enter-active {
  opacity: 1;
  transform: scale(1);
  transition: all 0.3s ease-in-out;
}

.product-card input {
  width: 100%;
  font-size: 1rem;
  padding: 6px 8px;
  margin: 6px 0;
  border: none;
  background-color: transparent;
  color: #222;
  border-radius: 4px;
  outline: none;
  transition: background-color 0.3s ease, border 0.3s ease;
  cursor: default; /* when readonly */
}

/* When inputs are readonly, look like plain text */
.product-card input[readonly] {
  border-bottom: 1px solid transparent;
  cursor: default;
}

/* Editable mode style — show border and background */
.product-card input.editable {
  background-color: #f0f8ff;
  border: 1px solid #007bff;
  cursor: text;
}

/* Optional: subtle focus style for inputs in editable mode */
.product-card input.editable:focus {
  outline: none;
  border-color: #0056b3;
  background-color: #e7f1ff;
}

.logout-btn {
  position: absolute;
  top: 103px;
  right: 20px;
  background: #dc2626;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
}

.logout-btn:hover {
  background: #b91c1c;
}

#theme-toggle{
background-color: rgb(0, 0, 0);
color: rgb(255, 255, 255);
transition: background-color 0.3s ease, color 0.3s ease, border 0.3s ease;
position: absolute;
  top: 65px;
  right: 20px;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.user-info {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #111827;
  color: #f9fafb;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
}

.user-info:hover {
  background-color: #1f2937;
  cursor: default;
}