/* کانتینر فرم */
.producto-form-container {
  font-family: inherit;
  color: inherit;
  max-width: 100%;
  margin: 30px 0;
  direction: rtl;
  background-color: #fff;
  padding: 20px 15px;
  border-radius: 12px;
  box-shadow: 0 0 10px #ccc;
  box-sizing: border-box;
}

/* بخش محصولات */
.producto-product-images {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 10px;
  box-sizing: border-box;
}

/* کارت هر محصول */
.producto-product-container {
  flex: 0 0 23%;
  max-width: 23%;
  background: #fefefe;
  border: 2px solid #eee;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  transition: all 0.3s ease;
  font-size: 14px;
  color: #333;
  user-select: none;
  position: relative;
  margin-bottom: 15px;
}

.producto-product-container:hover {
  border-color: #C30A52;
  box-shadow: 0 0 10px rgba(0, 148, 255, 0.3);
  cursor: pointer;
}

.producto-product-image {
  width: 100%;
  height: 130px;
  object-fit: contain;
  margin-bottom: 8px;
}

.producto-product-name {
  font-weight: bold;
  margin-bottom: 5px;
}

.producto-product-price {
  color: #C30A52;
  margin-bottom: 8px;
  font-size: 15px;
}

/* سلکتور تعداد */
.producto-quantity-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.producto-quantity-btn {
  width: 32px;
  height: 32px;
  background-color: #C30A52;
  color: white;
  border: none;
  font-size: 22px;
  line-height: 1;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.producto-quantity-btn:hover {
  background-color: #C1114B;
}

.producto-quantity {
  min-width: 30px;
  text-align: center;
  font-weight: bold;
  font-size: 16px;
  color: #222;
}

/* فرم ورودی‌ها */
.producto-form-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.producto-form-row input,
.producto-form-row select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.3s ease;
}

.producto-form-row input:focus,
.producto-form-row select:focus {
  border-color: #C30A52;
}

/* دکمه پرداخت */
.producto-form-submit {
  margin-top: 25px;
  text-align: center;
}

.producto-payment-button {
  background-color: #C30A52;
  color: white;
  padding: 14px 40px;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.25s ease;
  WIDTH: 100%;
}

.producto-payment-button:hover {
  background-color: #C1114B;
}

/* پیام‌ها */
.producto-message-container {
  max-width: 600px;
  margin: 15px auto;
  text-align: center;
}

.producto-success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 15px 20px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 16px;
  border: 1px solid #c3e6cb;
}

.producto-error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px 20px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 16px;
  border: 1px solid #f5c6cb;
}

.producto-warning-message {
  background-color: #fff3cd;
  color: #856404;
  padding: 15px 20px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 16px;
  border: 1px solid #ffeeba;
}

/* مجموع قیمت */
#total_price {
  margin-top: 15px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

/* ===== ریسپانسیو ===== */

/* تبلت و پایین‌تر (عرض کمتر از 768px) */
@media (max-width: 768px) {
  .producto-product-container {
    flex: 0 0 45%;
    max-width: 45%;
  }
}

/* موبایل کوچک و پایین‌تر (عرض کمتر از 480px) */
@media (max-width: 480px) {
  .producto-product-container {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
@media (max-width: 480px) {
  .producto-product-container {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}
.producto-error {
    border-color: red !important;
    background-color: #fff0f0;
}
/* راست‌چین کردن ورودی موبایل و پیام خطا */
#mobile, #mobile-error {
  direction: rtl !important;
  text-align: right !important;
}
@media (max-width: 768px) {
  #mobile {
    direction: rtl !important;
    text-align: right !important;
  }
}

