.aa-products-slider {
      --aa-font:
        "Inter Tight",
        "Tajawal",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

      --aa-card-background: #fcfcfd;
      --aa-image-background: #ffffff;
      --aa-title: #1b1e36;
      --aa-muted: #9da0a9;
      --aa-brand: #6857f5;

      --aa-control-background: #f6f7fb;
      --aa-control-border: #edf0f6;

      /* المسافة بين البطاقات */
      --aa-gap: 18px;

      /* استدارة البطاقة والصورة */
      --aa-card-radius: 25px;
      --aa-image-radius: 18px;

      /* حشو الصورة داخل البطاقة */
      --aa-media-margin-top: 8px;
      --aa-media-margin-inline: 8px;
      --aa-image-inner-padding: 3px;

      /* حجم زر السلة */
      --aa-cart-size: 34px;
      --aa-cart-icon-size: 17px;

      width: 100%;
      max-width: 100%;
      margin: 0;
      padding: 0;
      overflow: hidden;

      font-family: var(--aa-font);
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }

    .aa-products-slider,
    .aa-products-slider *,
    .aa-products-slider *::before,
    .aa-products-slider *::after {
      box-sizing: border-box;
    }

    .aa-products-slider__sprite {
      position: absolute;
      width: 0;
      height: 0;
      overflow: hidden;
      pointer-events: none;
    }


    .aa-products-carousel,
    .aa-products-viewport {
      width: 100%;
    }

    .aa-products-viewport {
      position: relative;
      overflow: hidden;

      touch-action: pan-y;
      overscroll-behavior-inline: contain;

      cursor: grab;

      -webkit-user-select: none;
      user-select: none;

      -webkit-touch-callout: none;
    }

    .aa-products-viewport.is-dragging {
      cursor: grabbing;
    }

    .aa-products-track {
      display: flex;
      flex-direction: row;
      direction: rtl;
      align-items: stretch;
      gap: var(--aa-gap);

      width: 100%;

      transform: translate3d(0, 0, 0);
      transform-style: preserve-3d;
      backface-visibility: hidden;
      will-change: transform;

      -webkit-user-select: none;
      user-select: none;
    }

    /* الحاسب: 6 بطاقات كاملة — خمس مسافات × 18px */
    .aa-product-slide {
      flex: 0 0 calc((100% - 90px) / 6);
      min-width: 0;
      direction: rtl;
    }

    /* =====================================================
       البطاقة
       ===================================================== */
    .aa-product-card {
      display: flex;
      flex-direction: column;

      width: 100%;
      height: 100%;
      min-width: 0;

      overflow: hidden;

      border: 1px solid rgba(27, 30, 54, .035);
      border-radius: var(--aa-card-radius);

      background: var(--aa-card-background);

      box-shadow:
        0 1px 0 rgba(27, 30, 54, .018),
        0 10px 28px rgba(27, 30, 54, .035);

      opacity: 0;
      filter: blur(6px);

      transform:
        translate3d(0, 24px, 0)
        scale(.989);

      backface-visibility: hidden;
    }

    /*
     * دخول البطاقة أول مرة فقط.
     * التدرج بين البطاقات يُدار من JavaScript، لذلك لا يوجد
     * animation-delay إضافي يمكن أن يعيد التأثير.
     */
    .aa-product-card.is-in {
      animation:
        aa-product-card-enter
        720ms
        cubic-bezier(.16, 1, .3, 1)
        forwards;
    }

    /*
     * الحالة الثابتة بعد انتهاء أي تأثير.
     * نقل البطاقة داخل DOM لا يعيد تأثير الدخول تلقائيًا.
     */
    .aa-product-card.has-entered {
      opacity: 1;
      filter: blur(0);

      transform:
        translate3d(0, 0, 0)
        scale(1);
    }

    /*
     * بعد اكتمال أول ظهور للملصقات تصبح ثابتة.
     * لا تعيد الحركة عند نقل البطاقة داخل السلايدر.
     */
    .aa-product-card.has-entered .aa-product-badge {
      opacity: 1;
      transform: none;
      animation: none;
    }

    /* =====================================================
       الصورة

       يوجد حشو علوي وجانبي حول مربع الصورة.
       الصورة نفسها تحتوي على حشو داخلي خفيف حتى لا تلتصق.
       ===================================================== */
    .aa-product-media {
      position: relative;

      width:
        calc(
          100%
          -
          (var(--aa-media-margin-inline) * 2)
        );

      aspect-ratio: 1 / 1;

      flex: 0 0 auto;

      margin:
        var(--aa-media-margin-top)
        var(--aa-media-margin-inline)
        0;

      overflow: hidden;

      border-radius:
        var(--aa-image-radius)
        var(--aa-image-radius)
        0
        0;

      background: var(--aa-image-background);

      transform: translateZ(0);
    }

    .aa-product-media img {
      display: block;

      width: 100%;
      height: 100%;

      margin: 0;
      padding: var(--aa-image-inner-padding);

      object-fit: contain;
      object-position: center;

      transform: translateZ(0);

      backface-visibility: hidden;

      -webkit-user-drag: none;
      user-drag: none;

      -webkit-user-select: none;
      user-select: none;

      pointer-events: none;

      transition:
        transform
        560ms
        cubic-bezier(.16, 1, .3, 1);
    }


    /* =====================================================
       ملصقات المنتج أعلى يمين الصورة

       جميع الملصقات مثبتة على الحافة اليمنى نفسها،
       مهما اختلف طول النص أو عدد الملصقات.
       ===================================================== */
    .aa-product-badges {
      position: absolute !important;
      top: 7px !important;
      right: 7px !important;
      left: 7px !important;
      z-index: 3;

      display: flex !important;
      flex-direction: column !important;
      align-items: flex-end !important;
      justify-content: flex-start !important;
      gap: 4px;

      /*
       * الحاوية بعرض الصورة كاملًا.
       * لذلك كل ملصق يلتصق باليمين بصورة مستقلة،
       * ولا يتأثر بعرض ملصق الخصم الموجود فوقه.
       */
      width: auto !important;
      max-width: none !important;

      direction: rtl !important;
      text-align: right !important;
      pointer-events: none;
    }

    .aa-product-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;

      /*
       * تثبيت الحافة اليمنى لكل ملصق.
       * margin-left:auto يدفع الملصق دائمًا إلى اليمين.
       */
      align-self: flex-end !important;
      margin-right: 0 !important;
      margin-left: auto !important;

      width: max-content !important;
      max-width: 100%;
      min-height: 20px;

      padding: 0 7px;

      border: 1px solid transparent;
      border-radius: 999px;

      font-size: 9px;
      line-height: 1;
      font-weight: 700;
      white-space: nowrap;

      box-shadow: 0 3px 10px rgba(27, 30, 54, .045);

      opacity: 0;

      transform:
        translate3d(0, -4px, 0)
        scale(.96);

      animation:
        aa-product-badge-enter
        420ms
        cubic-bezier(.16, 1, .3, 1)
        forwards;
    }

    .aa-product-badge:nth-child(2) {
      animation-delay: 55ms;
    }

    .aa-product-badge:nth-child(3) {
      animation-delay: 110ms;
    }

    /* رفع النص بصريًا 1px في الحاسب */
    .aa-product-badge__text {
      display: block;
      transform: translateY(-1px);
    }

    /* الخصم باللون الأحمر */
    .aa-product-badge--discount {
      color: #ffffff;
      background: #e5484d;
      border-color: rgba(229, 72, 77, .18);
    }

    .aa-product-badge--new {
      color: #167c50;
      background: rgba(232, 250, 242, .96);
      border-color: rgba(22, 124, 80, .09);
    }

    .aa-product-badge--featured {
      color: #9a6500;
      background: rgba(255, 247, 222, .97);
      border-color: rgba(154, 101, 0, .09);
    }

    /*
     * إعادة حركة الملصقات عند دخول بطاقة جديدة
     * بعد التنقل داخل السلايدر.
     */



    /* =====================================================
       محتوى البطاقة

       التقسيم:
       1. التصنيف والتقييم
       2. العنوان
       3. فاصل
       4. السعر وزر السلة
       ===================================================== */
    .aa-product-body {
      display: flex;
      flex-direction: column;
      flex: 1 1 auto;

      width: 100%;
      min-width: 0;

      padding:
        12px
        14px
        0;
    }

    .aa-product-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      column-gap: 12px;

      direction: rtl;

      width: 100%;
      min-width: 0;
      min-height: 17px;

      margin: 0 0 7px;

      color: var(--aa-muted);

      font-size: 10.5px;
      line-height: 1.4;
      font-weight: 450;
    }

    .aa-product-category {
      display: block;
      flex: 1 1 auto;
      min-width: 0;
      max-width: calc(100% - 50px);

      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;

      direction: rtl;
      text-align: right;
    }

    .aa-product-rating {
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 3px;

      flex: 0 0 auto;

      direction: ltr;
      text-align: left;
      white-space: nowrap;
    }

    .aa-product-rating-value {
      direction: ltr;
      unicode-bidi: isolate;
    }

    .aa-product-star {
      color: #f5bf24;
      font-size: 12.5px;
      line-height: 1;
    }

    /*
     * العنوان يبتعد عن الفاصل ولا يلتصق به.
     * ارتفاع سطرين ثابت يحافظ على محاذاة جميع البطاقات.
     */
    .aa-product-title {
      display: -webkit-box;

      width: 100%;
      min-height: 39px;

      margin: 0 0 12px;
      overflow: hidden;

      color: var(--aa-title);

      font-size: 13.5px;
      line-height: 1.45;
      font-weight: 600;

      direction: rtl;
      unicode-bidi: plaintext;
      text-align: right;

      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }

    /* =====================================================
       صف السعر والسلة

       الفاصل مستقل عن العنوان.
       الحشو العلوي والسفلي متوازن.
       ===================================================== */
    .aa-product-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;

      direction: ltr;

      width: 100%;
      min-height: 52px;

      margin-top: auto;
      padding:
        9px
        0
        10px;

      border-top:
        1px
        solid
        rgba(27, 30, 54, .065);
    }

    .aa-product-price {
      display: inline-flex;
      align-items: baseline;
      justify-content: flex-start;
      gap: 3px;

      flex: 0 0 auto;

      margin: 0;
      padding: 0;

      color: var(--aa-brand);

      font-size: 14px;
      line-height: 1;
      font-weight: 700;

      direction: rtl;
      text-align: right;
      white-space: nowrap;

      /* إزاحة السعر 2px إلى اليسار */
      transform: translateX(-2px);
    }

    .aa-product-price__regular {
      display: inline-flex;
      align-items: baseline;
      gap: 2px;
      margin-inline-end: 2px;
      padding: 0;
      color: rgba(220, 38, 38, .84);
      font-size: 11px;
      line-height: 1;
      font-weight: 500;
      text-decoration-line: line-through;
      text-decoration-thickness: 1px;
      text-decoration-color: rgba(220, 38, 38, .72);
      white-space: nowrap;
    }

    .aa-product-price__regular-number {
      direction: ltr;
      unicode-bidi: isolate;
      font-weight: 500;
    }

    .aa-product-price__regular-currency {
      color: inherit;
      font-size: 8.5px;
      font-weight: 400;
    }

    .aa-product-price__number {
      direction: ltr;
      unicode-bidi: isolate;
      font-weight: 700;
    }

    .aa-product-price__currency {
      color: inherit;
      font-size: 11px;
      font-weight: 700;
    }

    .aa-product-cart {
      appearance: none !important;
      -webkit-appearance: none !important;

      position: relative;

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

      flex: 0 0 var(--aa-cart-size);

      width: var(--aa-cart-size) !important;
      min-width: var(--aa-cart-size) !important;
      max-width: var(--aa-cart-size) !important;

      height: var(--aa-cart-size) !important;
      min-height: var(--aa-cart-size) !important;
      max-height: var(--aa-cart-size) !important;

      margin: 0 !important;
      padding: 0 !important;

      border: 0 !important;
      border-radius: 50% !important;

      background: transparent !important;
      background-color: transparent !important;
      background-image: none !important;

      color: var(--aa-title);

      cursor: pointer;
      line-height: 0;

      /* إزاحة ثابتة: 4px لليسار و1px للأعلى */
      transform: translate(-4px, -1px);

      box-shadow: none !important;
      -webkit-tap-highlight-color: transparent;

      transition:
        color 200ms ease,
        background-color 200ms ease,
        transform 200ms cubic-bezier(.16, 1, .3, 1);
    }

    .aa-product-cart::before,
    .aa-product-cart::after {
      content: none !important;
      display: none !important;
    }

    .aa-product-cart__icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;

      width: var(--aa-cart-icon-size);
      height: var(--aa-cart-icon-size);

      opacity: 1;
      transform: scale(1);

      transition:
        opacity 150ms ease,
        transform 150ms ease;
    }

    .aa-product-cart__icon svg {
      display: block;
      width: 100%;
      height: 100%;

      fill: currentColor;
      pointer-events: none;
    }

    /*
     * اللودنق عنصر مستقل؛ لذلك دورانه لا يتعارض مع حركة الزر.
     */
    .aa-product-cart__loader {
      position: absolute;
      top: 50%;
      left: 50%;

      display: block;

      width: var(--aa-cart-icon-size);
      height: var(--aa-cart-icon-size);

      margin:
        calc(var(--aa-cart-icon-size) / -2)
        0
        0
        calc(var(--aa-cart-icon-size) / -2);

      border:
        2px
        solid
        rgba(104, 87, 245, .18);

      border-top-color: var(--aa-brand);
      border-radius: 50%;

      opacity: 0;
      visibility: hidden;

      pointer-events: none;
    }

    .aa-product-cart.is-loading {
      color: var(--aa-brand);
      cursor: wait;
      pointer-events: none;
    }

    .aa-product-cart.is-loading .aa-product-cart__icon {
      opacity: 0;
      transform: scale(.75);
    }

    .aa-product-cart.is-loading .aa-product-cart__loader {
      opacity: 1;
      visibility: visible;

      animation:
        aa-product-cart-spin
        680ms
        linear
        infinite;
    }

    .aa-product-cart:focus {
      outline: none;
    }

    .aa-product-cart:focus-visible {
      outline:
        2px
        solid
        rgba(104, 87, 245, .26);

      outline-offset: 2px;
    }

    /* =====================================================
       أسهم قسم الأعمال
       ===================================================== */
    .aa-products-controls {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 9px;

      direction: ltr;

      width: 100%;
      margin-top: 17px;
    }

    .aa-products-control {
      appearance: none !important;
      -webkit-appearance: none !important;

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

      flex: 0 0 38px !important;

      width: 38px !important;
      min-width: 38px !important;
      max-width: 38px !important;

      height: 38px !important;
      min-height: 38px !important;
      max-height: 38px !important;

      margin: 0 !important;
      padding: 0 !important;

      border:
        1px
        solid
        var(--aa-control-border) !important;

      border-radius: 50% !important;

      background: var(--aa-control-background) !important;
      background-color: var(--aa-control-background) !important;
      background-image: none !important;

      color: var(--aa-brand);

      font: inherit;
      line-height: 0;

      cursor: pointer;
      box-shadow: none !important;
      -webkit-tap-highlight-color: transparent;

      transition:
        color 200ms ease,
        background-color 200ms ease,
        border-color 200ms ease,
        transform 200ms cubic-bezier(.16, 1, .3, 1);
    }

    .aa-products-control::before,
    .aa-products-control::after {
      content: none !important;
      display: none !important;
    }

    .aa-products-control svg {
      display: block;

      width: 14px !important;
      height: 14px !important;

      fill: currentColor;
      pointer-events: none;

      transform-origin: center;
    }

    .aa-products-control--prev svg {
      transform:
        scaleX(-1)
        rotate(28deg);
    }

    .aa-products-control--next svg {
      transform: rotate(28deg);
    }

    .aa-products-control-line {
      width: 25px;
      height: 1px;

      border-radius: 99px;
      background: rgba(27, 30, 54, .12);
    }

    .aa-products-control:active {
      color: #fff;

      background: var(--aa-brand) !important;
      background-color: var(--aa-brand) !important;
      border-color: var(--aa-brand) !important;

      transform: scale(.96);
    }

    @media (hover: hover) {
      .aa-product-cart:hover {
        color: var(--aa-brand);
        background-color: rgba(104, 87, 245, .065) !important;
        transform: translate(-4px, -2px);
      }

      .aa-products-control:hover {
        color: #fff;

        background: var(--aa-brand) !important;
        background-color: var(--aa-brand) !important;
        border-color: var(--aa-brand) !important;

        transform: translateY(-1px);
      }
    }

    @keyframes aa-product-cart-spin {
      to {
        transform: rotate(360deg);
      }
    }

    @keyframes aa-product-badge-enter {
      0% {
        opacity: 0;

        transform:
          translate3d(0, -4px, 0)
          scale(.96);
      }

      100% {
        opacity: 1;

        transform:
          translate3d(0, 0, 0)
          scale(1);
      }
    }

    @keyframes aa-product-card-enter {
      0% {
        opacity: 0;
        filter: blur(6px);

        transform:
          translate3d(0, 24px, 0)
          scale(.989);
      }

      65% {
        opacity: 1;
        filter: blur(1px);

        transform:
          translate3d(0, -2px, 0)
          scale(1.002);
      }

      100% {
        opacity: 1;
        filter: blur(0);

        transform:
          translate3d(0, 0, 0)
          scale(1);
      }
    }

    /* التابلت: 4 بطاقات كاملة — ثلاث مسافات × 18px */
    @media (max-width: 1024px) {
      /*
       * في التابلت والجوال يبقى السعر بوزن 400.
       * السماكة 700 مخصصة للحاسب فقط.
       */
      .aa-product-price,
      .aa-product-price__number,
      .aa-product-price__currency {
        font-weight: 400;
      }

      .aa-product-slide {
        flex-basis:
          calc(
            (100% - 54px)
            /
            4
          );
      }

      .aa-products-slider {
        --aa-media-margin-top: 7px;
        --aa-media-margin-inline: 7px;
      }
    }

    /* الجوال: بطاقتان كاملتان — مسافة واحدة 18px */
    @media (max-width: 767px) {
      .aa-products-slider {
        --aa-gap: 10px;

        --aa-card-radius: 22px;
        --aa-image-radius: 15px;

        --aa-media-margin-top: 6px;
        --aa-media-margin-inline: 6px;
        --aa-image-inner-padding: 2px;

        --aa-cart-size: 30px;
        --aa-cart-icon-size: 15px;
      }

      .aa-product-slide {
        flex-basis:
          calc(
            (100% - 10px)
            /
            2
          );
      }

      .aa-product-card {
        box-shadow:
          0 1px 0 rgba(27, 30, 54, .015),
          0 7px 20px rgba(27, 30, 54, .025);
      }

      .aa-product-body {
        padding:
          10px
          11px
          0;
      }

      .aa-product-meta {
        gap: 6px;
        min-height: 16px;

        margin-bottom: 6px;

        font-size: 9.7px;
      }

      .aa-product-star {
        font-size: 11.5px;
      }

      .aa-product-badges {
        top: 5px;
        right: 5px;
        gap: 3px;
      }

      .aa-product-badge {
        min-height: 18px;
        padding: 0 6px;
        font-size: 8px;
      }

      /* خفض النص بصريًا 1px في الجوال */
      .aa-product-badge__text {
        transform: translateY(1px);
      }

      .aa-product-title {
        min-height: 36px;
        margin-bottom: 10px;

        font-size: 12.2px;
        line-height: 1.42;
      }

      /*
       * مساحة متوازنة في الجوال:
       * 7px أعلى و8px أسفل فقط.
       */
      .aa-product-footer {
        min-height: 44px;

        padding:
          7px
          0
          8px;
      }

      .aa-product-price {
        font-size: 13.5px;
      }

      .aa-product-price__currency {
        font-size: 10.5px;
      }

      .aa-products-controls {
        margin-top: 14px;
      }

      .aa-products-control {
        flex-basis: 35px !important;

        width: 35px !important;
        min-width: 35px !important;
        max-width: 35px !important;

        height: 35px !important;
        min-height: 35px !important;
        max-height: 35px !important;
      }

      .aa-products-control,
      .aa-products-control:hover,
      .aa-products-control:focus {
        color: var(--aa-brand) !important;

        background: var(--aa-control-background) !important;
        background-color: var(--aa-control-background) !important;
        border-color: var(--aa-control-border) !important;

        transform: none !important;
      }

      .aa-products-control:active {
        color: #fff !important;

        background: var(--aa-brand) !important;
        background-color: var(--aa-brand) !important;
        border-color: var(--aa-brand) !important;

        transform: scale(.96) !important;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .aa-product-card,
      .aa-product-card.is-in,
      .aa-product-card.has-entered {
        opacity: 1 !important;
        filter: none !important;
        transform: none !important;
        animation: none !important;
      }

      .aa-product-media img,
      .aa-product-cart,
      .aa-products-control {
        transition: none !important;
      }

      .aa-product-cart__loader {
        animation-duration: 1.2s !important;
      }
    }



/* =========================================================
   تحسينات الإضافة الديناميكية
   ========================================================= */
.aa-products-slider {
  --works-grid-size: 44px;
  --works-grid-line: rgba(104, 87, 245, .082);
  --works-grid-shift-x: 120px;
  --works-grid-shift-y: 0px;
}

/* المطلوب: إلغاء ظل بطاقات المنتجات فقط */
.aa-products-slider .aa-product-card {
  box-shadow: none !important;
}

.aa-products-slider .aa-product-media,
.aa-products-slider .aa-product-title a,
.aa-products-slider .aa-product-cart {
  text-decoration: none !important;
}

.aa-products-slider .aa-product-title a {
  display: block;
  color: inherit !important;
}

.aa-products-slider .aa-product-media {
  color: inherit;
}

.aa-products-slider .aa-product-media img {
  max-width: 100%;
}

.aa-products-slider .aa-product-badge--stock {
  color: #9a3412;
  background: rgba(255, 237, 213, .97);
  border-color: rgba(154, 52, 18, .09);
}

/* =========================================================
   مقدمة المنتجات — نفس تنسيق مقدمة الأعمال
   ========================================================= */
.aa-products-intro {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "description main";
  column-gap: 48px;
  align-items: end;
  direction: ltr;
}

.aa-products-intro::before {
  content: "";
  position: absolute;
  top: -22px;
  right: 0;
  bottom: -24px;
  left: 0;
  z-index: 0;
  pointer-events: none;
  border: 0;
  outline: 0;
  box-shadow: none;
  background-image:
    linear-gradient(
      to right,
      var(--works-grid-line) 0,
      var(--works-grid-line) 1px,
      transparent 1px,
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      var(--works-grid-line) 0,
      var(--works-grid-line) 1px,
      transparent 1px,
      transparent 100%
    );
  background-size:
    var(--works-grid-size) var(--works-grid-size),
    var(--works-grid-size) var(--works-grid-size);
  background-position:
    var(--works-grid-shift-x) var(--works-grid-shift-y),
    var(--works-grid-shift-x) var(--works-grid-shift-y);
  background-repeat: repeat;
  opacity: 0;
  -webkit-mask-image:
    radial-gradient(
      ellipse at center,
      #000 0%,
      #000 40%,
      rgba(0, 0, 0, .86) 56%,
      rgba(0, 0, 0, .46) 73%,
      rgba(0, 0, 0, .14) 88%,
      transparent 100%
    );
  mask-image:
    radial-gradient(
      ellipse at center,
      #000 0%,
      #000 40%,
      rgba(0, 0, 0, .86) 56%,
      rgba(0, 0, 0, .46) 73%,
      rgba(0, 0, 0, .14) 88%,
      transparent 100%
    );
  transform: translate3d(0, 8px, 0);
  transition:
    opacity 760ms ease 80ms,
    transform 820ms cubic-bezier(.16, 1, .3, 1) 80ms;
}

.aa-products-slider.is-visible .aa-products-intro::before {
  opacity: .80;
  transform: translate3d(0, 0, 0);
}

.aa-products-intro > * {
  position: relative;
  z-index: 1;
}

.aa-products-intro__main {
  grid-area: main;
  justify-self: end;
  width: 100%;
  min-width: 0;
  direction: rtl;
  text-align: right;
}

.aa-products-kicker,
.aa-products-main-title,
.aa-products-main-description {
  opacity: 0;
  filter: blur(8px);
  transform: translate3d(0, 22px, 0) scale(.987);
  backface-visibility: hidden;
  direction: rtl;
}

.aa-products-slider.is-visible .aa-products-kicker,
.aa-products-slider.is-visible .aa-products-main-title,
.aa-products-slider.is-visible .aa-products-main-description {
  animation:
    aa-products-intro-enter
    820ms
    cubic-bezier(.16, 1, .3, 1)
    forwards;
  animation-delay: calc(var(--aa-products-order, 0) * 120ms);
}

.aa-products-kicker {
  direction: ltr;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 30px;
  padding: 3px 14px 3px 6px;
  margin: 0 0 25px;
  border: 1px solid rgba(27, 30, 54, .10);
  border-radius: 99px;
  background: linear-gradient(180deg, #fcfcfd 0%, #f9fafb 100%);
  color: var(--aa-title);
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .75),
    0 1px 0 rgba(13, 16, 23, .025);
}

.aa-products-kicker__text {
  display: block;
  direction: rtl;
  color: var(--aa-title);
}

.aa-products-kicker__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--aa-title);
  color: #ffffff;
  line-height: 0;
}

