:root {
  --primary-color: #007a3d;
  --accent-color: #4caf50;
  --light-gray: #f5f5f5;
  --dark-gray: #333;
  --white: #fff;
  --error: #f44336;
  --success: #4caf50;
  --warning: #ff9800;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Cairo', sans-serif;
}

body {
  background-color: var(--light-gray);
  color: var(--dark-gray);
  line-height: 1.6;
  font-size: 16px;
  direction: rtl;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Logo */
.logo-container {
  text-align: center;
  margin-bottom: 20px;
}

.logo {
  max-width: 200px;
  max-height: 100px;
}

/* Headings */
.selection-heading {
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
}

/* Products scroll */
.products-scroll-container {
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}

.products-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 10px 5px;
}

.product-card {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin: 0 10px;
  padding: 15px;
  min-width: 180px;
  max-width: 200px;
  scroll-snap-align: start;
  transition: all 0.3s ease, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
}

.product-card.selected {
  background-color: rgba(76, 175, 80, 0.15);
  border: 2px solid var(--accent-color);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.product-card.selected::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.product-image {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-details {
  text-align: center;
}

.product-details h3 {
  font-size: 16px;
  margin-bottom: 5px;
}

.price {
  font-weight: bold;
  color: var(--primary-color);
}

.product-quantity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.product-quantity button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background-color: white;
  font-size: 16px;
  cursor: pointer;
}

.product-quantity button:hover {
  background-color: #f5f5f5;
}

.quantity-number {
  font-weight: bold;
  font-size: 16px;
}

.scroll-indicator {
  text-align: center;
  margin-bottom: 20px;
  font-size: 14px;
  color: #666;
}

/* Form styles */
.order-card {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 20px;
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

input, select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.extra-fields {
  margin-top: 15px;
}

.hidden {
  display: none;
}

/* Order summary */
.order-summary {
  margin-top: 25px;
  padding: 15px;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.order-summary h3 {
  margin-bottom: 10px;
  text-align: center;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.summary-row.total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  font-weight: bold;
  font-size: 18px;
  color: var(--primary-color);
}

/* Submit button */
.submit-btn {
  width: 100%;
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px;
  font-size: 18px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.3s;
}

.submit-btn:hover {
  background-color: var(--accent-color);
}

/* Alerts */
.messages {
  margin-bottom: 20px;
}

.alert {
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.alert-error {
  background-color: #ffebee;
  color: var(--error);
}

.alert-warn {
  background-color: #fff8e1;
  color: var(--warning);
}

.alert-ok {
  background-color: #e8f5e9;
  color: var(--success);
}

.err {
  color: var(--error);
  font-size: 14px;
  margin-top: 4px;
}

/* Helper text */
.helper-text {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.25rem;
  font-style: italic;
}

.helper-text.hidden {
  display: none;
}

/* New: select warning box + zoom animation */
.select-warning {
  background: #ffecec;       /* light red box */
  color: #8b0000;            /* dark red text */
  border: 1px solid #f5c6c6;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  margin: 0.75rem auto;
  max-width: 720px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.select-warning.hidden {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
  height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

@keyframes zoomPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.pulse-zoom {
  animation: zoomPulse 1s ease-in-out infinite;
}

/* Media queries */
@media (max-width: 600px) {
  .product-card {
    min-width: 150px;
  }
}

/* in multi_product.css */
.spinner { display: inline-block; width: 1rem; height: 1rem;
  border: 2px solid #ccc; border-top-color: var(--primary-color);
  border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }