/* ====== RESET ====== */
* { box-sizing: border-box; }

/* تحسينات الأداء للصور */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  max-width: 100%;
  height: auto;
}

html {
  margin:0; 
  padding:0;
  width: 100%;
  overflow-x: hidden;
}
body {
  margin:0; 
  padding:0;
  font-family: "Inter", "Segoe UI", Tahoma, Arial, "Cairo", "Tajawal", sans-serif;
  min-height: 100vh;
  color:#222;
  width: 100%;
  overflow-x: hidden;
  position: relative;
}

/* خلفية افتراضية - يمكن تخصيصها لكل صفحة */
body:not(.has-category-bg) {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  background-color: #f5f5f0; /* لون احتياطي إذا لم توجد صورة */
}

/* خلفية الصفحة الرئيسية */
body.page-index {
  background-image: url('uploads/background.jpg');
}

/* خلفية صفحة المنتجات */
body.page-products {
  background-image: url('uploads/background_products.jpg'), url('uploads/background.jpg');
}

.category-title-header h1 {
  font-size: 3.5rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
  color: white;
  margin: 0;
}

/* محتوى الصفحة فوق الصورة الخلفية */
.category-content-wrapper {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 30px;
  margin-top: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .category-title-header {
    padding: 60px 15px 30px;
  }
  
  .category-title-header h1 {
    font-size: 2rem;
  }
  
  .category-content-wrapper {
    padding: 20px 15px;
    margin-top: 10px;
  }
}

/* خلفية صفحة الفئات */
body.page-categories {
  background-image: url('uploads/background_categories.jpg'), url('uploads/background.jpg');
}

/* خلفية صفحة تفاصيل المنتج */
body.page-product-details {
  background-image: url('uploads/background_product.jpg'), url('uploads/background.jpg');
}

/* خلفية صفحة السلة */
body.page-cart {
  background-image: url('uploads/background_cart.jpg'), url('uploads/background.jpg');
}

/* خلفية صفحة الدفع */
body.page-checkout {
  background-image: url('uploads/background_checkout.jpg'), url('uploads/background.jpg');
}

/* خلفية صفحة تسجيل الدخول */
body.page-login {
  background-image: url('uploads/background_login.jpg'), url('uploads/background.jpg');
}

body.page-register {
  background-image: url('uploads/background_login.jpg'), url('uploads/background.jpg');
}

/* ====== MAIN BANNER - Carousel كبير ====== */
.banner-carousel {
    /* Full-width hero banner */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    height: 600px;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 0;
}

.banner-carousel .carousel-item {
    height: 600px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    position: relative;
    overflow: visible;
}

.banner-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Button واحد في الوسط تماماً */
.banner-category-button {
    position: absolute !important;
    top: 70% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 20 !important;
    background: #ff6b35 !important;
    color: #fff !important;
    padding: 18px 50px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 1.2rem !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.5) !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

.banner-category-button:hover {
    background: #ff8c42 !important;
    color: #fff !important;
    transform: translate(-50%, -50%) scale(1.05) !important;
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.7) !important;
    text-decoration: none !important;
}

.banner-category-button:focus {
    outline: none !important;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.5), 0 0 0 3px rgba(255, 107, 53, 0.3) !important;
}

/* زر كبير في اليسار (وسط البانر) */
.banner-button-large {
    padding: 22px 70px !important;
    font-size: 1.6rem !important;
    border-radius: 60px !important;
    top: 70% !important;
    left: 25% !important;
    transform: translateY(-50%) !important;
    bottom: auto !important;
    background: #ff6b35 !important;
    border: none !important;
}

.banner-button-large:hover {
    transform: translateY(-50%) scale(1.05) !important;
    background: #ff8c42 !important;
}

/* زر أصغر في اليمين (وسط البانر) */
.banner-button-small {
    padding: 15px 35px !important;
    font-size: 1.1rem !important;
    top: 70% !important;
    right: 25% !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    bottom: auto !important;
    background: #ff6b35 !important;
    border: none !important;
}

.banner-button-small:hover {
    transform: translateY(-50%) scale(1.05) !important;
    background: #ff8c42 !important;
}

.banner-category-button i {
    font-size: 1.3rem;
}

