/* igotflue. Mobil Sıralama · only catalog archives on mobile */
.igf-mobile-sort { display: none; }

@media (max-width: 900px) {
  /* Hide native Woo ordering only after custom UI has been built. */
  form.woocommerce-ordering.igf-sort-ready { display: none !important; }

  .igf-mobile-sort {
    --igf-sort-bg: #f5f5f5;
    --igf-sort-panel: #ffffff;
    --igf-sort-hover: #eeeeee;
    --igf-sort-selected: #ededed;
    --igf-sort-text: #151515;
    --igf-sort-muted: #606060;
    --igf-sort-line: #dadada;
    display: block !important;
    position: relative;
    z-index: 8;
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    margin: 14px 0 26px;
    font-family: inherit;
  }

  html[data-theme="dark"] .igf-mobile-sort {
    --igf-sort-bg: #1b1b1d;
    --igf-sort-panel: #1d1d1f;
    --igf-sort-hover: #28282b;
    --igf-sort-selected: #323236;
    --igf-sort-text: #f5f5f5;
    --igf-sort-muted: #b2b2b6;
    --igf-sort-line: #48484c;
  }

  .igf-mobile-sort *, .igf-mobile-sort *::before, .igf-mobile-sort *::after {
    box-sizing: border-box;
  }

  .igf-mobile-sort__trigger {
    all: unset;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 56px;
    gap: 12px;
    padding: 14px 17px;
    border: 1px solid var(--igf-sort-line);
    border-radius: 16px;
    background: var(--igf-sort-bg);
    color: var(--igf-sort-text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .igf-mobile-sort__trigger:focus-visible,
  .igf-mobile-sort__option:focus-visible {
    outline: 2px solid var(--igf-sort-text);
    outline-offset: 3px;
  }

  .igf-mobile-sort__trigger:hover { background: var(--igf-sort-hover); }
  .igf-mobile-sort__trigger[aria-expanded="true"] {
    border-color: var(--igf-sort-muted);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
  }
  .igf-mobile-sort__lead {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: var(--igf-sort-text);
  }
  .igf-mobile-sort__lead svg { width: 20px; height: 20px; }
  .igf-mobile-sort__divider {
    height: 24px;
    width: 1px;
    background: var(--igf-sort-line);
    flex: 0 0 auto;
  }
  .igf-mobile-sort__label {
    display: flex;
    flex: 1 1 auto;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
    color: var(--igf-sort-muted);
    text-align: left;
  }
  .igf-mobile-sort__value {
    color: var(--igf-sort-text);
    font-weight: 700;
  }
  .igf-mobile-sort__chevron { flex: 0 0 auto; margin-left: auto; display: inline-flex; }
  .igf-mobile-sort__chevron svg { width: 18px; height: 18px; transition: transform .16s ease; }
  .igf-mobile-sort__trigger[aria-expanded="true"] .igf-mobile-sort__chevron svg { transform: rotate(180deg); }

  .igf-mobile-sort__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
    padding: 7px;
    border: 1px solid var(--igf-sort-line);
    border-radius: 16px;
    background: var(--igf-sort-panel);
    color: var(--igf-sort-text);
    box-shadow: 0 12px 35px rgba(0,0,0,.20);
    max-height: min(60vh, 380px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .igf-mobile-sort__panel[hidden] { display: none !important; }
  .igf-mobile-sort__option {
    all: unset;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 47px;
    padding: 11px 13px;
    border-radius: 10px;
    color: var(--igf-sort-text);
    font: inherit;
    font-size: 13.5px;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .igf-mobile-sort__option:hover { background: var(--igf-sort-hover); }
  .igf-mobile-sort__option[aria-pressed="true"] {
    background: var(--igf-sort-selected);
    font-weight: 700;
  }
  .igf-mobile-sort__option-icon { flex: 0 0 21px; display: inline-flex; opacity: .85; }
  .igf-mobile-sort__option-icon svg { width: 19px; height: 19px; }
  .igf-mobile-sort__option-text { flex: 1 1 auto; min-width: 0; }
  .igf-mobile-sort__check { flex: 0 0 18px; margin-left: auto; display: inline-flex; }
  .igf-mobile-sort__check svg { width: 18px; height: 18px; }
  .igf-mobile-sort__option[aria-pressed="false"] .igf-mobile-sort__check { visibility: hidden; }

  /* Ensure button typography and outline aren't overridden by theme. */
  .igf-mobile-sort button { text-transform: none; letter-spacing: 0; }
}

@media (max-width: 360px) {
  .igf-mobile-sort__trigger { padding: 12px 13px; gap: 9px; font-size: 13px; }
  .igf-mobile-sort__option { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .igf-mobile-sort__chevron svg { transition: none; }
}
