/* ===== STYLE.CSS - النسخة المعدلة مع نظام الكوبونات ===== */
* {margin: 0; padding: 0; box-sizing: border-box;}
body {
  font-family: 'Cairo', sans-serif;
  background-color: #0d0d0d;
  color: #fff;
  overflow-x: hidden;
}

/* تأثير blur للهيدر */
header.scrolled {
  background: rgba(17, 17, 17, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(212, 175, 55, 0.4) !important;
}

/* Toast Notification - محسن */
.toast {
  position: fixed;
  top: 100px;
  right: 20px;
  background: rgba(25, 25, 25, 0.95);
  color: #fff;
  padding: 15px 20px;
  border-radius: 12px;
  font-weight: 600;
  z-index: 10000;
  transform: translateX(400px);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  border-left: 4px solid #d4af37;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  max-width: 350px;
  font-size: 0.9rem;
}

.toast.show {
  transform: translateX(0);
}

/* fade-in animation - محسن */
.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* تأثيرات التحميل للصور الجديدة */
.image-loading {
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

img.loaded {
  opacity: 1 !important;
  transition: opacity 0.5s ease !important;
}

img.error {
  opacity: 0.5 !important;
  filter: grayscale(100%) !important;
}

/* شريط التقدم المضاف */
.loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(212, 175, 55, 0.2);
  z-index: 10001;
  display: none;
}

.loading-progress {
  height: 100%;
  background: linear-gradient(90deg, #d4af37, #b8941f);
  width: 0%;
  transition: width 0.4s ease;
  border-radius: 0 2px 2px 0;
}

/* أنيميشن الريبل للأزرار */
@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

/* كلاسات مساعدة جديدة */
.structured-data {
  display: none !important;
}

.tracking-data {
  display: none !important;
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
    position: fixed;
    bottom: 90px;
    left: 25px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.9), rgba(184, 148, 31, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 9997;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 1), rgba(184, 148, 31, 1));
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
}

.scroll-to-top i {
    color: #000;
    font-size: 1.3rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.scroll-to-top:hover i {
    transform: translateY(-2px);
}

/* تأثير الشفافية أثناء التمرير */
body.scrolled .scroll-to-top {
    opacity: 0.8;
}

body.scrolled .scroll-to-top:hover {
    opacity: 1;
}

/* أنيميشن النبض */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(212, 175, 55, 0.8);
    }
}

.scroll-to-top.pulse {
    animation: pulseGlow 2s infinite;
}

/* ===== Order Confirmation Popup - النسخة المعدلة للوضع الداكن والفاتح ===== */
.confirmation-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10002;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 20px;
    backdrop-filter: blur(5px);
}

.confirmation-popup.active {
    display: flex;
    opacity: 1;
}

.confirmation-popup.closing {
    opacity: 0;
}

.confirmation-content {
    background: rgba(35, 35, 35, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 16px;
    padding: 25px;
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(212, 175, 55, 0.2);
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.3) translateY(50px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.confirmation-popup.active .confirmation-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.confirmation-popup.closing .confirmation-content {
    transform: scale(0.3) translateY(50px);
    opacity: 0;
}

.confirmation-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    position: relative;
}

.confirmation-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 20%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37, #b8941f, transparent);
    border-radius: 2px;
}

.confirmation-header h3 {
    color: #25D366;
    font-size: 1.4rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.confirmation-header p {
    color: #bbb;
    font-size: 0.9rem;
}

.confirmation-message {
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.confirmation-message p {
    color: #25D366;
    font-weight: 600;
    margin: 0;
    font-size: 0.95rem;
}

/* تفاصيل الطلب */
.order-summary {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05));
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 14px;
    padding: 15px;
    margin-bottom: 18px;
    text-align: center;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.order-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

.order-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.order-detail:last-child {
    border-bottom: none;
}

.order-detail.total {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.1));
    border-radius: 8px;
    padding: 10px;
    margin-top: 8px;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.detail-label {
    color: #ccc;
    font-weight: 600;
    font-size: 0.85rem;
}