.aa-products-kicker__icon svg {
  display: block;
  width: 13px;
  height: 13px;
  margin: 0;
  transform: scaleX(-1);
  transform-origin: center;
}

.aa-products-kicker__icon svg path {
  fill: currentColor;
}

.aa-products-main-title {
  width: 100%;
  margin: 0;
  color: var(--aa-title);
  font-size: 34px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.028em;
  text-align: right;
}

.aa-products-main-title__accent {
  color: var(--aa-brand);
}

.aa-products-main-description {
  grid-area: description;
  align-self: center;
  justify-self: start;
  width: 100%;
  max-width: 525px;
  margin: 0;
  padding: 0;
  color: #727274;
  font-size: 14.5px;
  line-height: 1.78;
  font-weight: 400;
  text-align: right;
}

@keyframes aa-products-intro-enter {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translate3d(0, 22px, 0) scale(.987);
  }
  62% {
    opacity: 1;
    filter: blur(1.5px);
    transform: translate3d(0, -2px, 0) scale(1.002);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* =========================================================
   طمس أفقي خفيف أثناء تحريك المنتجات فقط
   ========================================================= */
.aa-products-viewport {
  isolation: isolate;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.aa-products-viewport::before,
.aa-products-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 34px;
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: opacity;
  transition: opacity 170ms ease;
}

.aa-products-viewport::before {
  right: 0;
  background:
    linear-gradient(
      to left,
      rgba(252, 252, 253, .72) 0%,
      rgba(252, 252, 253, .36) 42%,
      rgba(252, 252, 253, 0) 100%
    );
}

.aa-products-viewport::after {
  left: 0;
  background:
    linear-gradient(
      to right,
      rgba(252, 252, 253, .72) 0%,
      rgba(252, 252, 253, .36) 42%,
      rgba(252, 252, 253, 0) 100%
    );
}

.aa-products-slider.is-sliding .aa-products-viewport::before,
.aa-products-slider.is-sliding .aa-products-viewport::after {
  opacity: .92;
}

.aa-products-track {
  position: relative;
  z-index: 1;
}

.aa-products-slider.is-static .aa-products-controls {
  display: none;
}

/* =========================================================
   تصنيفات صفحة المتجر
   ========================================================= */
.aa-shop-categories {
  width: 100%;
  margin: 0 0 12px;
}

.aa-shop-main-tabs {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  padding: 2px 1px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  direction: rtl;
  scroll-behavior: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  cursor: default;
}

.aa-shop-main-tabs::-webkit-scrollbar,
.aa-shop-subtabs::-webkit-scrollbar {
  display: none;
}

.aa-shop-main-tabs.is-dragging,
.aa-shop-subtabs.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.aa-shop-main-tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  flex: 0 0 252px;
  min-width: 252px;
  min-height: 78px;
  padding: 10px 11px;
  border: 1px solid rgba(27, 30, 54, .065);
  border-radius: 22px;
  background: var(--aa-card-background);
  color: var(--aa-title) !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transition:
    border-color 210ms ease,
    background 210ms ease,
    transform 210ms cubic-bezier(.16, 1, .3, 1);
}