/* Responsive adjustments for banner buttons (smaller on mobile) */
@media (max-width: 768px) {
    .banner-category-button {
        padding: 12px 30px !important;
        font-size: 0.95rem !important;
        gap: 6px !important;
    }

    .banner-button-large {
        padding: 14px 40px !important;
        font-size: 1.1rem !important;
        left: 30% !important;
    }

    .banner-button-small {
        padding: 10px 30px !important;
        font-size: 0.95rem !important;
        right: 20% !important;
    }
}

.banner-carousel .carousel-control-prev,
.banner-carousel .carousel-control-next {
    width: 50px;
    height: 50px;
    background: transparent;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    transition: all 0.3s ease;
    border: 3px solid #0d3b66;
    box-shadow: 0 2px 10px rgba(13, 59, 102, 0.3);
    z-index: 15;
}

.banner-carousel .carousel-control-prev:hover,
.banner-carousel .carousel-control-next:hover {
    opacity: 1;
    background: rgba(13, 59, 102, 0.1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(13, 59, 102, 0.5);
    border-color: #0a3d62;
}

.banner-carousel .carousel-control-prev {
    left: 15px;
}

.banner-carousel .carousel-control-next {
    right: 15px;
}

.banner-carousel .carousel-control-prev-icon,
.banner-carousel .carousel-control-next-icon {
    width: 20px;
    height: 20px;
    background-color: transparent;
    border-radius: 0;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.banner-carousel .carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
    filter: drop-shadow(0 1px 2px rgba(13, 59, 102, 0.5));
}

.banner-carousel .carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    filter: drop-shadow(0 1px 2px rgba(13, 59, 102, 0.5));
}

.banner-carousel .carousel-indicators {
    bottom: 20px;
    margin-bottom: 0;
}

.banner-carousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    margin: 0 5px;
    transition: all 0.3s ease;
}

.banner-carousel .carousel-indicators button.active {
    background: #fff;
    width: 30px;
    border-radius: 6px;
}

.banner-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-bottom: 30px;
}

/* Footer avec contacts */
.banner-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    position: relative;
    z-index: 3;
}

.banner-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1em;
    color: white;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a3d62;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Responsive Banner - Mobile */
@media (max-width: 768px) {
    .banner-carousel {
        height: auto !important;
        min-height: 50vh;
        max-height: 400px;
        aspect-ratio: 16/9;
    }
    
    .banner-carousel .carousel-item {
        height: 100% !important;
        min-height: 50vh;
        max-height: 400px;
    }
    
    .banner-carousel .carousel-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    .banner-category-button {
        top: 75% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        padding: 8px 22px !important;
        font-size: 0.85rem !important;
    }
    
    .banner-content {
        padding-bottom: 20px;
    }
    
    .banner-footer {
        gap: 20px;
        flex-direction: column;
    }
    
    .banner-contact-item {
        font-size: 1em;
        padding: 8px 16px;
    }
    
    .contact-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* ====== Category Carousel Controls (أسهم بين الفئات) ====== */
.category-carousel-prev,
.category-carousel-next {
    width: 55px;
    height: 55px;
    background: rgba(0, 0, 0, 0.8) !important;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.category-carousel-prev:hover,
.category-carousel-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 1) !important;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.8);
}

.category-carousel-prev {
    left: 15px;
}

.category-carousel-next {
    right: 15px;
}

.category-carousel-prev .carousel-control-prev-icon,
.category-carousel-next .carousel-control-next-icon {
    width: 25px;
    height: 25px;
    background-color: white;
    border-radius: 50%;
    background-size: 60% 60%;
    background-position: center;
    background-repeat: no-repeat;
}

.category-carousel-prev .carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.category-carousel-next .carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Responsive Category Carousel */
@media (max-width: 768px) {
    .category-carousel-prev,
    .category-carousel-next {
        width: 40px;
        height: 40px;
    }
    
    .category-carousel-prev {
        left: 10px;
    }
    
    .category-carousel-next {
        right: 10px;
    }
}

/* التأكد من أن المحتوى فوق الخلفية */
.container-max,
.container,
main,
section {
  position: relative;
  z-index: 1;
}

/* ====== WHATSAPP FLOATING BUTTON ====== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 50%;
    right: 20px;
    transform: translateY(50%);
    background: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background: #20BA5A;
    transform: translateY(50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    color: white;
    text-decoration: none;
}

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

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(37, 211, 102, 0.7);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

/* RTL Support for WhatsApp Button */
[dir="rtl"] .whatsapp-float {
    right: auto;
    left: 20px;
}

