/* Add custom CSS styles below */ 
.banner-square {
    margin: 0 !important;
    padding: 0 !important;
}
/* =====================================================
   شريط التصنيفات تحت الهيدر - ثيم ملاك
   لا يحذف القائمة الجانبية
===================================================== */

/* السماح للهيدر باستيعاب شريط التصنيفات */
.store-header .main-nav-container {
    height: auto !important;
}

/* شريط التصنيفات */
#custom-category-nav {
    width: 100%;
    position: relative;
    z-index: 9998;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.06);
    border-bottom: 1px solid rgba(0,0,0,.10);
    direction: rtl;
}

/* الحاوية */
#custom-category-nav .custom-category-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* القائمة الرئيسية */
#custom-category-nav .custom-category-list {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* القسم الرئيسي */
#custom-category-nav .custom-category-item {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* الرابط الرئيسي */
#custom-category-nav .custom-category-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 52px;
    padding: 0 22px;

    color: #222;
    font-size: 15px;
    font-weight: 600;

    text-decoration: none;
    white-space: nowrap;

    transition: all .25s ease;
}

/* Hover */
#custom-category-nav .custom-category-link:hover {
    background: #f7f7f7;
}

/* السهم */
#custom-category-nav .custom-category-arrow {
    display: none;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    border: 0;
    background: transparent;

    color: #333;
    font-size: 15px;

    cursor: pointer;

    transition: transform .25s ease;
}

/* السهم عند الفتح */
#custom-category-nav .custom-category-item.is-open
.custom-category-arrow {
    transform: rotate(180deg);
}

/* =====================================================
   القائمة الفرعية
===================================================== */

#custom-category-nav .custom-submenu {
    position: absolute;

    top: 100%;
    right: 0;

    min-width: 220px;

    margin: 0;
    padding: 8px 0;

    background: #fff;

    border: 1px solid rgba(0,0,0,.08);

    box-shadow:
        0 10px 30px rgba(0,0,0,.12);

    list-style: none;

    opacity: 0;
    visibility: hidden;

    transform: translateY(8px);

    transition:
        opacity .2s ease,
        visibility .2s ease,
        transform .2s ease;

    z-index: 999999;
}

/* فتح القائمة بالماوس */
#custom-category-nav .custom-category-item:hover
.custom-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* فتحها بالجافا */
#custom-category-nav .custom-category-item.is-open
.custom-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* عناصر القائمة الفرعية */
#custom-category-nav .custom-submenu li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* روابط الأقسام الفرعية */
#custom-category-nav .custom-submenu a {
    display: block;

    width: 100%;
    padding: 12px 20px;

    color: #555;
    background: #fff;

    font-size: 14px;
    font-weight: 500;

    text-decoration: none;

    transition: all .2s ease;
}

/* Hover */
#custom-category-nav .custom-submenu a:hover {
    color: #000;
    background: #f6f6f6;
    padding-right: 25px;
}

/* عرض الكل */
#custom-category-nav .custom-submenu .display-all-category {
    font-weight: 700;
}

/* =====================================================
   الجوال
===================================================== */

@media (max-width: 767px) {

    #custom-category-nav {
        overflow: visible;
    }

    #custom-category-nav .custom-category-inner {
        overflow-x: auto;
        justify-content: flex-start;

        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    #custom-category-nav .custom-category-inner::-webkit-scrollbar {
        display: none;
    }

    #custom-category-nav .custom-category-list {
        width: max-content;
        min-width: 100%;
        justify-content: flex-start;
    }

    #custom-category-nav .custom-category-link {
        min-height: 48px;
        padding: 0 15px;
        font-size: 13px;
    }

    #custom-category-nav .custom-category-arrow {
        width: 22px;
        height: 22px;
        font-size: 13px;
    }

    #custom-category-nav .custom-submenu {
        min-width: 190px;
    }

    #custom-category-nav .custom-submenu a {
        padding: 11px 15px;
        font-size: 13px;
    }
}



/* ===== حاوية المقاسات ===== */
.s-product-options-grid-mode {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin-top: 8px !important;
}

/* ===== كل خيار ===== */
.s-product-options-grid-mode label {
  position: relative !important;
  margin: 0 !important;
  cursor: pointer !important;
}

/* إخفاء دائرة الراديو الأصلية */
.s-product-options-grid-mode label input[type="radio"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 100% !important;
  height: 100% !important;
  inset: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  z-index: 2 !important;
}

/* شكل مربع المقاس */
.s-product-options-grid-mode-span {
  min-width: 52px !important;
  height: 46px !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1.5px solid #e2e2e2 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #333 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: .3px !important;
  transition: all .25s ease !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.05) !important;
  user-select: none !important;
}

/* عند المرور بالماوس */
.s-product-options-grid-mode label:hover .s-product-options-grid-mode-span {
  border-color: #111 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 10px rgba(0,0,0,.08) !important;
}

/* المقاس المختار */
.s-product-options-grid-mode label input[type="radio"]:checked + .s-product-options-grid-mode-span {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(0,0,0,.18) !important;
  transform: translateY(-2px) !important;
}

/* علامة صح صغيرة على المقاس المختار */
.s-product-options-grid-mode label:has(input:checked)::after {
  content: "✓";
  position: absolute;
  top: -7px;
  left: -7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  z-index: 3;
}

/* تركيز الكيبورد (للوصولية) */
.s-product-options-grid-mode label input[type="radio"]:focus-visible + .s-product-options-grid-mode-span {
  outline: 2px solid #111 !important;
  outline-offset: 3px !important;
}

/* المقاس غير المتوفر */
.s-product-options-grid-mode label input[type="radio"]:disabled + .s-product-options-grid-mode-span {
  opacity: .45 !important;
  text-decoration: line-through !important;
  background: #f5f5f5 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* ===== عنوان الخيار (المقاس) ===== */
.s-product-options-option-label {
  font-weight: 700 !important;
  font-size: 15px !important;
  margin-bottom: 6px !important;
}

/* ===== الوضع الليلي ===== */
.dark .s-product-options-grid-mode-span {
  background: #1f1f1f !important;
  border-color: #3a3a3a !important;
  color: #eee !important;
}
.dark .s-product-options-grid-mode label:hover .s-product-options-grid-mode-span {
  border-color: #fff !important;
}
.dark .s-product-options-grid-mode label input[type="radio"]:checked + .s-product-options-grid-mode-span {
  background: #fff !important;
  border-color: #fff !important;
  color: #111 !important;
}
.dark .s-product-options-grid-mode label:has(input:checked)::after {
  border-color: #1f1f1f;
}

/* ===== الموبايل ===== */
@media (max-width: 480px) {
  .s-product-options-grid-mode { gap: 8px !important; }
  .s-product-options-grid-mode-span {
    min-width: 46px !important;
    height: 42px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
  }
}