.aa-shop-main-tab.is-active {
  border-color: rgba(104, 87, 245, .28);
  background: #f7f5ff;
}

.aa-shop-main-tab__image {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 17px;
  background: #fff;
}

.aa-shop-main-tab__image img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 2px;
  object-fit: contain;
  object-position: center;
}

.aa-shop-main-tab__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  text-align: right;
}

.aa-shop-main-tab__copy strong {
  display: block;
  overflow: hidden;
  color: var(--aa-title);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.aa-shop-main-tab__copy span {
  display: block;
  overflow: hidden;
  color: #81838c;
  font-size: 10.5px;
  line-height: 1.5;
  font-weight: 400;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.aa-shop-subtabs-shell {
  position: relative;
  width: 100%;
  margin-top: 10px;
  overflow: hidden;
}

.aa-shop-subtabs {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  padding: 2px 1px 7px;
  overflow-x: auto;
  overflow-y: hidden;
  direction: rtl;
  scroll-behavior: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  cursor: default;
}

.aa-shop-subtab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  min-width: max-content;
  min-height: 40px;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid var(--aa-control-border);
  border-radius: 999px;
  background: var(--aa-control-background);
  color: var(--aa-title) !important;
  text-decoration: none !important;
  box-shadow: none !important;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
  transition:
    color 210ms ease,
    background 210ms ease,
    border-color 210ms ease,
    transform 210ms cubic-bezier(.16, 1, .3, 1);
}

.aa-shop-subtab.is-active {
  color: #ffffff !important;
  background: var(--aa-brand);
  border-color: var(--aa-brand);
}

.aa-shop-subtab__image {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
}

.aa-shop-subtab__image img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 1px;
  object-fit: cover;
  object-position: center;
}

