/* ===============================
   Reset & Base Styles
================================= */
* {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    vertical-align: baseline;
    font-weight: normal;
    color: #222;
    /*font-family: "Cairo", sans-serif;*/
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;/*omar.26.10.07*/
}

/* Text Elements */
h1 { font-size: 18px; }
h2 { font-size: 17px; }
h3 { font-size: 16px; }
h4 { font-size: 15px; }
h5 { font-size: 14px; }
h6 { font-size: 13px; }

p {
    font-weight: normal;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    color: #222;
    font-size: 13px;
}

/* Links */
a {
    text-decoration: none;
    color: #222;
    transition: all 0.4s ease;
}
a:hover { color: #199eb1; }
a:focus { outline: none; }

/* Images & Inputs */
img { border: none; transition: all 0.5s ease-out; }
input, textarea, select { outline: none; }

/* Body */
body {
    text-align: right;
    direction: rtl;
    font-size: 12px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-font-smoothing: antialiased;
    font-smoothing: antialiased;
}
/* ============ الخلفية العامة ============ */
body{
    background-image: url(../images/bg.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    min-height: 100vh;
    margin: 0;
    padding: 0;

    position: relative;   /* ← مهم لاحتواء الطبقة */
}

/* ============ الغشاء الخفيف ============ */
body::before{
    content: "";
    position: fixed;
    inset: 0;                       /* يغطي كامل الشاشة */

    background: rgba(255, 255, 255, 0.20);   /* ← الغشاء الأبيض الشفاف */

    z-index: -1;                    /* ← خلف كل المحتوى لكن فوق الخلفية */
    pointer-events: none;           /* ← لا يعترض النقرات */
}


/* Tabs */
.price-tabs ul {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.price-tabs li a {
  display: block;
  padding: 8px 16px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.price-tabs li a:hover {
  background: rgba(255,255,255,0.3);
}

.price-tabs li.active a {
  background: #fff;
  color: #2c3e50;
  font-weight: bold;
}



/* ===============================
   Tables
================================= */
table, th, td {
    border: 1px solid #F3F3F3;
    border-collapse: collapse;
    direction: rtl;
}
table { width: 100%; }
td {
    padding: 5px 10px;
    font-size: 12px;
    color: #6A6A6A;
    line-height: 20px;
}

/* ===============================
   Styled Select
================================= */
.styled-select {
    background: #e7e7e7;
    height: 29px;
    overflow: hidden;
    width: 122px;
    float: left;
}
.styled-select select {
    background: transparent;
    border: none;
    font-size: 13px;
    height: 40px;
    padding: 5px;
    width: 132px;
    direction: rtl;
    text-align: right;
    color: #666;

}
.styled-select.slate select {
    width: 162px;
}

/* ===============================
   Products
================================= */
/* ====== Responsive Products ====== */
.products {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    min-height: 150px;
    padding-bottom: 100px;
    justify-content: center;
}
.product {
    width: 150px;
    background: linear-gradient(145deg, #ffffff, #fdfdfd);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.4s ease;
    margin:3px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border:1px solid orange;
}

.product:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.15);
}

.product_face {
    padding: 14px 12px 12px 12px;
    position: relative;
    text-align: center;
}

.productImg {
    width: 100%;
    aspect-ratio: 1 / 1;   /* مربع */
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.productImg img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.productImg:hover img {
    transform: scale(1.08);
}

.product h2 {
    font-size: 14px;
    margin: 6px 0;
    color: #2E2E2E;
    font-weight: 600;
}

.product h3 {
    font-size: 12px;
    color: #777;
    margin-bottom: 5px;
}

.product .price {
    font-size: 18px;
    font-weight: 700;
    color: #27AE60;
}

.pcat{
font-size:1.0em;
}
/* ليبل المتبقي أعلى الصورة */
.product .remain1 {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #EB7D65; /* لون احمر */
    color: #000 !important;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 2;
}
.product .remain2 {
    position: absolute;
    top: 10px;
    left: 10px;
    background: orange; /* لون برتقالي */
    color: #000 !important;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 2;
}
.product .remain3 {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #27AE60; /* لون أخضر */
    color: #fff !important;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 2;
}


.product .option {
    display: flex;
    justify-content: center;
    align-items: center;
}

.product .option span.fa {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffc400, #ffbb00);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000 !important;
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.product .option span.fa:hover {
    background: linear-gradient(135deg, #eeb600, #f0b000);
    transform: scale(1.15) rotate(10deg);
    cursor: pointer;
}

.product .option span.fa-check-circle {
    background: linear-gradient(135deg, #27AE60, #1E8449) !important;
    transform: scale(1.1);
    color:#fff !important;
}

.product .option span.fa-check-circle:hover {
    transform: scale(1.1);
    cursor: default;
}




/* ===============================
   Search
================================= */
/* ============ شريط البحث ============ */
.search-container{
    display: flex;
    align-items: center;
    max-width: 680px;
    margin: 30px auto;
    padding: 6px 6px 6px 18px;
    background: #fff;
    border: 2px solid #e3ecf5;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(13, 71, 161, 0.08);
    transition: border-color .25s, box-shadow .25s, transform .2s;
    direction: rtl;
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    box-sizing: border-box;
}

.search-container:hover{
    border-color: #c5dcf5;
    box-shadow: 0 8px 24px rgba(13, 71, 161, 0.12);
}

.search-container:focus-within{
    border-color: #0d47a1;
    box-shadow: 0 10px 30px rgba(13, 71, 161, 0.22);
    transform: translateY(-1px);
}

/* أيقونة البحث الداخلية على اليمين */
.search-icon{
    color: #90a4c4;
    font-size: 17px;
    margin-left: 12px;
    margin-right: 6px;
    transition: color .2s;
}

.search-container:focus-within .search-icon{
    color: #0d47a1;
}

/* حقل الإدخال */
.search-container input{
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 13px 6px;
    font-size: 15px;
    color: #1a2b47;
    font-family: inherit;
    min-width: 0;
}

.search-container input::placeholder{
    color: #90a4c4;
    transition: color .2s;
}

.search-container input:focus::placeholder{
    color: #b8c8dd;
}

/* زر البحث */
.search-container button{
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left:-10px;
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.35);
    transition: transform .15s, box-shadow .2s, background .2s;
}

.search-container button:hover{
    transform: scale(1.06);
    box-shadow: 0 6px 16px rgba(13, 71, 161, 0.45);
    background: linear-gradient(135deg, #1976d2, #1565c0);
}

.search-container button:active{
    transform: scale(0.96);
}

.search-container button i{
    color: #fff;
}




/* ===============================
   Footer
================================= */
.site-footer {
  background-color: #1a1a1a;
  color: #fff;
  font-family: Arial, sans-serif;
  padding: 30px 20px 20px 20px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  text-align: right;
}

.footer-logo-desc {
  flex: 1 1 250px;
}

.footer-logo-link {
  display: inline-block;
  margin-bottom: 15px;
}

.footer-logo {
  width: 100px;
  padding: 11px;
  background: #fff;
  border-radius: 99px;
}

.footer-desc {
  color: #ccc;
  line-height: 1.6;
}

.footer-links {
  flex: 1 1 200px;
}

.footer-links h4 {
  margin-bottom: 15px;
  color: #fff;
  font-size: 16px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  line-height: 2;
}

.footer-links ul li a {
  color: #ccc;
  text-decoration: none;
}

.footer-social {
  flex: 1 1 200px;
}

.footer-social h4 {
  margin-bottom: 15px;
  color: #fff;
  font-size: 16px;
}

.social-icons {
  display: flex;
  gap: 10px;
  font-size: 18px;
}

.social-icons a i {
  color: #fff;
}

.footer-address {
  flex: 1 1 250px;
}

.footer-address h4 {
  margin-bottom: 11px;
  color: #fff;
  font-size: 16px;
}

.footer-address p {
  color: #ccc;
  line-height: 1.6;
}

.footer-copy {
  text-align: center;
  padding-top: 11px;
  border-top: 1px solid #333;
  color: #777;
  font-size: 13px;
  margin-top: 11px;
}








/*====note:هذا مهم جدا للمحافظة على الوان الخطوط عند ترجمة الجوجل لان الترجمة تعمل  احيانا على اضافة رمز فونت لضمان سلامة النصوص وباق التنسيق صحيح*/
font {
    color: inherit !important;
    background-color: transparent !important;
    box-shadow: none !important;
}
/*==========================*/













.quantity-box{
    display:inline-flex ;
    align-items:center ;
    border:1px solid #ddd ;
    border-radius:10px ;
    overflow:hidden ;
    background:#f9f9f9 ;
}

.qty-btn{
    width:38px ;
    height:38px ;
    border:none ;
    background:#ffffff ;
    font-size:20px ;
    font-weight:bold ;
    cursor:pointer ;
    transition:0.2s ;
    
}

.qty-btn:hover{
    background:#2c3e50 ;
    color:#fff ;
}

.qty-input{
    width:50px ;
    height:40px ;
    border:none ;
    text-align:center ;
    font-size:16px ;
    outline:none ;
    background:#f9f9f9 ;
}

/* إخفاء الأسهم الافتراضية للـ input */
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button{
    -webkit-appearance:none ;
    margin:0 ;
}





/* تصميم صفحات الترقيم - أنيق وفخم */
.pagination-container {
    direction: ltr;
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
}

.pagination {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    direction: ltr;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: linear-gradient(145deg, #ffffff, #fefcf9);
    border: 2px solid rgba(255, 140, 0, 0.2);
    border-radius: 12px;
    color: #1a1a1a;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    gap: 6px;
}

.pagination a:hover {
    background: linear-gradient(145deg, #ff6600, #ff4400);
    border-color: #ff6600;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 102, 0, 0.3);
}

.pagination a:active {
    transform: translateY(0);
}

/* الصفحة النشطة (الحالية) */
.pagination .active {
    background: linear-gradient(145deg, #ff6600, #ff4400);
    border-color: #ff6600;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
    cursor: default;
}

/* أيقونات الأسهم */
.pagination a i {
    font-size: 1rem;
    color: white;
    transition: transform 0.2s;
}

.pagination a:hover i {
    transform: scale(1.1);
}

/* تنسيق خاص للأزرار الجانبية */
.pagination .nav-btn {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border-color: rgba(255, 140, 0, 0.4);
    color: #ffaa44;
}

.pagination .nav-btn:hover {
    background: linear-gradient(145deg, #ff6600, #ff4400);
    color: white;
}

/* للأجهزة الصغيرة */
@media (max-width: 600px) {
    .pagination a, .pagination span {
        min-width: 35px;
        height: 35px;
        padding: 0 8px;
        font-size: 0.8rem;
        border-radius: 10px;
    }
    
    .pagination {
        gap: 5px;
    }
}



/* =================slider السلايدر ================= */
.dia-slider{
    position: relative;
    width: 100%;

    height: 420px;


    overflow: hidden;
    box-shadow: 0 15px 40px rgba(13, 71, 161, 0.15);
    direction: rtl;
    background: #eaf3ff;
    border-radius:0px;
    border-bottom: 5px solid;
    border-image: linear-gradient(90deg, #fff, #ffc999, #fff, #ffc999, #fff) 1;

}

/* ============slides الشرائح ============ */
.slides{
    position: relative;
    width: 100%;
    height: 100%;
}

.slide{
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity .8s ease, transform 1.2s ease;
    pointer-events: none;
}

.slide.active{
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.slide img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* طبقة داكنة فوق الصورة لتحسين قراءة النص */
.slide::after{
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to left,
        rgba(255, 255, 255, 0.75) 0%,
        rgba(230, 230, 235, 0.55) 45%,
        rgba(180, 185, 195, 0.25) 100%
    );
    z-index: 1;
}

/* ============ محتوى الشريحة ============ */
.slide-content{
    position: absolute;
    top: 50%;
    right: 60px;
    transform: translateY(-50%);
    max-width: 520px;
    z-index: 2;
    color: #fff;
    text-align: right;
}

.slide-content h2{
    font-size: 2.3rem;
    font-weight: 800;
    margin: 0 0 14px;
    line-height: 1.4;
    border-radius:9px;
    background:#fffa;
    padding:12px;
    /* حدود بيضاء 3px حول الحروف */
    -webkit-text-stroke: 3px #000;
    paint-order: stroke fill;   /* يجعل الحدود خلف الحروف وليس فوقها */
    color: #fff;             /* لون الحروف الداخلي (اختر ما يناسبك) */

    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .7s ease .25s, transform .7s ease .25s;
}

.slide-content p{
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0 0 22px;
    line-height: 1.7;
    color: #000;                     /* لون الحروف الداخلي */
    border-radius:9px;
    background:#fffa;
    padding:9px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .7s ease .4s, transform .7s ease .4s;

    /* ===== حدود بيضاء 3px حول الحروف ===== */
    -webkit-text-stroke: 3px #fff;
    paint-order: stroke fill;

    /* ===== إزاحة قليلة لليسار ===== */
    position: relative;
    right: 10px;
}

.slide-content .slide-btn{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    background: linear-gradient(135deg, #e88700, #ffb03a);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(232, 135, 0, 0.45);
    transition: transform .2s, box-shadow .2s;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .7s ease .55s, transform .7s ease .55s, box-shadow .2s;
}

.slide-content .slide-btn:hover{
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(232, 135, 0, 0.55);
}

/* ظهور المحتوى عند تفعيل الشريحة */
.slide.active .slide-content h2,
.slide.active .slide-content p,
.slide.active .slide-content .slide-btn{
    opacity: 1;
    transform: translateY(0);
}

/* ============ أزرار التنقل ============ */
.slider-arrow{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .25s, transform .2s;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.slider-arrow:hover{
    background: rgba(255, 255, 255, 0.45);
    transform: translateY(-50%) scale(1.08);
}

.slider-arrow:active{
    transform: translateY(-50%) scale(0.95);
}

.slider-arrow.prev{ right: 16px; }
.slider-arrow.next{ left: 16px; }

/* ============ النقاط ============ */
.slider-dots{
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.slider-dots span{
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width .3s ease, background .3s ease;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.slider-dots span.active{
    width: 26px;
    border-radius: 6px;
    background: #fff;
}

/* ===============================
   Mobile Design
================================= */
@media (max-width: 768px){

    .dia-slider{
        height: 300px;
        border-radius: 0;
        margin: 0px;
        box-shadow: 0 6px 18px rgba(13, 71, 161, 0.15);
    }

    .slide::after{
        background: linear-gradient(
            to top,
            rgba(13, 71, 161, 0.85) 0%,
            rgba(13, 71, 161, 0.45) 3%,
            rgba(13, 71, 161, 0.10) 10%
        );
    }

    .slide-content{
        right: 20px;
        left: 20px;
        top: auto;
        bottom: 45px;
        transform: none;
        max-width: none;
        text-align: center;
    }

    .slide-content h2{
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .slide-content p{
        font-size: 1.1rem;
        margin-bottom: 14px;
        line-height: 1.6;
    }

    .slide-content .slide-btn{
        padding: 10px 20px;
        font-size: 13px;
    }

    .slider-arrow{
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .slider-arrow.prev{ right: 8px; }
    .slider-arrow.next{ left: 8px; }

    .slider-dots{
        bottom: 14px;
    }

    .slider-dots span{
        width: 8px;
        height: 8px;
    }

    .slider-dots span.active{
        width: 20px;
    }
}

/* ===============================
   شاشات صغيرة جداً
================================= */
@media (max-width: 400px){
    .dia-slider{
        height: 260px;
    }
    .slide-content h2{
        font-size: 1.15rem;
    }
    .slide-content p{
        font-size: 0.78rem;
    }
}































/* ============================================================
   شبكة الفئات
============================================================ */
.categories{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;

    width: 90%;
    margin: 0 auto;
    padding: 20px 0 80px;

    direction: rtl;
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    box-sizing: border-box;
    align-items: start;
}

/* ============================================================
   البطاقة الأساسية
============================================================ */
.category{
    position: relative;
    height: auto;
    display: flex;
    flex-direction: column;
}

.category > a{
    text-decoration: none;
    display: block;
    width: 100%;
}

.category_face{
    position: relative;
    width: 100%;
    padding: 22px 16px 24px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);

    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 20px;

    box-sizing: border-box;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 6px 20px rgba(13, 71, 161, 0.10),
        0 1px 3px rgba(13, 71, 161, 0.05);

    transition:
        transform .3s cubic-bezier(0.34,1.56,0.64,1),
        box-shadow .3s ease,
        background .3s ease,
        border-radius .3s ease;
}
@media (min-width: 769px){
  .category_face{
    min-height:300px;
  }
}
/* سهم صغير في الزاوية */
.category_face::after{
    content: "›";
    position: absolute;
    bottom: 14px;
    left: 34px;
    transform: translateX(-50%) translateY(0);

    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(234, 243, 255, 0.9);
    color: #0d47a1;
    font-size: 18px;
    font-weight: 700;
    line-height: 29px;
    text-align: center;

    opacity: 0;
    transition: opacity .25s, transform .25s, background .25s, color .25s;
}

.category_face:hover::after{
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    color: #fff;
}

/* ============================================================
   صورة الفئة
============================================================ */
.categoryImg{
    width: 150px;
    height: 150px;
    margin: 0 auto 16px;
    border-radius: 22px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(234,243,255,0.7));
    border: 1px solid rgba(255, 255, 255, 0.9);

    box-shadow:
        inset 0 -3px 10px rgba(13, 71, 161, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 6px 16px rgba(13, 71, 161, 0.10);

    transition: transform .35s ease, box-shadow .35s ease;
}

.category:hover .categoryImg{
    transform: scale(1.06) rotate(-2deg);
}

.categoryImg img{
    max-width: 82%;
    max-height: 82%;
    object-fit: contain;
}

/* ============================================================
   عنوان ووصف الفئة
============================================================ */
.category-title{
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.4;
    transition: color .2s;
    color:#222C5C;
}

.category:hover .category-title{ color: #fff;-webkit-text-stroke: 3px #222C5C;
            paint-order: stroke fill; }

.category-desc{
    font-size: 0.82rem;
    color: #607593;
    font-weight: 500;
    line-height: 1.7;
    margin: 0;
    min-height: 2.6em;
    padding: 0 4px;
}

/* ============================================================
   ✅ شريط الفئات الفرعية - Popup منسدل من البطاقة
============================================================ */
.sub-categories-bar{
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;

    /* مخفي افتراضياً */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.98);
    transform-origin: top center;

    margin-top: 8px;
    padding: 0;

    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);

    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 18px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 16px 40px rgba(13, 71, 161, 0.18),
        0 6px 16px rgba(232, 135, 0, 0.10);

    z-index: 100;

    transition:
        opacity .3s ease,
        transform .35s cubic-bezier(0.34, 1.56, 0.64, 1),
        visibility .3s;
}

/* يظهر عند المرور */
.category:hover .sub-categories-bar{
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* سهم صغير أعلى القائمة يشير للبطاقة */
.sub-categories-bar::before{
    content: "";
    position: absolute;
    top: -8px;
    right: 30px;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    border-right: 1px solid rgba(255, 255, 255, 0.9);
    transform: rotate(-45deg);
    border-radius: 3px 0 0 0;
    box-shadow: -2px -2px 6px rgba(13, 71, 161, 0.04);
}

/* رأس الشريط */
.sub-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
    border-bottom: 1px dashed rgba(13, 71, 161, 0.15);
    margin-bottom: 6px;
}

.sub-title{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #0d47a1;
    letter-spacing: 0.2px;
}

.sub-title i{
    color: #e88700;
    font-size: 0.85rem;
}

.sub-count{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 50px;

    background: linear-gradient(135deg, #e88700, #ffb03a);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 2px 6px rgba(232, 135, 0, 0.35);
}

/* حاوية التمرير */
.sub-categories-scroll{
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 10px 12px;
    max-height: 240px;
    overflow-y: auto;

    scrollbar-width: thin;
    scrollbar-color: rgba(13, 71, 161, 0.25) transparent;
}

.sub-categories-scroll::-webkit-scrollbar{ width: 4px; }
.sub-categories-scroll::-webkit-scrollbar-track{ background: transparent; }
.sub-categories-scroll::-webkit-scrollbar-thumb{
    background: rgba(13, 71, 161, 0.25);
    border-radius: 99px;
}
.sub-categories-scroll::-webkit-scrollbar-thumb:hover{
    background: rgba(13, 71, 161, 0.45);
}

/* ============================================================
   زر الفئة الفرعية (Chip)
============================================================ */
.sub-chip{
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;

    padding: 8px 10px;
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.65);
    border: 1px solid transparent;

    text-decoration: none;
    color: #1a2b47;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;

    transition: all .25s ease;
}

.sub-chip:hover{
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.10), rgba(21, 101, 192, 0.05));
    border-color: rgba(13, 71, 161, 0.15);
    color: #0d47a1;
    transform: translateX(-4px);
}

.sub-chip:hover .sub-chip-img{
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    border-color: #0d47a1;
}

.sub-chip-img{
    width: 30px;
    height: 30px;
    border-radius: 8px;
    flex-shrink: 0;
    overflow: hidden;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: rgba(234, 243, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.9);

    transition: background .25s, border-color .25s;
}

.sub-chip-img img{
    max-width: 78%;
    max-height: 78%;
    object-fit: contain;
    transition: filter .25s;
}

.sub-chip:hover .sub-chip-img img{
    filter: brightness(0) invert(1);
}

.sub-chip-name{
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

/* سهم صغير على اليسار */
.sub-chip::after{
    content: "›";
    font-size: 1.1rem;
    color: #c5d3e6;
    font-weight: 700;
    transition: color .25s, transform .25s;
    flex-shrink: 0;
}

.sub-chip:hover::after{
    color: #0d47a1;
    transform: translateX(-3px);
}

/* ============================================================
   الموبايل - بطاقات أفقية + الشريط داخل البطاقة
============================================================ */
/* ============================================================
   الموبايل - بطاقات أفقية + شريط فرعي قابل للسحب داخل حدوده
============================================================ */
@media (max-width: 768px){

    /* ✅ منع الصفحة من التمرير الأفقي */
    html, body{
        overflow-x: hidden;
        max-width: 100vw;
    }

    .categories{
        grid-template-columns: 1fr;
        gap: 14px;
        width: 100%;
        max-width: 100vw;
        padding: 12px 10px 100px;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    /* ✅ البطاقة: عرض ثابت 100% ولا تخرج عن الشاشة */
    .category{
        position: relative;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;              /* ← يمنع أي عنصر من الخروج */
    }

    /* ===== البطاقة الأساسية أفقية ===== */
    .category_face{
        display: grid;
        grid-template-columns: 72px 1fr;
        grid-template-rows: auto auto;
        column-gap: 14px;
        row-gap: 2px;
        align-items: center;

        padding: 12px 14px;

        text-align: right;
        width: 100%;
        box-sizing: border-box;
        border-radius: 6px;
        border-bottom-left-radius:2px;
        border-bottom-right-radius:2px;
    }

    .categoryImg{
        grid-column: 1;
        grid-row: 1 / span 2;

        width: 72px;
        height: 72px;
        margin: 0;
        border-radius: 18px;
    }

    .category-title{
        grid-column: 2;
        grid-row: 1;
        align-self: end;
        font-size: 0.98rem;
        margin: 0 0 4px;
        text-align: right;
        
    }

    .category-desc{
        grid-column: 2;
        grid-row: 2;
        align-self: start;
        font-size: 0.78rem;
        min-height: auto;
        margin: 0;
        text-align: right;
    }

    /* سهم صغير على اليسار */
    .category_face::after{
        content: "›";
        position: absolute;
        top: 50%;
        left: 14px;
        transform: translateY(-50%);
        font-size: 22px;
        color: #c5d3e6;
        font-weight: 700;
        transition: color .3s, transform .3s;
        pointer-events: none;
    }

    /* ============================================================
       ✅ الشريط الفرعي - عرض ثابت داخل البطاقة، قابل للسحب داخلياً
    ============================================================ */
    .sub-categories-bar{
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        margin-top: -4px;

        /* ✅ عرض ثابت = عرض البطاقة بالضبط */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;

        opacity: 1;
        visibility: visible;
        transform: none;

        background: rgba(255, 255, 255, 0.75);
        backdrop-filter: blur(12px) saturate(180%);
        -webkit-backdrop-filter: blur(12px) saturate(180%);

        border: 1px solid rgba(255, 255, 255, 0.9);
        border-top: none;
        border-radius: 0 0 5px 5px;

        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.9),
            0 8px 20px rgba(13, 71, 161, 0.06);

        z-index: 1;

        /* ✅ يمنع أي عنصر داخلي من الخروج */
        overflow: hidden;
        position: relative;
    }

    /* إلغاء السهم الصغير أعلى القائمة */
    .sub-categories-bar::before{
        display: none;
    }

    /* الرأس */
    .sub-header{
        padding: 8px 14px 6px;
        margin-bottom: 4px;
    }

    .sub-title{ font-size: 0.72rem; }
    .sub-title i{ font-size: 0.75rem; }

    .sub-count{
        min-width: 20px;
        height: 20px;
        font-size: 0.65rem;
    }

    /* ============================================================
       ✅ حاوية السحب الأفقي - عرض ثابت + محتوى قابل للتمرير
    ============================================================ */
    .sub-categories-scroll{
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;

        /* ✅ مهم جداً: العرض لا يتجاوز الأب */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;

        padding: 4px 40px 10px 12px;

        /* ✅ التمرير الأفقي داخل الحاوية فقط */
        overflow-x: auto;
        overflow-y: hidden;

        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;

        /* ✅ منع وصول التمرير للصفحة */
        overscroll-behavior-x: contain;

        /* ✅ منع اختيار النص أثناء السحب */
        -webkit-user-select: none;
        user-select: none;

        /* ✅ إخفاء scrollbar */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .sub-categories-scroll::-webkit-scrollbar{
        display: none;
        width: 0;
        height: 0;
    }

    /* تدرّج أبيض على اليمين (يشير لوجود المزيد) */
    .sub-categories-bar::after{
        content: "";
        position: absolute;
        top: 34px; bottom: 0; right: 0;
        width: 40px;
        background: linear-gradient(
            to left,
            rgba(255, 255, 255, 0.95) 20%,
            rgba(255, 255, 255, 0) 100%
        );
        pointer-events: none;
        z-index: 2;
        border-radius: 0 0 16px 0;
    }

    /* الأزرار - لا تنضغط ولا تتقلص */
    .sub-chip{
        width: auto;
        flex: 0 0 auto;                 /* ← مهم: لا تتمدد ولا تنضغط */
        padding: 8px 12px 8px 8px;
        font-size: 0.75rem;
        min-height: 36px;
        border-radius: 50px;
        gap: 8px;

        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.95);

        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.95),
            0 2px 6px rgba(13, 71, 161, 0.08);

        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;

        white-space: nowrap;
    }

    .sub-chip:hover{
        transform: none;
    }

    .sub-chip-img{
        width: 22px;
        height: 22px;
        border-radius: 50%;
    }

    .sub-chip-name{
        text-align: right;
    }

    /* إخفاء السهم الصغير على الموبايل */
    .sub-chip::after{
        display: none;
    }

    /* تأثير الضغط */
    .sub-chip:active{
        transform: scale(0.96);
        background: linear-gradient(135deg, #0d47a1, #1565c0);
        color: #fff;
    }

    .sub-chip:active .sub-chip-img{
        background: rgba(255, 255, 255, 0.25);
        border-color: rgba(255, 255, 255, 0.4);
    }
}

/* ============================================================
   موبايل صغير جداً
============================================================ */
@media (max-width: 400px){

    .category_face{
        grid-template-columns: 64px 1fr;
        padding: 10px 12px;
        gap: 10px;

        border-bottom-left-radius:2px;
        border-bottom-right-radius:2px;
    }

    .categoryImg{
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }

    .category-title{ font-size: 0.9rem; }
    .category-desc{ font-size: 0.72rem; }

    .sub-categories-scroll{
        padding: 4px 34px 10px 10px;
        gap: 6px;
    }

    .sub-chip{
        padding: 7px 10px 7px 6px;
        font-size: 0.7rem;
        min-height: 32px;
        gap: 6px;
    }

    .sub-chip-img{
        width: 18px;
        height: 18px;
    }
}