/* Responsive WhatsApp Button */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 28px;
        bottom: 50%;
        right: 15px;
        transform: translateY(50%);
    }
    
    .whatsapp-float:hover {
        transform: translateY(50%) scale(1.1);
    }
    
    [dir="rtl"] .whatsapp-float {
        left: 15px;
        right: auto;
    }
}

/* ====== MODERN PRODUCT CARDS (Adem Nutrition Style) ====== */
.product-card-modern {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.product-card-modern:hover {
    /* تم إزالة transform لتجنب مشاكل التمرير */
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ====== FISHING STORE PRODUCT CARDS ====== */
.product-card-fishing {
    border: 3px solid #0a3d62; /* أزرق - نفس لون navbar */
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 15px rgba(10, 61, 98, 0.3), 
                0 0 0 1px rgba(10, 61, 98, 0.2) inset,
                0 2px 8px rgba(0,0,0,0.1);
    background: #ffffff;
    position: relative;
    will-change: box-shadow, border-color;
}

/* إطار مزخرف أزرق */
.product-card-fishing::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, 
        #0a3d62 0%, 
        #1a5a8a 25%, 
        #0d3b66 50%, 
        #1a5a8a 75%, 
        #0a3d62 100%);
    background-size: 200% 200%;
    border-radius: 12px;
    z-index: -1;
    opacity: 0.6;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.product-card-fishing:hover {
    box-shadow: 0 6px 20px rgba(10, 61, 98, 0.5), 
                0 0 0 2px rgba(10, 61, 98, 0.3) inset,
                0 4px 15px rgba(0,0,0,0.15);
    border-color: #1a5a8a; /* أزرق فاتح عند hover */
    /* تم إزالة transform لتجنب مشاكل التمرير */
}

.product-image-fishing {
    background: #f8f9fa;
    padding: 15px;
    text-align: center;
}

.product-image-fishing img {
    transition: opacity 0.3s ease-in-out;
    /* تم إزالة transform transition لتجنب مشاكل التمرير */
}

/* تحسين تحميل الصور */
.product-image-lazy,
img[loading="lazy"] {
    will-change: opacity;
}

/* Placeholder أثناء التحميل - محسّن */
.product-image-fishing {
    position: relative;
}

.product-image-fishing img.loading {
    opacity: 0;
}

.product-image-fishing img.loaded {
    opacity: 1;
}

/* تم إزالة animation loading لتجنب المشاكل */

.product-card-fishing:hover .product-image-fishing img {
    /* تم إزالة transform لتجنب مشاكل التمرير */
    opacity: 0.95;
}

.product-name-fishing {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.4;
    min-height: 2.8em;
}

.product-category-fishing {
    color: #666;
    font-size: 0.85rem;
}

.product-rating {
    color: #ddd;
    font-size: 0.9rem;
}

.product-rating i {
    margin-right: 2px;
}

.stock-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.stock-badge.in-stock {
    background: #d4edda;
    color: #155724;
}

.stock-badge.in-stock i {
    color: #28a745;
    margin-right: 4px;
}

.stock-badge.out-stock {
    background: #f8d7da;
    color: #721c24;
}

.stock-badge.out-stock i {
    color: #dc3545;
    margin-right: 4px;
}

.product-price-fishing {
    font-size: 1.1rem;
    color: #0a3d62;
}

.product-action-fishing .btn {
    font-weight: 500;
    padding: 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.product-action-fishing .btn-primary {
    background: #0d6efd;
    border-color: #0d6efd;
}

.product-action-fishing .btn-primary:hover {
    background: #0b5ed7;
    border-color: #0b5ed7;
    /* تم إزالة transform لتجنب مشاكل التمرير */
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

.product-image-modern {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    color: white;
}

.product-badge.bg-success {
    background: #28a745 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.product-badge.bg-danger {
    background: #dc3545 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.product-actions-modern {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-add-cart-modern {
    flex: 1;
    background: #0d6efd;
    border: none;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-add-cart-modern:hover {
    background: #0b5ed7;
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
    color: white;
}

.btn-buy-now-modern {
    flex: 1;
    background: #6c757d;
    border: none;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-buy-now-modern:hover {
    background: #5a6268;
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
    color: white;
}

/* ====== RTL SUPPORT ====== */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .navbar-nav {
  flex-direction: row-reverse;
}

[dir="rtl"] .ms-auto {
  margin-left: 0 !important;
  margin-right: auto !important;
}

[dir="rtl"] .me-auto {
  margin-right: 0 !important;
  margin-left: auto !important;
}

[dir="rtl"] .text-start {
  text-align: right !important;
}

[dir="rtl"] .text-end {
  text-align: left !important;
}

/* ====== CONTAINER ====== */
.container-max {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 15px;
  min-height: calc(100vh - 200px);
  padding-bottom: 0;
}

/* ====== SUPPORT & DELIVERY SECTION ====== */
.support-delivery-section {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  position: relative !important;
  clear: both !important;
  display: block !important;
  padding: 30px 0 !important;
}

.support-delivery-section .container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

/* ====== FOOTER ====== */
footer {
  margin-top: 0 !important;
  padding-top: 20px !important;
  padding-bottom: 20px !important;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  left: 0 !important;
  right: 0 !important;
  position: relative !important;
  margin-bottom: 0 !important;
  clear: both !important;
  display: block !important;
}

body {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  overflow-x: hidden !important;
  position: relative;
}

html {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  overflow-x: hidden !important;
  height: 100%;
  background: #0d3b66 !important;
}

/* إزالة الفراغ الأبيض تحت الـ footer */
body::after {
  content: '';
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 500px;
  background: #0d3b66;
  z-index: -100;
  pointer-events: none;
}

/* إزالة الفراغ الأبيض تحت الـ footer - طبقة خلفية */
body::after {
  content: '';
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 300px;
  background: #0d3b66;
  z-index: -10;
  pointer-events: none;
}

body {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

html {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

footer .container {
  max-width: 1200px;
  padding: 0 20px;
  margin: 0 auto;
  width: 100%;
}

footer h4 {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  margin-bottom: 20px !important;
}

footer h5 {
  font-size: 1.3rem !important;
  font-weight: 600 !important;
  margin-bottom: 20px !important;
}

footer p {
  font-size: 1rem !important;
  line-height: 1.8 !important;
  margin-bottom: 12px !important;
}

footer li {
  font-size: 1rem !important;
  line-height: 1.8 !important;
  margin-bottom: 8px !important;
}

footer .d-flex.gap-3 {
  margin-top: 25px !important;
}

footer .d-flex.gap-3 a {
  font-size: 32px !important;
  width: 45px !important;
  height: 45px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.3s ease;
}

footer .d-flex.gap-3 a:hover {
  transform: scale(1.2);
}

footer .mb-4 {
  margin-bottom: 2rem !important;
}

footer .col-md-4 {
  padding: 0 20px;
}

footer hr {
  margin: 30px 0 !important;
  border-width: 1px !important;
}

footer .text-center {
  font-size: 1rem !important;
  line-height: 1.8 !important;
}

/* Footer responsive - إزالة الخطوط على الشاشات الصغيرة */
@media (max-width: 768px) {
  .footer-column {
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.2) !important;
    padding-right: 0 !important;
    padding-bottom: 20px !important;
    margin-bottom: 20px !important;
  }
  
  .footer-column:last-child {
    border-bottom: none !important;
  }
}

/* ====== NAVBAR ====== */
.navbar-custom {
  background: linear-gradient(90deg, #0b74de, #0066cc);
  box-shadow: 0 2px 8px rgba(3, 24, 66, 0.08);
}
.navbar-custom .navbar-brand {
  color:#fff;
  font-weight:700;
  letter-spacing:0.2px;
}
.navbar-custom .nav-link {
  color: rgba(255,255,255,0.95);
  margin-right:10px;
}
.navbar-custom .nav-link:hover { color:#fffa; }

/* ====== NAVBAR AZRA9 (تدرج أزرق داكن) ====== */
.navbar-custom-blue {
  background: linear-gradient(135deg, #0a3d62 0%, #1a5a8a 25%, #0d3b66 50%, #1a5a8a 75%, #0a3d62 100%);
  padding: 8px 0 10px 0;
  box-shadow: 0 4px 20px rgba(10, 61, 98, 0.3);
  border-bottom: none;
}

/* التأكد من أن navbar يبقى ثابتًا - CSS أقوى */
nav.navbar.navbar-expand-lg.navbar-custom-blue,
.navbar.navbar-expand-lg.navbar-custom-blue,
nav.navbar-custom-blue,
.navbar-custom-blue {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1030 !important;
  width: 100% !important;
  margin: 0 !important;
}

/* التأكد من أن أي container داخل navbar لا يمنع sticky */
.navbar-custom-blue .container {
  position: relative;
}

/* التأكد من أن body لا يمنع sticky */
body {
  overflow-x: hidden;
  overflow-y: auto;
}

/* Class إضافي لضمان sticky */
.sticky-navbar {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1030 !important;
  width: 100% !important;
}

/* ====== TOP BAR (Gris clair) ====== */
.navbar-top-bar-light {
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  width: 100%;
}

.navbar-top-bar-light a:hover {
  color: #0d6efd !important;
  text-decoration: underline !important;
}

/* Responsive pour navbar-top-bar-light */
@media (max-width: 768px) {
  .navbar-top-bar-light .d-flex {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .navbar-top-bar-light .d-flex > div {
    width: 100%;
    justify-content: center !important;
  }
}

.navbar-brand-blue {
  color: #ffffff !important;
  font-size: 22px;
  font-weight: 700;
  transition: all 0.3s ease;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.navbar-brand-blue:hover {
  color: #e0f2ff !important;
  transform: scale(1.05);
}

.nav-link-blue {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 500;
  transition: all 0.3s ease;
  margin: 0 5px;
  padding: 8px 15px !important;
  border-radius: 6px;
}

.nav-link-blue:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.navbar-custom-blue .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
}

.navbar-custom-blue .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-custom-blue .form-control {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #333;
}

.navbar-custom-blue .btn-light {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #0a3d62;
  font-weight: 600;
}

.navbar-custom-blue .btn-light:hover {
  background: #ffffff;
  color: #0a3d62;
}

/* ====== LANGUAGE SWITCHER ====== */
.language-switcher-btn {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.language-switcher-btn::after {
  margin-left: auto;
  margin-right: 0;
}

.dropdown-menu {
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 4px;
}

/* Language dropdown menu - يظهر فوق قائمة الفئات */
#languageDropdown + .dropdown-menu,
.dropup #languageDropdown + .dropdown-menu {
  z-index: 1031 !important;
}

.dropdown-item {
  padding: 8px 16px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: #f8f9fa;
}

.dropdown-item.active {
  background: #e9ecef;
  color: #0a3d62;
  font-weight: 600;
}

/* نقاط pagination */
.pagination .page-link {
    color: #0d6efd;             /* اللون الأزرق تاع موقعك */
    border: 1px solid #d0d0d0;
    padding: 8px 14px;
    font-weight: 500;
    border-radius: 4px;
}

/* لما يدير hover */
.pagination .page-link:hover {
    background-color: #0d6efd;
    color: white;
}

/* الصفحة اللي راه فيها المستخدم */
.pagination .active .page-link {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: white !important;
    font-weight: bold;
}


/* لوجو صغير */
.brand-icon {
  width:34px; height:34px;
  border-radius:6px;
  margin-right:10px;
  object-fit:cover;
}

/* ====== CARDS ====== */
.card-custom {
  border-radius: 12px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 6px 20px rgba(11,20,40,0.04);
  margin-bottom: 18px;
}

/* ====== FORMS ====== */
.checkout-title { font-size: 22px; margin-bottom: 10px; color:#0b2d59; }
.form-label { font-weight:600; color:#333; }

.btn-primary.custom {
  background: linear-gradient(180deg,#1890ff,#0b74de);
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight:600;
}
.btn-primary.custom:hover { filter:brightness(.95); transform:translateY(-1px); }

.form-control {
  border-radius: 8px;
  border:1px solid #e6e9ef;
  padding: 10px 12px;
  background:#fff;
}

/* ====== TABLE PRODUITS ====== */
.table-products {
  width:100%;
  border-collapse: collapse;
  margin-top:12px;
  font-size:14px;
}
.table-products th, .table-products td {
  padding:10px 12px;
  border-bottom: 1px solid #f0f2f7;
  text-align:left;
}
.table-products th {
  background:#fbfdff;
  color:#333;
  font-weight:700;
}

/* ====== FOOTER ====== */
.footer {
  margin-top: 36px;
  padding: 20px 0;
  background:#0b2d59;
  color:#fff;
  text-align:center;
  border-top-left-radius:10px;
  border-top-right-radius:10px;
}

/* badge */
.badge-pending {
  background:#fff3cd;
  color:#856404;
  padding:4px 8px;
  border-radius:6px;
  font-weight:600;
}

/* ====== PROMO CATEGORY CARD ====== */
.promo-category-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(220, 53, 69, 0.5);
  transition: all 0.4s ease;
  background: #dc3545 !important;
  border: 4px solid #ff4757;
  min-height: 300px;
}

.promo-category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 50%, #dc3545 100%);
  z-index: 1;
}

.promo-category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 50px rgba(220, 53, 69, 0.7);
  border-color: #ff6b7a;
}

.promo-content {
  position: relative;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
}

.promo-image {
  position: absolute;
  width: 200px;
  height: 200px;
  object-fit: contain;
  opacity: 0.25;
  filter: brightness(0.8);
  transition: transform 0.5s ease;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.promo-category-card:hover .promo-image {
  transform: translate(-50%, -50%) scale(1.05);
}

.promo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.3), rgba(200, 35, 51, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
}

.promo-placeholder i {
  font-size: 120px;
  color: rgba(255,255,255,0.4);
}

.promo-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.95);
  color: #dc3545;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 18px;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  animation: pulse 2s infinite;
}

.promo-badge i {
  margin-right: 5px;
  animation: fire 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes fire {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.2) rotate(-5deg); }
  75% { transform: scale(1.2) rotate(5deg); }
}

.promo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.95), rgba(200, 35, 51, 0.98));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 30px;
  z-index: 5;
}

.promo-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 10px;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
  letter-spacing: 2px;
  color: #ffffff;
  text-transform: uppercase;
}

.promo-subtitle {
  font-size: 20px;
  margin-bottom: 25px;
  opacity: 0.95;
  font-weight: 500;
}

.promo-btn {
  background: white;
  color: #dc3545;
  padding: 15px 35px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.promo-category-card:hover .promo-btn {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.promo-btn i {
  transition: transform 0.3s ease;
}

.promo-category-card:hover .promo-btn i {
  transform: translateX(5px);
}

/* ====== CATEGORY CARDS ====== */
.category-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(11,20,40,0.15) !important;
}

.category-card img {
  transition: transform 0.3s ease;
}

.category-card:hover img {
  transform: scale(1.05);
}

/* ====== CIRCULAR CATEGORY CARDS ====== */
.category-card-circular {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  transition: transform 0.3s ease;
}

.category-card-circular:hover {
  transform: translateY(-5px);
}

.category-image-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 3px solid #fff;
}

.category-card-circular:hover .category-image-circle {
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  transform: scale(1.05);
}

.category-circle-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-card-circular:hover .category-circle-img {
  transform: scale(1.1);
}

.category-circle-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d6efd 0%, #0a3d62 100%);
  color: white;
  font-size: 50px;
}

.category-name {
  color: #333;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  margin-top: 12px;
}

.category-card-circular:hover .category-name {
  color: #0d6efd;
}

/* ====== CATEGORIES HORIZONTAL MENU ====== */
.categories-horizontal-menu {
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 0;
  position: relative;
  z-index: 1000;
  margin-top: 0;
  margin-bottom: 0;
}

.categories-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  transition: transform 0.3s ease;
  will-change: transform;
}

.categories-scroll-wrapper {
  overflow: hidden;
  position: relative;
}

.category-menu-item {
  position: relative;
  margin: 0;
}

/* خط فاصل أزرق بين الفئات */
.category-separator {
  width: 2px;
  height: 30px;
  background: #0a3d62;
  margin: 0 5px;
  align-self: center;
  list-style: none;
  flex-shrink: 0;
}

.category-menu-link {
  display: block;
  padding: 14px 25px;
  color: #0a3d62;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: #ffffff;
  position: relative;
}

.category-menu-link:hover {
  color: #0a3d62;
  background: rgba(10, 61, 98, 0.05);
}

.category-menu-item.has-submenu .category-menu-link:hover {
  background: rgba(10, 61, 98, 0.05);
  color: #0a3d62;
}

.category-menu-link i {
  font-size: 0.7rem;
  margin-left: 6px;
  transition: transform 0.3s ease;
  vertical-align: middle;
}

.category-menu-item:hover .category-menu-link i {
  transform: rotate(180deg);
}

/* Sub-categories menu */
.subcategories-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 250px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-radius: 0 0 6px 6px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  display: none;
  z-index: 1001;
  border-top: 3px solid #0d6efd;
}

.category-menu-item:hover .subcategories-menu {
  display: block;
}

.subcategory-link {
  display: block;
  padding: 12px 25px;
  color: #555;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.subcategory-link:hover {
  background: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
  border-left-color: #0d6efd;
  padding-left: 30px;
}

/* RTL Support */
[dir="rtl"] .subcategories-menu {
  left: auto;
  right: 0;
}

[dir="rtl"] .subcategory-link {
  border-left: none;
  border-right: 3px solid transparent;
}

[dir="rtl"] .subcategory-link:hover {
  padding-left: 25px;
  padding-right: 30px;
  border-left: none;
  border-right-color: #ff6600;
}

[dir="rtl"] .category-menu-link i {
  margin-left: 0;
  margin-right: 6px;
}

[dir="rtl"] .category-menu-item {
  border-right: none;
  border-left: 1px solid #e0e0e0;
}

[dir="rtl"] .category-menu-item:last-child {
  border-left: none;
}

/* Responsive */
@media (max-width: 768px) {
  .categories-horizontal-menu {
    display: none;
  }
}

/* Responsive */
@media (max-width:768px){
  .container-max{ padding: 0 12px; margin:18px auto; }
  .navbar-custom .nav-link { display:none; }
  .card-custom { padding:14px; }
  
  .promo-content {
    height: 250px;
  }
  
  .promo-title {
    font-size: 32px;
  }
  
  .promo-subtitle {
    font-size: 16px;
  }
  
  .promo-btn {
    padding: 12px 25px;
    font-size: 16px;
  }
  
  .promo-badge {
    top: 10px;
    right: 10px;
    padding: 8px 15px;
    font-size: 14px;
  }
}

/* ====== SUB-CATEGORIES ====== */
.sub-category-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.sub-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
    border-color: #007bff;
}