.aa-products-slider.is-filtering .aa-products-track {
  opacity: .16;
  transform: translate3d(0, 3px, 0);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.aa-products-slider.is-filtering .aa-shop-main-tabs,
.aa-products-slider.is-filtering .aa-shop-subtabs {
  pointer-events: none;
}

.aa-products-filter-status {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.aa-products-empty {
  flex: 0 0 100%;
  width: 100%;
  padding: 36px 20px;
  border-radius: 24px;
  background: var(--aa-card-background);
  color: #727274;
  text-align: center;
  font-size: 14px;
  line-height: 1.7;
}

.aa-product-cart.is-added {
  color: var(--aa-brand);
}

@media (hover: hover) {
  .aa-shop-main-tab:hover,
  .aa-shop-subtab:hover {
    border-color: rgba(104, 87, 245, .24);
    transform: translateY(-1px);
  }

  .aa-shop-subtab.is-active:hover {
    color: #fff !important;
    border-color: var(--aa-brand);
  }
}

@media (max-width: 1024px) {
  .aa-products-slider {
    --works-grid-size: 38px;
    --works-grid-line: rgba(104, 87, 245, .078);
    --works-grid-shift-x: 44px;
  }

  .aa-products-intro {
    display: block;
    width: 100%;
    max-width: 720px;
    margin: 0 auto 34px;
    direction: rtl;
    text-align: center;
  }

  .aa-products-intro::before {
    top: -18px;
    bottom: -20px;
  }

  .aa-products-intro__main,
  .aa-products-main-title {
    width: 100%;
    text-align: center;
  }

  .aa-products-kicker {
    margin-bottom: 25px;
  }

  .aa-products-main-title {
    margin: 0 0 12px;
    font-size: 30px;
  }

  .aa-products-main-description {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding-inline: 28px;
    text-align: center;
  }

  .aa-products-viewport::before,
  .aa-products-viewport::after {
    width: 28px;
    -webkit-backdrop-filter: blur(3.5px);
    backdrop-filter: blur(3.5px);
  }
}

@media (max-width: 767px) {
  .aa-products-slider {
    --works-grid-size: 30px;
    --works-grid-line: rgba(104, 87, 245, .055);
    --works-grid-shift-x: 18px;
  }

  .aa-products-intro {
    max-width: 720px;
    margin: 0 auto 24px;
    text-align: center;
  }

  .aa-products-intro::before {
    top: -15px;
    bottom: -17px;
  }

  .aa-products-kicker {
    margin-bottom: 25px;
    font-size: 12.5px;
  }

  .aa-products-kicker__text {
    position: relative;
    top: 2px;
  }

  .aa-products-main-title {
    margin-bottom: 10px;
    font-size: 24px;
    line-height: 1.28;
    letter-spacing: -.018em;
  }

  .aa-products-main-description {
    width: 96%;
    max-width: 96%;
    padding-inline: 10px;
    font-size: 13.5px;
    line-height: 1.72;
  }

  .aa-products-viewport::before,
  .aa-products-viewport::after {
    width: 22px;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }

  .aa-products-slider.is-sliding .aa-products-viewport::before,
  .aa-products-slider.is-sliding .aa-products-viewport::after {
    opacity: .84;
  }

  .aa-shop-categories {
    margin-bottom: 10px;
  }

  .aa-shop-main-tabs {
    gap: 9px;
    padding-bottom: 6px;
  }

  .aa-shop-main-tab {
    flex-basis: 220px;
    min-width: 220px;
    min-height: 70px;
    padding: 8px 9px;
    border-radius: 19px;
  }

  .aa-shop-main-tab__image {
    flex-basis: 50px;
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .aa-shop-main-tab__copy strong {
    font-size: 12.2px;
  }

  .aa-shop-main-tab__copy span {
    font-size: 9.8px;
  }

  .aa-shop-subtabs {
    gap: 7px;
    padding-bottom: 5px;
  }

  .aa-shop-subtab {
    min-height: 36px;
    padding: 4px 7px;
    font-size: 11.4px;
  }

  .aa-shop-subtab > span:last-child {
    position: relative;
    top: 2px;
  }

  .aa-shop-subtab__image {
    flex-basis: 26px;
    width: 26px;
    height: 26px;
  }
}

@media (max-width: 390px) {
  .aa-products-slider {
    --works-grid-size: 27px;
    --works-grid-line: rgba(104, 87, 245, .052);
    --works-grid-shift-x: 14px;
  }

  .aa-products-intro::before {
    top: -13px;
    bottom: -15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aa-products-intro::before {
    opacity: .72 !important;
    transform: none !important;
    transition: none !important;
  }

  .aa-products-kicker,
  .aa-products-main-title,
  .aa-products-main-description {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    animation: none !important;
  }

  .aa-products-viewport::before,
  .aa-products-viewport::after {
    opacity: 0 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    transition: none !important;
  }
}


/* =========================================================
   الإصدار 1.1 — تحسين المتجر والتبويبات والتحميل
   ========================================================= */

.aa-products-slider .added_to_cart,
.aa-products-slider .wc-forward,
.aa-products-slider a.added_to_cart {
  display: none !important;
  visibility: hidden !important;
}

.aa-products-carousel {
  position: relative;
}

.aa-products-loading {
  position: absolute;
  inset: 0;
  z-index: 25;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-height: 220px;

  background: rgba(255, 255, 255, .78);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 150ms ease,
    visibility 0s linear 150ms;
}

.aa-products-slider.is-filtering .aa-products-loading {
  opacity: 1;
  visibility: visible;

  transition:
    opacity 150ms ease,
    visibility 0s linear 0s;
}

.aa-products-loading__spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 16px;
}

.aa-products-loading__spinner i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aa-brand);
  opacity: .28;
  transform: translateY(0);
  animation: aa-products-loading-dot 720ms ease-in-out infinite;
}

.aa-products-loading__spinner i:nth-child(2) {
  animation-delay: 110ms;
}

.aa-products-loading__spinner i:nth-child(3) {
  animation-delay: 220ms;
}

.aa-products-loading__text {
  color: #727274;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 500;
}

@keyframes aa-products-loading-dot {
  0%,
  70%,
  100% {
    opacity: .25;
    transform: translateY(0);
  }

  35% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

/* صفحة المتجر شبكة ثابتة وليست سلايدر */
.aa-products-slider--shop {
  overflow: visible;
}

.aa-products-slider--shop .aa-products-carousel,
.aa-products-slider--shop .aa-products-viewport {
  overflow: visible;
}

.aa-products-slider--shop .aa-products-viewport {
  cursor: default;
  touch-action: auto;
  -webkit-user-select: auto;
  user-select: auto;
}

.aa-products-slider--shop .aa-products-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--aa-gap);
  width: 100%;
  transform: none !important;
  transform-style: flat;
  backface-visibility: visible;
  will-change: auto;
  -webkit-user-select: auto;
  user-select: auto;
}

