    /* ===================================================================
       Recommendations — Grid or Swipe/carousel, merchant-controlled
       independently for desktop, tablet, and mobile via three classes
       carried on the same grid element: is-desktop-*, is-tablet-*,
       is-mobile-*. Scoped with a cx-rec prefix, same convention as
       recently-viewed's cx-rv classes.
       =================================================================== */

    /* Heading at the start, prev/next buttons at the end of the same row. */
    .cx-rec-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      margin: 0 0 1.25rem;
    }

    .cx-rec-heading {
      margin: 0;
      text-align: start;
      font-size: 1.5rem;
      font-weight: 800;
    }

    .cx-rec-nav { display: flex; gap: 0.5rem; flex-shrink: 0; }

    .cx-rec-nav__btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 2.5rem;
      height: 2.5rem;
      border: 1px solid var(--adi-gray-200, #e5e5e5);
      border-radius: 10px;
      background: #fff;
      color: #333;
      cursor: pointer;
      transition: border-color 0.15s ease, color 0.15s ease;
    }

    .cx-rec-nav__btn:hover { border-color: var(--pc-accent, #45bace); color: var(--pc-accent, #45bace); }

    /* ---- Swipe/carousel wrap + nav arrows ---- */
    .cx-rec-swipe-wrap {
      position: relative;
    }

    .cx-rec-arrow {
      display: none;
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      z-index: 2;
      width: 2.25rem;
      height: 2.25rem;
      border-radius: 2px;
      border: 1px solid rgba(0, 0, 0, 0.1);
      background: #fff;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: #333;
    }

    .cx-rec-arrow:hover {
      color: var(--pc-accent, #111);
      border-color: var(--pc-accent, #111);
    }

    .cx-rec-arrow--prev { left: -0.75rem; }
    .cx-rec-arrow--next { right: -0.75rem; }

    /* ---- Desktop (default / base) ---- */
    .cx-rec-grid.is-desktop-grid {
      display: grid;
      grid-template-columns: repeat(var(--rec-cols-desktop), minmax(0, 1fr));
      gap: var(--rec-gap);
    }

    .cx-rec-grid.is-desktop-swipe {
      display: flex;
      gap: var(--rec-gap);
      overflow-x: auto;
      scroll-behavior: smooth;
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
      padding-bottom: 0.65rem;
      margin: 0 -0.1rem;
      scrollbar-width: thin;
    }

    .cx-rec-grid.is-desktop-swipe::-webkit-scrollbar { height: 6px; }
    .cx-rec-grid.is-desktop-swipe::-webkit-scrollbar-thumb {
      background: rgba(0, 0, 0, 0.15);
      border-radius: 2px;
    }

    .cx-rec-grid.is-desktop-swipe .cx-rec-item {
      flex: 0 0 var(--rec-item-w-desktop);
      max-width: var(--rec-item-w-desktop);
      scroll-snap-align: start;
    }

    .cx-rec-grid.is-desktop-swipe ~ .cx-rec-arrow { display: flex; }

    /* ---- Tablet ---- */
    @media (max-width: 991px) {
      .cx-rec-grid.is-tablet-grid {
        display: grid;
        grid-template-columns: repeat(var(--rec-cols-tablet), minmax(0, 1fr));
        gap: var(--rec-gap);
      }

      .cx-rec-grid.is-tablet-swipe {
        display: flex;
        gap: var(--rec-gap);
        grid-template-columns: none;
        overflow-x: auto;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.65rem;
        margin: 0 -0.1rem;
        scrollbar-width: thin;
      }

      .cx-rec-grid.is-tablet-swipe::-webkit-scrollbar { height: 6px; }
      .cx-rec-grid.is-tablet-swipe::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.15);
        border-radius: 2px;
      }

      .cx-rec-grid.is-tablet-swipe .cx-rec-item {
        flex: 0 0 var(--rec-item-w-tablet);
        max-width: var(--rec-item-w-tablet);
        scroll-snap-align: start;
      }

      .cx-rec-grid.is-desktop-swipe ~ .cx-rec-arrow { display: none; }
      .cx-rec-grid.is-tablet-swipe ~ .cx-rec-arrow { display: flex; }
    }

    /* ---- Mobile ---- */
    @media (max-width: 640px) {
      .cx-rec-grid.is-mobile-grid {
        display: grid;
        grid-template-columns: repeat(var(--rec-cols-mobile), minmax(0, 1fr));
        gap: var(--rec-gap);
      }

      .cx-rec-grid.is-mobile-swipe {
        display: flex;
        gap: var(--rec-gap);
        grid-template-columns: none;
        overflow-x: auto;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.65rem;
        margin: 0 -0.1rem;
        scrollbar-width: thin;
      }

      .cx-rec-grid.is-mobile-swipe::-webkit-scrollbar { height: 6px; }
      .cx-rec-grid.is-mobile-swipe::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.15);
        border-radius: 2px;
      }

      .cx-rec-grid.is-mobile-swipe .cx-rec-item {
        flex-basis: var(--rec-item-w-mobile);
        max-width: var(--rec-item-w-mobile);
        scroll-snap-align: start;
      }

      /* Arrow buttons stay off on mobile — touch swipe is enough */
      .cx-rec-grid.is-tablet-swipe ~ .cx-rec-arrow,
      .cx-rec-grid.is-mobile-swipe ~ .cx-rec-arrow { display: none; }
    }

    /* List view: overrides grid/swipe at every breakpoint — a single
       stacked column of full-width rows. */
    .cx-rec-grid.cx-rec-grid--list {
      display: flex !important;
      flex-direction: column !important;
      gap: var(--rec-gap);
    }

    .cx-rec-grid.cx-rec-grid--list .cx-rec-item {
      flex: none !important;
      max-width: 100% !important;
      width: 100%;
    }