.sub-category-card img {
    transition: transform 0.3s ease;
}

.sub-category-card:hover img {
    transform: scale(1.05);
}

[dir="rtl"] .sub-category-card {
    text-align: right;
}

/* ====== FILTERS SIDEBAR ====== */
.filter-section-header {
    border-bottom: 2px solid #0d3b66;
    padding-bottom: 10px;
}

.filter-section-header h5 {
    color: #0d3b66;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

.filter-section-header h5 i {
    color: #0d3b66;
    margin-right: 8px;
}

/* زر Réinitialiser أنيق أبيض */
.btn-reset-filter {
    background: #ffffff !important;
    border: 1px solid rgba(13, 59, 102, 0.2) !important;
    color: #0d3b66 !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}

.btn-reset-filter:hover {
    background: #f8f9fa !important;
    border-color: #0d3b66 !important;
    color: #0d3b66 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(13, 59, 102, 0.15) !important;
}

.filter-section {
    background: #ffffff; /* خلفية بيضاء واضحة */
    border: 1px solid rgba(13, 59, 102, 0.15); /* إطار أزرق خفيف نفس ألوان الموقع */
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.filter-title {
    cursor: pointer;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-title h6 {
    font-weight: 600;
    color: #0d3b66;
    margin: 0;
    font-size: 0.95rem;
}

.filter-title i {
    margin-right: 8px;
    font-size: 0.85rem;
    color: #0d3b66;
}

.filter-content {
    padding-top: 10px;
}

.filter-content .form-check {
    margin-bottom: 10px;
    padding-left: 25px;
}

.filter-content .form-check-label {
    cursor: pointer;
    font-size: 0.9rem;
    color: #0d3b66;
}

.filter-content .form-check-input {
    cursor: pointer;
    margin-top: 0.25rem;
}

.filter-content .form-select {
    font-size: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #0d3b66;
}

.filter-content .form-select:focus {
    border-color: #0d3b66;
    box-shadow: 0 0 0 0.2rem rgba(13, 59, 102, 0.25);
}

/* RTL Support for filters */
[dir="rtl"] .filter-title {
    text-align: right;
}

[dir="rtl"] .filter-content .form-check {
    padding-left: 0;
    padding-right: 25px;
}

[dir="rtl"] .filter-title i {
    margin-right: 0;
    margin-left: 8px;
}