.aa-products-slider--shop .aa-product-slide {
  width: auto;
  min-width: 0;
  flex: none;
}

.aa-products-slider--shop .aa-products-controls,
.aa-products-slider--shop .aa-products-viewport::before,
.aa-products-slider--shop .aa-products-viewport::after {
  display: none !important;
}

/* دخول أخف لبطاقات شبكة المتجر */
.aa-products-slider--shop .aa-product-card {
  filter: blur(3px);
  transform: translate3d(0, 14px, 0) scale(.994);
}

.aa-products-slider--shop .aa-product-card.is-in {
  animation: aa-product-shop-card-enter 500ms cubic-bezier(.16, 1, .3, 1) forwards;
}

.aa-products-slider--shop .aa-product-card.has-entered {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

@keyframes aa-product-shop-card-enter {
  0% {
    opacity: 0;
    filter: blur(3px);
    transform: translate3d(0, 14px, 0) scale(.994);
  }

  65% {
    opacity: 1;
    filter: blur(.5px);
    transform: translate3d(0, -1px, 0) scale(1.001);
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
}

/* الحاسب: سحب خفيف مستقل مع بقاء النقر طبيعيًا */
@media (min-width: 1025px) {
  .aa-shop-main-tabs,
  .aa-shop-subtabs {
    scroll-behavior: auto;
    cursor: default;
    -webkit-overflow-scrolling: auto;
  }

  .aa-shop-main-tabs.is-dragging,
  .aa-shop-subtabs.is-dragging {
    cursor: grabbing;
  }
}

/* التابلت والجوال: تمرير لمس أصلي سلس */
@media (max-width: 1024px) {
  .aa-shop-main-tabs,
  .aa-shop-subtabs {
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    cursor: default;
  }

  .aa-shop-main-tab,
  .aa-shop-subtab {
    scroll-snap-align: start;
  }

  .aa-products-slider--shop .aa-products-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .aa-products-loading {
    min-height: 180px;
  }

  .aa-products-slider--shop .aa-products-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .aa-shop-subtab {
    padding-right: 7px;
    padding-left: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aa-products-loading__spinner i {
    animation: none !important;
    opacity: .65;
  }

  .aa-products-slider--shop .aa-product-card,
  .aa-products-slider--shop .aa-product-card.is-in,
  .aa-products-slider--shop .aa-product-card.has-entered {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    animation: none !important;
  }
}


/* =========================================================
   الإصدار 1.2 — تجربة تطبيقية سريعة وسلسة
   ========================================================= */

/* إلغاء طمس جانبي السلايدر نهائيًا */
.aa-products-viewport::before,
.aa-products-viewport::after,
.aa-products-slider.is-sliding .aa-products-viewport::before,
.aa-products-slider.is-sliding .aa-products-viewport::after {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* خلفية تحميل بطمس حقيقي بدل الطبقة البيضاء */
.aa-products-loading {
  border-radius: 24px;
  background: rgba(246, 247, 251, .30);
  -webkit-backdrop-filter: blur(10px) saturate(112%);
  backdrop-filter: blur(10px) saturate(112%);
}

.aa-products-loading__spinner {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 999px;
  background: rgba(255, 255, 255, .52);
  box-shadow: none;
}

.aa-products-loading__text {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .50);
}

/* تقليل عمليات الرسم المستمرة في السلايدر */
.aa-product-slide {
  contain: layout style paint;
}

.aa-products-slider:not(.aa-products-slider--shop) .aa-products-track {
  will-change: transform;
}

/* بطاقة عرض المزيد بنفس هوية بطاقة المنتج */
.aa-product-more-card {
  height: 100%;
  border: 1px solid rgba(27, 30, 54, .035);
  background:
    linear-gradient(
      145deg,
      #fcfcfd 0%,
      #faf9ff 100%
    );
}

.aa-product-more-card__link {
  display: flex;
  flex-direction: column;

  width: 100%;
  height: 100%;
  min-height: 100%;

  color: var(--aa-title) !important;
  text-decoration: none !important;
}

.aa-product-more-card__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;

  width:
    calc(
      100%
      -
      (var(--aa-media-margin-inline) * 2)
    );

  aspect-ratio: 1 / 1;

  margin:
    var(--aa-media-margin-top)
    var(--aa-media-margin-inline)
    0;

  padding: 18px;

  border-radius:
    var(--aa-image-radius)
    var(--aa-image-radius)
    0
    0;

  background:
    radial-gradient(
      circle at 50% 38%,
      rgba(104, 87, 245, .10) 0%,
      rgba(104, 87, 245, .045) 45%,
      rgba(255, 255, 255, .80) 100%
    );

  text-align: center;
}

.aa-product-more-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 54px;
  height: 54px;

  border-radius: 50%;

  background: var(--aa-brand);
  color: #ffffff;

  transition:
    transform 260ms cubic-bezier(.16, 1, .3, 1),
    background-color 220ms ease;
}

.aa-product-more-card__icon svg {
  display: block;

  width: 19px;
  height: 19px;

  fill: currentColor;

  transform:
    scaleX(-1)
    rotate(28deg);
}

.aa-product-more-card__visual strong {
  display: block;

  max-width: 150px;

  color: var(--aa-title);

  font-size: 13.5px;
  line-height: 1.55;
  font-weight: 600;
}

.aa-product-more-card__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;

  min-height: 64px;

  padding: 12px;

  border-top: 1px solid rgba(27, 30, 54, .055);

  color: var(--aa-brand);

  font-size: 10.5px;
  line-height: 1.5;
  font-weight: 600;

  text-align: center;
}

@media (hover: hover) {
  .aa-product-more-card__link:hover .aa-product-more-card__icon {
    transform: translateY(-2px) scale(1.04);
    background-color: #5d4be8;
  }
}

/* الشبكة الطويلة ترسم البطاقات القريبة فقط */
.aa-products-slider--shop .aa-product-slide {
  content-visibility: auto;
  contain-intrinsic-size: 280px 380px;
}