.detail-value {
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}

.order-code {
    color: #d4af37 !important;
    font-weight: 700;
    background: rgba(212, 175, 55, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* أزرار التأكيد */
.confirmation-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.whatsapp-info {
    text-align: center;
    margin-bottom: 8px;
}

.whatsapp-info p {
    color: #25D366;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
}

.whatsapp-btn, .close-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #128C7E, #25D366);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

/* ===== ستايلات كود الخصم الجديدة ===== */
.coupon-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.coupon-input-group .form-input {
  flex: 1;
  margin-bottom: 0;
}

.apply-coupon-btn {
  background: linear-gradient(135deg, #25D366, #128C7E);
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 0.9rem;
}

.apply-coupon-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #128C7E, #25D366);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.apply-coupon-btn:disabled {
  background: #555;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.apply-coupon-btn.applied {
  background: linear-gradient(135deg, #d4af37, #b8941f);
}

.apply-coupon-btn.applied:hover {
  background: linear-gradient(135deg, #b8941f, #d4af37);
}

.coupon-message {
  font-size: 0.85rem;
  margin-top: 5px;
  padding: 8px 12px;
  border-radius: 8px;
  display: none;
  text-align: center;
  font-weight: 600;
}

.coupon-message.success {
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.3);
  color: #25D366;
  display: block;
}

.coupon-message.error {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #dc3545;
  display: block;
}

.coupon-row {
  background: rgba(37, 211, 102, 0.05);
  border-radius: 6px;
  padding: 4px 8px;
  margin: 2px 0;
  border: 1px solid rgba(37, 211, 102, 0.2);
}

.discount-value {
  color: #25D366 !important;
  font-weight: 700;
}

/* تأثير على السعر النهائي عند التخفيض */
.total-row.with-discount {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.15), rgba(37, 211, 102, 0.1)) !important;
  border-color: rgba(37, 211, 102, 0.3) !important;
}

/* ===== Light Mode للكوبونات ===== */
[data-theme="light"] .apply-coupon-btn {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
}

[data-theme="light"] .apply-coupon-btn.applied {
  background: linear-gradient(135deg, #a07850, #8a6642);
}

[data-theme="light"] .coupon-message.success {
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.3);
  color: #128C7E;
}

[data-theme="light"] .coupon-message.error {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #c82333;
}

[data-theme="light"] .coupon-row {
  background: rgba(37, 211, 102, 0.05);
  border: 1px solid rgba(37, 211, 102, 0.2);
}

[data-theme="light"] .discount-value {
  color: #128C7E !important;
}

[data-theme="light"] .total-row.with-discount {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.1), rgba(37, 211, 102, 0.05)) !important;
  border-color: rgba(37, 211, 102, 0.2) !important;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .toast {
        top: 80px;
        right: 10px;
        left: 10px;
        max-width: none;
        text-align: center;
        font-size: 0.85rem;
    }
    
    .loading-bar {
        height: 2px;
    }
    
    .scroll-to-top {
        bottom: 80px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
    
    .scroll-to-top i {
        font-size: 1.2rem;
    }
    
    .confirmation-content {
        padding: 20px 15px;
        margin: 15px;
    }
    
    .order-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .detail-value {
        text-align: right;
        width: 100%;
    }

    .coupon-input-group {
        flex-direction: column;
        gap: 8px;
    }

    .apply-coupon-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        bottom: 70px;
        left: 15px;
        width: 42px;
        height: 42px;
    }
    
    .scroll-to-top i {
        font-size: 1.1rem;
    }

    .coupon-input-group {
        gap: 6px;
    }

    .apply-coupon-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .coupon-message {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

/* ربط ملف الهيدر */
@import url('header.css');

/* ربط ملفات CSS الإضافية */
@import url('feedback.css');