/* עיצוב כללי */
body {
  direction: rtl;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  color: #333;
}

h1, h2, h3 {
  text-align: center;
  margin-top: 20px;
  color: #222;
}

/* טפסים */
form, .form-section {
  max-width: 400px;
  margin: 20px auto;
  padding: 15px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
}

label {
  display: block;
  margin-bottom: 10px;
}

input, select {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
  margin-top: 5px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

input[type="number"] {
  max-width: 100px;
}

/* כפתורים */
button {
  padding: 10px 20px;
  background-color: #007bff;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
}

button:hover {
  background-color: #0056b3;
}

/* הודעות */
#message {
  text-align: center;
  margin-top: 15px;
  font-weight: bold;
  color: red;
}

/* אזור תצוגת מוצרים ועגלה */
#product-list, #cart-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px;
  justify-items: center;
}

/* כרטיס מוצר */
.product-card {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 20px;
  padding: 15px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  direction: rtl;
  max-width: 300px;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* תמונה בכרטיס מוצר */
.product-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #eee;
}

/* מידע בכרטיס מוצר */
.product-info {
  flex: 1;
  text-align: right;
}

.product-info strong {
  display: block;
  margin-bottom: 5px;
}

/* כפתור הוספה לעגלה */
.add-to-cart-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.add-to-cart-btn:hover {
  background-color: #0056b3;
}

/* כפתורי פעולה בכרטיס מוצר */
.product-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-top: 10px;
  justify-content: flex-start;
}

/* עיצוב לוח ניהול */
.dashboard-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  justify-items: center;
  margin-top: 15px;
}

.dashboard button {
  min-width: 150px;
  max-width: 200px;
}

/* כרטיס הזמנה */
.order-card {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* רספונסיביות */
@media (max-width: 500px) {
  form, .form-section {
    margin: 10px;
    padding: 10px;
  }

  .product-card {
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
  }

  .product-image {
    margin-bottom: 10px;
  }

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

.customer-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.customer-card {
  border: 1px solid #ccc;
  padding: 12px;
  border-radius: 8px;
  background-color: #fff;
}

.customer-card h4 {
  margin: 0;
}

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

.navbar {
  background-color: #333;
  overflow: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: right;
  padding: 10px;
  gap: 10px;
  direction: rtl;
}

.navbar a {
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 8px;
  background-color: #444;
  transition: background-color 0.2s;
  font-weight: bold;
}

.navbar a:hover {
  background-color: #555;
}


.add-to-cart-btn:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  opacity: 0.6;
}


.personal-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.personal-buttons button {
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 8px;
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  min-width: 220px;
  max-width: 280px;
  text-align: center;
  transition: background-color 0.2s ease;
}

.personal-buttons button:hover {
  background-color: #0056b3;
}




.cart-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.cart-item-card {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 15px;
  background-color: #fafafa;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cart-summary {
  max-width: 600px;
  margin: 30px auto;
  padding: 20px;
  border-top: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-start;
}

.cart-summary input[type="date"] {
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

#placeOrderBtn {
  padding: 12px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
}

#placeOrderBtn:hover {
  background-color: #0056b3;
}

#total {
  font-weight: bold;
  font-size: 18px;
}


.back-btn {
  background-color: #f1f1f1;
  color: #333;
  border: 1px solid #ccc;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  margin: 20px auto;
  display: block;
  max-width: 300px;
}

.back-btn:hover {
  background-color: #ddd;
}


.cart-item-content {
  display: flex;
  align-items: center;
  gap: 15px;
  direction: rtl;
}

.cart-product-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #ddd;
  background-color: #fff;
}

.cart-product-info {
  flex: 1;
  text-align: right;
}


.form-section button{
  margin: 5px;
}

.products-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 40px; /* אפשר גם 30px או 24px – לפי העדפה */
  justify-content: space-evenly;
  align-items: flex-start;
  margin: 0 auto;
  max-width: 1200px;
}


.products-wrapper .form-section {
  flex: 1 1 400px;
  max-width: 600px;
}