/* انتقالات أسرع وأنظف على الجوال */
@media (max-width: 767px) {
  .aa-products-loading {
    border-radius: 20px;
    background: rgba(246, 247, 251, .24);
    -webkit-backdrop-filter: blur(6px) saturate(108%);
    backdrop-filter: blur(6px) saturate(108%);
  }

  .aa-product-more-card__visual {
    gap: 10px;
    padding: 12px;
  }

  .aa-product-more-card__icon {
    width: 46px;
    height: 46px;
  }

  .aa-product-more-card__icon svg {
    width: 16px;
    height: 16px;
  }

  .aa-product-more-card__visual strong {
    max-width: 125px;
    font-size: 12.2px;
  }

  .aa-product-more-card__footer {
    min-height: 52px;
    padding: 9px;
    font-size: 9.5px;
  }

  .aa-products-track {
    transform-style: flat;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aa-products-loading {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(246, 247, 251, .92);
  }
}


/* =========================================================
   الإصدار 1.3 — سلايدر محدود ولودر مرن وملصقات مستقلة
   ========================================================= */

/* بطاقة عرض المزيد: الأيقونة والعنوان في منتصف البطاقة بالكامل */
.aa-product-more-card__link {
  justify-content: center;
}

.aa-product-more-card__visual {
  flex: 1 1 auto;

  width: 100%;
  min-height: 100%;
  aspect-ratio: auto;

  margin: 0;
  padding: 22px;

  border-radius: inherit;

  background:
    radial-gradient(
      circle at 50% 45%,
      rgba(104, 87, 245, .105) 0%,
      rgba(104, 87, 245, .045) 46%,
      rgba(255, 255, 255, .82) 100%
    );
}

.aa-product-more-card__footer {
  display: none !important;
  border: 0 !important;
}

/* الأزرار تتوقف فعليًا عند أول وآخر السلايدر */
.aa-products-control:disabled,
.aa-products-control[aria-disabled="true"] {
  opacity: .34 !important;
  color: #9da0a9 !important;

  background: var(--aa-control-background) !important;
  border-color: var(--aa-control-border) !important;

  cursor: default !important;
  pointer-events: none !important;
  transform: none !important;
}

/* التبويبات تبقى قابلة للنقر أثناء طلب سابق */
.aa-products-slider.is-filtering .aa-shop-main-tabs,
.aa-products-slider.is-filtering .aa-shop-subtabs {
  pointer-events: auto !important;
}

/* طبقة الطمس تغطي كامل منطقة المنتجات */
.aa-products-loading {
  position: absolute;
  inset: 0;

  z-index: 1000;

  display: block;

  width: 100%;
  height: 100%;
  min-height: clamp(320px, 56svh, 620px);

  padding: 0;

  border-radius: 24px;

  background: rgba(244, 245, 248, .20);

  -webkit-backdrop-filter: blur(10px) saturate(112%);
  backdrop-filter: blur(10px) saturate(112%);

  overflow: visible;
}

/*
 * مؤشر التحميل ثابت في وسط الشاشة حتى لو كانت شبكة المنتجات طويلة،
 * بينما تبقى طبقة الطمس ممتدة فوق كامل الشبكة.
 */
.aa-products-loading__content {
  position: fixed;
  top: 50%;
  left: 50%;

  z-index: 1001;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;

  width: max-content;
  max-width: calc(100vw - 32px);

  transform: translate3d(-50%, -50%, 0);

  pointer-events: none;
}

.aa-products-loading__content.is-restarting {
  animation:
    aa-products-loader-restart
    260ms
    cubic-bezier(.16, 1, .3, 1)
    both;
}

@keyframes aa-products-loader-restart {
  0% {
    opacity: .35;
    transform: translate3d(-50%, -47%, 0) scale(.97);
  }

  100% {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(1);
  }
}

/*
 * شريط التنقل المرفق يستخدم z-index مرتفعًا جدًا؛
 * يبقى فوق اللودر والطمس بلا أي تعارض.
 */
.aa-mobile-nav {
  isolation: isolate;
}

/* الرمز المختصر: [aa_product_badges] */
.aa-single-product-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;

  width: 100%;

  direction: rtl;
}

.aa-single-product-badges .aa-product-badge {
  position: static;

  min-height: 23px;

  margin: 0 !important;
  padding: 0 9px;

  font-size: 9.8px;
  line-height: 1;
  font-weight: 700;

  opacity: 1;
  transform: none;
  animation: none;

  box-shadow: 0 3px 10px rgba(27, 30, 54, .04);
}

