/* التنسيقات العامة */
:root {
    --gold-color: #d4af37;
    --dark-gold: #b8860b;
    --charcoal: #333333;
    --cream-color: #f5f5f5;
}

/* أنماط الأزرار الذهبية */
.btn-gold {
    background-color: var(--gold-color);
    border-color: var(--gold-color);
    color: white;
    transition: all 0.3s ease;
}

.btn-gold:hover, .btn-gold:focus {
    background-color: var(--dark-gold);
    border-color: var(--dark-gold);
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

.btn-outline-gold {
    border-color: var(--gold-color);
    color: var(--gold-color);
    transition: all 0.3s ease;
}

.btn-outline-gold:hover, .btn-outline-gold:focus {
    background-color: var(--gold-color);
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: #f8f9fa;
}

/* إضافة خط Tajawal من جوجل */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

/* تنسيق البطاقات */
.card {
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 20px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* أزرار المنتج */
.product-buttons {
    display: flex;
    justify-content: space-between;
}

/* تنسيق صفحة تفاصيل المنتج */
.product-detail-img {
    max-height: 400px;
    object-fit: contain;
}

/* تنسيق عربة التسوق */
.cart-item {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

/* تنسيق صفحة المصنع */
.process-step {
    padding: 20px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: transform 0.3s, box-shadow 0.3s;
}

.process-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.process-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: var(--gold-color);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.2rem;
}

.cart-item img {
    max-width: 80px;
    max-height: 80px;
    object-fit: cover;
}

/* تنسيق صفحة الدفع */
.checkout-summary {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
}

/* تنسيق القائمة الرئيسية */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffffff;
}

/* تحسينات لأيقونة السلة ومظهرها */
.cart-icon-wrapper {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--dark-gold);
    color: white;
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* تأثير تحديث الشارة */
@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

.badge-updated {
    animation: badgePulse 0.5s ease-in-out;
    background-color: #e74c3c !important; /* لون أحمر واضح للتحديث */
}

/* زر الواتساب */
.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-whatsapp:hover, .btn-whatsapp:focus {
    background-color: #128C7E;
    color: white;
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.3);
    transform: translateY(-2px);
}

.btn-whatsapp .fab {
    font-size: 1.2em;
}

/* تأثير نبض للواتساب */
@keyframes whatsAppPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.btn-whatsapp:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: scale(0) translate(-50%, -50%);
    transform-origin: top left;
    transition: transform 0.6s;
}

.btn-whatsapp:hover:after {
    transform: scale(2) translate(-50%, -50%);
}

/* Floating WhatsApp Icon */
.floating-whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.floating-whatsapp i {
    line-height: 1;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
    color: white;
    box-shadow: 0 6px 14px rgba(37, 211, 102, 0.4);
}

.floating-whatsapp:focus {
    color: white;
}

/* Tooltip for WhatsApp */
.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background-color: #333;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.whatsapp-tooltip:after {
    content: '';
    position: absolute;
    top: 50%;
    right: -8px;
    margin-top: -8px;
    border-width: 8px 0 8px 8px;
    border-style: solid;
    border-color: transparent transparent transparent #333;
}

.floating-whatsapp:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Animation for floating WhatsApp */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.floating-whatsapp {
    animation: pulse 2s infinite;
}

/* تنسيق الفيديو - تحسين للأجهزة المحمولة */
.video-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* نسبة 16:9 للفيديو */
    max-height: 80vh; /* الحد الأقصى للارتفاع هو 80% من ارتفاع الشاشة */
}

.video-container video.full-width-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover; /* يغطي المساحة المتاحة مع الحفاظ على النسبة */
}

/* للشاشات الصغيرة (الموبايل) */
@media (max-width: 767.98px) {
    .video-container {
        padding-bottom: 75%; /* نسبة أكثر ملاءمة للموبايل */
    }
    
    .carousel-caption {
        padding: 10px;
        bottom: 0;
    }
    
    .carousel-caption h1 {
        font-size: 1.5rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }
}

/* للأجهزة اللوحية */
@media (min-width: 768px) and (max-width: 991.98px) {
    .carousel-caption h1 {
        font-size: 2rem;
    }
}

/* تحسينات للقائمة المنبثقة على الموبايل */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        right: 0;
        width: 85%;
        height: 100vh;
        padding: 2rem;
        background-color: white;
        z-index: 1050;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
        box-shadow: -5px 0px 15px rgba(0,0,0,0.1);
    }

    .navbar-collapse.show {
        transform: translateX(0);
    }

    .mobile-nav-header {
        border-bottom: 1px solid #eee;
        padding-bottom: 1rem;
        margin-bottom: 1.5rem;
    }

    /* أيقونة السلة على الموبايل */
    .cart-mobile-icon {
        position: relative;
        padding: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
    }

    .cart-badge-mobile {
        position: absolute;
        top: -5px;
        right: -5px;
        background-color: var(--gold-color);
        color: white;
        font-size: 0.7rem;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-weight: bold;
    }
}

/* تحسينات لعرض الصور الثلاث على الموبايل */
@media (max-width: 767.98px) {
    .feature-box {
        position: relative;
        height: 100%;
        border-radius: 5px;
        overflow: hidden;
        box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    }
    
    .feature-img {
        height: 60px;
        position: relative;
    }
    
    .feature-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 5px;
    }
    
    .feature-title {
        color: white;
        margin: 0;
        font-size: 0.8rem;
        text-align: center;
        font-weight: bold;
    }
    
    .feature-description {
        background: white;
        height: auto;
    }
    
    .feature-description p {
        font-size: 0.7rem;
        margin-bottom: 5px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .feature-description .btn {
        font-size: 0.7rem;
        padding: 2px 5px;
    }
}

/* تنسيق الصور المصغرة */
.thumbnail {
    transition: opacity 0.3s;
}

.thumbnail:hover {
    opacity: 0.8;
}

/* تنسيق الحقول العربية */
input, textarea, select {
    direction: rtl;
}

/* تنسيق عناصر العرض */
.carousel-inner {
    border-radius: 5px;
    overflow: hidden;
}

/* أنماط الأزرار الذهبية */
.gold-btn {
    background-color: var(--gold-color);
    border-color: var(--gold-color);
    color: white;
}

.gold-btn:hover {
    background-color: var(--dark-gold);
    border-color: var(--dark-gold);
    color: white;
}

.gold-outline-btn {
    color: var(--gold-color);
    border-color: var(--gold-color);
    background-color: transparent;
}

.gold-outline-btn:hover {
    background-color: var(--gold-color);
    color: white;
}

/* تنسيق أقسام الصفحة الرئيسية */
.section-title {
    position: relative;
    margin-bottom: 30px;
    padding-bottom: 15px;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background-color: var(--gold-color);
}

/* تنسيق أزرار الكمية */
.quantity-control {
    display: flex;
    align-items: center;
}

.quantity-control button {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-control input {
    width: 50px;
    text-align: center;
}

/* تنسيق الإشعارات */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* تنسيق خاص للهواتف المحمولة */
@media (max-width: 768px) {
    .card-img-top {
        height: 150px;
    }
    
    .product-detail-img {
        max-height: 300px;
    }
}
