/* Add to Cart Button Fix - إصلاح زر إضافة للسلة */

/* إصلاح حجم زر إضافة للسلة ليكون متناسق مع زر تأكيد الطلب */
.custom-atc-btn,
.atc-buy-button .custom-atc-btn {
  display: inline-block !important;
  width: 100% !important;
  min-width: 200px !important;
  height: 50px !important;
  line-height: 50px !important;
  padding: 0 30px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-align: center !important;
  text-decoration: none !important;
  border: none !important;
  border-radius: 24px !important;
  background: linear-gradient(135deg, var(--primary-color, #4C3BCF), var(--secondary-color, #6c5ce7)) !important;
  color: #fff !important;
  box-shadow: 0 4px 15px var(--primary-color, rgba(76, 59, 207, 0.25)) !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  position: relative !important;
  overflow: hidden !important;
  margin: 0 !important;
  font-family: "Avenir Next World", -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* تأثير hover */
.custom-atc-btn:hover,
.atc-buy-button .custom-atc-btn:hover {
  background: linear-gradient(135deg, var(--secondary-color, #6c5ce7), var(--primary-color, #4C3BCF)) !important;
  color: #fff !important;
  box-shadow: 0 6px 20px var(--primary-color, rgba(76, 59, 207, 0.35)) !important;
  transform: translateY(-2px) !important;
}

/* تأثير active */
.custom-atc-btn:active,
.atc-buy-button .custom-atc-btn:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 10px var(--primary-color, rgba(76, 59, 207, 0.25)) !important;
}

/* إصلاح تخطيط الأزرار في الحاوية */
#nrwooconfirm.atc-buy-button {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 15px !important;
  width: 100% !important;
  margin-top: 20px !important;
}

/* تأكد من أن كلا الزرين لهما نفس الحجم والموضع */
#nrwooconfirm.atc-buy-button .custom-atc-btn,
#nrwooconfirm.atc-buy-button input[type="submit"] {
  flex: 1 !important;
  width: 100% !important;
  height: 50px !important;
  line-height: 50px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  border-radius: 24px !important;
  padding: 0 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}

/* تحسين التخطيط على الشاشات الصغيرة */
@media (max-width: 768px) {
  #nrwooconfirm.atc-buy-button {
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  .custom-atc-btn,
  .atc-buy-button .custom-atc-btn {
    min-width: 100% !important;
    height: 45px !important;
    line-height: 45px !important;
    font-size: 15px !important;
  }
}

/* إصلاح أي مشاكل في التموضع */
.custom-atc-btn {
  position: static !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  margin: 0 !important;
  float: none !important;
  clear: none !important;
}

/* ضمان التناسق العمودي للأزرار */
#nrwooconfirm.atc-buy-button * {
  vertical-align: middle !important;
  box-sizing: border-box !important;
}

/* إصلاح أي اختلافات في الخط */
#nrwooconfirm.atc-buy-button .custom-atc-btn,
#nrwooconfirm.atc-buy-button input[type="submit"] {
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* إزالة أي تأثيرات غير مرغوبة */
.custom-atc-btn::before,
.custom-atc-btn::after {
  display: none !important;
}

/* تحسين مظهر الزر عند التعطيل */
.custom-atc-btn.disabled,
.custom-atc-btn:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  background: #ccc !important;
  color: #666 !important;
}

/* دعم إعدادات الألوان المتغيرة */
.custom-atc-btn,
.atc-buy-button .custom-atc-btn {
  /* استخدام متغيرات CSS للألوان */
  --atc-primary: var(--primary-color, #4C3BCF);
  --atc-secondary: var(--secondary-color, #6c5ce7);
  --atc-text: var(--button-text-color, #fff);
  --atc-shadow: var(--primary-color, rgba(76, 59, 207, 0.25));
}

/* تأثير إضافي للزر مع الألوان المتغيرة */
.custom-atc-btn::before,
.atc-buy-button .custom-atc-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
  z-index: 1;
}

.custom-atc-btn:hover::before,
.atc-buy-button .custom-atc-btn:hover::before {
  left: 100%;
}

/* ضمان أن النص يظهر فوق التأثير */
.custom-atc-btn span,
.atc-buy-button .custom-atc-btn span,
.custom-atc-btn,
.atc-buy-button .custom-atc-btn {
  position: relative;
  z-index: 2;
}

/* إصلاح أي مشاكل في التخطيط مع العناصر الأخرى */
.form-footer {
  display: flex !important;
  flex-direction: column !important;
  gap: 15px !important;
}

.form-footer #nrwooconfirm.atc-buy-button {
  margin-top: 15px !important;
}

/* ضمان التناسق العمودي النهائي */
#nrwooconfirm.atc-buy-button {
  min-height: 50px !important;
  align-items: stretch !important;
}

#nrwooconfirm.atc-buy-button .custom-atc-btn,
#nrwooconfirm.atc-buy-button input[type="submit"] {
  margin: 0 !important;
  padding: 0 30px !important;
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  border: none !important;
  outline: none !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}

/* إصلاح أي مشاكل في التموضع النسبي */
#nrwooconfirm.atc-buy-button .custom-atc-btn {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
} 