.aa-single-product-badges .aa-product-badge__text {
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  .aa-products-loading {
    min-height: clamp(300px, 58svh, 560px);

    border-radius: 20px;

    background: rgba(244, 245, 248, .16);

    -webkit-backdrop-filter: blur(7px) saturate(108%);
    backdrop-filter: blur(7px) saturate(108%);
  }

  /*
   * رفع المؤشر قليلًا عن شريط التنقل السفلي،
   * مع بقائه في منتصف المساحة المرئية.
   */
  .aa-products-loading__content {
    top: calc(50% - 34px);
  }

  .aa-products-loading__text {
    position: relative;
    top: 1px;
  }

  .aa-product-more-card__visual {
    min-height: 100%;
    padding: 16px;
  }

  .aa-single-product-badges {
    gap: 5px;
  }

  .aa-single-product-badges .aa-product-badge {
    min-height: 22px;
    padding: 0 8px;
    font-size: 9.4px;
  }

  .aa-single-product-badges .aa-product-badge__text {
    transform: translateY(1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aa-products-loading__content.is-restarting {
    animation: none !important;
  }
}


/* =========================================================
   الإصدار 1.4 — Scroll Snap أصلي ولودر داخل شبكة المنتجات
   ========================================================= */

/*
 * سلايدر الرئيسية وذات الصلة يعتمد تمرير المتصفح الأصلي.
 * لا توجد transforms يدوية أثناء السحب.
 */
.aa-products-slider:not(.aa-products-slider--shop) .aa-products-viewport {
  overflow-x: auto;
  overflow-y: hidden;

  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scroll-padding-inline: 0;

  overscroll-behavior-inline: contain;
  touch-action: pan-x pan-y;

  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;

  cursor: grab;
}

.aa-products-slider:not(.aa-products-slider--shop) .aa-products-viewport::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.aa-products-slider:not(.aa-products-slider--shop) .aa-products-viewport:active {
  cursor: grabbing;
}

.aa-products-slider:not(.aa-products-slider--shop) .aa-products-track {
  transform: none !important;
  will-change: auto;
}

.aa-products-slider:not(.aa-products-slider--shop) .aa-product-slide {
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

/* اللودر يوجد داخل صندوق المنتجات فقط */
.aa-products-viewport {
  position: relative;
}

.aa-products-loading {
  position: absolute;
  inset: 0;

  z-index: 30;

  width: 100%;
  height: 100%;
  min-height: 0;

  padding: 0;

  border-radius: 22px;

  background: rgba(244, 245, 248, .18);

  -webkit-backdrop-filter: blur(9px) saturate(110%);
  backdrop-filter: blur(9px) saturate(110%);

  overflow: clip;
}

/*
 * يبقى المؤشر داخل حدود شبكة المنتجات فقط.
 * sticky يجعله يرافق المستخدم أثناء النزول ثم يتوقف عند نهاية الشبكة.
 */
.aa-products-loading__content {
  position: sticky;
  top: 41svh;
  left: auto;

  z-index: 31;

  width: max-content;
  max-width: calc(100% - 28px);

  margin:
    clamp(105px, 25svh, 210px)
    auto
    0;

  transform: none;

  pointer-events: none;
}

.aa-products-loading__content.is-restarting {
  animation:
    aa-products-loader-restart-v14
    240ms
    cubic-bezier(.16, 1, .3, 1)
    both;
}

@keyframes aa-products-loader-restart-v14 {
  0% {
    opacity: .36;
    transform: translate3d(0, 5px, 0) scale(.97);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* عبارة عرض المزيد في سطرين ثابتين */
.aa-product-more-card__visual strong {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 100%;
  max-width: none;
}

.aa-product-more-card__visual strong > span {
  display: block;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .aa-products-slider:not(.aa-products-slider--shop) .aa-products-viewport {
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
  }

  .aa-products-loading {
    border-radius: 18px;

    background: rgba(244, 245, 248, .14);

    -webkit-backdrop-filter: blur(7px) saturate(106%);
    backdrop-filter: blur(7px) saturate(106%);
  }

  /*
   * أعلى من منتصف الشاشة قليلًا، وليس قريبًا من أعلى الصفحة.
   */
  .aa-products-loading__content {
    top: 35svh;

    margin-top:
      clamp(92px, 22svh, 165px);
  }

  .aa-products-loading__text {
    position: relative;
    top: 1px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aa-products-slider:not(.aa-products-slider--shop) .aa-products-viewport {
    scroll-behavior: auto !important;
  }

  .aa-products-loading__content.is-restarting {
    animation: none !important;
  }
}

/* =========================================================
   الإصدار 2.0.1 — Skeleton Loader مؤجل + دخول تبويبات خفيف
   ========================================================= */

/*
 * يظهر هذا اللودر في متجر التصنيفات فقط وبعد 180ms من بدء الطلب.
 * النتائج السريعة أو المخزنة مؤقتًا لا تعرض أي لودر أو وميض.
 */
.aa-products-slider--shop .aa-products-loading {
  position: absolute;
  inset: 0;
  z-index: 30;

  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;

  overflow: hidden;
  border-radius: 25px;
  background: #f2f5fa;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  -webkit-backdrop-filter: none;
  backdrop-filter: none;

  transition:
    opacity 120ms ease,
    visibility 0s linear 120ms;
}

.aa-products-slider--shop.is-filtering .aa-products-loading {
  opacity: 1;
  visibility: visible;

  transition:
    opacity 120ms ease,
    visibility 0s linear 0s;
}

/* إلغاء مؤشر النقاط القديم نهائيًا لصالح بطاقات الـSkeleton. */
.aa-products-slider--shop .aa-products-loading__content,
.aa-products-slider--shop .aa-products-loading__spinner,
.aa-products-slider--shop .aa-products-loading__text {
  display: none !important;
}

.aa-products-skeleton {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: start;
  align-content: start;
  gap: var(--aa-gap);

  width: 100%;
  min-height: 100%;
  padding: 0;
}

.aa-products-skeleton__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;

  border: 1px solid rgba(27, 30, 54, .035);
  border-radius: var(--aa-card-radius, 25px);
  background: var(--aa-card-background, #fbfbfc);
}

.aa-products-skeleton__media,
.aa-products-skeleton__meta,
.aa-products-skeleton__title,
.aa-products-skeleton__footer i,
.aa-products-skeleton__footer b {
  display: block;
  background: #eceff4;
  background-image: none !important;
  animation: none !important;
  -webkit-animation: none !important;
}

.aa-products-skeleton__media {
  width: calc(100% - (var(--aa-media-margin-inline, 8px) * 2));
  aspect-ratio: 1 / 1;
  margin: var(--aa-media-margin-top, 8px) var(--aa-media-margin-inline, 8px) 0;
  border-radius: var(--aa-image-radius, 20px) var(--aa-image-radius, 20px) 0 0;
}

.aa-products-skeleton__meta {
  width: 54%;
  height: 9px;
  margin: 13px 14px 0 auto;
  border-radius: 999px;
}

.aa-products-skeleton__title {
  width: calc(100% - 28px);
  height: 11px;
  margin: 10px 14px 0;
  border-radius: 999px;
}

.aa-products-skeleton__title--short {
  width: 66%;
  margin-top: 7px;
  margin-left: auto;
}

.aa-products-skeleton__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  min-height: 52px;
  margin: 13px 14px 0;
  padding: 10px 0;
  border-top: 1px solid rgba(27, 30, 54, .055);
}

.aa-products-skeleton__footer i {
  width: 46%;
  height: 11px;
  border-radius: 999px;
}

.aa-products-skeleton__footer b {
  width: var(--aa-cart-size, 36px);
  height: var(--aa-cart-size, 36px);
  flex: 0 0 var(--aa-cart-size, 36px);
  border-radius: 50%;
}


/* دخول منتجات التبويب الجديد: من الأسفل مع طمس خفيف جدًا. */
.aa-products-slider--shop .aa-product-card {
  opacity: 0;
  filter: blur(2.5px);
  transform: translate3d(0, 12px, 0) scale(.996);
}

.aa-products-slider--shop .aa-product-card.is-in {
  animation:
    aa-product-shop-card-enter-v201
    430ms
    cubic-bezier(.16, 1, .3, 1)
    forwards;
}

.aa-products-slider--shop .aa-product-card.has-entered {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
}

@keyframes aa-product-shop-card-enter-v201 {
  0% {
    opacity: 0;
    filter: blur(2.5px);
    transform: translate3d(0, 12px, 0) scale(.996);
  }

  68% {
    opacity: 1;
    filter: blur(.45px);
    transform: translate3d(0, -1px, 0) scale(1.001);
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@media (max-width: 1024px) {
  .aa-products-skeleton {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .aa-products-slider--shop .aa-products-loading {
    border-radius: 20px;
  }

  .aa-products-skeleton {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* ست بطاقات تكفي لملء ثلاث صفوف على الجوال دون رسم زائد. */
  .aa-products-skeleton__card:nth-child(n + 7) {
    display: none;
  }

  .aa-products-skeleton__meta {
    margin-top: 11px;
  }

  .aa-products-skeleton__title {
    margin-top: 8px;
  }

  .aa-products-skeleton__footer {
    min-height: 46px;
    margin-top: 10px;
  }

  .aa-products-slider--shop .aa-product-card {
    filter: blur(2px);
    transform: translate3d(0, 10px, 0) scale(.997);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aa-products-skeleton__media,
  .aa-products-skeleton__meta,
  .aa-products-skeleton__title,
  .aa-products-skeleton__footer i,
  .aa-products-skeleton__footer b {
    animation: none !important;
  }

  .aa-products-slider--shop .aa-product-card,
  .aa-products-slider--shop .aa-product-card.is-in,
  .aa-products-slider--shop .aa-product-card.has-entered {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    animation: none !important;
  }
}


/* =========================================================
   تعديلات 2.1.0: ثبات لون السلة + خمسة تصنيفات رئيسية + ظل الفرعيات
   ========================================================= */
.aa-products-slider .aa-product-cart {
  color: var(--aa-title, #1b1e36) !important;
}

.aa-products-slider .aa-product-cart__icon,
.aa-products-slider .aa-product-cart__icon svg,
.aa-products-slider .aa-product-cart__icon svg path {
  color: currentColor !important;
  fill: currentColor !important;
  stroke: none !important;
}

.aa-products-slider .aa-product-cart.is-loading,
.aa-products-slider .aa-product-cart.is-added {
  color: var(--aa-brand, #6857f5) !important;
}

@media (hover: hover) {
  .aa-products-slider .aa-product-cart:hover {
    color: var(--aa-brand, #6857f5) !important;
  }
}

/* الحاسب: خمسة أعمدة مرنة بلا تمرير أو قص. التابلت والجوال يبقيان كما هما. */
@media (min-width: 1025px) {
  .aa-shop-main-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;
    overflow: visible;
    padding-inline: 1px;
  }

  .aa-shop-main-tab {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: none;
  }
}

/* ظل النهاية اليسرى للتصنيفات الفرعية على جميع الشاشات. */
.aa-shop-subtabs-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  width: 34px;
  background: linear-gradient(
    90deg,
    #f2f5fa 0%,
    rgba(242, 245, 250, .88) 38%,
    rgba(242, 245, 250, 0) 100%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.aa-shop-subtabs-shell.has-more-left::after {
  opacity: 1;
}

.aa-shop-subtabs-next {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  left: 4px;
  top: 50%;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(27, 30, 54, .07);
  border-radius: 50%;
  background: #fff;
  color: var(--aa-title, #1b1e36);
  box-shadow: 0 7px 18px rgba(27, 30, 54, .10);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%) translateX(-3px);
  transition: opacity 170ms ease, visibility 170ms ease, transform 170ms ease;
}

.aa-shop-subtabs-next svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

@media (hover: hover) {
  .aa-shop-subtabs-shell.has-more-left:hover .aa-shop-subtabs-next,
  .aa-shop-subtabs-shell.has-more-left:focus-within .aa-shop-subtabs-next {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
  }

  .aa-shop-subtabs-next:hover {
    color: #fff;
    background: var(--aa-brand, #6857f5);
    border-color: var(--aa-brand, #6857f5);
  }
}

.aa-shop-subtabs-next:focus-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  outline: 2px solid rgba(104, 87, 245, .28);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .aa-shop-subtabs-shell::after,
  .aa-shop-subtabs-next {
    transition: none !important;
  }
}

/* أثناء الإضافة السريعة تختفي الأيقونة ويحل مؤشر التحميل مكانها بالحجم نفسه. */
.aa-products-slider .aa-product-cart.is-loading .aa-product-cart__icon {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: scale(.76) !important;
}

.aa-products-slider .aa-product-cart.is-loading .aa-product-cart__loader {
  opacity: 1 !important;
  visibility: visible !important;
  animation: aa-product-cart-spin 680ms linear infinite !important;
}

/* ضبط نهائي للتباعد بين التصنيفات الفرعية وشبكة المنتجات فقط. */
.aa-products-slider--shop .aa-shop-categories {
  margin-bottom: 0 !important;
}

.aa-products-slider--shop .aa-shop-subtabs {
  padding-bottom: 2px;
}

.aa-products-slider--shop .aa-products-carousel {
  position: relative;
  top: 0 !important;
  margin-top: 15px !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
}

.aa-products-slider--shop .aa-products-viewport {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* =========================================================
   RSKH 1.3.x — تحسينات تنسيق وتجربة تبويبات المتجر فقط
   ========================================================= */

/* 1) حد رصاصي شديد الخفة على صور التصنيفات الرئيسية والفرعية. */
.aa-shop-main-tab__image,
.aa-shop-subtab__image {
  box-sizing: border-box;
  border: 1px solid rgba(27, 30, 54, .055);
}

/* 2) تثبيت سهم نهاية التصنيفات الفرعية ومنع أنماط أزرار القالب من تشويهه. */
.aa-shop-subtabs-next {
  left: 2px !important;
  top: 50% !important;
  width: 31px !important;
  min-width: 31px !important;
  max-width: 31px !important;
  height: 31px !important;
  min-height: 31px !important;
  max-height: 31px !important;
  padding: 0 !important;
  border: 1px solid rgba(27, 30, 54, .07) !important;
  border-radius: 50% !important;
  background: #fff !important;
  color: var(--aa-title, #1b1e36) !important;
  box-shadow: 0 7px 18px rgba(27, 30, 54, .10) !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: 0 !important;
  overflow: hidden !important;
  transform: translateY(-50%) translateX(-2px);
}

.aa-shop-subtabs-next svg {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  fill: currentColor !important;
}

/* يظهر السهم فقط عند وجود عناصر مخفية في جهة اليسار، فوق نفس منطقة الظل. */
.aa-shop-subtabs-shell.has-more-left .aa-shop-subtabs-next {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

/* 4) تمرير لمس أصلي بلا snap حتى لا يقاوم حركة الإصبع أحيانًا. */
@media (max-width: 1024px) {
  .aa-shop-subtabs {
    scroll-behavior: auto;
    scroll-snap-type: none;
    touch-action: pan-x pan-y;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .aa-shop-subtab {
    scroll-snap-align: none;
  }

  /* 5) ظل خفيف ومتطابق للتبويبات الرئيسية والفرعية على التابلت والجوال. */
  .aa-shop-main-tab,
  .aa-shop-subtab {
    box-shadow: 0 3px 10px rgba(27, 30, 54, .04) !important;
  }
}

/* 6) تكبير بسيط وآمن للتبويبات الفرعية وصورها على الحاسب. */
@media (min-width: 1025px) {
  .aa-shop-subtab {
    min-height: 44px;
    padding: 6px 10px;
    gap: 8px;
    font-size: 12.4px;
  }

  .aa-shop-subtab__image {
    flex-basis: 31px;
    width: 31px;
    height: 31px;
  }
}

/* تكبير متوازن على التابلت والجوال بدون تغيير بنية الشريط أو عدد العناصر. */
@media (max-width: 1024px) {
  .aa-shop-subtab {
    min-height: 41px;
    padding: 5px 9px;
    gap: 7px;
    font-size: 11.8px;
  }

  .aa-shop-subtab__image {
    flex-basis: 29px;
    width: 29px;
    height: 29px;
  }
}

@media (max-width: 767px) {
  .aa-shop-subtab {
    min-height: 42px;
    padding-right: 9px;
    padding-left: 9px;
  }

  .aa-shop-subtab__image {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
  }
}


/* =========================================================
   RSKH 2.1.1 — تصحيح الظل الجانبي وموضع سهم الفرعيات فقط
   ========================================================= */

/* الظل المقصود هو ظل حافة الكاروسيل، وليس ظل بطاقات/أزرار التبويب. */
@media (max-width: 1024px) {
  .aa-shop-main-tab,
  .aa-shop-subtab {
    box-shadow: none !important;
  }

  .aa-shop-categories {
    position: relative;
  }

  /* ظل جانبي خفيف عند نهاية كاروسيل التصنيفات الرئيسية (اليسار في RTL). */
  .aa-shop-categories::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 0;
    z-index: 7;
    width: 27px;
    height: 76px;
    pointer-events: none;
    background: linear-gradient(
      90deg,
      #f2f5fa 0%,
      rgba(242, 245, 250, .88) 42%,
      rgba(242, 245, 250, 0) 100%
    );
    opacity: 0;
    transition: opacity 180ms ease;
  }

  .aa-shop-categories.has-main-more-left::before {
    opacity: 1;
  }
}

/* ظل نهاية كاروسيل التصنيفات الفرعية فقط عند وجود عناصر مخفية يسارًا. */
.aa-shop-subtabs-shell::after {
  width: 36px;
  z-index: 7;
  background: linear-gradient(
    90deg,
    #f2f5fa 0%,
    rgba(242, 245, 250, .88) 42%,
    rgba(242, 245, 250, 0) 100%
  );
}

/* تثبيت السهم داخل نفس سطر الفرعيات، في منتصف الحافة اليسرى تمامًا. */
.aa-shop-subtabs-shell {
  position: relative !important;
  overflow: hidden !important;
}

.aa-shop-subtabs-next {
  position: absolute !important;
  inset: auto !important;
  top: 50% !important;
  left: 3px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 10 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  float: none !important;

  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;

  margin: 0 !important;
  padding: 0 !important;
  transform: translate3d(0, -50%, 0) !important;
  vertical-align: middle !important;
  line-height: 1 !important;
}

.aa-shop-subtabs-shell.has-more-left .aa-shop-subtabs-next,
.aa-shop-subtabs-shell.has-more-left:hover .aa-shop-subtabs-next,
.aa-shop-subtabs-shell.has-more-left:focus-within .aa-shop-subtabs-next {
  top: 50% !important;
  left: 3px !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate3d(0, -50%, 0) !important;
}


/* =========================================================
   RSKH 2.1.2 — تصحيح نهائي للسهم ومسافة شبكة المنتجات فقط
   ========================================================= */

/* السهم: بدون أي ظل، وحد رصاصي شفاف ورقيق جدًا فقط. */
.aa-shop-subtabs-next,
.aa-shop-subtabs-shell.has-more-left .aa-shop-subtabs-next,
.aa-shop-subtabs-shell.has-more-left:hover .aa-shop-subtabs-next,
.aa-shop-subtabs-shell.has-more-left:focus-within .aa-shop-subtabs-next {
  box-shadow: none !important;
  border: 1px solid rgba(27, 30, 54, .055) !important;
}

/* شبكة المنتجات: إنزال خفيف وموحد على جميع الشاشات بدون top/transform. */
.aa-products-slider--shop .aa-products-carousel {
  top: 0 !important;
  margin-top: 15px !important;
  transform: none !important;
}

/* =========================================================
   RSKH 2.1.3 — ظهور سهم الفرعيات أثناء التفاعل فقط
   تعديل محصور بالسهم دون تغيير بقية التنسيقات أو المنطق.
   ========================================================= */

/* يبقى السهم مخفيًا حتى أثناء وجود عناصر مخفية؛ الظهور تديره حالة التفاعل فقط. */
.aa-shop-subtabs-shell .aa-shop-subtabs-next,
.aa-shop-subtabs-shell.has-more-left .aa-shop-subtabs-next,
.aa-shop-subtabs-shell.has-more-left:hover .aa-shop-subtabs-next,
.aa-shop-subtabs-shell.has-more-left:focus-within .aa-shop-subtabs-next {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* يظهر مؤقتًا فقط أثناء تمرير الفرعيات أو الضغط على أحد تبويباتها. */
.aa-shop-subtabs-shell.has-more-left.is-arrow-active .aa-shop-subtabs-next {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* الجوال فقط: تصغير بسيط لزر السهم كاملًا دون تغيير موضعه. */
@media (max-width: 767px) {
  .aa-shop-subtabs-next,
  .aa-shop-subtabs-shell.has-more-left .aa-shop-subtabs-next,
  .aa-shop-subtabs-shell.has-more-left.is-arrow-active .aa-shop-subtabs-next {
    width: 27px !important;
    min-width: 27px !important;
    max-width: 27px !important;
    height: 27px !important;
    min-height: 27px !important;
    max-height: 27px !important;
  }

  .aa-shop-subtabs-next svg {
    width: 14px !important;
    height: 14px !important;
  }
}


/* =========================================================
   RSKH 2.1.5 — إبقاء Loader الشبكة بدون لمعان
   يظهر الـSkeleton أثناء تبديل التبويب، لكن بدون Shimmer/Glow.
   ========================================================= */
.aa-products-slider--shop .aa-products-loading {
  display: block !important;
}

.aa-products-slider--shop.is-filtering .aa-products-loading {
  display: block !important;
}

.aa-products-slider--shop .aa-products-skeleton__media,
.aa-products-slider--shop .aa-products-skeleton__meta,
.aa-products-slider--shop .aa-products-skeleton__title,
.aa-products-slider--shop .aa-products-skeleton__footer i,
.aa-products-slider--shop .aa-products-skeleton__footer b {
  animation: none !important;
  -webkit-animation: none !important;
  background-image: none !important;
}
