@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css");

/* 🔹 الحاوية الرئيسية للفورم المباشر (Inline Wrapper) */
#do-inline-form-wrapper {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

/* 🔹 الهيدر والسعر */
#do-inline-form-wrapper .do-popup-header {
    text-align: center;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

#do-inline-form-wrapper .do-popup-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #111827;
}

#do-inline-form-wrapper .do-popup-price {
    margin-top: 8px;
    color: #059669;
    font-size: 17px;
    font-weight: 700;
}

/* 🔹 الحقول والصفوف */
.do-field-group {
    margin-bottom: 12px;
    text-align: right;
}

.do-field-group label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

#do-inline-form-wrapper .do-row input[type="text"],
#do-inline-form-wrapper .do-row input[type="tel"],
#do-inline-form-wrapper .do-row input[type="number"],
.do-field-group input[type="text"],
.do-field-group input[type="tel"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    color: #1f2937;
    background-color: #f9fafb;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

#do-inline-form-wrapper .do-row input:focus,
.do-field-group input:focus {
    outline: none;
    border-color: #000000;
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

/* 🔹 أزرار المقاسات (Taille Swatches) */
.do-swatches-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.do-swatch-btn {
    padding: 8px 16px;
    border: 1px solid #d1d5db !important;
    background: #ffffff !important;
    color: #111827 !important;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 45px;
    text-align: center;
}

.do-swatch-btn:hover {
    border-color: #000000 !important;
    background: #f3f4f6 !important;
}

.do-swatch-btn.active {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: #000000 !important;
}

/* 🔹 خانة الكمية (+ / -) */
.do-qty-selector {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 140px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    overflow: hidden !important;
    margin-top: 5px !important;
}

.do-qty-btn {
    width: 45px !important;
    height: 42px !important;
    background: #f3f4f6 !important;
    color: #111827 !important;
    border: none !important;
    font-size: 20px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    user-select: none !important;
}

.do-qty-btn:hover {
    background: #e5e7eb !important;
}

.do-qty-input-visible {
    width: 50px !important;
    height: 42px !important;
    border: none !important;
    text-align: center !important;
    font-size: 18px !important;
    font-weight: bold !important;
    color: #000000 !important;
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* 🔹 منطقة الكوبون */
.do-coupon-input-wrap {
    display: flex;
    gap: 8px;
}

.do-coupon-input-wrap input {
    flex: 1;
}

.do-coupon-input-wrap button,
#do-inline-form-wrapper #apply-coupon-btn {
    background: #111827;
    color: #ffffff;
    border: none;
    padding: 0 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Cairo', sans-serif;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.do-coupon-input-wrap button:hover,
#do-inline-form-wrapper #apply-coupon-btn:hover {
    background: #374151;
}

#do-coupon-message {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 600;
}

/* 🔹 التوصيل والتنبيهات */
#do-inline-form-wrapper .do-free {
    text-align: center;
    color: #16a34a;
    font-weight: 700;
    font-size: 14px;
    margin: 10px 0;
}

#do-inline-form-wrapper .do-popup-result {
    text-align: center;
    min-height: 20px;
    margin-top: 8px;
    font-weight: 600;
    font-size: 14px;
}

/* 🔹 زر "تأكيد الطلب الآن" مع الحركة (Pulse Animation) */
.do-popup-submit,
#do-inline-form-wrapper .do-popup-submit {
    width: 100%;
    background: #27ae60;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s ease;
    animation: doPulse 2s infinite;
}

.do-popup-submit:hover,
#do-inline-form-wrapper .do-popup-submit:hover {
    background: #219150;
}

.do-popup-submit:disabled,
#do-inline-form-wrapper .do-popup-submit:disabled {
    background: #9ca3af;
    animation: none;
    cursor: not-allowed;
}

/* 🔹 تعريف حركة النبض (Pulse Keyframes) */
@keyframes doPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7);
    }
    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(39, 174, 96, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

/* 🔹 إخفاء عناصر ووكومرس الإضافية خارج الإطار */
.summary.entry-summary > form.variations_form:not(#do-swatches-container form) {
    display: none !important;
}

/* 🔹 Responsive */
@media(max-width: 480px) {
    #do-inline-form-wrapper {
        padding: 15px;
        margin-top: 15px;
    }
    #do-inline-form-wrapper .do-popup-header h2 {
        font-size: 18px;
    }
}
/* 🔴 إصلاح ضغط الشاشة وإلغاء مسافات القالب الخارجي */
@media (max-width: 767px) {
    .ast-woocommerce-container,
    .woocommerce div.product,
    .summary.entry-summary {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* 🔹 شريط التنبيه العلوي (تحفيز الشراء) */
.do-promo-bar {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}

/* 🔹 شارات الثقة والضمان أسفل زر الطلب */
.do-trust-badges {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
    font-size: 12px;
    color: #4b5563;
    font-weight: 600;
}

.do-trust-badges span {
    display: flex;
    align-items: center;
    gap: 4px;
}