/* Merchant Catalog Selectors - Figma Design (icon-font icons) */

.category-image {
  border-radius: 10px;
  margin-bottom: 20px;
  margin-top: 20px;
  position: relative;
}

  .category-image:before {
    content: '';
    display: block;
    padding-top: 27%;
  }

  .category-image img {
    position: absolute;
    left: 0;
    top: 0;
    object-fit: cover;
    width: 100%;
    max-height: 100%;
    border-radius: 15px;
  }

.merchant-master-wraper .product-selectors .merchant-filter-toggle {
  display: none;
}

.merchant-master-wraper .product-selectors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 0 0 20px;
  padding: 16px 0;
  border: 0;
}

  .merchant-master-wraper .product-selectors:after {
    content: none;
    display: none;
    clear: none;
  }

  .merchant-master-wraper .product-selectors > div {
    display: flex;
    align-items: center;
    margin: 0;
  }

  .merchant-master-wraper .product-selectors .product-sorting {
    order: -1;
  }

  .merchant-master-wraper .product-selectors span {
    font-size: 14px;
    color: var(--dark-grey);
    margin-right: 8px;
    vertical-align: middle;
  }

  .merchant-master-wraper .product-selectors .merchant-select-wrapper {
    position: relative;
    display: inline-block;
    isolation: isolate;
  }

    .merchant-master-wraper .product-selectors .merchant-select-wrapper::after {
      font-family: 'icon-font';
      speak: never;
      font-style: normal;
      font-weight: normal;
      font-variant: normal;
      text-transform: none;
      line-height: 1;
      font-size: 12px;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      content: "\e02e";
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      pointer-events: none;
      color: var(--black);
      z-index: 2;
    }

  .merchant-master-wraper .product-selectors select {
    min-height: 36px;
    padding: 6px 32px 6px 12px;
    font-size: 14px;
    color: var(--black);
    background-color: var(--white);
    border: none;
    border-radius: 8px;
    margin: 0;
    appearance: none;
    position: relative;
    z-index: 1;
  }

  .merchant-master-wraper .product-selectors .product-viewmode {
    display: flex;
    align-items: center;
    gap: 0;
    float: none;
    margin-left: 0;
  }

    .merchant-master-wraper .product-selectors .product-viewmode span {
      display: none;
    }

    .merchant-master-wraper .product-selectors .product-viewmode a {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      margin: 0;
      padding: 0;
      background: var(--grey);
      border: 1px solid var(--grey);
      border-radius: 8px;
      color: var(--black);
      transition: all 0.2s ease;
      font-size: 0;
    }

      .merchant-master-wraper .product-selectors .product-viewmode a.grid {
        border-radius: 8px;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
      }

      .merchant-master-wraper .product-selectors .product-viewmode a.list {
        border-radius: 8px;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
      }

        .merchant-master-wraper .product-selectors .product-viewmode a.grid::before,
        .merchant-master-wraper .product-selectors .product-viewmode a.list::before {
          font-family: 'icon-font';
          speak: never;
          font-style: normal;
          font-weight: normal;
          font-variant: normal;
          text-transform: none;
          line-height: 1;
          font-size: 16px;
          -webkit-font-smoothing: antialiased;
          -moz-osx-font-smoothing: grayscale;
        }

      /* Icon codes - override with your icon-font values */
      .merchant-master-wraper .product-selectors .product-viewmode a.grid::before {
        content: "\e094"; /* icon-font-grid - replace with your code */
      }

      .merchant-master-wraper .product-selectors .product-viewmode a.list::before {
        content: "\e0a8"; /* icon-font-list - replace with your code */
      }

      .merchant-master-wraper .product-selectors .product-viewmode a.selected {
        background: var(--white);
        border-color: var(--red);
        border-width: 1px;
        color: var(--black);
      }

      .merchant-master-wraper .product-selectors .product-viewmode a.grid.selected {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
      }

      .merchant-master-wraper .product-selectors .product-viewmode a.list.selected {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
      }

      .merchant-master-wraper .product-selectors .product-viewmode a.selected::before {
        color: var(--red);
      }

      .merchant-master-wraper .product-selectors .product-viewmode a:hover:not(.selected) {
        background: var(--grey);
        border-color: var(--dark-grey);
      }


/* Mobile: pill/chip layout with filter button */
@media all and (max-width: 768px) {
  .merchant-master-wraper .product-selectors {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
  }

    .merchant-master-wraper .product-selectors span {
      font-size: 0;
    }

    .merchant-master-wraper .product-selectors .merchant-filter-toggle {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      padding: 0;
      background: var(--white);
      border: 1px solid var(--grey);
      border-radius: 10px;
      color: var(--black);
      cursor: pointer;
      flex-shrink: 0;
      order: -1;
    }

      /* Filter icon - override content with your icon-font code */
      .merchant-master-wraper .product-selectors .merchant-filter-toggle::before {
        font-family: 'icon-font';
        speak: never;
        font-style: normal;
        font-weight: normal;
        font-variant: normal;
        text-transform: none;
        line-height: 1;
        font-size: 18px;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        content: "\e0f4"; /* icon-font-filter - replace with your code */
      }

      .merchant-master-wraper .product-selectors .merchant-filter-toggle:hover {
        background: var(--grey);
        border-color: var(--dark-grey);
      }

    .merchant-master-wraper .product-selectors .product-sorting,
    .merchant-master-wraper .product-selectors .product-page-size {
      padding: 4px 10px;
      background: var(--white);
      border: 1px solid var(--grey);
      border-radius: 10px;
      min-height: 40px;
    }

    .merchant-master-wraper .product-selectors .product-viewmode {
      display: none;
    }

    .merchant-master-wraper .product-selectors .merchant-select-wrapper::after {
      right: 0;
    }

    .merchant-master-wraper .product-selectors .product-sorting select,
    .merchant-master-wraper .product-selectors .product-page-size select {
      border: 0;
      background-color: transparent;
      padding: 0 20px 0 0;
      min-height: auto;
      font-size: 14px;
      min-width: 0;
    }
}

/* Mobile filter panel overlay */
@media all and (max-width: 1000px) {
  .merchant-master-wraper #merchant-catalog .side-2 {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 320px;
    z-index: 9999;
    background: var(--white);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

    .merchant-master-wraper #merchant-catalog .side-2.filter-panel-open {
      transform: translateX(0);
    }

  .merchant-master-wraper .merchant-filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

    .merchant-master-wraper .merchant-filter-overlay.active {
      display: block;
      opacity: 1;
    }

  [dir="rtl"] .merchant-master-wraper #merchant-catalog .side-2 {
    left: auto;
    right: 0;
    transform: translateX(100%);
  }

    [dir="rtl"] .merchant-master-wraper #merchant-catalog .side-2.filter-panel-open {
      transform: translateX(0);
    }
}
